Microsoft KB Archive/201716

= PRB: Error 3251 Generated by Calling ADOX Methods =

Article ID: 201716

Article Last Modified on 8/23/2001

-

APPLIES TO


 * Microsoft ActiveX Data Objects 2.1
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q201716



SYMPTOMS
Executing an ADOX method such as the following:

Catalog.Tables.Append tbl against SQL Server may generate the following error:

Run time error "3251": "The operation requested by the application is not supported by the provider".



CAUSE
SQL Server's Stored Procedures are not current.



RESOLUTION
Run the Instcat.sql script that came with the version of Microsoft Data Access Components (MDAC) currently installed.



STATUS
This behavior is by design.



MORE INFORMATION
The Connection's Errors collection should also reveal an error like the following:

[Microsoft][ODBC SQL Server Driver][SQL Server]The ODBC catalog stored procedures installed on server (local) are version 6.50.193; version 07.00.0523 or later is required to ensure proper operation. Please contact your system administrator.

The catalog stored procedures installed on server  are version 6.50.193; version 07.00.0330 or later is required to support IDBSchemaRowset. Please contact your system administrator.

Steps to Reproduce Behavior
 Start Visual Basic. Choose a Standard EXE Project Type.  Add the following References to the Project:   Microsoft ActiveX Data Objects Microsoft ADO Ext. for DDL and Security   Paste the following code in the Load method of the default Form: Dim tbl As New ADOX.Table Dim cn As New ADODB.Connection Dim cl As New ADOX.Column Dim cat As New ADOX.Catalog

'Open Connection to Data Source With cn   .ConnectionString = "PROVIDER=sqloledb;DATA SOURCE=<your_server;USER ID= ;PASSWORD= ;INITIAL CATALOG=pubs" .Open End With

'Associate the Catalog object to the Connection. With cat .ActiveConnection = cn End With

'Create a table definition. With tbl .Name = "MyADOXtbl" End With

'Create a Column definition. With cl   .Name = "Col1" .DefinedSize = 10 .Type = adChar .Attributes = adColFixed + adColNullable End With

'Add the Column definition to the table table definition. tbl.Columns.Append cl

'Create the table on the Data Source cat.Tables.Append tbl </li></ol>

Keywords: kbdatabase kbprb KB201716

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.