[Microsoft] [ODBC驱动程序管理器]找不到数据源名称 [英] [Microsoft][ODBC Driver Manager] Data source name not found

查看:179
本文介绍了[Microsoft] [ODBC驱动程序管理器]找不到数据源名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用VB.NET 2008测试ODBC连接。

Fisrt我用ODBC管理器创建了一个名为'XXX'的用户ODBC连接工作正常(所有测试都通过)。



在我的程序中,我设置了ConnectionString:myODBC.Connectionstring =ODBC = XXX;

当我尝试打开连接时VB出错:



 SQL错误:[Microsoft] [ODBC驱动程序管理器]数据找不到源名称,也没有指定默认驱动程序
SQL Scriptline:
SQL状态:IM002





我是困惑是什么错误?



谢谢



从下面的非解决方案复制的其他信息

最后我查看了系统注册表(HKEY_CURRENT_USER \Software\ODBC\ODBC.Ini \ XXXX)

且数据有效ODBC的名称是正确的,我用两个系统DNS进行了测试,但结果相同。

我'我正在安装XPPro 32位的PC上工作。

DNS显示在用户DNS下

帮助我

解决方案

似乎DSN未正确创建。你能去Run>然后粘贴odbcad32.exe

你能在那里看到你的ODBC连接吗?如果是,请在哪个选项卡下?



如果连接在那里可以测试连接(如果ODBC名称在那里,则不需要此步骤)


连接字符串 ODBC = XXX 无效。它应该是 DSN = XXX



如果您的数据源需要凭据,则需要指定那些: DSN = XXX; Uid =用户名; Pwd =密码



http://www.connectionstrings.com/dsn/ [ ^ ]


谢谢,它工作正常,我真的很傻到没有注意到错误

Hi,
I'm testing ODBC connection using VB.NET 2008.
Fisrt I have created, with ODBC manager, an User ODBC connection named 'XXX' that works fine (all test passed).

In my program I set the ConnectionString so: myODBC.Connectionstring="ODBC=XXX;"
when I try to open the connection VB goes in error :

SQL Error: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
SQL Scriptline:
SQL State:IM002



I'm confused what is the mistake?

Thanks

additional information copied from non-solution below
At last I looked in the system registry (HKEY_CURRENT_USER\Software\ODBC\ODBC.Ini\XXX)
and the data are valid the name of the ODBC is the right one , I did the test with both a System DNS , but I have same result.
I'm working on PC where is installed XPPro 32bit.
The DNS appears under User DNS
Help me

解决方案

Seems the DSN is not created properly. Can you go to Run> then paste odbcad32.exe
Can you see your ODBC connection there. If yes, under which tab?

Can you test the connection there if it is connecting (this step is not needed for you if the ODBC name is there)


The connection string "ODBC=XXX" is not valid. It should be "DSN=XXX".

If your data source requires credentials, you will need to specify those as well: "DSN=XXX;Uid=username;Pwd=password".

http://www.connectionstrings.com/dsn/[^]


Thanks, it's works fine, I'm really a fool to not having noticed the error


这篇关于[Microsoft] [ODBC驱动程序管理器]找不到数据源名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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