my_Conn.CursorLocation = 3
my_Conn.Open strConnString
my_Conn.Errors.Clear
bmrq = Now()
strSql = "Insert into pz ([XQDH],[XM],[BYLBDM],[BYXX],[KSLXDM],[YKZSLB],[ZGZY],[CSNY],[XBDM],[ZZMMDM],[MZDM],[YZBM],[KSLBDM],[KSTZ],[JBZZ],[YSWY],[JSKM],[KLDM],[CJZS],[XKZX],[ZYKSLB],[MSKD],[LXDH],[SFZH],[YJDZ],[PWD],[BMRQ]) Values ('"
strSql = strSql & xqdm & "','" & xm & "','" & bylbdm & "','" & byxxdm& "','" & kslxdm & "','" & ykzslbdm & "','" & zgzydm & "','" & csny & "','" & xbdm & "','" & zzmmdm & "','" & mzdm & "','" & yzbm & "','" & kslbdm & "','" & kstzdm & "','" & jbzz & "','" & yswydm & "','" & jskmdm & "','" & kldm & "','" & cjzs & "','" & xkzx & "','" & zykslbdm & "','" & mskddm & "','" & lxdh & "','" & sfzh & "','" & yjdz & "','" & userpass & "','" & bmrq & "')"
'Response.write strSql
'response.End
my_Conn.Execute(strSql)
如果注释掉my_Conn.Open strConnString,就在my_Conn.Execute(strSql)出错:ADODB.Connection (0x800A0E78)
对象关闭时,不允许操作。
请各位帮我看看是怎么回事啊?谢谢了!!
2 个解决方案
#1
strConnString = "Driver={Sql Server};Server=服务器名;DataBase=数据库名;Uid=登陆名;Pwd=密码;"
my_Conn.Open strConnString
my_Conn.Open strConnString
#2
非常谢谢了!
#1
strConnString = "Driver={Sql Server};Server=服务器名;DataBase=数据库名;Uid=登陆名;Pwd=密码;"
my_Conn.Open strConnString
my_Conn.Open strConnString
#2
非常谢谢了!