Using ADO 2.5 Streams on SQL Server 7.0 
Author Message
 Using ADO 2.5 Streams on SQL Server 7.0

I'm trying to use the Record and Stream objects in ADO 2.5 on SQL Server 7.
The goal is to move data from an image field to a text field in another
table.  When I try to open the Record object it generates runtime error 3251
saying "Object or provider is not capable of performing requested
operation".  I don't see what I'm doing wrong but I can't imagine that the
SQLOLEDB doesn't support opening Records.  Here's a boiled down version of
my code anyway.   One more question... I haven't been able to get this far
yet, but how do you specify which field to use when you open a Stream object
off of a Record?  Thanks for the help.

Jonathan Byrne

Dim oConnection as ADODB.Connection
Dim oRecordSet as ADODB.RecordSet
Dim oRecordSet as ADODB.RecordSet
Dim oRecord as ADODB.Record
  Set oConnection = New ADODB.Connection
  oConnection.Open "Provider=SQLOLEDB;Server=Eagle;Trusted_Connection=Yes"
  Set oRecordSet = New ADODB.Recordset
  oRecordSet.Open "MyTable", oConnection, adOpenForwardOnly, adLockReadOnly
  Do While Not oRecordSet.EOF
    Set oRecord = New ADODB.Record
    oRecord.Open oRecordSet, oConnection, adModeRead
    oRecordSet.MoveNext
  Loop



Mon, 02 Sep 2002 03:00:00 GMT  
 Using ADO 2.5 Streams on SQL Server 7.0
    The SQLOLEDB provider doesn't support opening records.

Bob Beauchemin


Quote:
> I'm trying to use the Record and Stream objects in ADO 2.5 on SQL Server
7.
> The goal is to move data from an image field to a text field in another
> table.  When I try to open the Record object it generates runtime error
3251
> saying "Object or provider is not capable of performing requested
> operation".  I don't see what I'm doing wrong but I can't imagine that the
> SQLOLEDB doesn't support opening Records.  Here's a boiled down version of
> my code anyway.   One more question... I haven't been able to get this far
> yet, but how do you specify which field to use when you open a Stream
object
> off of a Record?  Thanks for the help.

> Jonathan Byrne

> Dim oConnection as ADODB.Connection
> Dim oRecordSet as ADODB.RecordSet
> Dim oRecordSet as ADODB.RecordSet
> Dim oRecord as ADODB.Record
>   Set oConnection = New ADODB.Connection
>   oConnection.Open "Provider=SQLOLEDB;Server=Eagle;Trusted_Connection=Yes"
>   Set oRecordSet = New ADODB.Recordset
>   oRecordSet.Open "MyTable", oConnection, adOpenForwardOnly,
adLockReadOnly
>   Do While Not oRecordSet.EOF
>     Set oRecord = New ADODB.Record
>     oRecord.Open oRecordSet, oConnection, adModeRead
>     oRecordSet.MoveNext
>   Loop



Mon, 02 Sep 2002 03:00:00 GMT  
 Using ADO 2.5 Streams on SQL Server 7.0
What is the logic behind that?  I would think Microsoft would want to
support all ADO operations in the SQL Server provider.

Jonathan Byrne1


Quote:
>     The SQLOLEDB provider doesn't support opening records.

> Bob Beauchemin



> > I'm trying to use the Record and Stream objects in ADO 2.5 on SQL Server
> 7.
> > The goal is to move data from an image field to a text field in another
> > table.  When I try to open the Record object it generates runtime error
> 3251
> > saying "Object or provider is not capable of performing requested
> > operation".  I don't see what I'm doing wrong but I can't imagine that
the
> > SQLOLEDB doesn't support opening Records.  Here's a boiled down version
of
> > my code anyway.   One more question... I haven't been able to get this
far
> > yet, but how do you specify which field to use when you open a Stream
> object
> > off of a Record?  Thanks for the help.

> > Jonathan Byrne

> > Dim oConnection as ADODB.Connection
> > Dim oRecordSet as ADODB.RecordSet
> > Dim oRecordSet as ADODB.RecordSet
> > Dim oRecord as ADODB.Record
> >   Set oConnection = New ADODB.Connection
> >   oConnection.Open

"Provider=SQLOLEDB;Server=Eagle;Trusted_Connection=Yes"

- Show quoted text -

Quote:
> >   Set oRecordSet = New ADODB.Recordset
> >   oRecordSet.Open "MyTable", oConnection, adOpenForwardOnly,
> adLockReadOnly
> >   Do While Not oRecordSet.EOF
> >     Set oRecord = New ADODB.Record
> >     oRecord.Open oRecordSet, oConnection, adModeRead
> >     oRecordSet.MoveNext
> >   Loop



Mon, 02 Sep 2002 03:00:00 GMT  
 Using ADO 2.5 Streams on SQL Server 7.0


Quote:
> What is the logic behind that?  I would think Microsoft would want to
> support all ADO operations in the SQL Server provider.

They don't. If you have downloaded MDAC, you should read the notes that
comes with it. You will find that only yhthe Jet Provider supports all ADO
operations, SQL, Oracle, ODBC have limitations. Here is the relevant
sections for ADOX

Certain features of ADOX are unsupported, depending upon your OLE DB data
provider. ADOX is fully supported with the Microsoft OLE DB Provider for the
Microsoft  Jet Database Engine. For the Microsoft SQL Server OLE DB
Provider, the Microsoft OLE DB Provider for ODBC, or the Microsoft OLE DB
Provider for Oracle see below. ADOX is not supported by any other Microsoft
OLE DB providers.

Microsoft SQL Server OLE DB Provider

All ADOX objects, collections, properties, and methods are supported except
for those listed here:

Catalog: Create method.
Tables: Properties for existing tables are read-only (properties for new
tables
can be read/write).
Views: Not supported.
Procedures: Append method, Delete method, Command property.
Keys: Append method, Delete method.
Users: Not supported.
Groups: Not supported.

Microsoft OLE DB Provider for ODBC

All ADOX objects, collections, properties, and methods are supported except
for those listed here:

Catalog: Create method.
Tables: Append method, Delete method. Properties for existing tables are
read-on
ly (properties for new tables can be read/write).
Views: Append method, Delete method, Command property.
Procedures: Append method, Delete method, Command property.
Indexes: Append method, Delete method.
Keys: Append method, Delete method.
Users: Not supported.
Groups: Not supported.

Microsoft OLE DB Provider for Oracle

All ADOX objects, collections, properties, and methods are supported except
for those listed here:

Catalog: Create method.
Tables: Append method, Delete method. Properties for existing tables are
read-on
ly (properties for new tables can be read/write).
Views: Append method, Delete method, Command property.
Procedures: Append method, Delete method, Command property.
Indexes: Append method, Delete method.
Keys: Append method, Delete method.
Users: Not supported.
Groups: Not supported.



Tue, 03 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ADO 2.5 / Win2K / VB IDE / SQL Server 7.0

2. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL

3. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL Syntax

4. VB6: Oracle 8/SQL Server 2000 compatibility problems using ADO 2.5 and SQL Syntax

5. Help - SQL 7.0 , ADO 2.5 , Store Procedure , VB6 and MSDataGrid

6. ADO 2.5 Sql Server Ole Db Provider and Memory Loss

7. Date format in ADO 2.5 XML stream

8. ADO 2.5 recordset in to a stream

9. ado connection to SQL Server 7.0

10. SQL Server 7.0 , ADO & VB 6.0

11. Problem refreshing SQL Server 7.0 joins in ADO

12. Using ADO/stream to upload image into SQL

 

 
Powered by phpBB® Forum Software