Method Community

 

MethodAPISelect_DataSetV2 XML Examples?

Last post 06-25-2013 2:16 PM by Method_David. 17 replies.
Page 2 of 2 (18 items) < Previous 1 2
Sort Posts: Previous Next
  • 06-25-2013 11:24 AM In reply to

    Re: MethodAPISelect_DataSetV2 XML Examples?

    Absolutely, Dave. Thank you again for your help. 

  • 06-25-2013 12:25 PM In reply to

    Re: MethodAPISelect_DataSetV2 XML Examples?

    Thank you, Dave - you have definitely been there answering my questions, and I do appreciate it. Can I depend on RecordID to be a count of rows in the table? If I can, I could deal with fetching where "RecordID >= MyLastRecordID and RecordID < MyLastRecordID+1000" - that would be much better than the time-based query I'm doing now.

  • 06-25-2013 2:16 PM In reply to

    Re: MethodAPISelect_DataSetV2 XML Examples?


    Hi gbisaga,

    No you cannot, since you may have deleted records. What you can do however is a simple call where for your fields parameter all you pass in is max(RecordID) and that will give you your max recordid, then you can build your query to get all records. Or you can use count(RecordID) to get the count. Simple C# examples below

    MethodAPI.Service _MethodAPI = new MethodAPI.Service();

    lblMethodAPISelect_XMLV2.Text = _MethodAPI.MethodAPISelect_XMLV2(CompanyAccount, Login, Password, "", "invoice", "max(recordid)", "", "", "", "");

     _MethodAPI.Dispose();

    MethodAPI.Service _MethodAPI = new MethodAPI.Service();

    lblMethodAPISelect_XMLV2.Text = _MethodAPI.MethodAPISelect_XMLV2(CompanyAccount, Login, Password, "", "invoice", "count(recordid)", "", "", "", "");

    _MethodAPI.Dispose();

     

    Dave

Page 2 of 2 (18 items) < Previous 1 2