Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting to SQL without using DSN
Message
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00501008
Message ID:
00501453
Views:
19
>>A while ago someone showed me this method of connect to a dBase database without having to use a DSN but instead to use the driver directly.
>>
>>nSQL = sqlstringconnect([DBQ=C:\GoldMine;DefaultDir=C:\GoldMine;Driver={Microsoft dBase Driver (*.dbf)};DriverId=533;MaxBufferSize=2048;PageTimeout=5;])
>>
>>On the SQL side I currently use:
>>
>>nSQL = sqlstringconnect([DSN=CCC_GoldMine;UID=sa;PWD=;AutoTranslate=No;UseProcForPrepare=0;QuotedId=No;AnsiNPW=No])
>>
>>and I was wondering if there is a way of specifying the SQL connection string with a driver instead of the DSN. If it is possible, could you take the string above and revise it correctly so that I can take a look at it.
>>
>>TIA
>>DJ :o)
>
>Absolutely. You may have to experiment a little, but all you do is use the EXACT descriptive name of the driver found under the Drivers tab of your Control Panel ODBC Administrator. These names can also be found in the Registry at HKEY_LOCAL_MACHINE\Software\ODBC\ODBCINST.INI
>
>lnHandle = sqlstringconnect('Driver=Microsoft dBase Driver (*.dbf);UID=sa;PWD=;AutoTranslate=No;UseProcForPrepare=0;QuotedId=No;AnsiNPW=No)
>
>To get an idea of the parameters you can pass, create a DSN using the driver you need, then look at the HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI node in the registry.

Or create File DSN than open it in any text editor.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform