Re: Cloned recordsets with SQL Server 2005
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Fri, 27 Jul 2007 16:34:04 -0400
JD wrote:
I found an odd issue. We have existing VB6 code (ADO 2.8) that
creates a read-write (adLockbatchOptimistic) recordset using a
command object (e.g. rs.Open cmd, ...), with a client side cursor and
a stored proc with parameters. The consuming code takes the
recordset, and generates cloned recordsets (e.g. rs.Clone) for
additional display grids. When something is changed in the grid, the
underlying recordset is updated in code. The actual posting of
changes to the DB is done by reading the recordset and issuing
separate UPDATE, DELETE, or INSERT SQL statements, not by using the
recordset to to update through a connection object.
When running against SQL Server 2000, things always worked well.
When we restored a working database to SQL 2005, and ran the client
code against it, everything worked fine except for this one use of
recordsets. We received "multiple-step operation" errors when trying
to write a recordset field value, but only to certain fields. And
this only occurs on the SQL 2005 DB.
I found a workaround by writing a "CopyRecordset" method that copies
the recordset that has the command object to a new recordset with no
command object or connection. Then it works fine for SQL 2000 and
SQL 2005. I hunted on MSDN and Google for articles on the
"multiple-step operation" errors , and read dozens of them, but to no
avail.
If someone is aware of a solution for this, I'd appreciate knowing
about it so I can use something other than my workaround.
Thanks in advance
You're going to have to help us reproduce this issue. Post a table creation
script with just the minimum number of columns needed to reproduce the
symptoms. Provide some sample data in the form of INSERT...VALUES
statements, and the snip of code that will reproduce the symptoms.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Prev by Date: Re: What to use for ADO parameter type and size
- Next by Date: Re: How to protect data within MS access?
- Previous by thread: What to use for ADO parameter type and size
- Next by thread: Re: Cloned recordsets with SQL Server 2005
- Index(es):
Relevant Pages
|
|