Method Community

 

APIDelete

Last post 03-30-2009 9:30 AM by Anonymous. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-26-2009 1:38 PM

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    APIDelete

    I tried using APIDelete and the response was "ThisSqlTransaction has ; it is no longer usable" it deletes 1 record, but I wanted it to delete multiple records, is that not allowed?


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 03-27-2009 10:51 AM In reply to

    Re: APIDelete

    Matt,

    For each APIDelete call there will only be one record deleted at a time. The problem appears to be the table was an accounting table and there were some locking issues when trying to perform some accounting clean up tasks that caused the error.

    We've updated the APIDelete. Can you call the APIDelete again and see if the error message happens. If it continues to happen can you tell us what table you are trying to delete the record from?

    Thanks,

    Peter

  • 03-27-2009 12:47 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: APIDelete

    I'm only trying to delete 1 record per call, just make multiple calls in a row.

    I am trying to delete ofut of a table I created called a1test.

    I tried it again just now get :

    <ERROR><MESSAGE>ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.</MESSAGE><STACKTRACE>   at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method)
       at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String method, SqlCommand command)
       at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at shrServiceCleanUp.fnExecuteSqlTransaction(String sDatabaseName, String sSQL, SqlConnection& connection, String sWebServiceEncryptionKey, Int32 intSecurityID, SqlCommand sqlConn, SqlTransaction sqlTran, String sComingFrom)</STACKTRACE><DETAIL>sSQL=DELETE FROM [a1test] WHERE RecordID=3</DETAIL><sDatabaseName>Apex</sDatabaseName><sComingFrom></sComingFrom></ERROR>

     


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 03-30-2009 9:30 AM In reply to

    Re: APIDelete

     Matt,

    This was an issue with non-accounting tables.  I've update the API so you can try the delete out again.

    Let me know if you have any other questions/issues.

    Pete

Page 1 of 1 (4 items)