Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Run ODBC Dialog, get DSN Back...
Message
De
08/04/1999 07:06:22
Bob Tracy
Independent Consultant
Driftwood, Texas, États-Unis
 
 
À
08/04/1999 05:08:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00206355
Message ID:
00206365
Vues:
21
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform