Private Sub Bsave_Click(sender As Object, e As EventArgs) Handles Bsave.Click
Dim conn As New OleDbConnection(constr)
Dim ds As New DataSet
Dim dt As New DataTable
Dim dtadapter As New OleDbDataAdapter
Dim objcmd As OleDbCommand
objcmd = New OleDbCommand
conn.Open()
For i As Integer = 0 To DataGridView1.Rows.Count - 1
If DataGridView1.Rows(i).Cells(0).Value <> "" Then
Dim insertSQLFY As String
insertSQLFY = "insert into R_detail(subdetailId) values ('" & DataGridView1.Rows(i).Cells(0).Value.ToString & "','" & txtid.Text & "')"
Savedata(insertSQLFY)
savedatafor()
End If
Next
MsgBox("ok.")
conn.Close()
End Sub