Board index » delphi » Spaces in Field Names

Spaces in Field Names

I have a Paradox table where some fields have spaces in their names.
But when I try to use an SQL statement with a field like "Our Ref" I
get a BDE error, and also if I use QuickReport it won't show or print
fields with a space in their names?

Do I just have to not use sapces in field names or is there a way
round this?

Thankyou,

Finn

 

Re:Spaces in Field Names


Quote
Finn Austin wrote:
> I have a Paradox table where some fields have spaces in their names.
> But when I try to use an SQL statement with a field like "Our Ref" I
> get a BDE error, and also if I use QuickReport it won't show or print
> fields with a space in their names?
> Do I just have to not use sapces in field names or is there a way
> round this?

Try to "quote" the field names.  I think this is covered in the manuals.

Aage J.

Re:Spaces in Field Names


Select A."Field 1", A."Field Two" From MyTable as A

Anthony Laudani
The Lane Construction Corporation
Meriden,  Connecticut

Quote
Finn Austin wrote in message <348fa850.6172...@news.dial.pipex.com>...
>I have a Paradox table where some fields have spaces in their names.
>But when I try to use an SQL statement with a field like "Our Ref" I
>get a BDE error, and also if I use QuickReport it won't show or print
>fields with a space in their names?

>Do I just have to not use sapces in field names or is there a way
>round this?

>Thankyou,

>Finn

Re:Spaces in Field Names


I am not sure about Delphi, but in paradox objectpal, you could enclose a
field name in parens () to force it to read a field name with spaces,
periods, or other "bad" things in it. After fighting with this for a while,
I have come to the conclusion that it is best to avoid using these
characters in field names.

--
Greg R. Johnson
CompuCom

gjohn...@mail.icongrp.com
http://cgi.icongrp.com/~gjohnson/

Quote
Finn Austin wrote in message <348fa850.6172...@news.dial.pipex.com>...
>I have a Paradox table where some fields have spaces in their names.
>But when I try to use an SQL statement with a field like "Our Ref" I
>get a BDE error, and also if I use QuickReport it won't show or print
>fields with a space in their names?

>Do I just have to not use sapces in field names or is there a way
>round this?

>Thankyou,

>Finn

Other Threads