Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get target database of an ODBC
Message
 
 
To
28/11/2001 20:12:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586814
Message ID:
00587294
Views:
35
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform