AddNew doesn't work for SQL Server recordset. 
Author Message
 AddNew doesn't work for SQL Server recordset.

I used this code in asp to add various records to  Access table.

For n=1 to 1000
...
  dRS.AddNew
 dRS(1) = UCase(cid)
 dRS(2) = AnyValue
 dRS.Update
...
Next

Now data moved to SQL Server and I'm getting error message in the AddNew
line.
ADODB.Recordset error '800a0cb3'
The operation requested by the application is not supported by the
provider.

How to go around?
Thanks, Michael



Mon, 24 Feb 2003 08:10:51 GMT  
 AddNew doesn't work for SQL Server recordset.

Post the details of how you get your dRS recordset instance...  It's likely
that you're getting the default cursor type which is read-only...

--
Michael Harris
Microsoft.MVP.Scripting
--


Quote:
> I used this code in asp to add various records to  Access table.

> For n=1 to 1000
> ...
>   dRS.AddNew
>  dRS(1) = UCase(cid)
>  dRS(2) = AnyValue
>  dRS.Update
> ...
> Next

> Now data moved to SQL Server and I'm getting error message in the AddNew
> line.
> ADODB.Recordset error '800a0cb3'
> The operation requested by the application is not supported by the
> provider.

> How to go around?
> Thanks, Michael



Mon, 24 Feb 2003 08:31:35 GMT  
 AddNew doesn't work for SQL Server recordset.
"Michael Harris" wrote ...

Quote:
> Post the details of how you get your dRS recordset instance...  It's
likely
> that you're getting the default cursor type which is read-only...

Or replace the .Update with an SQL INSERT (which it gets translated into
anyway) and don't worry about the cursor type ;-)

hand

Adam



Mon, 24 Feb 2003 16:11:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. First Recordset.AddNew Doesn't Appear in Grid

2. Databound Checkbox doesn't work BindingContext(...).AddNew

3. AddNew works, but then it doesn't (ADO)

4. Addnew works but doesn't...

5. AddNew works, but then it doesn't (ADO)

6. AddNew method doesn't work right!!

7. Addnew Doesn't Addnew!

8. SQL-OLE doesn't recognize SQL Server version

9. ODBC .addnew works from Access to SQL Server, but not from Excel

10. fRefreshLinks Doesn't work if path doesn't exist

11. Open recordset doesn't work (see attached file)

12. Why doesn't RecordSet.MoveLast work?

 

 
Powered by phpBB® Forum Software