Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages
Started by ca,ppp,lewer
Thu, 10 Jun 1999 00:00
Dynamic SQL Problem
Author: ca,ppp,lewer
Date: Thu, 10 Jun 1999 00:00
Date: Thu, 10 Jun 1999 00:00
13 lines
1157 bytes
1157 bytes
I'm trying to create a dynamic SQL application - using the client/server model, and I am unable to set the SQL property, of a TQuery object, on the application server. (I need to send the entire SQL statement over to the app. server). I've followed the example "BCB3.0\examples\midas\adhoc", but I've noticed that the "OnDataRequest" event handler for my TProvider (application server side) never gets fired, therefore I'm unable to set the SQL statement. I believe this is not a DCOM issue, as I can see the SQL statement is arriving correctly on the app. server side, I just can't seem to set the sql property of the TQuery. I would greatly appreciate any suggestions ... thanks, tom.
Re: Dynamic SQL Problem
Author: Aldis Viesturs
Date: Thu, 10 Jun 1999 00:00
Date: Thu, 10 Jun 1999 00:00
8 lines
892 bytes
892 bytes
> I've noticed that the "OnDataRequest" event handler for my TProvider > (application server side) never gets fired, therefore I'm unable to set the > SQL statement. Why You are seting SQL in "OnDataReqwest" rather than setting SQL in server method that receives it? -- http://skyscraper.fortunecity.com/module/68/
Re: Dynamic SQL Problem
Author: Jim
Date: Thu, 17 Jun 1999 00:00
Date: Thu, 17 Jun 1999 00:00
20 lines
1305 bytes
1305 bytes
Don't care about OnDataRequest,
In Client you can use SetSQL() to change the Server Query SQL statement,just
like the demo you mentioned.
void __fastcall TForm1::RunButtonClick(TObject *Sender)
{
ClientDataSet->Close();
WideString wsql;
// wsql = Memo1->Lines->Text;
wsql = "select * from where company = :company"
IAdHocQueryDemo_BCBDisp srvr;
srvr.Bind(LPDISPATCH(RemoteServer->AppServer));
srvr.SetSQL(wsql.Copy());
// Query SQL in Server tier already changed now
ClientDataSet->Params->Clear();
ClientDataSet1->Params->CreateParam(ftString,"company",ptInput);
ClientDataSet1->Params->ParamByName("company")->AsString = Edit1->Text;
ClientDataSet1->SendParams();
ClientDataSet->Open();
}
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