我正在使用此代码并收到类型不匹配的错误,运行时错误“13”错误在下面标记的行中,特别是由于prereq.paid=" + rs1!paid + " "
查询中的条件()...
rs1.Open "select name,nposts,postad.paid as paid from ad,post,postad where ad.adid = " +
cmbAdno.Text +
" and ad.adid=postad.adid and postad.pid=post.pid ", con, adOpenDynamic,
adLockOptimistic
While Not rs1.EOF
cmbTitle.AddItem (rs1!Name)
rs1.MoveNext
Wend
rs1.MoveFirst
cmbTitle.Text = rs1!Name
txtNposts.Text = rs1!nposts
If IsNumeric(rs1!paid) Then
MsgBox (rs1!paid + 1)
End If
**rs2.Open "select title from postad,prereq where postad.paid = prereq.paid and prereq.paid=" +
rs1!paid + " ", con, adOpenDynamic, adLockOptimistic**
While Not rs2.EOF
lstPrereq.AddItem (rs2!Title)
rs2.MoveNext
Wend
rs2.Close
rs1.Close