Subject | Re: UPDATE question |
---|---|
Author | giannifilippone |
Post date | 2007-05-02T13:24:34Z |
with ZEOS components ?? ---->>>>>
ydm.zquery.active:=false;;
ydm.zquery.SQL.Clear;
ydm.zquery.SQL.Add('update diario');
ydm.zquery.SQL.Add('set modo = 2, ');
ydm.zquery.SQL.Add('data_ora_fine = :adesso');
ydm.zquery.SQL.Add('where (utente = :key_user) and');
ydm.zquery.SQL.Add(' (ditta = :key_ditta) and');
ydm.zquery.SQL.Add(' (amministrazione= :key_amm) and');
ydm.zquery.SQL.Add(' (progr = :key_progr)');
ydm.zquery.ParambyName('key_user').AsString := key_user;
ydm.zquery.ParambyName('key_ditta').Asinteger := key_ditta;
ydm.zquery.ParambyName('key_amm').Asinteger := key_amm;
ydm.zquery.ParambyName('key_progr').Asinteger := key_progr;
ydm.zquery.ParambyName('adesso').Asdatetime := now;
ydm.zquery.ExecSql;
k99:= ydm.zquery.RowsAffected; <<<<<<<<<----------------
<<<<<<<<<<<<
if (k99 <> 1) then
MessageBox(Handle,
pchar('MODIFICATI N° '+INTTOSTR(K99)+ ' records'),
'records Modificati - !!! avvisare',
mb_Ok or mb_IconExclamation or mb_DefButton1)
regards,
Gianni Filippini
ydm.zquery.active:=false;;
ydm.zquery.SQL.Clear;
ydm.zquery.SQL.Add('update diario');
ydm.zquery.SQL.Add('set modo = 2, ');
ydm.zquery.SQL.Add('data_ora_fine = :adesso');
ydm.zquery.SQL.Add('where (utente = :key_user) and');
ydm.zquery.SQL.Add(' (ditta = :key_ditta) and');
ydm.zquery.SQL.Add(' (amministrazione= :key_amm) and');
ydm.zquery.SQL.Add(' (progr = :key_progr)');
ydm.zquery.ParambyName('key_user').AsString := key_user;
ydm.zquery.ParambyName('key_ditta').Asinteger := key_ditta;
ydm.zquery.ParambyName('key_amm').Asinteger := key_amm;
ydm.zquery.ParambyName('key_progr').Asinteger := key_progr;
ydm.zquery.ParambyName('adesso').Asdatetime := now;
ydm.zquery.ExecSql;
k99:= ydm.zquery.RowsAffected; <<<<<<<<<----------------
<<<<<<<<<<<<
if (k99 <> 1) then
MessageBox(Handle,
pchar('MODIFICATI N° '+INTTOSTR(K99)+ ' records'),
'records Modificati - !!! avvisare',
mb_Ok or mb_IconExclamation or mb_DefButton1)
regards,
Gianni Filippini