Subject | RE: [firebird-support] SQL error code = -104 Unexpected end of command, from Delphi App |
---|---|
Author | Maya Opperman |
Post date | 2014-01-09T07:18:51Z |
1. Your insert is failing, but you haven’t provided us with the SQL you are using for an insert. Also, check the refresh SQL property of your DB component.
2. I notice you have an ; at the end of all your SQL. I don’t think that is necessary when entering the SQL into the SQL property of your Delphi component (it isn’t for the IBXpress and FIBPlus components). You might be managing to confuse it somehow with that.
3. You are correct, when passing parameters as variables in Delphi, you don’t need to quote the text to cater for apostrophes. If you were to have built your SQL inline, without passing parameters, THEN you would have had to do that. So, the way your are working is best there, so you don’t have to worry about that.
4. I see your are using ShowMessage() to debug. Not sure if that was just to describe it simply to us, or if your are not using Delphi debugger (F,7 F8) to step through your code. If you aren’t using F7/F8, you’ll find the problem a lot faster if you take some time to learn how to use the debugger, and do away with the showMessage() method.
5. You might find it a lot easier to locate the problem if you use a SQL monitor. Then you’ll see the exact SQL statement that is failing, and can go look at what is character 30 of line 1. I think IBExpert has a SQL monitor, or your Delphi component set might also have a component you can use to create your own SQL monitor.
Cheers
Maya