Connect to TeraDatabase using Teradata.Client.Provider

Connectivity
Enthusiast

Connect to TeraDatabase using Teradata.Client.Provider

I am trying to connect to TeraDatabase from an ASP.NET 2.0 application using Teradata.Client.Provider.

I get the following error :

System.DllNotFoundException: Unable to load DLL 'wincli32.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) at Teradata.Client.Provider.WpSession.CLI.DBCHINI(Int32& returnCode, IntPtr contextArea, CliDbcArea& DbcArea) at Teradata.Client.Provider.WpSession..ctor() at Teradata.Client.Provider.Connection.Open(UtlConnectionString connectionString, UInt32 timeout) at Teradata.Client.Provider.ConnectionPool.CreateConnection(UInt32 timeout) at Teradata.Client.Provider.ConnectionPool.GetConnectionFromPool(Object owningObject) at Teradata.Client.Provider.ConnectionFactory.GetConnection(Object owningObject, UtlConnectionString connStr) at Teradata.Client.Provider.TdConnection.Open() at AppWTeradata._Default.butConnect_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\AppWTeradata\AppWTeradata\Default.aspx.vb:line 33

I have installed the latest version of .Net Teradatabase Driver 1.0.0.0.
Also I have CLIv2 Interface DLL 4.8.1.2, Teradata GSS version 6.1.0.7 installed on my PC.

Here is the code I have used.
cString = "Data Source=VSAFESEND;User Id=xxxxx;Password=xxxxxx"
cn = New TdConnection(sCString)
cn.Open()

Any Ideas ?

Thank you
Pr
27 REPLIES
Teradata Employee

Re: Connect to TeraDatabase using Teradata.Client.Provider

I suspect that the Path is not correct. Therefore CLR cannot find and load CLI (wincli32.dll).

I suggest testing CLI installation by running NQuery.exe first.
NQuery.exe is usually installed in "C:\Program Files\NCR\NET Data Provider for Teradata\01.00.00.00\Samples\Bin" directory. It is a simple ad-hoc query tool.
Enthusiast

Re: Connect to TeraDatabase using Teradata.Client.Provider

Whe I try to connect to the database using NQuery I get the following error:

Unable to load DLL: 'wincli32.dll'. The specified folder could not be found.

I have checked the path and it looks right. May be if you could see the attached
image files and let me know if the path looks right on my machine.

Thanks.
Pr

Enthusiast

Re: Connect to TeraDatabase using Teradata.Client.Provider

In case you didn't get the image files they are attached to this email.
Teradata Employee

Re: Connect to TeraDatabase using Teradata.Client.Provider

Could you open a command prompt and display the Path?
It should have C:\Program Files\NCR\Teradata Client\Cliv2 in it.

Or better yet, Check the path in
Start->Control Panel->System->Advanced->"Environment Variables".

Common Language Runtime does not read the registry to locate DLLs.
It simply uses the Path to find CLI (WinCli32.dll).

for example here is my path

C:\>path
PATH=C:\Program Files\Common Files\NCR\AXSMOD;C:\Program Files\NCR\Common Files\Shared ICU Libraries for Teradata\lib;C:
\Program Files\NCR\Teradata Client\cliv2\;C:\Program Files\NCR\Teradata Client\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Common File
s\Compuware;

CLI is installed in C:\Program Files\NCR\Treadata Client\cliv2\.

Hope this helps
Enthusiast

Re: Connect to TeraDatabase using Teradata.Client.Provider

I have wincli32.dll under the path you mentioned (C:\Program Files\NCR\Teradata Client\cliv2).

The Path on my machine is as follows:
PATH=C:\Program Files\NCR\Teradata Client\cliv2\;C:\Program Files\NCR\Common Fil
es\Shared ICU Libraries for Teradata\lib;C:\blp\API\dde;C:\WINNT\system32;C:\WIN
NT;C:\WINNT\System32\Wbem;c:\progra~1\orant\bin;c:\Program Files\Micr
osoft SQL Server\90\Tools\binn\;

Let me know what you think.

I appreciate all your help.

Thanks
Pr.
Teradata Employee

Re: Connect to TeraDatabase using Teradata.Client.Provider

I think you might have multiple copies of WinCli32.dll.
Can you search your hard drive? specifically Windows\System32 directory.
WinCli32.dll has a dependency on tdusr32.dll; which is usually in the same directory.
A similar error message is generated when WinCli32.dll cannot find and load tdusr32.dll.

Enthusiast

Re: Connect to TeraDatabase using Teradata.Client.Provider

I have only one version of both the files in my machine so that's not the problem. I still don't know what's the problem.
Teradata Employee

Re: Connect to TeraDatabase using Teradata.Client.Provider

TeraSSO.dll is used by ODBC Driver for Teradata and CLI.
I noticed that you have ODBC Driver 03.01.00.00.
Rename the TeraSSO.dll in Windows\System32 directory to TeraSSo.dll.old.

Also, Dependes.exe ships with Visual Studio 2005. Launch Dependes.exe and open WinCli32.dll.
It is a very good tool to pinpoint DLL incompatibilities.
Teradata Employee

Re: Connect to TeraDatabase using Teradata.Client.Provider

I also recommend upgrading to TTU8.1 ODBC driver.