Saya biasanya capture di tempat temporary tidak langsung ke grid, nah untuk memasukkan ke gridnya saya pakai SQL command, yang saya pakai kurang lebih seperti ini:

oQry.SQL.Text := 'SELECT ItemCode FROM TempTransTb WHERE ItemCode = :ItemCode';
oQry.ParamByname( 'ItemCode' ).AsString := cItemCode.Text;
oQry.Open;

if oQry.RecordCount <> 0 then
   begin
    oQry.Close;
    oQry.SQL.Text := 'UPDATE TempTransTb SET Qty = Qty + :Qty WHERE ItemCode = :ItemCode';
   end
else
   begin
     oQry.Close;
     oQry.SQL.Text := 'INSERT INTO TempTransTb ( ItemCode, Qty, Price ) VALUES ( :ItemCode, :Qty, :Price );
     oQry.ParamByName( 'Price' ).asFloat := nPrice;

   end;

oQry.ParamByName( 'Qty' ).asInteger := nQty;
oQry.ParamByName( 'ItemCode' ).asString := cItemCode;
oQry.ExecSQL;


Best regards,
  Sobari Tanuwijaya
  ICQ # 141027563


-------------------------------------------------
There are no problems we cannot solve together,
and very few that we can solve by ourselves
    - Lyndon Johnson.

On Friday, October 22, 2004, 1:39:06 PM, hendrik c wrote:


>  Dear All,

> Untuk input quntity barang yg sama pada program POS yg memakai
> scan barcode tembak yaitu dengan menembakkan barcode sebanyak 2 kali
> berurutan.
> bagaimanakah Triknya untuk hal diatas  ?

> trims

> Hendrikc

> [Non-text portions of this message have been removed]




> Berlangganan: [EMAIL PROTECTED]
> Stop Berlangganan: [EMAIL PROTECTED]
> Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
> Yahoo! Groups Links







Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]



Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=groups/S=:HM/A=2128215/rand=389961417


Yahoo! Groups Links

Reply via email to