Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 26th, 2003, 02:13 AM
Registered User
 
Join Date: Aug 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP error

Hi,
Can any one of you guys help? I am trying to connect to my database using asp. Anytime I connect the following error message. Being new to asp, its difficult to figure out what exactly the problem is:

Dim objRs, objConn, Hardware,strConn

'emne=Request.QueryString("emne")
strQuery="SELECT DISTINCT * FROM Hardware"
'strQuery="SELECT * FROM Lokation
'LokationID2 objRS("LokationID")
'strQuery="SELECT * FROM Hardware WHERE LokationID=LokationID
'objRS2.open strConn
' WHERE emne='" & emne & "';"

strConn=Application("strConn")
set objRS=Server.createObject("ADODB.recordset")
set objConn=Server.createObject("ADODB.connection")
objConn.open strConn
objRS.open strQuery, objConn, adOpenStatic,, adCmdText


The asp error is
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access-driver] "(unknown)" is not a valid path. Control, that the parth is correctly spelt, and that you are connect to the right server, hvor the files is.
/web2/menuitem5doc1.asp, line 39

Line 39 is the objConn.open strConn

Any suggestions?

Nick




 
Old August 26th, 2003, 03:46 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Sounds like a problem with the format of the connection string strConn. See if it looks like any of the examples here: http://www.able-consulting.com/ADO_Conn.htm
 
Old August 26th, 2003, 04:49 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 184
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Jonax
Default

Quote:
quote:
Being new to asp, its difficult to figure out what exactly the problem is
To view the contents of your connectionstring, add the following line to your code...

Code:
strConn=Application("strConn")
response.write strConn: response.end
set objRS=Server.createObject("ADODB.recordset")
(You should remove it or comment it out, once you think you have the right path...)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in Migrating Project from ASP to ASP.NET hbansal ASP.NET 1.0 and 1.1 Professional 0 September 12th, 2008 05:48 AM
error.asp? grstad Classic ASP Basics 3 December 8th, 2006 03:58 PM
ASP error redski Classic ASP Basics 3 December 8th, 2005 10:29 PM
ASP "no right" error Edward King Classic ASP Basics 2 January 13th, 2005 06:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.