Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 ASP Recordset and Null Values... Please Help!

Author  Topic 

hugor99
Starting Member

5 Posts

Posted - 2002-08-22 : 20:35:16
Hi,

I am trying to enter a null value into a sql database using a recordset. The code is very similar in several pages, and I don't want to have to rewrite it all using command objects and stored procedures.

the code looks like this:
sqlContent = "select * from webcontent"
set objRSContent = server.CreateObject("adodb.recordset")
objRSContent.Open sqlContent, mainConn, adOpenKeyset, adLockOptimistic
objrscontent("abstract") = null
objrscontent.update


I keep getting this error on the "= null" line:

multi-step oledb blah blah no work was performed.

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-08-23 : 14:35:32
The code you've provided appears to be trying to set the "abstract" field to null on EVERY row (because you don't show any movement from one row to another). Is that really what you want to do? If so, then why not just issue the SQL statement UPDATE... instead of SELECTing the rows into a recordset?

Go to Top of Page
   

- Advertisement -