Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get target database of an ODBC
Message
 
 
À
28/11/2001 20:12:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00586814
Message ID:
00587294
Vues:
36
This message has been marked as the solution to the initial question of the thread.
>Hi Sergey,
>
>
>If I were to get the SourceDB alone, How will I do it? Is there a property wherein it will display the SourceDB alone?
>
>The code displays the full info of the odbc including the passwords, id's, sourcetype, etc.
>
>
Something like
lcDsn = "VFPDBC"
lnConn = SQLConnect( lcDsn )
lcConnStr = SQLGetProp( lnConn, "ConnectString")
= SQLDisconnect( lnConn )
* Now you can parse the connection string to get the DBC full name 
*     and any other ODBC configuration info you need

DIMENSION laLines[1]
= ALINES(laLines, STRTRAN(lcConnStr, ";", CHR(13)))
lnRow = ASCAN( laLines, "SourceDB=")
lcDbcFullName = ALLTRIM(STRTRAN( laLines[lnRow], "SourceDB=", ""))
?lcDbcFullName
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform