Exception when using TMyStoredProc sequentially
Posted: Thu  06 Jul 2006 07:40
				
				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 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?