- Total Members: 220,329
- Threads: 525,403
- Posts: 977,029
Great community. Great ideas.
Welcome to ASP/Free, a community dedicated to helping beginners and professionals alike in improving their knowledge of Microsoft's development and administration technologies. Sign up today to gain access to the combined insight of tens of thousands of members.
-
January 23rd, 2013, 01:00 PM
#1
Error connecting to DB2 from classic ASP application
I'm traditionally a java developer but have been tasked with enhancing a classic ASP web app to persist data to a DB2 database. When trying to create an ODBC connection I keep getting the following error...
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
The code from my ASP page looks like this...
Dim conn, rs, sql
Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.RecordSet")
conn.Open "Driver={IBM DB2 ODBC DRIVER}; Database=ECDEV; Hostname=XX.XX.X.XX; Port=50001; Protocol=TCPIP; Uid=XXXXXXXX; Pwd=XXXXXXXX;"
sql = "SELECT ........"
rs.Open sql, conn
The error comes on the open statement. This same connection string is being used by other applications and works fine. The only difference is that these other applications don't run on the same physical box as mine. But since I'm using a DSN-less connection should that matter? I don't think I've left anything out of the string that's required.
Any ideas on what could be causing the problem?
Similar Threads
-
By alextf in forum Microsoft IIS
Replies: 1
Last Post: May 5th, 2011, 05:48 AM
-
By alextf in forum Microsoft SQL Server
Replies: 0
Last Post: February 5th, 2011, 04:53 AM
-
By scottyc in forum Microsoft IIS
Replies: 0
Last Post: August 31st, 2009, 06:07 PM
-
By digitaldxb in forum .NET Development
Replies: 5
Last Post: February 19th, 2008, 05:17 AM
-
By Steve Schofield in forum .NET Development
Replies: 1
Last Post: December 2nd, 2003, 03:36 AM