I'm trying to create tables using ADOX, and specifically to add new
columns to existing tables.
I have very basic code for doing this which works fine if I use it to
connect to Access, but if I use it to connect to SQLServer then when I
create a table I get the following error message displayed:
"Run-time error '3251': Object or provider is not capable of
performing requested operation"
This error is documented in the knowledge base as being due to not
having an up to date INSTCAT.SQL file installed into SQLServer, ie a
version less that 7, however I've checked and my freshly installed
SQLServer 2000 is using version 8.00.128.
I've tried installing the INSTCAT.SQL from MDAC 2.6, and I've tried
against a new SQLServer 2000 installation. Always the same error
appears. The knowledge base article says that the connection's Errors
collection should have further information, which it doesn't, so I
suspect the problem is not related to INSTCAT.SQL
What I'm trying to do is very basic, and yet I'm falling at the first
hurdle - does anyone have a clue what might be going wrong?
Here's the code I'm using, very simple:
Dim tbl As New ADOX.Table
Dim cat As New ADOX.Catalog
cat.ActiveConnection = "driver=SQL
tbl.Name = "mytable"
tbl.Columns.Append "ID", adInteger
' The following line gives the error
Sent via Deja.com http://www.deja.com/
Before you buy.