Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLEDB/ADO Database Table Creation ?
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00559939
Message ID:
00563834
Views:
79
One way to do this using ADO is to use a select statement with a WHERE clause that returns no records. You will end up with the ADO recordset with all of the fields, but no records.

>I have a side question on this one. In my app, I need to read the table structure from a MSSQL2K database and then do my "Create Table" structure. Do you know how I might easily do that with ADO (using the Connection object reference to my MSSQL2K box)?
>
>So I would be able to code:
>
>arStructure = oConnMSSQL.Execute("GiveMeStructureOf ThisTable").GetRows
>
>Then I could have an array that I could parse/feed to my VFP database, giving me a mirrored structure.
>
>What do you think?
>
>
>>I think for this it's easier to use the connection's execute method to send regular VFP SQL commands:
>>
oConn.Execute "CREATE TABLE myTable (iID i PRIMARY KEY, desc c(30))"
>>This creates the table with a couple of fields with iID being the primary key.
>>HTH
Thanks,
Dan Jurden
djurden@outlook.com
Previous
Reply
Map
View

Click here to load this message in the networking platform