Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 2nd, 2003, 04:23 PM
Ritch Ritch is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: The Netherlands
Posts: 39 Ritch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 18 m 26 sec
Reputation Power: 5
CRecordset::Edit() throws an exception in Firebird

Hello,

I am writing a C++ application which uses the Firebird Database (v1.0.3).

I'm using the CRecordset class (MFC Library) to manipulate tables. No problem in adding rows, all works fine, but whenever I try to update an existing field, the recordset throws an exception. Here is a small code snippet:

Code:
CRecordset rst;
rst.m_strFilter = "SomeField = value"; // SomeField is PK or unique
rst.Open();
if (!rst.IsEOF())
{
  try
  {
    rst.Edit();
    rst.m_FIELDNAME1 = value;
    rst.m_FIELDNAME2 = value;
    rst.Update();
  }
  catch (CDBException *xcp)
  {
    MessageBox("Error:\n" + xcp->m_strError, "ERROR!");
    xcp->Delete();
  }
}
else
{
  ...
}
rst.Close();


Now when an update occurs, the application will throw error code -104, Unexpected end of command. Further, after the execution of this code, when I try to shut down the Guardian, it informs me there is an Overlapped I/O operation in progress (code 99).

I'm at a loss here, because the same code worked ok with Interbase 7.
Does anybody know the solution to this problem or see what I might be overlooking?

Thanks in Advance,

Sincerely,
Richard

ps: I realize this same post has been posted earlier in the C (++ #) forum, and apologize for the crosspost.

Reply With Quote
  #2  
Old March 5th, 2005, 03:39 AM
Djuki Djuki is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 2 Djuki User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 27 m 47 sec
Reputation Power: 0
I using CRecordset class tooo, but y cant conect to Firebird database Dynaset

CRecordset test;
test.Open(CRecordset::dynaset, 'SELECT * FROM TABLE');

ODB does not support dynaset, dynamic. Only ForwardOnly, What shoul i do to solve this problem ?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > CRecordset::Edit() throws an exception in Firebird


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT