Thread View: borland.public.cppbuilder.database.dbexpress
1 messages
1 total messages
Started by Fabi�n
Mon, 01 Nov 2004 14:58
sqlquery in a thread
Author: Fabi�n
Date: Mon, 01 Nov 2004 14:58
Date: Mon, 01 Nov 2004 14:58
47 lines
2500 bytes
2500 bytes
Hi.
I'm trying to open a TSQLQuery in a thread called by a TServiceApplication.
The Query is declared in the TServiceApplication and passed as a pointer to
the tread (declared in the header file).
I can sucsesfully execute a store procedure in the query (the store doesn't
return any row). But if I use a sotre that returns a row the thread crashes.
The strange thing is that it doesn't execute the code in the catch, it
simply stops.
Here is some part of the code:
try
{
ARequestInfo->Session->Content->Values["WAITING_SP"] = 1;
//quitar planes
SP_QUITAR_PLAN_VENTAS->SQL->Text = "EXECUTE PROCEDURE
VT_WAP_QUITAR_PLAN_VENTAS(" +
(AnsiString)ARequestInfo->Session->Content->Values["ORDERREQUEST_ID"] + ","
+
ARequestInfo->Session->Content->Values["APPLICATIONS_ID"] + ")";
SP_QUITAR_PLAN_VENTAS->ExecSQL();
//aplicar planes
appliedPlans->Clear();
appliedPlans_tosave->Clear();
ARequestInfo->Session->Content->Values["WAITING_SP"] = 2;
dsPlanOrders->SQL->Text = "SELECT * FROM VT_GET_ORDERS(" +
ARequestInfo->Session->Content->Values["APPLICATIONS_ID"] + "," +
ARequestInfo->Session->Content->Values["ORDERREQUEST_ID"] + ")";
dsPlanOrders->Active = Open();
ARequestInfo->Session->Content->Values["WAITING_SP"] = 3;
while(!dsPlanOrders->Eof)
{
the code continues...
I use this: ARequestInfo->Session->Content->Values["WAITING_SP"] to have
a simple log of the thread. I'm shure that the code stops when it tryes to
open the query.
Can someone help me with this strange problem?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads