Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get target database of an ODBC
Message
 
 
To
19/01/2003 21:57:43
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586814
Message ID:
00743353
Views:
42
Ric,

Here's the code that works for me. Substitute your path and try it.
lcConnStr = "DRIVER=Microsoft FoxPro VFP Driver (*.dbf); " + ;
			"UID=; " + ;
			"Deleted=Yes; Null=Yes; Collate=Machine; " + ;
			"BackgroundFetch=No ; " + ;
			"Exclusive=No; " + ;
			"SourceType=DBF; SourceDB=h:\Temp; "
lnConn = SqlStringConnect(lcConnStr)

? SqlTables(lnConn, "Table")
It's DSN-less connection which I prefer to use in my programs because it allows full program control over ODBC connection parameters.

>Sergey,
>
>Thanks, that was a type. That second parameter is 'TABLE' but I still get a -1 Return value. So, I must study a bit more on this issue because it is not working. The DSN connection works, as I can get all of the DSN properties. But, I am still not able to retrieve a list of all the tables in the DSN dirctory; nor am I able to run a select statemnt. If you have any more suggestions they would be well taken. But, thank you so much for your time in any event.
>
<snip>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform