Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return from Sql Procedure

Status
Not open for further replies.

maheshmehta

IS-IT--Management
Mar 4, 2002
8
0
0
IN
I wrote a simple Stored Proc.
Its working fine if i am working throgh command object
But if i am using simple
Conn.Execute "Exec proc_name 'paramters'"
it throughs me error

"Operation not allowed if object is closed"

The proc is like

CREATE PROCEDURE Just_Try @fieldname varchar(50), @username varchar(50)
AS
Insert into users (user_name) values('mahesh')
Select userid from users
GO

Now if i remove the Insert statement it works fine

Any help Please

Mahesh
 
Try adding Set Nocount On to the procedure. Place the statement just before the Insert statement. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top