commands out of sync problem (borland c++ builder)
Posted by: Frederik Teerlinck
Date: May 28, 2005 03:53AM

I’m stuck on a problem and I just can’t find a solution. I’m writing a simple multi-tier DB (mysql) application in a windows environment using DBexpress and soap. The client application is just performing a ping to a remote server and when the reply arrives I want to store the ping information in a DB, but I always get the error ‘commands out of sync: you can’t run this command now’.

Here’s the code when I receive the ping reply:


void __fastcall TForm1::IdIcmpClient1Reply(TComponent *ASender,
const TReplyStatus &AReplyStatus)
{
static int ID = 0;
int pingtime;

if (AReplyStatus.ReplyStatusType == rsTimeOut)
pingtime = 5000;
else pingtime = AReplyStatus.MsRoundTripTime;

// now call the server to store the data
pingDataSet->AppendRecord(ARRAYOFCONST((ID, configDataSetIPaddress->Value, pingtime)));
if(pingDataSet->ChangeCount > 0)
pingDataSet->ApplyUpdates(0); <---- Here I get the error

ID++;
}

Now I’ve been looking for this problem in google, I didn’t find any solution, but what I saw is that several people had this problem and it could have something to do with the used version of mysql and the used dll’s. I’m using MySQL 4.1.11, dbexpmysql.dll of 91kb and libmysql.dll of 228kb. I’ve tried several other versions of libmysql.dll, but then I always get the ‘unable to load libmysql.dll’ error.

Anyone any ideas how to solve this?

Options: ReplyQuote


Subject
Views
Written By
Posted
commands out of sync problem (borland c++ builder)
1619
May 28, 2005 03:53AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.