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

Discussion in '.NET' started by oo7bopnd, Sep 1, 2015.

  1. oo7bopnd

    oo7bopnd

    Joined:
    Sep 1, 2015
    Messages:
    1
    Likes Received:
    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
     
    oo7bopnd, Sep 1, 2015
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roman
    Replies:
    0
    Views:
    4,356
    Roman
    Jan 4, 2004
  2. GTN170777
    Replies:
    27
    Views:
    4,153
    Bob Barrows
    Jul 16, 2009
  3. avi
    Replies:
    2
    Views:
    3,427
    Bob Barrows
    Nov 22, 2009
  4. mygoogleac
    Replies:
    0
    Views:
    348
    mygoogleac
    Oct 2, 2003
  5. Matt
    Replies:
    3
    Views:
    387
  6. news.onetel.net.uk
    Replies:
    3
    Views:
    486
    Michael Winter
    Aug 9, 2004
  7. SmittyBroham
    Replies:
    2
    Views:
    307
    SmittyBroham
    Jan 7, 2005
  8. Drew
    Replies:
    1
    Views:
    234
    Martin Honnen
    Nov 8, 2006
Loading...