ERROR: Exception query was 'CREATE NONCLUSTERED INDEX[I1] ON AllAccounts_BAK ( [Master_received_Day] ASC )' with exception One or more errors occurred. ERROR: Exception Inner Exception Unable to read data from the transport connection: Operation on non-blocking socket would block.
Here is the Code in C# that executes this query:
private void ExecuteQuery(string qStr)
{
using (SqlConnection cnx = new SqlConnection(_ConnectionString))
{
using (SqlCommand cmd = new SqlCommand(qStr, cnx))
{
cmd.Connection.Open();
cmd.ExecuteNonQuery();
}
}
}
The connection string is tested just before the query to be sure that it will do a connection by retrieving two rows of data. No-one else uses the database. The query has been tested in the SQL Operation Console and it works. It is a tcp connection to an Azure database. I have loaded data and done queries using this kind of code. What causes this kind of error?