also installed fix pack 8 of that product.
I am using it to connect from an asp.net web page to an IBM as400. the
400 is at v5r1.
From the db2 command line shell I am able to connect to the as400
database.
The error I am getting is:
Unable to load DLL 'db2app.dll'.
The details of the error are below. Also below is my asp.net web page
code.
I am not using Visual Studio to code my page, so I did not add a
reference to the DB2 .NET namespace in the normal way. I am using the
assembly directive:
<%@ Assembly Name="IBM.Data.DB2, Culture=neutral,
Version=8.1.2.1, PublicKeyToken=7c307b91aa13d208" %>
Any idea why the db2app.dll is not found? It is on my system, in the
sqllib/bin directory.
thanks,
-Steve
Here is my asp.net web page code:
<%@ Page Language="C#" Trace=true %>
<%@ Assembly Name="IBM.Data.DB2, Culture=neutral,
Version=8.1.2.1, PublicKeyToken=7c307b91aa13d208" %>
<%@ Import Namespace="IBM.Data.DB2" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
void linkConnect_Click(object sender, EventArgs e)
{
String cs = "Server=192.168.1.160:446; " +
"Database=S104VDNM; " +
"UID=QSECOFR; PWD=xyz;";
DB2Connection conn = new DB2Connection(cs);
conn.Open();
conn.Close();
}
Here is the error message:
Unable to load DLL 'db2app.dll'.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.DllNotFoundException: Unable to load DLL
'db2app.dll'.
Stack Trace:
[DllNotFoundException: Unable to load DLL 'db2app.dll'.]
IBM.Data.DB2.v.nmpTraceOn() +0
IBM.Data.DB2.v.e() +97
IBM.Data.DB2.DB2ConnPool.d() +324
IBM.Data.DB2.DB2ConnPool..ctor() +21
IBM.Data.DB2.DB2Connection..cctor() +67