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

前端 未结 6 1218
醉梦人生
醉梦人生 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:52

    use try-catch to see real error occurred on you

     try
    {
      //Your insert code here
    }
    catch (System.Data.SqlClient.SqlException sqlException)
    {
      System.Windows.Forms.MessageBox.Show(sqlException.Message);
    }
    

提交回复
热议问题