Professional Web Applications Themes

ASP Access Database Connection Problem - Dreamweaver AppDev

Hey all! I'm relatively new to using ASP and i am having difficulty connecting my Access Database using the application window in Dreamweaver MX 2004. Here is my connection code: /connections/tm.asp <% ' FileName="Connection_odbc_conn_dsn.htm" ' Type="ADO" ' HTTP="false" ' Catalog="" ' Schema="" MM_con_tm_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("tastymaths.mdb") %> I am receiving the following error when attempting to submit a form: ADODB.Command error '800a0bb9' Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. /reg.asp, line 114 Line 114 of my reg.asp file is as follows: If (Not MM_abortEdit) Then ' execute ...

  1. #1

    Default ASP Access Database Connection Problem

    Hey all!

    I'm relatively new to using ASP and i am having difficulty connecting my
    Access Database using the application window in Dreamweaver MX 2004.

    Here is my connection code:

    /connections/tm.asp

    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    MM_con_tm_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    Server.MapPath("tastymaths.mdb")
    %>

    I am receiving the following error when attempting to submit a form:

    ADODB.Command error '800a0bb9'

    Arguments are of the wrong type, are out of acceptable range, or are in
    conflict with one another.

    /reg.asp, line 114


    Line 114 of my reg.asp file is as follows:


    If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection (THIS IS LINE 114)
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close


    does anybody know where i am going wrong?
    Thanks


    Gavin

    GavW Guest

  2. #2

    Default Re: ASP Access Database Connection Problem

    Hi yea,
    I see your path to your database is incorrect.

    to create a dsnless connection you need to have the absolute address to your
    database as in

    Data Source=C:\Inetpub\wwwroot\FabioDB\fabio.mdb;".

    note how my database above is in my c drive etc etc.... and look at where
    yours is

    tastymaths.mdb in the middle of no where really. so create the correct path
    to your db and I think you should be ok. if your using MX2004 the extension
    from tom muck below is brilliant. I use it often to get my full path. see it
    on the bottom of the page , it is called "Get Database Path"

    [url]http://www.basic-ultradev.com/extensions/index.asp?tfm_order=DESC&tfm_orderby=ProductName&o ffset=20[/url]

    to use it is simple. first load the extension into dreamweaver and reboot
    it. then open dreamweaver create a new page, apply this extension it will
    ask you for the name of your database, type in tastymaths.mdb then save the
    page and view it in a browser. it will give you the full path to your
    database. cut and paste it inside
    > Server.MapPath("tastymaths.mdb").
    this is worth a read too
    [url]http://www.webthang.co.uk/tuts/tuts_dmx/gk_cons/cons.asp[/url]

    regards

    twocans









    "GavW" <webforumsusermacromedia.com> wrote in message
    news:d0pk13$l2j$1forums.macromedia.com...
    > Hey all!
    >
    > I'm relatively new to using ASP and i am having difficulty connecting my
    > Access Database using the application window in Dreamweaver MX 2004.
    >
    > Here is my connection code:
    >
    > /connections/tm.asp
    >
    > <%
    > ' FileName="Connection_odbc_conn_dsn.htm"
    > ' Type="ADO"
    > ' HTTP="false"
    > ' Catalog=""
    > ' Schema=""
    > MM_con_tm_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.MapPath("tastymaths.mdb")
    > %>
    >
    > I am receiving the following error when attempting to submit a form:
    >
    > ADODB.Command error '800a0bb9'
    >
    > Arguments are of the wrong type, are out of acceptable range, or are in
    > conflict with one another.
    >
    > /reg.asp, line 114
    >
    >
    > Line 114 of my reg.asp file is as follows:
    >
    >
    > If (Not MM_abortEdit) Then
    > ' execute the insert
    > Set MM_editCmd = Server.CreateObject("ADODB.Command")
    > MM_editCmd.ActiveConnection = MM_editConnection (THIS IS LINE 114)
    > MM_editCmd.CommandText = MM_editQuery
    > MM_editCmd.Execute
    > MM_editCmd.ActiveConnection.Close
    >
    >
    > does anybody know where i am going wrong?
    > Thanks
    >
    >
    > Gavin
    >

    twocans Guest

  3. #3

    Default Re: ASP Access Database Connection Problem

    hi i agree with twocans but then i use the same conection script oyu do and the
    first time i did i got the same error message. i am assuming that you have
    created a folder in the wwwroot folder to test you app? if so have you put your
    database in the root folder of the site? or in a folder called database? i use
    the following MM_connSTS_STRING = 'Provider=Microsoft.Jet.OLEDB.4.0; Data
    Source= ' &amp; Server.MapPath('/mainsitefolder/database/sitedatabase.mdb')
    this works fine for me when i am testing plus when i upload the site it works
    on my remote service provider hope this helps Gubs

    Gubbins Guest

  4. #4

    Default Re: ASP Access Database Connection Problem

    did you try out the tom muck extension, it is really very good for getting
    the path.

    just out of interest lol

    twocans



    "Gubbins" <webforumsusermacromedia.com> wrote in message
    news:d0q3v2$j1r$1forums.macromedia.com...
    > hi i agree with twocans but then i use the same conection script oyu do
    > and the
    > first time i did i got the same error message. i am assuming that you have
    > created a folder in the wwwroot folder to test you app? if so have you put
    > your
    > database in the root folder of the site? or in a folder called database? i
    > use
    > the following MM_connSTS_STRING = 'Provider=Microsoft.Jet.OLEDB.4.0; Data
    > Source= ' &amp;
    > Server.MapPath('/mainsitefolder/database/sitedatabase.mdb')
    > this works fine for me when i am testing plus when i upload the site it
    > works
    > on my remote service provider hope this helps Gubs
    >

    twocans Guest

  5. #5

    Default Re: ASP Access Database Connection Problem

    twocans forgot the link
    [url]http://www.tom-muck.com/extensions/help/oledbconnectionString/[/url]

    Bill


    BillB Guest

  6. #6

    Default Re: ASP Access Database Connection Problem

    OOpps thanks Bill





    "BillB >" <bill.betournay<"spamTrap"> wrote in message
    news:d0qt72$qv1$1forums.macromedia.com...
    > twocans forgot the link
    > [url]http://www.tom-muck.com/extensions/help/oledbconnectionString/[/url]
    >
    > Bill
    >

    twocans Guest

Similar Threads

  1. Help using Access database connection
    By weelco in forum Coldfusion Database Access
    Replies: 4
    Last Post: April 5th, 11:20 PM
  2. DW8 connection to MS Access database
    By Database Novice in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: October 16th, 12:42 PM
  3. Access DataBase Connection Problem
    By Vantage in forum Dreamweaver AppDev
    Replies: 2
    Last Post: March 9th, 11:24 PM
  4. Access Database connection is not working! Help!
    By George1613 in forum Dreamweaver AppDev
    Replies: 0
    Last Post: February 27th, 07:15 PM
  5. Access and database connection
    By chris in forum ASP.NET Security
    Replies: 3
    Last Post: August 8th, 03:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139