🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Using IN with query in a RDM

#1621
From: Jim
Date: Fri, 02 Jul 1999 00:00
23 lines
1352 bytes
>>   "select id from table1 where id  in (select id from table2)"
>>  "select id from table1 where id  not in ('01','02','03')"

I Did use these sql statements in multi-tier program.

Like the demo in CBuilder examples\midas\adhoc directory
I wrote the code like the following:

void __fastcall TForm1::RunButtonClick(TObject *Sender)
{
  // Send the query string to the server and try to open the client dataset
  ClientDataSet->Close();

  WideString wsql = "select id from table1 where id  in (select id from
table2)";
  // Bind to IDispatch of server and send SQL string over
  IAdHocQueryDemo_BCBDisp srvr;
  srvr.Bind(LPDISPATCH(RemoteServer->AppServer));
  srvr.SetSQL(wsql.Copy());

  // Open/Display the dataset
  ClientDataSet->Open();
}
Technical Details
Message-ID: <7lhjuf$24i32@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3779301D.8A5A1581@artisansoftware.com> <7leenl$str3@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fcd2b,b3e9f1c7b851a475
X-Google-Attributes: gidfcd2b,public
From: "Jim" <jim@www.cdsf.com>
Subject: Re: Using IN with query in a RDM
Date: 1999/07/02
Message-ID: <7lhjuf$24i32@forums.borland.com>
X-Deja-AN: 496308354
References: <3779301D.8A5A1581@artisansoftware.com> <7leenl$str3@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
Newsgroups: borland.public.cppbuilder.database.multi-tier