ASP Access Database Connection Problem

Ask a Question related to Dreamweaver AppDev, Design and Development.

  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. Similar Questions and Discussions

    1. Help using Access database connection
      I am using access, but when it connects using the supplied driver in CF MX7 suddenly I can see the full path name under for instance my tables in...
    2. DW8 connection to MS Access database
      I'm new to database design and I've been trying to connect to an MS Database on my local computer. I've been going round in circles trying asp,...
    3. Access DataBase Connection Problem
      There is something I don't do right. When setting up the Microsoft Jet Driver for my Access 2000 database connection, I clicked the test button and...
    4. Access Database connection is not working! Help!
      Hi Guys, i had installed the new fix for Dreamweaver MX 2004 for the Windows XP SP2 but i still cannot connect with an Access database on a ASP.NET...
    5. Access and database connection
      I get the following error when I try to run my web page in asp.net. The Microsoft Jet database engine cannot open the file...
  3. #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" <webforumsuser@macromedia.com> wrote in message
    news:d0pk13$l2j$1@forums.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

  4. #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

  5. #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" <webforumsuser@macromedia.com> wrote in message
    news:d0q3v2$j1r$1@forums.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

  6. #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

  7. #6

    Default Re: ASP Access Database Connection Problem

    OOpps thanks Bill





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

    twocans Guest

Posting Permissions

  • You may not post new threads
  • You may 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