I am getting some sql errors when trying to insert a record to mysql table using asp.net application.
Let me explain the scenario for your reference.
This asp.net web form is executing perfectly when i am trying it in my localhost.
The error is getting when I tried it with my hosting server.
Expand|Select|Wrap|Line Numbers
- System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Dr_no', table 'myDB.username.tablename'; column does not allow nulls. INSERT fails.
But why is that error about NULL values?
one more thing I should say to you guys,
Actually there are nearly 2500 records in the table currently.
Will it be the problem, I mean time out issues or some thing.
because This error also getting (not always) in my query analyser when I am executing queries against remote host.
Query Analyser:
Expand|Select|Wrap|Line Numbers
- [Microsoft][ODBC SQL Server Driver]TDS buffer length too large
Here this is the complete error:
Asp.net page
Expand|Select|Wrap|Line Numbers
- System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Dr_no', table 'myDB.username.tablename'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at myproject.registration.Page_Load(Object sender, EventArgs e)