Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLConfigDataSource
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00444226
Message ID:
00444521
Views:
8
Hi Ellen,

What I want to do is create a Data Source (a System DSN) in ODBC Manager.

This is done by using the SQLConfigDataSource function inside odbccp32.dll
This function has a parameters to indicate the ODBC Driver to use and another parameter with a String containing all the options that you want to set in the Data Source being created.
The syntax of this string is Driver dependent.

If I am creating a Data Source based on the VFP Driver, I can use a string like "SourceDB=c:\dbdir\mydb.dbc"

When I am creating a Data Source based on the SQL Server Driver, I want to set some options of the Driver. Each of them has a syntax and I don't know the syntax for some of them.

Anyway, thank you very much for your reply.




>Hi Francisco -
>
>I haven't actually done this myself, so I'm not sure if it's going to work or not, but I think you might be able to use SQLSETPROP() and/or SQLGETPROP().
>
>From the help file:
>Connections inherit properties in a similar fashion. Default properties for connection 0 are inherited when you create and store a named connection in a database. You can change these default property settings for connection 0 with the SQLSETPROP( ) function. After the connection has been created and is stored in a database, you can change connection properties with the DBSETPROP( ) function. When you use a connection, the property settings stored for the connection in the database are inherited by the active connection. You can change these properties on the active connection using the SQLSETPROP( ) function for the connection handle.
>
>Does this help?
>There is more in the help file under "ODBC data sources, using named views and connections"
>
>>I want to create an ODBC DSN programaticaly.
>>I can't find the proper keywords to use for these options:
>>
>>Disable the checkbox «Connect to SQL Server to obtain default settings ...»
>>«Perform Translation for character data»
>>
>>I am using the ODBC Driver version 3.70.08.21
>>
>>Any help would be apreciated.
>>
>>TIA
Previous
Reply
Map
View

Click here to load this message in the networking platform