Board index » delphi » Select Top 20 *...

Select Top 20 *...

Hi,

I'm getting an error message when I use 'Select top 20 * from profile'. The
same works well from the MS-SQL Query Analyzer.

Thanks

C.Fleury

 

Re:Select Top 20 *...


Are you using a TQuery with RequestLive set to true ?
If you don't need a live result set, set RequestLive to false and
see if that works.

HTH,
Stephen

Quote
C.Fleury <Fle...@CompuTimes.net> wrote in message news:3a0643a6$1_2@dnews...
> I'm getting an error message when I use 'Select top 20 * from profile'.
The
> same works well from the MS-SQL Query Analyzer.

Re:Select Top 20 *...


It does (setting RequestLive to False). But I really need it to be
true...any work around ?
Thanks
C.Fleury

Quote
"Stephen Ahn" <s...@visionfps.com.au> wrote in message

news:3a073bd6_1@dnews...
Quote
> Are you using a TQuery with RequestLive set to true ?
> If you don't need a live result set, set RequestLive to false and
> see if that works.

> HTH,
> Stephen

> C.Fleury <Fle...@CompuTimes.net> wrote in message

news:3a0643a6$1_2@dnews...
Quote
> > I'm getting an error message when I use 'Select top 20 * from profile'.
> The
> > same works well from the MS-SQL Query Analyzer.

Re:Select Top 20 *...


Some ideas, though not sure if this will help in your situation :
- use ADO instead of BDE. It's better suited to working with
MSSQL7.
- Use RequestLive set to false, and redesign that part of
your app, so that the user enters data via an input screen
(rather than directly in the Grid) and updates the db using
a different TQuery (with RequestLive = true) which just
selects the one record being modified.

Good luck,
Stephen

Quote
"C.Fleury" <Fle...@CompuTimes.net> wrote in message news:3a079116_1@dnews...
> It does (setting RequestLive to False). But I really need it to be
> true...any work around ?
> Thanks
> C.Fleury

> "Stephen Ahn" <s...@visionfps.com.au> wrote in message
> news:3a073bd6_1@dnews...
> > Are you using a TQuery with RequestLive set to true ?
> > If you don't need a live result set, set RequestLive to false and
> > see if that works.

> > HTH,
> > Stephen

> > C.Fleury <Fle...@CompuTimes.net> wrote in message
> news:3a0643a6$1_2@dnews...
> > > I'm getting an error message when I use 'Select top 20 * from
profile'.
> > The
> > > same works well from the MS-SQL Query Analyzer.

Re:Select Top 20 *...


Quote
> updates the db using a different TQuery (with RequestLive = true) which just
> selects the one record being modified.

Or even better, use TQuery with SQL statement like "update <TABLE> set <FIELD1>
= :Field1..... where <FIELDN>= :FieldN" and supply values through PARAMS
property. IMHO it gives you more control over process. Happy coding...
Ilia

Other Threads