sql insert question

Discussion in 'Questions (Windows Mobile)' started by tremara1, Nov 20, 2008.

  1. tremara1

    tremara1 Active Member Licensed User

    I ran into a strange one when I tried to use this insert statement. When I ran it in B4ppc it actually worked,
    but when I tried to compile it there was(obviously) an error.

    This actually worked when run in debug mode

    text = "INSERT into pword(name,med,dose,time,spi) values('"
    text = text & txtName.text
    text = text & "','" txtMed.text
    text = text & "','" txtDose.text
    text = text & "','" txtTimes.text
    text = text & "','" txtSP.text
    text = text & "')"

    This is what it should have been

    text = "INSERT into pword(name,med,dose,time,spi) values('"
    text = text & txtName.text
    text = text & "','" & txtMed.text
    text = text & "','" & txtDose.text
    text = text & "','" & txtTimes.text
    text = text & "','" & txtSP.text
    text = text & "')"

    It took me ages to see it as it ran perfectly in debug I was just curious as to why it worked.

    thanks.......:sign0161:
     
  2. klaus

    klaus Expert Licensed User

    This shows only that the IDE is more permissive and allows some missings, but the compiler is restrictive and needs the correct spelling.

    I had sometimes similar concerns, and I agree with you that it's mostly not that easy to find out why it works in the IDE and not in the compiler.

    It would be interesting to have Erel's comment, if he intends to make the IDE in the future as 'restrictive' as the compiler and having identical behaviours for both.

    Best regards.
     
    Last edited: Nov 20, 2008
  3. Erel

    Erel Administrator Staff Member Licensed User

    I consider it a bug and it will be fixed in the next version.
    The IDE should also show an error in such case.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice