I will make the process of looping the data to save data into SQL Server database,
but field data that must be stored is retrieved from the database access,
data taken later not only a record, but a lot of records,
so it takes a process of looping in it, I am still confused with the looping process, please help,
This is my code which is simple, and there is still no looping process:
Private Sub ListTemp_Click()
Dim sqltambah As String
Set rsmusik = New ADODB.Recordset
rsmusik.Open "SELECT title,singer,id_kategori,nama from musik where id_musik=1000", conn
If rsmusik.EOF = False Then
sqltambah = "INSERT INTO iMUSIC " & _
"(ID_MUSIC, TITLE, SINGER, FID_M_CATEGORY, FILE_NAME, SOURCE, PATH, ACTIVE, VOL , ANALOG, DATE_ADDED)" & _
" VALUES (" & _
"'" & Text1.Text & "', " & _
"'" & Text3.Text & "', " & _
"'" & Text2.Text & "', " & _
"'" & CB_kategori.Text & "', " & _
"'" & filename_txt.Text & "', " & _
"'" & source_txt.Text & "', " & _
"'" & path_txt.Text & "', " & _
"'" & active.Caption & "', " & _
"'" & vol_txt.Text & "', " & _
"'" & CB_Analog.Text & "', " & _
"'" & DTPicker1.Value & "' " & _
")"
End If
Do While Not rsmusik.EOF
Text2.Text = rsmusik!singer
Text3.Text = rsmusik!Title
CB_kategori.Text = rsmusik!id_kategori
rsmusik.MoveNext
Loop
End Sub