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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Invalid Column Names... but i can query it?

Status
Not open for further replies.

mhurst925

IS-IT--Management
Jan 5, 2006
19
0
0
US
I have a vb program that uses a DataReader to get 5 values from a row that has approximately 13 columns. I am able to collect values if they are found in columns 0-7, anything from columns 8 - 13 return "Invalid Column Name". I am assuming that this is partly because the .fieldcount returns a value of 8. The odd thing is that I am able to go into the SQL Management Studio and run the desired query and return all column values from the row. I thought this could have been caused by the DataReader so i created a SQLCommand to query for only 1 of the inaccessible values, this returns the same error.

I am stuck on how to resolve this so i can continue writing this program.

Thanks
 

Could you post the code you use to get the data from the database, and the code to get the values from the returned data? Also, what are the names of the problem fields?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top