Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

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.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -