×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Static ADO cursors in Oracle

Static ADO cursors in Oracle

Static ADO cursors in Oracle

(OP)
We have a COM application using VC++ objects to connect to SQL Server through MTS.

We now want to port this to Oracle. I have configured the software, correctly I think, and am having the following behaviour.

The first method called on start up is successful, the second method however fails. The difference is that the cursor opened in the first method is a Forward-Only cursor, but the second method uses a Static cursor. If I change the second method to be a Forward-Only cursor, it works fine. However I want to use the GetRecordCount function which is only valid in a static cursor.

Therefore do static cursors work in Oracle when configured with MTS?
Is there some specific configuration that I need to get these to run? - code below.

The error actually occurs when the GetRecordCount function is accessed and says cursor closed.

      // Connect to DB
      pConnection = new _ConnectionPtr(__uuidof(Connection));
      db_man->OpenConnection(pConnection, lBusAreaID);

      // Declare a recordset
      pResults = new _RecordsetPtr(__uuidof(Recordset));
      pResults->PutRefActiveConnection(pConnection);

      // Retreive the recordset
      pResults->Open(SQLString,
                       vtEmpty,
                     adOpenStatic,
                     adLockReadOnly,
                     adCmdText);
      
      // Check the recordset

      record_count = pResults->GetRecordCount();

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close