>I am trying to dynamically create Access 2000 tables (not an entire .mdb file) with VFP code. I can create a table, but it will only let me create character fields. If I use any other field types, it will not create it. However, I also do not get an error message. Any suggestions or ideas would be greatly appreciated.
>
>Steve
You can also do this by using ADO & ADOX:
oCn = Create("ADODB.Connection")
oCat = Create("ADOX.Catalog")
oTbl = Create("ADOX.Table")
oCn.Open("Provider=Microsoft.Jet.OLEDB.3.51;Data Source=d:\temp\db1.mdb")
oCat.ActiveConnection = oCn
oTbl.Name = "MyTable"
oTbl.Columns.Append("Column1", 3) && adInteger
oTbl.Columns.Append("Column3", 129, 10) && adChar
oCat.Tables.Append(oTbl)
Although for ACC2K you should try version 4.0 of the provider.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement