From freetds Thu Feb 07 00:36:32 2002 From: Nick Gorham Date: Thu, 07 Feb 2002 00:36:32 +0000 To: freetds Subject: [freetds] Re: More ODBC driver documentation desired X-MARC-Message: https://marc.info/?l=freetds&m=101304198023026 Brian Bruns wrote: > Ok bad news from the front. The LDAP stuff does the following ugly hack > > SQLGetInfo(dbh,SQL_DRIVER_NAME,drv_name,30,&len); > if (!strncmp(ldap_pvt_str2upper(drv_name),"SQLSRV32.DLL",30)) > { > ... > > So it is specifically looking for the microsoft driver and then turns > cursors on as Nick alluded to. Problem is I don't know how to do > cursors in TDS 4.2/7.0 without doing quite a bit of work. Not sure you can, I say the MS SQL Server driver do it when we were thinking of a TDS type solution (too many variables, and changeable by MS IMHO to make a commercial solution, fine for open source though). It does some strange things, for a start it uses stored procs to prepare and execute SQL and fetch results, and you don't want to know (well maybe you do) what it does to describe parameters, its very easy to break, and explains why you can get a syntax error from calling SQLNumParams :-( basicaly what it ends up doing is caling a sp_fetch procedure that returns one (or a number) of row(s) of the result set, and after thats read the socket is free for other stuff, unlike the normal execute, and the data just keeps comming. Nick --- You are currently subscribed to freetds as: [freetds@progressive-comp.com] To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu