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">
<html>
<head>
<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>
</head>
<body>
<%
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")
Else
Response.Write "Your search genererated the following documents" & "strSearch"
Response.Write objRS("Subject")
Response.Write objRS("Description")
End If
objRs.Close
Set objRs = Nothing
%>
</body>
</html>
|