|
-
Sep 28th, 2004, 07:31 AM
#1
Thread Starter
PowerPoster
system error?
at the executenonreader statement, i always get a system error. what am i doing wrong?
Code:
string SQLConnString = myConnection;
SqlConnection myConn = new SqlConnection(SQLConnString);
myConn.Open();
SqlCommand myCommand = new SqlCommand("USE " + TxtDBName.Text + " " + storeProcString);
SqlDataAdapter da1 = new SqlDataAdapter(myCommand);
myCommand.Connection = myConn;
myCommand.ExecuteNonQuery();
myConn.Close();
-
Sep 28th, 2004, 11:13 AM
#2
Frenzied Member
Try:
Code:
string SQLConnString = myConnection;
SqlConnection myConn = new SqlConnection(SQLConnString);
SqlCommand myCommand = new SqlCommand("USE " + TxtDBName.Text + " " + storeProcString, myConn);
SqlDataAdapter da1 = new SqlDataAdapter(myCommand);
myCommand.ExecuteNonQuery();
DJ
-
Sep 28th, 2004, 05:05 PM
#3
Frenzied Member
If you put your code in a try...catch block, and catch the SqlExcpetion, you'll get better details of the exact problem.
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
|