What am I overlooking?

Discussion in 'Questions (Windows Mobile)' started by Scubaticus, Oct 31, 2007.

  1. Scubaticus

    Scubaticus Active Member Licensed User

    Code:
    fCtciDat = 1
    sqlCmd = 
    "Select Alias from Locs As l outer join Sess As s on l.Ndx = s.Ndx Where s.sSes >= '" & fCtciDat & "' AND s.eSes <= '" & fCtciDat & "'"
    After executing the above code, sqlCmd has the value "The XML was improperly formatted. Please escape it if necessary"

    Do I overlook something? I don't see it.
    If there is something wrong in formatting a string I would expect a runtime error message, not a completely different value in my string!

    Scub
     
  2. LineCutter

    LineCutter Active Member Licensed User

    Take it apart into it's components & feed them through the SQL parser one additional step at a time until it complains. It could be something in the format of your variable.
     
  3. Scubaticus

    Scubaticus Active Member Licensed User

    I'm just filling a string with a value. I took the string in parts and when the <= comes in the value of the SqlCmd string is changed with the XML error.

    SqlCmd could also be named JustAString with the same result.

    SQL has nothing to do with it at this point.

    Scub
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    This is not the value of SQLCmd.
    There is a bug in the IDE that causes this message (it tries to parse the string as XML because of the > sign).
    It is fixed in the next version.
    You can check its value in the watches fields.
     
  5. LineCutter

    LineCutter Active Member Licensed User

    I hate it when Erel is better at this than me, even if I did beat him to replying ;)
     
  6. Scubaticus

    Scubaticus Active Member Licensed User

    He's fast and always points to the right direction. The 'error' is gone anyway in the new release. My mistake was stopping the debugger after the strange string value the debugger gave me. Blame it at working to late .... :)
     
Loading...