Calling a Parameterised Stored proc from VB/ADO

  • Hi.

    I have a sp that accepts 2 parameters and I am callng it from VB6 using the ADO Command object. I then set a recordset object to the execute method. I get no error and yet it keep telling me that the recordset object is not created (Operation is not allowed when the object is closed)

    My stored proc doesn't return a clean set but like this (1 row(s) affected)

    (1 row(s) affected)

    (1 row(s) affected) and then the rows and columns of data I need.

    Can anyone help me.

    I've tried different ways of calling a stored proc but to no avail.

  • Try adding 'set nocount on' as the first line of the proc.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Andy, you deh man, thnx a lot for sharing your knowledge.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply