Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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 April 8th, 2005, 11:23 AM
Authorized User
Join Date: Jan 2005
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unspecified Error???

I keep receiving unspecified error on the bolded line below... If I paste the query in Access it runs properlry, also if I response.write the query it writes properly. Permissions are properly set there are actually two other scripts in this directory running in independant access databases that are functioning properly but this one keeps flagging an error... Does any one see what Im doing wrong?
<%@ LANGUAGE="VBScript" %>

dim objConn,objRec,name1
set objConn=Server.CreateObject("ADODB.Connection")
objConn.Open "\\lou1-web01\robohelp\shpsmate\shpsmate v3\asp\Hot Topics\db.mdb"
 Set objRec = Server.CreateObject ("ADODB.Recordset")
objRec.Open "SELECT [ID],[tblName],[PP], FROM Names WHERE [PP]='" & request.form("PPID") & "'",ObjConn

 Response.write name1 & "<br/>"
Old April 10th, 2005, 08:25 AM
Authorized User
Join Date: Sep 2004
Location: , , United Kingdom.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts

Yeah you have the connection string wrong. It Should be like this:

Dim conn, RS, strSQL
Set conn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
ConnStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database")
Conn.Open Connstr
strSQL = "SELECT * FROM tbl;"
rs.open strsql, conn

Or in your case (Cause your open a connection on a remote comp)

Dim Conn, RS
Set Conn = CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
Conn.Open "\\server\share\file.mdb"
Set RS = Conn.Execute("SELECT * FROM TABLE")


Old April 10th, 2005, 01:00 PM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

I would base your connection string on the OLEDB one at http://www.connectionstrings.com/


Joe (Microsoft MVP - XML)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unspecified error mahesh_82 ADO.NET 1 January 10th, 2007 06:24 AM
Unspecified Error. lam_lvl ADO.NET 4 December 22nd, 2006 02:47 PM
unspecified error Meterman Classic ASP Databases 1 July 13th, 2004 10:19 AM

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