how to recordset using inner join in VB 6.0
i have 2 table table
t1
sid svalue
1 aaaa
2 bbbb
t2
pid sid
1 1
2 2
i want recordset so that it content
pid svalue
1 aaaa
2 bbbb
i use
With AdoResult
If .State = adStateOpen Then .Close
.Open "Select t1.svalue,t2.pid from t2 inner join t1 on t1.sid=t2.sid", con, adOpenStatic, adLockPessimistic开发者_如何学C
Do Until .EOF
MsgBox (.Fields(1))
.MoveNext
Loop
End With
but getting nothing not even error details
精彩评论