Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run ODBC Dialog, get DSN Back...
Message
From
08/04/1999 07:06:22
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
 
 
To
08/04/1999 05:08:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00206355
Message ID:
00206365
Views:
22
>HI!
>
>I want to create my own Connection String
>Dialog. I can't remember how to get the ODBC COntorl Panel
>Dialog to pop up and get the DSN value back from it.
>
>I know I sa it here somewhere????
>
>Even Better Would be the ability to create an entire ocnnection string....
>
>Can Anyone help me?
Tim,
I can't help you with the command to open the ODBC Dialog, but if you just want to create a DSN on the fly, try something like this:

LPARAMETER tcJobFile
DECLARE INTEGER SQLConfigDataSource IN odbccp32.DLL INTEGER, ;
INTEGER, STRING, STRING

settings="DSN=Job_Files"+CHR(0)+;
"Description=Paradox ODBC Driver"+CHR(0)+;
"DefaultDir=&tcJobFile"+CHR(0)+;
"FIL=Paradox 3.x"+CHR(0)+;
"CollatingSequence=ASCII"

tcNewDSN = SQLConfigDataSource(0,1,"Microsoft Paradox Driver (*.db )",settings)
CLEAR DLLS
RETURN tcNewDSN

This has been posted on UT in numerous forms over the past couple of years.
Bob Tracy

Never engage in a battle of wits if you're only half armed.
Previous
Reply
Map
View

Click here to load this message in the networking platform