Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get table structure like aFields in VFP?
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01025460
Message ID:
01025478
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Keep in mind my questions are probably very stupid or naive (or both <g>), but I am very ignorant on the subject of SQL Server.
>
>1. If I were to use SqlColumns() (which I just looked up in help, never used it before), I would need to make connection to the SQL Server first, right? This is how I make connection:
>
>
>PUBLIC hCon
>hCon = SQLSTRINGCONNECT([DRIVER=SQL Server;SERVER=
>(local);DATABASE=MyDatabase;Trusted_Connection=Yes])
>
>
>The SqlColumns() has a parameter nStatementHandle. Would this be the same as hCon above?

Yes

>
>2. INFORMATION_SCHEMA is not even in VFP help. So this is strictly SQL Server thingy. Where would I look for syntax on how to use it, that is how to "run a query" against it?
>

You would look in SQL Server Books Online (BOL). It's SQL Server help file, very good one.
SELECT * 
FROM pubs.INFORMATION_SCHEMA.Columns 
WHERE table_name = 'Authors'
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform