关于oracle db与.NET连接的问题
我正在尝试使用 .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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用什么驱动程序?从错误消息来看,您正在通过 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