Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003

    invoking an asp script


    I have a midlet that implements a Http connection to an asp script. the connection is successful and the midlet receives an OK response from the server.

    My problem is how do I send a recordset back to the midlet?


  2. #2
    Super Contributor
    Join Date
    Mar 2003

    RE: invoking an asp script

    What you can do is send the recodset as a delimited string back to the MIDlet and in the MIDlet you read the content and parse the string into Java objects or primitive types. For example:
    ' oRS is the recordset of course
    response.write(oRS("id&quot) & ";" & oRS("name&quot)

    // after getting the response, where c is the connection object
    InputStream is = c.openInputStream();
    int ch;
    StringBuffer sb = new StringBuffer();
    while ((ch = is.read()) != -1) {
    String response = sb.toString()
    // and now you go on to parse response (in this case, looking for
    // the ';' and getting the substrings before and after it and putting
    // them in the object where you store the recordset)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts