这个“多步 OLE DB”是什么? 错误?

发布于 2024-07-04 11:48:19 字数 644 浏览 11 评论 0原文

我正在为班加罗尔最好的一款可怕的软件做一些工作。

它主要是用经典的 ASP/VbScript 编写的,但“移植”到了 ASP.NET,尽管 ASPX 页面中的大部分代码都是经典的 ASP 风格:(

当它尝试连接到我的本地数据库时,我收到此消息:

<多步 OLE DB 操作生成错误。如果可用,请检查每个 OLE DB 状态值。

Line 38:    MasterConn = New ADODB.Connection()
Line 39:    MasterConn.connectiontimeout = 10000
Line 40:        MasterConn.Open(strDB)

有人知道此错误意味着什么吗?这个连接字符串:

PROVIDER=MSDASQL;DRIVER={SQL Server};Server=JONATHAN-PC\SQLEXPRESS\;DATABASE=NetTraining;Integrated Security=true

这是它最初使用的连接字符串,我只是将其重新指向我的数据库

更新:

问题是使用 ADO 的“集成安全性”,我更改为使用用户帐户。连接得很好。

I'm doing a little bit of work on a horrid piece of software built by Bangalores best.

It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(

I'm getting this message when it tries to connect to my local database:

Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Line 38:    MasterConn = New ADODB.Connection()
Line 39:    MasterConn.connectiontimeout = 10000
Line 40:        MasterConn.Open(strDB)

Anybody have a clue what this error means? Its connecting to my local machine (running SQLEXPRESS) using this connection string:

PROVIDER=MSDASQL;DRIVER={SQL Server};Server=JONATHAN-PC\SQLEXPRESS\;DATABASE=NetTraining;Integrated Security=true

Which is the connection string that it was initially using, I just repointed it at my database.

UPDATE:

The issue was using "Integrated Security" with ADO. I changed to using a user account and it connected just fine.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

╭⌒浅淡时光〆 2024-07-11 11:48:19

附带说明一下,connectionstrings.com 是一个很棒的网站,因此您不必记住所有连接字符串语法。

As a side note, connectionstrings.com is a great site so you don't have to remember all that connection string syntax.

咋地 2024-07-11 11:48:19

我在尝试通过精彩的经典 ASP 连接到 MySQL 数据库时遇到了这个问题。 上面的解决方案并没有直接修复它,但我最终通过将ODBC驱动程序(从长期存在的3.51)更新到最新版本来解决它。 然后,我能够保留驱动程序行(并且不添加提供程序位),但我确实必须相应地更新连接字符串:

Driver={MySQL ODBC 5.1 Driver};

效果很好。 快乐哈喽。

I came across this problem when trying to connect to an MySQL database via the wonderful Classic ASP. The solutions above didn't fix it directly, but I resolved it in the end by updating the ODBC Driver (from the long standing 3.51) to the latest version. I was then able to leave the driver line in (and not add the Provider bit), but I did have to update the connection string accordingly to:

Driver={MySQL ODBC 5.1 Driver};

That worked fine. Happy chappy.

绝不服输 2024-07-11 11:48:19

很久以前我在 ASP 工作中就遇到过这个问题。 我找到了这篇知识库文章,它对我有所帮助。 我希望它能解决你的问题。

http://support.microsoft.com/kb/269495

如果这不起作用并且一切检查完毕,那么它可能是你的连接字符串。 接下来我将尝试以下步骤:

删除:

DRIVER={SQL Server};

将提供程序编辑为:

Provider=SQLOLEDB;

I ran into this a long time ago with working in ASP. I found this knowledge base article and it helped me out. I hope it solves your problem.

http://support.microsoft.com/kb/269495

If this doesn't work and everything checks out, then it is probably your connection string. I would try these steps next:

Remove:

DRIVER={SQL Server};

Edit the Provider to this:

Provider=SQLOLEDB;
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文