Error on Update

V

vovan

I'm trying to run SQL Server Stored Procedure to update a single record in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem. I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.SqlClient.SqlException: A severe error occurred on the current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should
be discarded.
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 CMS.Client.UpdateInsertLocation(Int32 IsNew) in
G:\_CMS\CMS04162007\Client.vb:line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan
 
R

rowe_newsgroups

I'm trying to run SQL Server Stored Procedure to update a single record in
DB from VB 2005 application.
I'm using 2 testing SQL Servers. With the first one there is no problem. I
detached the database from the first server and attached it to the second
one. With the second server I get an error:
"System.Data.SqlClient.SqlException: A severe error occurred on the current
command. The results, if any, should be discarded.
A severe error occurred on the current command. The results, if any, should
be discarded.
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 CMS.Client.UpdateInsertLocation(Int32 IsNew) in
G:\_CMS\CMS04162007\Client.vb:line 767"

Why could it happen? All Select SPs are working fine. I'm using the same
connection object (of cource with different connection string).

Any help please

vovan

Can you run the sproc from enterprise manager or query analyzer? You
might also check the event logs on the server to see if it gives a
better description of the error.

Thanks,

Seth Rowe
 
V

vovan

No problem with executing from Enterprise Manager. I also did not find any
record in Log file related to this problem. I was looking for time when
error happened as well as for anything else related to the problem.

vovan
 
V

vovan

One of the fields in the updatable table is varchar(8000). After I made it
smaller (varchar(4000)) everything works.
I think this is relater to SQL Server settings. So on one server that size
doesn't affect the package while on another server it does affect.
Either I need to find out what setting is responsible for the package size
or just keep the size of the column small enough.

vovan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top