SQL Server 7.0 and ADO Cursors 
Author Message
 SQL Server 7.0 and ADO Cursors

Hi!

Why I can edit data in SQL Server 7.0 only when I open ADO recordset
that uses server-side cursor and that is opened as a keyset? I can't use
client-side cursors because I can't update data in updatable views that
base on tables that user can't access.

I would like to use client-side cursors because of ADO error "Consumer's
event handler called a non-reentrant method in the provider.". I got
information that I have to use client-side cursors, but they won't let
me edit my data. What I have to do?

Greetings,
Gunnar Peipman



Mon, 21 Jul 2003 19:42:53 GMT  
 SQL Server 7.0 and ADO Cursors
    Set mCmd = New ADODB.Command
        mCmd.ActiveConnection = pConn
        mCmd.CommandText = strSql
        mCmd.CommandType = adCmdText

    Set mrstOrderLines = New ADODB.Recordset
        mrstOrderLines.CursorLocation = adUseClient
        mrstOrderLines.Open mCmd, , adOpenStatic, adLockOptimistic

Note the Open Static and adLockOptimistic

Default recordset is Locked, forward only

Regards

VOrtex


Quote:
> Hi!

> Why I can edit data in SQL Server 7.0 only when I open ADO recordset
> that uses server-side cursor and that is opened as a keyset? I can't use
> client-side cursors because I can't update data in updatable views that
> base on tables that user can't access.

> I would like to use client-side cursors because of ADO error "Consumer's
> event handler called a non-reentrant method in the provider.". I got
> information that I have to use client-side cursors, but they won't let
> me edit my data. What I have to do?

> Greetings,
> Gunnar Peipman




Tue, 22 Jul 2003 06:24:16 GMT  
 SQL Server 7.0 and ADO Cursors
I know about locking. I set locking type to adLockOptimistic. The question is
aboyt combination of cursor location and cursor type.
Quote:

>     Set mCmd = New ADODB.Command
>         mCmd.ActiveConnection = pConn
>         mCmd.CommandText = strSql
>         mCmd.CommandType = adCmdText

>     Set mrstOrderLines = New ADODB.Recordset
>         mrstOrderLines.CursorLocation = adUseClient
>         mrstOrderLines.Open mCmd, , adOpenStatic, adLockOptimistic

> Note the Open Static and adLockOptimistic

> Default recordset is Locked, forward only

> Regards

> VOrtex



> > Hi!

> > Why I can edit data in SQL Server 7.0 only when I open ADO recordset
> > that uses server-side cursor and that is opened as a keyset? I can't use
> > client-side cursors because I can't update data in updatable views that
> > base on tables that user can't access.

> > I would like to use client-side cursors because of ADO error "Consumer's
> > event handler called a non-reentrant method in the provider.". I got
> > information that I have to use client-side cursors, but they won't let
> > me edit my data. What I have to do?

> > Greetings,
> > Gunnar Peipman




Tue, 22 Jul 2003 19:05:16 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ADO 2.0, SQL Server 7.0, ServerSide cursors, IDENTITY columns after rs.AddNew

2. Cursor Problem with SQL Server 7.0

3. ado connection to SQL Server 7.0

4. SQL Server 7.0 , ADO & VB 6.0

5. Problem refreshing SQL Server 7.0 joins in ADO

6. Need to Save .rpt files in SQL Server 7.0 with ADO 2.1

7. ado SP problem in SQL Server 7.0 and 2000

8. Ado Save & Open with SQL server 7.0

9. ADO and SQL Server 7.0

10. ADO vs ODBC (SQL Server 7.0)

11. Using ADO 2.5 Streams on SQL Server 7.0

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

 

 
Powered by phpBB® Forum Software