>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only