一个简单的句子,却搞不定
rs.Open "select * from zhiyuan where xingming = ' " & seltxt & " '", cn, adOpenKeyset, adLockBatchOptimistic得到zhiyuan 表中 xingming 字段等于 seltxt 的值,是这样写吗?请指点,BAIDU了很久,无解呀。
--------------------编程问答-------------------- rs.Open "select * from zhiyuan where xingming = '" & seltxt & "'", cn, adOpenKeyset, adLockBatchOptimistic
冒号之间的空格要去掉,还有要确定这个字段是文本类型 --------------------编程问答-------------------- 学习中 --------------------编程问答-------------------- 受教了,谢谢! --------------------编程问答-------------------- rs.Open "select * from zhiyuan where xingming = '" & seltxt & "' cn, adOpenKeyset, adLockBatchOptimistic
--------------------编程问答-------------------- rs.Open "select * from zhiyuan where xingming='" & seltxt & "'",cn,adOpenKeyset,adLockBatchOptimistic --------------------编程问答-------------------- rs.Open "select * from zhiyuan where xingming= '" & seltxt & " '",cn,adOpenKeyset,adLockBatchOptimistic
补充:VB , 数据库(包含打印,安装,报表)