🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.multi-tier
6 messages
6 total messages Started by Steve Pietrykoski Tue, 29 Jun 1999 00:00
Using IN with query in a RDM
#1754
Author: Steve Pietrykoski
Date: Tue, 29 Jun 1999 00:00
10 lines
897 bytes
Hello all,

In a query in a regular datamodule, I can use the SQL keyword IN (e.g.
"where state in ('NJ', 'CA')" ).  But when I create the same query in a
RDM and attach a provider to it, I receive the error "Capability not
supported" when I try to open a client dataset attached to that
provider.  Is there a way to make this work?

Thanks,
Steve Pietrykoski
Re: Using IN with query in a RDM
#1617
Author: Steve Pietrykoski
Date: Wed, 30 Jun 1999 00:00
17 lines
1079 bytes
Thanks for the response Peter,

But that isn't the case here.  I am changing the SQL on an existing,
working query at runtime.  If I change it to an SQL without the IN
keyword, it works.

Steve Pietrykoski

Peter Ayre wrote:
> 
> When I get that message it usually means that I have forgotten to set the
> database property of my query and am doing something that SQL server likes
> but paradox(the default) does not.
> 
>  Hope this helps
> 
> Peter
Re: Using IN with query in a RDM
#1755
Author: Peter Ayre
Date: Wed, 30 Jun 1999 00:00
21 lines
1204 bytes
When I get that message it usually means that I have forgotten to set the
database property of my query and am doing something that SQL server likes
but paradox(the default) does not.

 Hope this helps

Peter


Steve Pietrykoski wrote in message
<3779301D.8A5A1581@artisansoftware.com>...
>Hello all,
>
>In a query in a regular datamodule, I can use the SQL keyword IN (e.g.
>"where state in ('NJ', 'CA')" ).  But when I create the same query in a
>RDM and attach a provider to it, I receive the error "Capability not
>supported" when I try to open a client dataset attached to that
>provider.  Is there a way to make this work?
>
>Thanks,
>Steve Pietrykoski
Re: Using IN with query in a RDM
#1619
Author: Jim
Date: Thu, 01 Jul 1999 00:00
10 lines
884 bytes
I used the statement before,but it worked.
My SQL statement look like
  "select id from table1 where id  in (select id from table2)"  or
 "select id from table1 where id  not in ('01','02','03')"
All worked in paradox table.

maybe you should show your entire sql statement or
try your statement in Database Destop first.

Jim
Re: Using IN with query in a RDM
#1620
Author: Steve Pietrykoski
Date: Thu, 01 Jul 1999 00:00
21 lines
1292 bytes
Jim,

I'm sorry for not making myself clear.  I can use IN in a query with no
problem in a two-tier app, but I cannot access a query using IN through
a provider in a *three-tier* app.  Is this SQL against your paradox
table being accessed by a client dataset through a provider?

Steve Pietrykoski

Jim wrote:
> 
> I used the statement before,but it worked.
> My SQL statement look like
>   "select id from table1 where id  in (select id from table2)"  or
>  "select id from table1 where id  not in ('01','02','03')"
> All worked in paradox table.
> 
> maybe you should show your entire sql statement or
> try your statement in Database Destop first.
> 
> Jim
Re: Using IN with query in a RDM
#1621
Author: 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();
}
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