h3$ = " WHERE IMS.SAMPLES.HSN = '2000003001'"
For i% = 0 To List1.ListCount-1
h1$ = "select *"
h2$ = " FROM IMS.SAMPLES"
h3$ = " WHERE IMS.SAMPLES.HSN = " & sampleidarray(i%)
hi$ = h1$ & h2$ & h3$
sqls1$ = hi$
rs.Open sqls1$, myconn, adOpenStatic, adLockOptimistic
....
rs.close
next i%
rs.Open "select * FROM IMS.SAMPLES WHERE HSN = 2000003001", myconn, adOpenStatic, adLockOptimistic
Does that work?
For i% = 0 To List1.ListCount-1
h1$ = "select *"
h2$ = " FROM IMS.SAMPLES"
h3$ = " WHERE IMS.SAMPLES.HSN = " & sampleidarray(i%) & ""
hi$ = h1$ & h2$ & h3$
sqls1$ = hi$
rs.Open sqls1$, myconn, adOpenStatic, adLockOptimistic
....
rs.close
next i%
If not (rs.EOF and rs.BOF) then
If you are experiencing a similar issue, please ask a related question
Title | # Comments | Views | Activity |
---|---|---|---|
splitOdd10 challenge | 5 | 80 | |
clicking a shape in a frame array vb6 | 3 | 40 | |
grouping on time windows | 6 | 43 | |
how to know if my Checkbox is True in VB6.0? | 9 | 40 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!