CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2001
    Location
    Lancashire, England
    Posts
    16

    Stored procs on SQL Server 7

    I am calling a stored proc on SQL Server 7 from VB6 using ADO. I can get the procedure to fire and return a recordset containing the resultant rows, but as soon as I try to assign the returned recordset to another recordset, I get an error with Object variable or With Block variable not set.

    I have declared a new instance of the recordset trying to copy into but still doesn't work. Also set cursor as client side. Provider=MSDASQL

    If I submit the same SQL for execution on the server, I can pass the recordset with no problems.

    Any help or ideas appreciated.


  2. #2
    Join Date
    May 2000
    Location
    Canada
    Posts
    32

    Re: Stored procs on SQL Server 7

    You can not use the same record set for different record selection unless you set it to nothing.
    I think in your case you should try declaring two diferent record set.

    Hope it helps



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured