Board index » delphi » Select with count(column) don't work...

Select with count(column) don't work...

Hi, i have D5 with an ADO connectionstring to an MDB ACCESS database.
When i execute the following simple statement, delphi say : ' field lastname
not found'

SELECT count(ado_persons.lastname) as ctl
FROM ado_persons

What happend ?

Thanks.

 

Re:Select with count(column) don't work...


Execute next statement instead:

SELECT count(*) as ctl
FROM ado_persons

--
With best regards, Mike Shkolnik
E-mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

Quote
"Eric Hubert" <eric.hub...@teledis.net> wrote in message

news:3e612099@newsgroups.borland.com...
Quote
> Hi, i have D5 with an ADO connectionstring to an MDB ACCESS database.
> When i execute the following simple statement, delphi say : ' field
lastname
> not found'

> SELECT count(ado_persons.lastname) as ctl
> FROM ado_persons

> What happend ?

> Thanks.

Re:Select with count(column) don't work...


I try this statement but i have always the message
'field lastname not found'

SELECT count(*) as ctl
FROM ado_persons

"Mike Shkolnik" <mshkolnik2...@ukr.net> a crit dans le message de news:
3e612...@newsgroups.borland.com...

Quote
> Execute next statement instead:

> SELECT count(*) as ctl
> FROM ado_persons

> --
> With best regards, Mike Shkolnik
> E-mail: mshkol...@scalabium.com
> WEB: http://www.scalabium.com

> "Eric Hubert" <eric.hub...@teledis.net> wrote in message
> news:3e612099@newsgroups.borland.com...
> > Hi, i have D5 with an ADO connectionstring to an MDB ACCESS database.
> > When i execute the following simple statement, delphi say : ' field
> lastname
> > not found'

> > SELECT count(ado_persons.lastname) as ctl
> > FROM ado_persons

> > What happend ?

> > Thanks.

Re:Select with count(column) don't work...


Quote
"Eric Hubert" <eric.hub...@teledis.net> wrote in message

news:3e612954$1@newsgroups.borland.com...

Quote
> I try this statement but i have always the message
> 'field lastname not found'

> SELECT count(*) as ctl
> FROM ado_persons

Try to clear TADOQuery fields.

Re:Select with count(column) don't work...


Quote
>Hi, i have D5 with an ADO connectionstring to an MDB ACCESS database.
>When i execute the following simple statement, delphi say : ' field lastname
>not found'

>SELECT count(ado_persons.lastname) as ctl
>FROM ado_persons

Right click on the TadoDataset choose the Fields Editor and see if you have
persistent fields saved that you need to remove.
--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Other Threads