Method Community

 

MethodAPISelect_DataSetV2

Last post 04-15-2015 2:16 PM by Method_Jonathan. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-14-2015 3:25 PM

    MethodAPISelect_DataSetV2

    We have code that has been in place for over two years and worked flawlessly. After the login changes we have started getting the following result:

    <?xml version="1.0" encoding="windows-1252" ?><MethodAPI response = "Failure. There were problems with running the query, please verify your parameters" ></MethodAPI>

    Yes. We have changed the login credentials in our code and have verified that they are correct. (They are my login credentials.)

    No. We have not made any other changes to the code.

    Strangely, the code works at times and then goes back to not working.

    Code is below.

    --

    sSelectFields = "FullName"
    sSelectFrom = "Customer"
    sSelectWhere = "SerialNo=" & iSerial & " AND " & "CodeNo=" & iCode
    sSelectGroupBy = ""
    sSelectHaving = ""
    sSelectOrderBy = ""

    'Call the MethodAPI to get the dataset
    sResult = wbsMethodAPI.MethodAPISelect_DataSetV2(sCompanyAccount, sUserName, sPassword, _
    "", datResponse, sSelectFrom, sSelectFields, sSelectWhere, sSelectGroupBy, sSelectHaving, sSelectOrderBy)
    wbsMethodAPI = Nothing

    if gdebug then response.write(sResult)

    --

    I am hoping a developer can provide some info as to what is causing the error message. This is a critical function in our business, we would like to resolve the issue immediately.

  • 04-15-2015 10:29 AM In reply to

    Re: MethodAPISelect_DataSetV2

    Hi Russ, 

    I see two potential problems based on our logs -

    1) I can see for the majority of calls you are using the username@yourcompany.com for authentication.  I do see periodic calls to the methodAPISelect_DataSetV2 that utilize just your Username though - and these appear to be calls that are failing.  My hunch here is that if you find this call in your code and update the credentials, you will no longer receive the error (or at least we can eliminate this as a factor and dive deeper into the problem)

    2) I also see parsing errors for cases where you are passing in "SerialNo= AND CodeNo=" ... you may want to isolate such cases where iSerial or iCode are blank and modify the query before sending a request to the API.

    Let me know if this helps,

    Cheers

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
  • 04-15-2015 10:47 AM In reply to

    Re: MethodAPISelect_DataSetV2

    Jonathan,

    Can you email me a list from the logs of the urls that are using the incorrect credentials?

    We are modifying the code to handle blanks and nulls passed into the serial and code number parameters.

  • 04-15-2015 2:16 PM In reply to

    Re: MethodAPISelect_DataSetV2

    Hi Russ,

    I've sent you an email in reply to this thread.  We can finish this conversation via email.

    Cheers

    Jonathan Gamble
    Product Manager
    Method Integration Inc.
    Local and overseas: 416.847.0400
    Toll Free: 1.888.925.6238
    Fax: 416.640.6027
    E-mail: j.gamble@method.me
Page 1 of 1 (4 items)