Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB/ADO Database Table Creation ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00559939
Message ID:
00563834
Vues:
80
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform