An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

前端 未结 6 1221
醉梦人生
醉梦人生 2020-12-16 04:07

When I execute my code below, this error message occurs:

"An exception of type \'System.Data.SqlClient.SqlException\' occurred in System.Data.dll bu

6条回答
  •  情深已故
    2020-12-16 04:43

    using (var cmd = new SqlCommand("SELECT EmpName FROM [Employee] WHERE EmpID = @id", con))
    

    put [] around table name ;)

提交回复
热议问题