为什么我会收到意外的错误与传统的ASP ADO? [英] Why am I getting unexpected error in ado with classic asp?

查看:440
本文介绍了为什么我会收到意外的错误与传统的ASP ADO?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的(我有以上这一切的连接未显示):

I have this (I have a connection above all this not shown):

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

当我执行我得到:

As soon as I execute I get:

    Active Server Pages error 'ASP 0115' 
    Unexpected error 

    myasppage.asp 

    A trappable error (C0000005) occurred in an external object. 
The script cannot continue running.

我不明白我在做什么错。我尝试了各种东西,如删除prepared,但没有任何效果(试试验和错误注释掉上述各种无济于事)。

I can't see what I am doing wrong. I tried various things such as remove prepared, but it has no effect (tried trial and error commenting out various above to no avail).

甲骨文如果它很重要。

感谢您的帮助。

推荐答案

这是不是权限问题,或已损坏的ADO驱动程序。

This is either permissions issue, or corrupted ADO drivers.

首先,就消除其他的东西,试试这个code调试的缘故:

First, just to eliminate other stuff try this code for sake of debugging:

Set rs = conn.Execute("select * from employees where lastname = 'JONES'")

如果你得到同样的错误,请尝试:

If you get same error, try:


    IUSR帐户在数据库服务器
  • 检查权限,或使用SQL验证。

  • 服务器到最新版本上重新安装MDAC。

此外,什么数据库? IIS是什么?

Also, what database? What IIS?

这篇关于为什么我会收到意外的错误与传统的ASP ADO?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆