CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: ADO & SQL

  1. #1
    Guest

    ADO & SQL

    Hi !

    I am connecting to a SQL database using ADO.

    The connection string I used is :
    "uid=name;pwd=pwd;driver={SQL Server};server=servername;database=dbname"

    Say, the connection object is Con,
    I used the statement:
    Con.Execute ("Delete From <tablename> where <condn>")

    I get the error:
    You can't have multiple recordsets with this cursor type (in a transaction.) Either change the cursor type, commit the transaction, or close one of the record sets.

    Can anyone tell me what kind of cursor type to use and where?

    The same application works if the backend is MS-Access.

    Can anyone help me out?

    Thanks.


  2. #2
    Join Date
    Jan 2000
    Location
    Tallahassee, FL
    Posts
    121

    Re: ADO & SQL

    before you open the connection try doing something like this first..

    Con.CursorType = adStatic
    Con.LockType = adLockBatchOptimistic

    then see what happends


  3. #3
    Guest

    Re: ADO & SQL

    There are no 'CursorType' and 'LockType' properties for an ADODB connection object.



  4. #4
    Guest

    Re: ADO & SQL

    The error you have got is very clear. y don't u try out any of the three alternatives ? u will defenitely get the solution.
    bye.


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