Hi
I try to use this code in a vb.net application but I get a an error on the "MyCommand.ExecuteNonQuery()" line.
I dont see any faults in this code, am I missing something here?
The only errror message VS give me is...
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
(The stored procedure is to drop a column in a database table.)
Regards
I try to use this code in a vb.net application but I get a an error on the "MyCommand.ExecuteNonQuery()" line.
I dont see any faults in this code, am I missing something here?
Code:
Dim MyConnection As SqlConnection
Dim MyCommand As SqlCommand
Dim MyDataReader As SqlDataReader
MyConnection = New SqlConnection(connStr)
MyCommand = New SqlCommand("p_DropColumn", MyConnection)
MyCommand.CommandType = CommandType.StoredProcedure
MyConnection.Open()
MyCommand.ExecuteNonQuery()
MyConnection.Dispose()
The only errror message VS give me is...
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error.
(The stored procedure is to drop a column in a database table.)
Regards