I am trying to retrieve a field "DESC" from a table in a DB.
If I send my Select statement is "SELECT * FROM Table" I get a bunch
of fields that I don't want. If I use "SELECT DESC FROM Table", my vb
program shows an error in the statement while trying to open the
recordset. I've tracked this down to DESC being a keyword. I am
actually interested in getting ten of the 100+ fields in the table but
it won't let me use the field name "DESC" in the select statement.
Since I can't change the name of the field I am reading from, is there
any workaround?
There may be a well known way to pass a keyword as a field name but
I've not been able to find the answer.
Thanks.
-jeff
Ralph - 28 Oct 2005 23:15 GMT
> I am trying to retrieve a field "DESC" from a table in a DB.
>
[quoted text clipped - 14 lines]
>
> -jeff
Depends on your database. There are 'escape' delimiters.
You might be able to do something as simple as ...
SELECT [DESC] FROM <table>
-ralph