Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling data from an excel sheet - Column Heading Issue

Status
Not open for further replies.

jetar

Programmer
Oct 16, 2003
49
0
0
US
Hey all,

I am using an excel worksheet as a data source for an ASP.NET page using VB.NET. The excel sheet has four columns 3 of which have one word headers, but one of them is broken up into two words, 'Sub-core Process', to be exact.

My problem is, if I try to reference that column in an sql query like 'Select Sub-core Process From tblName' it errors out b/c it doesnt like the two word column name.

Does anyone know a way around this without changing the column heading to one word as I am not in a position to do that and it is pretty set as is. Thanks for the help.
 
Select [Sub-core Process] From tblName

I am pretty sure it is the same as Access - you specify field or table names in square brackets when there are spaces in them

Give it a try

Mark [openup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top