unable to load db2app.dll

S

Steve Richter

I am trying, really trying to use the DB2Connection class provided by
IBM to connect to a database on my old reliable as400 from the asp.net
web page.

When I run the DB2Connection code in my .aspx file I get an error:
Unable to load DLL 'db2app.dll'.
Exception Details: System.DllNotFoundException: Unable to load DLL
'db2app.dll'.

with the help of this list I am using the @assembly directive to
reference the DB2Connection assembly in my .aspx file:

<%@ Assembly Name="IBM.Data.DB2, Culture=neutral,
Version=8.1.2.1, PublicKeyToken=7c307b91aa13d208" %>

To connect to the as400 database, this is presumably all I have to do:
String cs = "Server=192.168.1.160:446; " +
"Database=S104VDNM; " +
"UID=QSECOFR; PWD=xxxx;";
DB2Connection conn = new DB2Connection(cs);
conn.Open();

I am asking the DB2 crowd about this and I have verified that DB2 is
properly installed on my PC and can connect to the as400.

Is my way of referencing the DB2 assembly the proper way of doing this
sort of thing? Should .NET be able to find the DLL once it is able to
find the assembly in the GAC?

Is there a path stmt I should be adding to a web.config file??

thanks,

-Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top