好多问题啊,vb & sql
/* vb中用sql语句*/
Dim Cn as rdoConnection
Dim str as string
Cn.execute(str) 中,如果str是sql的一大段复合语句,这样的话Cn.execute(str)
会不行的(我做的),如果用过程,Cn.execute( )里面该怎么写,那个过程又怎么写?
还有一个问题:
Cn.Execute ("if object_id('testcre2') is not null drop table testcre2") --(1)
Cn.Execute ("create table testcre2 ( i int Not Null,k int Not Null)") --(2)
本来我是没有 testcre2表的,现在第一句没通过,如果把第一句注释掉,第二句通过了,
为什么第一句错了?他报错:无效sql语句,期 待"delete","insert","update","select","procedure"
这到底是什么意思(这样报错)?不支持第一句的语法?我用的是vb6专业英文版