Registriert seit: 17. Apr 2013
97 Beiträge
|
error in "insert into"
19. Dez 2013, 09:34
hi
i am using adoquery to insert value,as i want to insert more values, therefore i have several lines.
but i got the error "false syntax near to ')'"
i have checked my code but i didnt find it why it gives me error,could anybody please help me?
Code:
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add('select msname, msdate,msid,mspid');
ADOQuery1.SQL.Add(',VZORT,VZID,ZSID,VZORG,VZNAME,NAME_ORG');
ADOQuery1.SQL.Add(',VZOK,VZIT,MZS');
ADOQuery1.SQL.Add('FROM TableA') ;
ADOQuery1.Open;
ADOQuery2.Close;
ADOQuery2.SQL.Clear;
ADOQuery2.SQL.Add('INSERT TableB (msname, msdate,msid,mspid,)');
ADOQuery2.SQL.Add('(VZORT,VZID,ZSID,VZORG,VZNAME,NAME_ORG,)');
ADOQuery2.SQL.Add('(VZOK,VZIT,MZS)');
ADOQuery2.SQL.Add('VALUES(:msname, :msdate,:msid,:mspid,)');
ADOQuery2.SQL.Add('(:VZORT,:VZID,:ZSID,:VZORG,:VZNAME,:NAME_ORG,)');
ADOQuery2.SQL.Add('(:VZOK,:VZIT,:MZS)');
|