Error on Update

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vovan

    #1

    Error on Update

    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.Sq lClient.SqlExce ption: 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.Sql Client.SqlConne ction.OnError(S qlException exception,
    Boolean breakConnection )
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
    exception, Boolean breakConnection )
    at
    System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
    stateObj)
    at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
    cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
    bulkCopyHandler , TdsParserStateO bject stateObj)
    at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
    RunBehavior runBehavior, String resetOptionsStr ing)
    at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
    DbAsyncResult result)
    at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
    result, String methodName, Boolean sendToPipe)
    at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
    at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
    G:\_CMS\CMS0416 2007\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


  • rowe_newsgroups

    #2
    Re: Error on Update

    On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
    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.Sq lClient.SqlExce ption: 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.Sql Client.SqlConne ction.OnError(S qlException exception,
    Boolean breakConnection )
    at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
    exception, Boolean breakConnection )
    at
    System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
    stateObj)
    at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
    cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
    bulkCopyHandler , TdsParserStateO bject stateObj)
    at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
    RunBehavior runBehavior, String resetOptionsStr ing)
    at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
    at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
    cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method,
    DbAsyncResult result)
    at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
    result, String methodName, Boolean sendToPipe)
    at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
    at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
    G:\_CMS\CMS0416 2007\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

    Comment

    • vovan

      #3
      Re: Error on Update

      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

      "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
      news:1176733963 .895307.230530@ n76g2000hsh.goo glegroups.com.. .
      On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
      >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.S qlClient.SqlExc eption: 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.Sql Client.SqlConne ction.OnError(S qlException exception,
      >Boolean breakConnection )
      >at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
      >exception, Boolean breakConnection )
      >at
      >System.Data.Sq lClient.TdsPars er.ThrowExcepti onAndWarning(Td sParserStateObj ect
      >stateObj)
      >at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
      >SqlCommand
      >cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
      >bulkCopyHandle r, TdsParserStateO bject stateObj)
      >at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
      >RunBehavior runBehavior, String resetOptionsStr ing)
      >at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
      >cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
      >async)
      >at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
      >cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
      >method,
      >DbAsyncResul t result)
      >at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
      >result, String methodName, Boolean sendToPipe)
      >at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
      >at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
      >G:\_CMS\CMS041 62007\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
      >

      Comment

      • vovan

        #4
        Re: Error on Update

        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

        "rowe_newsgroup s" <rowe_email@yah oo.comwrote in message
        news:1176733963 .895307.230530@ n76g2000hsh.goo glegroups.com.. .
        On Apr 16, 10:26 am, "vovan" <some...@vovan. comwrote:
        >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.S qlClient.SqlExc eption: 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.Sql Client.SqlConne ction.OnError(S qlException exception,
        >Boolean breakConnection )
        >at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
        >exception, Boolean breakConnection )
        >at
        >System.Data.Sq lClient.TdsPars er.ThrowExcepti onAndWarning(Td sParserStateObj ect
        >stateObj)
        >at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
        >SqlCommand
        >cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
        >bulkCopyHandle r, TdsParserStateO bject stateObj)
        >at System.Data.Sql Client.SqlComma nd.FinishExecut eReader(SqlData Reader ds,
        >RunBehavior runBehavior, String resetOptionsStr ing)
        >at System.Data.Sql Client.SqlComma nd.RunExecuteRe aderTds(Command Behavior
        >cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
        >async)
        >at System.Data.Sql Client.SqlComma nd.RunExecuteRe ader(CommandBeh avior
        >cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String
        >method,
        >DbAsyncResul t result)
        >at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
        >result, String methodName, Boolean sendToPipe)
        >at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
        >at CMS.Client.Upda teInsertLocatio n(Int32 IsNew) in
        >G:\_CMS\CMS041 62007\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
        >

        Comment

        Working...