Lebih baik :

private sub simpandata
dim i as long

on error goto errSave
with Conn
   i=.begintrans
   .execute str_insert
   .committrans
end with

msgbox "data berhasil disimpan"

exit sub
errSave: 'ada error
if i>0 then conn.rollbacktrans
end sub


Best Regards,
David J M

Advanced Access
Independent Software Vendor
-----------------------------



 --- On Thu 02/02, bart2000e < [EMAIL PROTECTED] > wrote:
From: bart2000e [mailto: [EMAIL PROTECTED]

maksudnya kaya gini :
on error goto errSave
with Conn
   .begintrans
   .execute str_insert
   .committrans
end with
on error goto 0
  if apakahada("tblMasterBarang", "KodeBarang", txtkodebarang.text)
=false then conn.rollbacktrans

  exit sub
  errSave :
ato saya salah maksud pak ?
thx



_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!




Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED]

Ikuti juga forum diskusi VB.net dengan 
mengirim email kosong ke [EMAIL PROTECTED]
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indoprog-vb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke