开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜