PaidtheUmpire
Programmer
I am trying to put through some data into an Access Table from Delphi 7, and am getting the following error:
"Missing Semicolon ( at the end of SQL Statement"
Here is the code... for the SQL statement. All the variables are correctly formatted.
But i am wondering if you could help me find the error of my ways.
Thanks,
Ricko
PS. Sorry about the formatting of the SQL code
Delphi, Delphi, Delphi. Oi! Oi! Oi!
"Missing Semicolon ( at the end of SQL Statement"
Here is the code... for the SQL statement. All the variables are correctly formatted.
But i am wondering if you could help me find the error of my ways.
Code:
SystemData.Junkish.SQL.Clear;
SystemData.JunkIsh.SQL.Add('INSERT INTO Call_Records VALUES ' + QuotedStr(CRN) + ', ' +
QuotedStr(IMSI) + ', ' + QuotedStr(IMEI) + ', ' + QuotedStr(PhoneNo) + ', ' +
QuotedStr(FullTime) + ', ' + QuotedStr(ChargeUnit) + ', ' + QuotedStr(CostD + '.' +
CostC) + ', ' + FloatToStr(CostClient) + ', ' + QuotedStr(LocationCode) + ', ' +
QuotedStr(DataType) + ', ' + QuotedStr(CUR) + ', ' + QuotedStr('Yes') + ', ' +
QuotedStr(Qwerty) + ', ' + IntToStr(Fakeness) + ', ' + QuotedStr(Part2) + ', ' +
QuotedStr(IntToStr(LineNo)) + ', ' + QuotedStr(InvoiceWords) + 'WHERE NOT EXISTS(SELECT
Call_Records.Client_Reference_Number, Call_Records.IMSI_Number,
Call_Records.Phone_Number_Called, Call_Records.Start_Date_And_Time FROM Call_Records' +
'WHERE (((Call_Records.Client_Reference_Number)=[CRN]) AND ((Call_Records.IMSI_Number)=[IMSI])
AND ((Call_Records.Phone_Number_Called)=[Phone]) AND ((Call_Records.Start_Date_And_Time)=[Time]));');
SystemData.Junkish.ExecSQL;
Thanks,
Ricko
PS. Sorry about the formatting of the SQL code
Delphi, Delphi, Delphi. Oi! Oi! Oi!