Dear all,
mo tanya nie, kok masih kagak bisa ya...
Public Sub Save_Detail()
Dim CMDBLDetail As New OleDbCommand
Dim i As Integer
Dim strSQL As String
Dim Tgl As String
Tgl = Format(LBTgl.Text, "short date")
For i = 0 To LVBeli.Items.Count - 1
strSQL = " INSERT INTO BELI_Detail VALUES ( '" & LBNo.Text & "', " _
& "
LVBeli.Items(i).SubItems(0).text, " _
& "
LVBeli.Items(i).SubItems(1).text, " _
& "
LVBeli.Items(i).SubItems(2).text, " _
& "
LVBeli.Items(i).SubItems(3).text, " _
& "
LVBeli.Items(i).SubItems(4).text, " _
& " '" &
CDate(Tgl) & "', '" & LBCD.Text & "', " _
& " '" &
LBThn.Text & "', '" & LBBln.Text & "', " _
& " '" &
LBAngka.Text & "' )"
Next i
Try
CMDBLDetail.CommandText = strSQL
Connection.Open()
CMDBLDetail.Connection = Connection
CMDBLDetail.ExecuteNonQuery()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Error")
Finally
Connection.Close()
End Try
End Su
TIA
--
Regards,
PALUARED
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/