Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get target database of an ODBC
Message
 
À
19/01/2003 21:57:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00586814
Message ID:
00744065
Vues:
46
I seem to remember something about two types of ODBC drivers, one to access free tables, one to access DBCs. Can it be that the DBC driver is installed on your DSN?

Dana

>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.
>
>Ric
>
>>
>>You can use AERROR() function to get ODBC errors. In this case you passed wrong second parameter to SQLTABLES(). It can be 'TABLE', 'VIEW', or 'SYSTEM TABLE' only.
>>
>>>Sergey,
>>>
>>>Right, I think I am getting there and thanks again. So, here is what I am thinking:
>>>
>>>I have a system DSN, "MY TEST DSN". It is setup as follows:
>>> Data Source Name: My Test Dsn
>>> Driver: Microsoft Foxpro VFP Driver (*.dbf)
>>> Database Type: Free Table Directory
>>> Path: C:\My Test Data
>>>
>>>So, my DSN can only return .DBF stuff... got that, but this is not working:
>>>
>>>
lcDsn = ALLTRIM("MY TEST DSN")
>>>lnConn = SQLConnect( lcDsn )
>>>lcConnStr = SQLGetProp( lnConn, "ConnectString")
>>>*-- But, here is a problem.  lnTableCount Returns -1
>>>lnTableCount = SQLTABLES(lnConn, 'DBF', "_tablelist")
>>>*-- And here lnData Returns -1
>>>lnData = SQLEXEC(lnConn, "SELECT * FROM TEST1", "_TESTDBF1")
>>>
>>>Am I really clueless here :) ???
>>>
Where's the damned Any Key?...too late
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform