Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

TAdsQuery Datasource property?

4 posts in Delphi Last posting was on 2003-08-29 19:58:32.0Z
David Looney Posted on 2003-08-29 15:51:28.0Z
From: "David Looney" <davidl@autostarsolutions.com>
Newsgroups: Advantage.Delphi
Subject: TAdsQuery Datasource property?
Date: Fri, 29 Aug 2003 10:51:28 -0500
Lines: 6
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 64.207.57.161
Message-ID: <3f4f7d98@solutions.advantagedatabase.com>
X-Trace: 29 Aug 2003 10:21:44 -0700, 64.207.57.161
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.207.57.161
Xref: solutions.advantagedatabase.com Advantage.Delphi:13809
Article PK: 1107245

What is the perpose of the DataSource property of a TAdsQuery?
Can one use this property to help speed up SQL statements?

David Looney


Doug Nettleton Posted on 2003-08-29 17:55:46.0Z
From: "Doug Nettleton" <doug@teibasl.com>
Newsgroups: Advantage.Delphi
References: <3f4f7d98@solutions.advantagedatabase.com>
Subject: Re: TAdsQuery Datasource property?
Date: Fri, 29 Aug 2003 13:55:46 -0400
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.100.153.164
Message-ID: <3f4f92cb@solutions.advantagedatabase.com>
X-Trace: 29 Aug 2003 11:52:11 -0700, 24.100.153.164
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!24.100.153.164
Xref: solutions.advantagedatabase.com Advantage.Delphi:13810
Article PK: 1107247

David:

Use it to resolve parameters:

e.g. with AdsQuery1, DataSource1, AdsQuery2, DataSource2, DBGrid1 attached
to DataSource1, and DBGrid2 attached to DataSource2

AdsQuery1.SQL something like 'select officecode, officename from offices'

AdsQuery2.SQL something like 'select * from invoices where officecode =
:officecode'

set AdsQuery2.DataSource := DataSource1 then as you move through the offices
list in DBGrid1, the contents of DBGrid2 will be refreshed and restricted to
the corresponding office from DBGrid1.

Hope that helps.

Doug

P.S. if there are any other uses, hopefully someone else will jump in here.

"David Looney" <davidl@autostarsolutions.com> wrote in message
news:3f4f7d98@solutions.advantagedatabase.com...
> What is the perpose of the DataSource property of a TAdsQuery?
> Can one use this property to help speed up SQL statements?
>
> David Looney
>
>


David Looney Posted on 2003-08-29 19:17:42.0Z
From: "David Looney" <davidl@autostarsolutions.com>
Newsgroups: Advantage.Delphi
References: <3f4f7d98@solutions.advantagedatabase.com> <3f4f92cb@solutions.advantagedatabase.com>
Subject: Re: TAdsQuery Datasource property?
Date: Fri, 29 Aug 2003 14:17:42 -0500
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 64.207.57.161
Message-ID: <3f4fa6b6@solutions.advantagedatabase.com>
X-Trace: 29 Aug 2003 13:17:10 -0700, 64.207.57.161
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!64.207.57.161
Xref: solutions.advantagedatabase.com Advantage.Delphi:13813
Article PK: 1107249

Would it help performance any if the DataSource was connected to an already
open table and can that even be done?
Example of using datasource 1 to select records from with the query object?
Something like "Select * From Datasource1 Where this = that Order by this"?
David Looney

"Doug Nettleton" <doug@teibasl.com> wrote in message
news:3f4f92cb@solutions.advantagedatabase.com...
> David:
>
> Use it to resolve parameters:
>
> e.g. with AdsQuery1, DataSource1, AdsQuery2, DataSource2, DBGrid1 attached
> to DataSource1, and DBGrid2 attached to DataSource2
>
> AdsQuery1.SQL something like 'select officecode, officename from offices'
>
> AdsQuery2.SQL something like 'select * from invoices where officecode =
> :officecode'
>
> set AdsQuery2.DataSource := DataSource1 then as you move through the
offices
> list in DBGrid1, the contents of DBGrid2 will be refreshed and restricted
to
> the corresponding office from DBGrid1.
>
> Hope that helps.
>
> Doug
>
> P.S. if there are any other uses, hopefully someone else will jump in
here.
>
> "David Looney" <davidl@autostarsolutions.com> wrote in message
> news:3f4f7d98@solutions.advantagedatabase.com...
> > What is the perpose of the DataSource property of a TAdsQuery?
> > Can one use this property to help speed up SQL statements?
> >
> > David Looney
> >
> >
>
>


Doug Nettleton Posted on 2003-08-29 19:58:32.0Z
From: "Doug Nettleton" <doug@teibasl.com>
Newsgroups: Advantage.Delphi
References: <3f4f7d98@solutions.advantagedatabase.com> <3f4f92cb@solutions.advantagedatabase.com> <3f4fa6b6@solutions.advantagedatabase.com>
Subject: Re: TAdsQuery Datasource property?
Date: Fri, 29 Aug 2003 15:58:32 -0400
Lines: 55
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 24.100.153.164
Message-ID: <3f4faf90@solutions.advantagedatabase.com>
X-Trace: 29 Aug 2003 13:54:56 -0700, 24.100.153.164
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!24.100.153.164
Xref: solutions.advantagedatabase.com Advantage.Delphi:13814
Article PK: 1107250

David:

In the example I gave you, AdsQuery1 must be opened first, or you'll get the
error:

"AdsQuery2: Field 'OFFICECODE' not found"

You can't "select" from a "datasource".

Regards,

Doug

"David Looney" <davidl@autostarsolutions.com> wrote in message
news:3f4fa6b6@solutions.advantagedatabase.com...
> Would it help performance any if the DataSource was connected to an
already
> open table and can that even be done?
> Example of using datasource 1 to select records from with the query
object?
> Something like "Select * From Datasource1 Where this = that Order by
this"?
> David Looney
>
> "Doug Nettleton" <doug@teibasl.com> wrote in message
> news:3f4f92cb@solutions.advantagedatabase.com...
> > David:
> >
> > Use it to resolve parameters:
> >
> > e.g. with AdsQuery1, DataSource1, AdsQuery2, DataSource2, DBGrid1
attached
> > to DataSource1, and DBGrid2 attached to DataSource2
> >
> > AdsQuery1.SQL something like 'select officecode, officename from
offices'
> >
> > AdsQuery2.SQL something like 'select * from invoices where officecode =
> > :officecode'
> >
> > set AdsQuery2.DataSource := DataSource1 then as you move through the
> offices
> > list in DBGrid1, the contents of DBGrid2 will be refreshed and
restricted
> to
> > the corresponding office from DBGrid1.
> >
> > Hope that helps.
> >
> > Doug
> >
> > P.S. if there are any other uses, hopefully someone else will jump in
> here.