agus.supriyanto31
Member
- Joined
- Jun 17, 2014
- Messages
- 7
- Programming Experience
- Beginner
hi,
so i want to get 2 data or more from table with same condition using loop
here is my table
and here is my code
but when i try it, it get error like this
help me please, thank you )
so i want to get 2 data or more from table with same condition using loop
here is my table
and here is my code
Private Sub COBAPANGGIL() Conn() Dim status = "Ready" rsSet.Open("Select * from tblDataStatus where status ='" & status & "'", Con, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic) Dim COBAARRAY() As String Dim i As Integer = 0 For i = 0 To rsSet.EOF COBAARRAY(i) = rsSet.Fields.Item("ID").Value MsgBox(COBAARRAY(i)) rsSet.Close() rsSet.Open("Select * from tblDatadiri where ID ='" & COBAARRAY(i) & "'", Con, ADODB.CursorTypeEnum.adOpenKeyset, ADODB.LockTypeEnum.adLockOptimistic) Dim COBA = rsSet.Fields.Item("Nama").Value MsgBox(COBA) MsgBox(COBAARRAY + COBA) rsSet.MoveNext() Next end sub
but when i try it, it get error like this
help me please, thank you )
Last edited by a moderator: