sql insert question

tremara1

Active Member
Licensed User
Longtime 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:
 

klaus

Expert
Licensed User
Longtime 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:
Top