views:

40

answers:

2

I'm trying to make query in a table that has a column named "First Name"

dim info = from md in employees _
where md!first name = "test" 

How can I use the field "first name" in this query.

I've tried \"first name\" and ""first name"" but neither works.

+2  A: 

Identifiers can't contain spaces in VB. The designer, I think, removes the spaces from the name when creating the entity class so it would simply be FirstName.

tvanfosson
Ok, good to know , I'm now changing the column name when i'm importing it into the database.
Iulian
A: 

Take a look at the class generated for your table. See if you can find the name of the field inside of it.

Methods, variables, properties, etc. can't contain spaces. Either the field has been left out of the class that's generated to represent your database table, or spaces has been stripped.

On a side-note; you might want to re-consider using spaces in column-names--using spaces and reserved key words are not very good practice.

roosteronacid