Information générale
Forum:
Microsoft SQL Server
Titre:
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement