Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| 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 December 22nd, 2004, 11:55 AM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Microsoft VBScript compilation error

I am new to aspnewbie, could someone please help me...I keep getting these errors: any assistance rendereed would be greatly appreciated

Microsoft VBScript compilation error '800a0411'

Name redefined

/Home/Database/search.asp, line 16

Const adOpenForwardOnly = 0

Microsoft VBScript compilation error '800a03f3'

Expected '='

/Home/Database/search.asp, line 26

Set objConn Server.CreateObject("ADOB.Connection")


here is my code for my database:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta type =typelib"
            file = C:\Program Files\Common Files\System\ado\msado15.dll"-->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Search Document Database</title>


Dim adOpenForwardOnly, adLockReadOnly, adCmdtable
Const adOpenForwardOnly = 0 (this is line sixteen)Const adLockReadOnly = 1
Const adCmdTable = 2
Const adOpenstatic = 3

Dim strSearch, strCriteria
strSearch = Request.Form ("search")

Dim objConn, objRS

Set objConn Server.CreateObject("ADOB.Connection") (this is line 26)
Set objRs = Server.CreateObject("ADODB.Recordset")
objConn.Open strConnect
objRS.Open "Document", objConn, adOpenstatic, adLockReadOnly, adCmdTable
strDescription= "Document'" & strSearch & "'"

objRs.Find.strCriteria 'show first relevant record
If objRS.EOF Then
Response.Write("Sorry the serach words use did not generate any records. Please try again using different search words")

Response.Write "Your search genererated the following documents" & "strSearch"
Response.Write objRS("Subject")
Response.Write objRS("Description")
End If
Set objRs = Nothing


Reply With Quote
  #2 (permalink)  
Old December 22nd, 2004, 01:24 PM
Friend of Wrox
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post


The statements Dim & Const both declare variables, so you need to lose the line:
Dim adOpenForwardOnly, adLockReadOnly, adCmdtable
Set objConn Server.CreateObject("ADOB.Connection")
should be
Set objConn = Server.CreateObject("ADOB.Connection")


Reply With Quote
  #3 (permalink)  
Old December 29th, 2004, 10:44 AM
Registered User
Join Date: Dec 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

thanks...solve one got another...solved one got another....very cyclic:D

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
Microsoft VBScript compilation error '800a03f6' jdutwell Classic ASP Basics 3 April 2nd, 2008 01:50 PM
Microsoft VBScript compilation error '800a03f6' ksrhyd Classic ASP Professional 0 October 11th, 2007 07:53 AM
Microsoft VBScript compilation error '800a0408' tarzannn Classic ASP Professional 2 February 3rd, 2006 08:55 AM
Microsoft VBScript compilation error '800a0401' baistopgun BOOK: Beginning ASP 3.0 3 October 16th, 2004 12:52 PM

All times are GMT -4. The time now is 03:30 PM.

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