请各位高手帮忙看段sql语句。。不知道错在哪里。。
实现效果是将信息同时添加到2个数据表中。
sql = "Insert Into userinf (username,password,name,userdept,userlevel,number,add) Values( "
sql = sql & SqlStr(username) & ", "
sql = sql & SqlStr(password) & ", "
sql = sql & SqlStr(name) & ", "
sql = sql & SqlStr(userdept) & ", "
sql = sql & SqlStr(userlevel) & ", "
sql = sql & SqlStr(number) & ", "
sql = sql & SqlStr(add) & ")"&";"&"Insert Into DocManageTypeTable (DocType) Values( "
sql = sql & SqlStr(username) & ")"
conn.Execute(sql)
------解决方案--------------------
你的数据库也许根本不支持事务操作,不允许sql="...";sql="..."2个SQL一起允许,遇到;后的字符就提示错误12