Microsoft VBScript runtime error '800a01b6' Object doesn't support this property or method: 'direct

Joined
Sep 1, 2015
Messages
1
Reaction score
0
Sir

I m trying to add data to access database, but its prompting a error "
Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'directory'

/opac/search/form_ac.asp, line 17"

asp code of this error is:

---------------------------------------------------------
<html>
<head>
</head>

<body>
<%
' Declaring variables
Dim title, description, keywords, url, mydate, data_source, con, sql_insert

' A Function to check if some field entered by user is empty
Function ChkString(string)
If string = "" Then string = " "
ChkString = Replace(string, "'", "''")
End Function

' Receiving values from directory
title = ChkString(Request.directory("title"))
description = ChkString(Request.directory("description"))
keywords = ChkString(Request.directory("keywords"))
url = ChkString(Request.directory("url"))
mydate = ChkString(Request.directory("mydate"))

data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("directory.mdb")
sql_insert = "insert into all_pages (title, description, keywords, url, mydate) values ('" & _
title & "', '" & description & "', '" & keywords & "', '" & url & "', '" & mydate & "')"

' Creating Connection Object and opening the database
Set con = Server.CreateObject("ADODB.Connection")
con.Open data_source
con.Execute sql_insert
' Done. Close the connection
con.Close
Set con = Nothing
Response.Write "All records were successfully entered into the database."
%>



</body>
</html>
------------------------------------------------

please help to solve this problem
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,439
Members
44,829
Latest member
PIXThurman

Latest Threads

Top