I get an error when running two MyStoredProc procedures one after the other. I am trying to identify whether the error is from MySql, Borland c++ 2006, or the CoreLab MySql component.
Exception class EMySqlException with message 'RecieveHeader: Net packets out of order: received[13], expected[1]'
I have one MyStoredProc, I change the parameter for the stored procedure by clicking on a button, then close the procedure if it is active in order to run it again. Perhaps I am supposed to reset it another way?
One button shows all cats, the other all dogs, using the same store procedure. It works for cats and then falls over when I click on the dog button, and the opposite if I click on the dog button first.
void __fastcall TForm1::btnCatsClick(TObject *Sender)
{
if (MyStoredProc->Active) {
MyStoredProc->Close();
}
// Filter to show only cats
MyStoredProc->ParamByName("Value")->AsString = "cat";
MyStoredProc->Execute();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::btnDogClick(TObject *Sender)
{
if (MyStoredProc->Active) {
MyStoredProc->Close();
}
// Filter to show only dogs
MyStoredProc->ParamByName("Value")->AsString = "dog";
MyStoredProc->Execute();
}
Any suggestions?
Exception when using TMyStoredProc sequentially
Please send us (EvgeniyD*crlab*com) a complete small sample to demonstrate this problem, including script to create server objects.
Also supply us following information
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor
Also supply us following information
- Exact version of MyDAC. You can see it in About sheet of TMyConnection Editor
- Exact version of MySQL server and MySQL client. You can see it in Info sheet of TMyConnection Editor
You set option AutoPrepare to True for StoredProc component. This bug of MySQL Server protocol with prepared stored procedures that return result set was discussed in this topic. To avoid this bug you should give up using preparing in this situation.