| Author |
Reading multple columns in 1 query.
|
Sam Smoot
Ranch Hand
Joined: Apr 18, 2002
Posts: 238
|
|
I'm attaching to an Access 2000 database on a shared mapped drive and can pull 1 column in at a time through my SQL statement. I have to execute a separate SQL call for each column, which seems to be a waste. I want to be able to pull in and show all the fields in each row. What do I do to show both / all of the columns in each row? (I'm just trying to get a handle on this, so I know this application doesn't make sense yet....) Thanks in Advance! [ February 18, 2004: Message edited by: Sam Smoot ]
|
CNSS/NSA Infosec Professional,<br />Software Engineer
|
 |
Sonny Gill
Ranch Hand
Joined: Feb 02, 2002
Posts: 1211
|
|
This could be your problem, unless SQL Server allows this! String SQL="SELECT FirstName LastName FROM TeamInfo"; the missing comma between FirstName and LastName. Try changing it to String SQL="SELECT FirstName, LastName FROM TeamInfo";
|
The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
|
 |
Sam Smoot
Ranch Hand
Joined: Apr 18, 2002
Posts: 238
|
|
DUHHHHHHHH!!! That fixed it... I gotta quit running in mixed mode and stick to one thing... Thanks!
|
 |
Sonny Gill
Ranch Hand
Joined: Feb 02, 2002
Posts: 1211
|
|
no worries, mate. cases like this, sometimes you can debug by trying to use PreparedStatement instead of Statement. cheers
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
|
And if you want all the columns you can just use SELECT * FROM ...
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Reading multple columns in 1 query.
|
|
|