Visual Studio 2015
Desktop App
Trying to execute a WORKING stored procedure from my app.
Here is the call...
string SQL2 = @"[dbo].[GetBestDeliveryAddress]"; using (SqlCommand myCommand2 = new SqlCommand(SQL2, myConnection)) { myCommand2.Parameters.AddWithValue("@DeliveryID", newtix); myCommand2.CommandType = CommandType.StoredProcedure; myCommand2.ExecuteNonQuery(); }
I get this error:
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: Could not find stored procedure ''
This happens whether I add the param after the SQL string or not.
@"[dbo].[GetBestDeliveryAddress] @DeliveryID";
I followed an example I found online exactly, I am a little confused why it's not working.
I'd rather live with false hope than with false despair.