pada event TombolSave_Click(...), di ketikan saja beberapa perintah untuk
simpan record2 yg dikehendaki.
Dapat juga menggunakan Transactions.

Contoh:
 
myTransaction = cnWIS.BeginTransaction(strTransaction)
mySqlCommand.Connection = cnWIS
mySqlCommand.Transaction = myTransaction

'----- perintah-1
mySqlCommand.CommandText = perintah-1
mySqlCommand.ExecuteNonQuery()

'----- perintah-2
mySqlCommand.CommandText = mySQLUpdateStock
daInvoice = New SqlDataAdapter(mySQLUpdateStock, cnWIS)
daInvoice.SelectCommand = mySqlCommand
daInvoice.Fill(dsInvoice)

For intCounter = 0 To dsInvoice.Tables(0).Rows.Count - 1
 mySqlCommand.CommandText = "UPDATE MainProducts SET " & _
                        "StockCurrent = Isnull(StockCurrent,0) + " &
CDec(dsInvoice.Tables(0).Rows(intCounter)("Qty")) & _
                        " WHERE MainProductID = '" &
dsInvoice.Tables(0).Rows(intCounter)("MainProductID") & "'"
 mySqlCommand.ExecuteNonQuery()
Next

....

 
semoga membantu.
 

Regards,

Muliadi


________________________________

From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of [EMAIL PROTECTED]
Sent: Friday, February 24, 2006 2:25 PM
To: [email protected]
Subject: [Programmer-VB] Save banyak record sekaligus



Para VB..er. 

Bagaimana cara simpan banyak record sekaligus dengan satu tombol Save.? 

tmakasih sebelumnya... 

haris 


Send instant messages to your online friends http://asia.messenger.yahoo.com 


Wahana Programmer Groups Links

<*> Untuk mengunjungi sponsor milis ini, klik link berikut:
    http://wahanaprogrammer.net

<*> Untuk menghubungi owner milis ini, kirim email ke:
    [EMAIL PROTECTED]

<*> Konsultasi pemrogramman bisa chat disini:
    Yahoo! Messenger: wahanaprogrammer
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Programmer-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