|
-
February 4th, 2009, 10:39 AM
#3
Re: I can create a SQL connection, but can't run any queries
 Originally Posted by darwen
Open the connection before creating the SqlCommand.
Also the output of the SQL select statement doesn't contain "Column1" or "Column2" in its output : its columns (as you specified) are "order_num" and "return_num".
So the code should read :
Code:
Console.WriteLine(thisReader["order_num"].ToString());
Console.WriteLine(thisReader["return_num"].ToString());
Darwen.
thanks, but that did not work, i got the same error.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|