关于oracle db与.NET连接的问题

发布于 2024-09-05 03:28:21 字数 360 浏览 2 评论 0原文

我正在尝试使用 .net 连接到 Oracle 数据库,但出现错误:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 

但是,当我输入“通过工具>连接到数据库添加新的数据库连接”时。效果很好。即使在复制连接字符串之后也是如此:

Data Source=source here;Persist Security Info=True;User ID=userhere;Password=pass;Unicode=True

I'm trying to connect to an oracle database with .net but i get the error:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 

however, when I enter add a new database connection through tools>connect to database. it works fine. even after copying the connection string which is:

Data Source=source here;Persist Security Info=True;User ID=userhere;Password=pass;Unicode=True

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

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

发布评论

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

评论(1

七月上 2024-09-12 03:28:21

您使用什么驱动程序?从错误消息来看,您正在通过 ODBC。我相信工具>连接到数据库使用 OLEDB 驱动程序。

提供的连接字符串看起来不像 odbc 连接字符串。

您可以发布一段代码来显示您如何设置连接吗?

谢谢

安德鲁

What driver are you using? It looks from the error message that that you're going through ODBC. I believe the tools>connect to database use OLEDB drivers.

The connection string provided doesn't look like an odbc connection string.

Can you post a snippit of code showing how you're setting up the connection?

Thanks

Andrew

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