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 March 11th, 2004, 08:29 PM
Registered User
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jmurrayhead
Default Problem with my database query

I receive this message when my page loads:

Microsoft VBScript runtime error '800a01a8' 

Object required: '' 

/testdata.asp, line 18
This is the script:
dim objRS 
dim strSQL 
Set oConn=Server.CreateObject("ADODB.Connection") 
filePath = Server.MapPath("mydatabase.mdb") 
oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\myroot\fpdb\mydatabase.mdb") 

set objRS = oConn.execute(strSQL) 
strSQL = strSQL & " WHERE UserName = '" & Session(appName & "UserName")& "'" 
Any ideas as to what may be wrong..please let me know!! Thanks!!!!
Old March 12th, 2004, 01:39 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts

Please try:

dim objRS
dim strSQL
Set oConn=Server.CreateObject("ADODB.Connection")
Set objRS=Server.CreateObject("ADODB.Recordset")

oConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("mydatabase.mdb"))


Old March 12th, 2004, 03:48 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

What is line 18?

Do you have Option Explicit at the top of your page?
If so, you should declare the variable oConn with a Dim oConn statement. In fact, it's pretty good practice to do that anyway.....

Otherwise, post some more information and/or code.


Imar Spaanjaars
Everyone is unique, except for me.

Similar Threads
Thread Thread Starter Forum Replies Last Post
database query problem naveed77 Beginning VB 6 2 February 12th, 2008 06:47 AM
database related query dkvaseeta Pro VB Databases 2 February 22nd, 2007 10:59 AM
Database Query Question kbuska BOOK: Beginning ASP 3.0 4 September 23rd, 2004 11:04 PM
Database access from java, INSERT query problem nitusincog BOOK: Beginning Java 2 1 July 21st, 2003 10:26 AM
database query Darren JSP Basics 0 July 12th, 2003 03:57 PM

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