Subject | Unexpected End of Command |
---|---|
Author | Andrew Gable |
Post date | 2013-11-02T19:01:05Z |
Hi all
I have a problem that has ONLY just started to happen
When ever I run the following SQL command from within my software
THIS has been working for the last 3yrs ever since I moved over to Firebird (I have software running the same command
and they are working fine)
RecData = Replace(RecData, "'", "''")
JournalRollEntry = Replace(JournalRollEntry, "'", "''")
SQLCommand = vbNullString
SQLCommand = SQLCommand & "INSERT INTO JournalRoll "
SQLCommand = SQLCommand & "VALUES ('"
SQLCommand = SQLCommand & Format(RecDate, "YYYY/MM/DD") & "','"
SQLCommand = SQLCommand & Format(RecTime, "HH:MM") & "','"
SQLCommand = SQLCommand & Format(PoSNumber, "000") & "','"
SQLCommand = SQLCommand & Format(TransNumber, "000000") & "','"
SQLCommand = SQLCommand & CashierID & "','"
SQLCommand = SQLCommand & JournalRollEntry & "','"
SQLCommand = SQLCommand & RecData & "')"
NetworkDatabaseConnection.Execute SQLCommand
I get the following error message
Run-time error ‘-2147467259 (80004005)’;
[ODBC firebird Driver][Firebird]Dynamic SQL Error
SQL error code =-104
Unexpected end of command –line ##, column ***
## and *** always change no matter what information I send.
This is an example of what I am trying to store into the database (Debug print out of what i am sending)
INSERT INTO JournalRoll VALUES ('2013/11/02','18:33','101','001541','1',' MANUAL GOODS £14.99 A
MANUAL GOODS £4.99 A
MANUAL GOODS £4.00 A
==========================================
SUB TOTAL £23.98
3 ITEMS SOLD
==========================================
CASH £25.00
CHANGE DUE £1.02
==========================================
02/11/2013 18:33 101 001541 1 0001','|N|1C MANUAL GOODS œ14.99 A
|N|1C MANUAL GOODS œ4.99 A
|N|1C MANUAL GOODS œ4.00 A
|N|1C==========================================
|N|3C SUB TOTAL œ23.98
|cA|2C3 ITEMS SOLD
|N|1C==========================================
|N|3C CASH œ25.00
|N|3C CHANGE DUE œ1.02
|N|1C
|N|1C|bC******************************************
|cA|4CNo Card?
|N|1CIf you had a loyalty card today you
|N|1CYou would have gotten points towards
|N|1Cyour Loyalty Voucher.
|N|1C
|N|1CAsk in Store for more details
|N|1C|bC****************************************** |N|1C')