🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.multi-tier
Article #1736

Re: Dynamic SQL Problem

#1736
From: Jim
Date: Thu, 17 Jun 1999 00:00
20 lines
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();
}
Technical Details
Message-ID: <7k9oet$o3h3@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7joe4m$84q10@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,17ad4cd9dcb73e3b
X-Google-Attributes: gidfcd2b,public
From: "Jim" <jim@www.cdsf.com>
Subject: Re: Dynamic SQL Problem
Date: 1999/06/17
Message-ID: <7k9oet$o3h3@forums.borland.com>
X-Deja-AN: 490512307
References: <7joe4m$84q10@forums.borland.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Reply-To: "Jim" <jim@www.cdsf.com>
Newsgroups: borland.public.cppbuilder.database.multi-tier