General information
Forum:
Microsoft SQL Server
Title:
Error in the following code
call connectToDb()
sql="select * from xl_news_update where News_ID=" & id
set rsedit=server.createobject("Adodb.recordset")
rsedit.open sql,conXL,adOpenKeyset,adLockOptimistic,adCmdText
if not(rsedit.bof or rsedit.eof) then
else
norec=true
end if
if subject<>"" then
sql2="update xl_news_update set Subject='" & subject & "', Message='" & message &"' where News_ID =" & id
set rscon=conXL.execute(sql2)
rscon.update
response.redirect "editnews.asp"
else
end if
this is part of my coding in a program.
Introduction: A subject and message are displayed separately. when the user changes and modifies them, the changes have to be updated and saved in the table(new record should not be added. same record should be updated) but the error comes as follows:
The operation requested by the application is not allowed if the object is closed .
Let me know if the error can be rectified.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only