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:
00559968
Views:
27
Thanks for the fast response. My code below shows what I was working from before you sent your message - they look pretty identical. I am getting an error in line 19:
C:\wintemp\maketable.vbs(12,1) ADOX.Tables: Object is no longer valid.

Set oTable = WScript.CreateObject("ADOX.Table.2.6")
Set oConn = WScript.CreateObject("ADODB.Connection")
Set oCat = WScript.CreateObject("ADOX.Catalog.2.6")
Set oKey = WScript.CreateObject("ADOX.Key.2.6")
oConn.Open "Provider=VFPOLEDB.1;Data Source=e:\src\projects\lookupcache.dbc"
oConn.CursorLocation = 2	'	adUseServer
oTable.Name = "Test01"
oTable.Columns.Append "iID" , 3 ' Integer
oKey.Name = "MyPK"
oKey.Type = 1 ' Primary Key
oKey.Columns.Append "iID"
oCat.Tables.Append oTable      <-- Error!
oTable.Keys.Append oKey
I am using VBScript (in Windows Script Host 5.6).

Help?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform