简体   繁体   English

我无法将Netezza与Microsoft ODBC(VS 2013)连接

[英]I can't connect Netezza with microsoft ODBC (VS 2013)

I install netezza ODBC drivers and configure data sources(ODBC) in Adminitstrative tools by add user DSN as NZSQL. 我安装netezza ODBC驱动程序,并通过将用户DSN添加为NZSQL在管理工具中配置数据源(ODBC)。

Next I connect with Visual studio 2013 using DSN in Server Explorer, in Datasource I select Microsoft ODBC data source and data provider I select .Net framework data provider for ODBC. 接下来,我在服务器资源管理器中使用DSN连接Visual Studio 2013,在“数据源”中选择Microsoft ODBC数据源,然后选择数据提供程序。为ODBC选择“ .Net Framework数据提供程序”。 The connection test is successful and I copy connectionstring from connection string in server explorer and paste it in web.config: 连接测试成功,我从服务器资源管理器中的连接字符串复制了连接字符串并将其粘贴到web.config中:

<add name="cn" connectionString="Dsn=NZSQL;Driver={NetezzaSQL};uid=kbanke2e"/>

When I compile the error is: 当我编译错误是:

Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. 附加信息:建立与SQL Server的连接时发生与网络相关或特定于实例的错误。 The server was not found or was not accessible. 服务器未找到或无法访问。 Verify that the instance name is correct and that SQL Server is configured to allow remote connections. 验证实例名称正确,并且已将SQL Server配置为允许远程连接。 (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接

I successfully managed to create a Netezza datasource in VS2013 by specifying the full connection string manually: 通过手动指定完整的连接字符串,我成功地在VS2013中成功创建了Netezza数据源:

Driver={NetezzaSQL};server=a.b.c.d;port=5480;database=SYSTEM;uid=myname;password=mypwd;

The only problem I had was due to VS looking for the 32-bit driver ( nsqlodbc.dll ) in C:\\Windows\\SysWOW64 . 我遇到的唯一问题是由于VS在C:\\Windows\\SysWOW64寻找32位驱动程序( nsqlodbc.dll )。 Initially I only had the 64-bit driver installed. 最初,我只安装了64位驱动程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM