Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor Field Names Created by SqlTables ()
Message
From
09/04/2002 11:18:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
09/04/2002 10:26:50
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00642663
Message ID:
00642707
Views:
13
>Hi,
>
>I have a program that connects to an ODBC Data Source, and performs some functions. Please, assume the following code fragment below:
>
> cSQLDataSource = "xyz"
> cSQLUserId     = "xyz"
> cSQLPassword   = "xyz"
>
> nPecasHandle = SqlConnect (cSQLDataSource, cSQLUserId, cSQLPassword)
>
> SqlTables (nPecasHandle, "Table", "TmpTables")
>
> Select TmpTables
> Browse
>
> SqlDisconnect (nPecasHandle)
>
>
>In all my DSNs till now (Informix, Oracle and VFP) when I call SqlTables () it creates a cursor with field names as defined in the help file:
>
>TABLE_QUALIFIER Table qualifier identifier
>TABLE_OWNER     Table owner identifier
>TABLE_NAME      The table name as it appears in the data dictionary
>TABLE_TYPE      The table type as it appears in the data dictionary
>REMARKS         A description of the table
>
>But now, when I accessed a SQL Server 2000 database, it returned:
>
>TABLE_CAT   Character 128
>TABLE_SCHEM Character 128
>TABLE_NAME  Character 128
>TABLE_TYPE  Character 32
>REMARKS     Character 254
>
>There is a reason (or explanation) for that? I'm running a VFP 6.0 SP5 app in a win2k professional.
>
>Thanks in advance.
>
>Fernando

Fernando,
As a workaround you could use sp_tables :

SQLEXEC(lnHandle,[Use pubs ; Exec sp_tables @table_type = "'TABLE'"],'pubs_tables')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform