Board index » delphi » Delphi doesn't like my query - unspecified error

Delphi doesn't like my query - unspecified error

The query is this

Select keyfield1,excelnumber,productdesc,

format(testtable1.usage,'nnn.nn') as usage,

meastype,pressnumber

from testtable1;

Works fine in Access. Delphi can't handle it. Maybe I'll give it a try in
VB.net

There was some other product I worked with once that had some called a
passthru query. Does Delphi have this?

Perhaps Delphi is looking at my query. The problem is that format statement.
If I take that out everything is ok,

except that my usage field comes out with something like 8 places after the
decimal point when I only want 2 places

 

Re:Delphi doesn't like my query - unspecified error


Quote
"uta" <i...@atemp.com> wrote in message

news:SQpN9.1578$b97.155869@newsread2.prod.itd.earthlink.net...

Quote
> The query is this

> Select keyfield1,excelnumber,productdesc,

> format(testtable1.usage,'nnn.nn') as usage,

> meastype,pressnumber

> from testtable1;

> Works fine in Access. Delphi can't handle it. Maybe I'll give it a try in
> VB.net

> There was some other product I worked with once that had some called a
> passthru query. Does Delphi have this?

> Perhaps Delphi is looking at my query. The problem is that format
statement.
> If I take that out everything is ok,

> except that my usage field comes out with something like 8 places after
the
> decimal point when I only want 2 places

Tried it in VB.net. It wouldn't take that Format function either, but it
didn't matter since
I got the 2 decimal places like I wanted without any extra effort. Looks
like I'll be
converting the application to VB.net a bit sooner that I had figured on.

Re:Delphi doesn't like my query - unspecified error


I guess I'll answer my own question.

TFloatField(ADOQuery1.FieldByName('usage')).DisplayFormat:='####.##';

Quote
"uta" <i...@atemp.com> wrote in message

news:zwtN9.2141$b97.185527@newsread2.prod.itd.earthlink.net...
Quote
> "uta" <i...@atemp.com> wrote in message
> news:SQpN9.1578$b97.155869@newsread2.prod.itd.earthlink.net...
> > The query is this

> > Select keyfield1,excelnumber,productdesc,

> > format(testtable1.usage,'nnn.nn') as usage,

> > meastype,pressnumber

> > from testtable1;

> > Works fine in Access. Delphi can't handle it. Maybe I'll give it a try
in
> > VB.net

> > There was some other product I worked with once that had some called a
> > passthru query. Does Delphi have this?

> > Perhaps Delphi is looking at my query. The problem is that format
> statement.
> > If I take that out everything is ok,

> > except that my usage field comes out with something like 8 places after
> the
> > decimal point when I only want 2 places

> Tried it in VB.net. It wouldn't take that Format function either, but it
> didn't matter since
> I got the 2 decimal places like I wanted without any extra effort. Looks
> like I'll be
> converting the application to VB.net a bit sooner that I had figured on.

Other Threads