dbTalk Databases Forums  

Column Names

comp.database.ms-access comp.database.ms-access


Discuss Column Names in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Warren
 
Posts: n/a

Default Column Names - 12-11-2003 , 09:39 PM






I am trying to capture some data from a MS Access DB which was created and
populated by a VB program I did not write. I can grab all the data but I
need to grab certain columns only, problem is the column names have spaces
in them.

IE

Cabinet Height, Cabinet Depth, Cabinet Width.

When I create the SQL statement during run time I tried the following from
my C++ program

Select Cabinet Height, Cabinet Depth, Cabinet Width From tbName;

Select Cabinet_Height, Cabinet_Depth, Cabinet_Width From tbName;

Neither worked, the only thing that seems to work is the wildcard *.

Do the columns come out of the Access DB as an Array

Select column[10], column[11], column[12] From tbName;

Or is there another way to call each column from the database that I need
and not all of the columns?


Warren



Reply With Quote
  #2  
Old   
Warren
 
Posts: n/a

Default found it thanks anyway No Message In Side - 12-12-2003 , 12:56 AM







"Warren" <wyght (AT) REMOVEwyght (DOT) com> wrote

Quote:
I am trying to capture some data from a MS Access DB which was created and
populated by a VB program I did not write. I can grab all the data but I
need to grab certain columns only, problem is the column names have spaces
in them.

IE

Cabinet Height, Cabinet Depth, Cabinet Width.

When I create the SQL statement during run time I tried the following from
my C++ program

Select Cabinet Height, Cabinet Depth, Cabinet Width From tbName;

Select Cabinet_Height, Cabinet_Depth, Cabinet_Width From tbName;

Neither worked, the only thing that seems to work is the wildcard *.

Do the columns come out of the Access DB as an Array

Select column[10], column[11], column[12] From tbName;

Or is there another way to call each column from the database that I need
and not all of the columns?


Warren





Reply With Quote
  #3  
Old   
Bradley
 
Posts: n/a

Default Re: Column Names - 12-14-2003 , 06:49 PM



"Warren" <wyght (AT) REMOVEwyght (DOT) com> wrote

Quote:
I am trying to capture some data from a MS Access DB which was created and
populated by a VB program I did not write. I can grab all the data but I
need to grab certain columns only, problem is the column names have spaces
in them.

IE

Cabinet Height, Cabinet Depth, Cabinet Width.

When I create the SQL statement during run time I tried the following from
my C++ program

Select Cabinet Height, Cabinet Depth, Cabinet Width From tbName;

Select Cabinet_Height, Cabinet_Depth, Cabinet_Width From tbName;

Neither worked, the only thing that seems to work is the wildcard *.

Do the columns come out of the Access DB as an Array

Select column[10], column[11], column[12] From tbName;

Or is there another way to call each column from the database that I need
and not all of the columns?


Warren
Put square brackets around the column names...

Select [Cabinet Height], [Cabinet Depth], [Cabinet Width] From tbName

I recommend that people do not put any spaces or special characters in
object names.. and always put square brackets in as good practice.

--
Bradley
Software Developer www.hrsystems.com.au
A Christian Response www.pastornet.net.au/response




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.