PDA

View Full Version : ODBC.ConfigDataSource


OneSharpeGuy
10-05-2004, 09:53 AM
Can anyone give a practical example of how to use this function. Maybe it's just me, but the help example doesn't help unless you already know what the parameters mean.

JXBURNS
10-05-2004, 10:53 AM
I think if you do not understand the parameters (I assume you mean the "DSN=" stuff) then you probably need to look at some ODBC help files as these are standard Windows ODBC connection strings.

I would start off by looking at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/off2000/html/acconAboutODBCDataSources.asp

And a very good source of actual examples is:

http://www.able-consulting.com/ADO_Conn.htm

All you are doing in SUF7 is passing across whatever the connection string has to be. If you have developed an application that uses a DSN or DSN-less connection then you can normally determine what the connection string is by examining a particularly property. For example an ADO connection string in VB6 can be determined by checking what ADOConnection.ConnectionString returns. From that you adapt to meet SUF7's requirement (adding "\\0" before each part).

John

OneSharpeGuy
10-06-2004, 02:31 PM
Does this function alwas create a User DSN or is there some way to create a System DSN

OneSharpeGuy
10-06-2004, 02:34 PM
Never mind. I see the option.