【发布时间】:2011-12-18 16:50:21
【问题描述】:
我有这个(我有一个没有显示的连接):
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn
cmd.CommandType = 1
cmd.Parameters.Append .CreateParameter("LASTNAME", 200, 1, 50, "JONES")
cmd.CommandText = "select * from employees where lastname = ?"
cmd.Prepared = True
Set rs = cmd.Execute
我一执行就得到:
Active Server Pages error 'ASP 0115'
Unexpected error
myasppage.asp
A trappable error (C0000005) occurred in an external object.
The script cannot continue running.
我看不出我做错了什么。我尝试了各种方法,例如删除准备好的,但它没有效果(尝试反复尝试注释掉上述各种无济于事)。
Oracle 如果重要的话。
感谢您的帮助。
【问题讨论】:
-
你为什么对记录集使用命令,为什么不使用 Adodb.Recordset?
-
如果我需要记录集并使用命令,我会使用存储过程。
标签: asp-classic ado