Featured post
asp classic - can't close recordset in asp&sql server -
i keep getting error:
adodb.recordset error '800a0e78' operation not allowed when object closed.
the asp code i'm using:
rs.open "usp_reply_insert 132 ,n'abc',n'teeeeeeext',0,n'gest','x@x.com' ",conn rs.close
the problem rs.close command
this stored procedure
alter procedure [dbo].[usp_reply_insert] @maamar_id int, @subject nvarchar(200), @text nvarchar(max), @userid int, @name nvarchar(50), @email nvarchar(150) begin set nocount on insert dbo.tbl_reply (maamar_id, userid, reply_subject, reply_text, reply_name, reply_email, reply_date, reply_status ) values ( @maamar_id, @userid, @subject, @text, @name, @email, getdate(), 0 ) end
how can close recored set?
10x
from msdn documentation on recordset.open method:
it not idea use source argument of open method perform action query not return records because there no easy way determine whether call succeeded. recordset returned such query closed.
to perform query not return records, such sql insert statement, call execute method of command object or execute method of connection object instead.
in short, rs.open call not resulting in open recordset, rs.close
statement doesn't function , should removed. better yet, follow example given in quoted text, using adodb.recordset invoke insert op not recommended.
- Get link
- X
- Other Apps
Comments
Post a Comment