I have this statement in Delphi
Datamodule1.Query1.SQl.Add('Start Transaction;');
Datamodule1.Query1.SQl.Add('Insert into independantfamilyplan');
Datamodule1.Query1.SQl.Add('values(''1111111111'',''Martin'',''sssss'',''8006195076089'',''70'',''GA010001'',''2004/05/05'',''0'');');
Datamodule1.Query1.SQl.Add('Insert into production');
Datamodule1.Query1.SQl.Add('select a.`Policy Number`, a.`PolicyHolder ID`, a.`Agent AccreditationCode`, a.`Policy Premium`, ''0'',''0000-00-00'',''0'',''Independent Family Care Plan'',''2004/05/05'' from independantfamilyplan a where a.`Policy Number` = ''1111111111'';');
Datamodule1.Query1.SQl.Add('Commit;');
and then this
Datamodule1.Query1.ExecSQL;
but it gives me an error before Insert into independantfamilyplan'? It says the ; is wrong? I have tested it in MySQL and the query works but in delphi it doesn't want to.
Does anybody know why?
thanks
Datamodule1.Query1.SQl.Add('Start Transaction;');
Datamodule1.Query1.SQl.Add('Insert into independantfamilyplan');
Datamodule1.Query1.SQl.Add('values(''1111111111'',''Martin'',''sssss'',''8006195076089'',''70'',''GA010001'',''2004/05/05'',''0'');');
Datamodule1.Query1.SQl.Add('Insert into production');
Datamodule1.Query1.SQl.Add('select a.`Policy Number`, a.`PolicyHolder ID`, a.`Agent AccreditationCode`, a.`Policy Premium`, ''0'',''0000-00-00'',''0'',''Independent Family Care Plan'',''2004/05/05'' from independantfamilyplan a where a.`Policy Number` = ''1111111111'';');
Datamodule1.Query1.SQl.Add('Commit;');
and then this
Datamodule1.Query1.ExecSQL;
but it gives me an error before Insert into independantfamilyplan'? It says the ; is wrong? I have tested it in MySQL and the query works but in delphi it doesn't want to.
Does anybody know why?
thanks