You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IDataProviderProvider = ProviderFactory.GetProvider("BlahProvider");
new SubSonic.Query.QueryCommand(
"Delete from foo", Provider
).ToDbCommand().ExecuteNonQuery();
This works fine:
SubSonic.Query.QueryCommand query = new SubSonic.Query.QueryCommand( "Delete from foo",Provider);
Provider.ExecuteQuery(query);
StackTrace:
System.InvalidOperationException was unhandled
Message=ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
Source=System.Data
StackTrace:
at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
The text was updated successfully, but these errors were encountered:
Using Multiple Providers. To reproduce exception:
This works fine:
StackTrace:
System.InvalidOperationException was unhandled
Message=ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.
Source=System.Data
StackTrace:
at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
The text was updated successfully, but these errors were encountered: