Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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/>"
Reply With Quote
  #2 (permalink)  
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")


Reply With Quote
  #3 (permalink)  
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)
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 04:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.