Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Re: ADODB.Connection

    > Is there an advantage of one of these over the other, other than not
    having
    > to know the physical path?
    >
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.MapPath("/_db/my.mdb") & ";"
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > Source="d:\inetpub\wwwroot\_db\my.mdb;"
    No. However, the advantage isn't just about being oblivious to the path at
    step 1, it's also about being immune to changes to the path indefinitely.
    With the first method, your ISP could change the folder structure of its
    webroot 80 times, and you wouldn't be affected...

    --
    Aaron Bertrand
    SQL Server MVP
    [url]http://www.aspfaq.com/[/url]


    Aaron Bertrand - MVP Guest

  2. Similar Questions and Discussions

    1. .NET returning ADODB.Connection to ASP
      Could someone tell me if I were to return a ADODB.Connection from a .NET dll to ASP, should I be able to use that connection? My .net dll...
    2. ADODB Connection Question
      Hi All Just IYHO, which is better: METHOD 1 ========= Creating the ADODB connection obejct at the beginning of an ASP page in an include...
    3. ADODB.Connection error '800a0046'
      I am receiving the following error: ADODB.Connection error '800a0046' Permission Denied Here is my connection string on my web page: <% Dim...
    4. ADODB Connection
      Could anybody tell me please what the "1,2" refers to in the last line of this code and where I can get a list of the parts to this '.open'...
    5. The specified module could not be found. (ADODB.Connection)
      Hi I am getting the follwoing error message Server object error 'ASP 0177 : 8007007e' Server.CreateObject Failed /BI...
  3. #2

    Default ADODB.Connection

    Is there an advantage of one of these over the other, other than not having
    to know the physical path?

    strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    Server.MapPath("/_db/my.mdb") & ";"
    strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    Source="d:\inetpub\wwwroot\_db\my.mdb;"

    --
    Roland

    This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose.


    Roland Hall Guest

  4. #3

    Default Re: ADODB.Connection

    "Roland Hall" <nobody@nowhere> wrote in message
    news:ucR3ZgDwDHA.2072@TK2MSFTNGP10.phx.gbl...
    > Is there an advantage of one of these over the other, other than not
    having
    > to know the physical path?
    >
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.MapPath("/_db/my.mdb") & ";"
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > Source="d:\inetpub\wwwroot\_db\my.mdb;"
    >
    > --
    > Roland
    >
    > This information is distributed in the hope that it will be useful, but
    > without any warranty; without even the implied warranty of merchantability
    > or fitness for a particular purpose.
    >

    Nope; MapPath() "Returns the full physical path ...".

    Note, you mistyped "Date Source=" above.


    McKirahan Guest

  5. #4

    Default Re: ADODB.Connection

    Roland Hall wrote:
    > Is there an advantage of one of these over the other, other than not
    > having to know the physical path?
    >
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > Server.MapPath("/_db/my.mdb") & ";"
    > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > Source="d:\inetpub\wwwroot\_db\my.mdb;"

    I suppose there might be a nanosecond or two saved by not having to run the
    MapPath function, but ...

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"


    Bob Barrows Guest

  6. #5

    Default Re: ADODB.Connection

    "Aaron Bertrand - MVP" wrote:
    > > Is there an advantage of one of these over the other, other than not
    > having
    > > to know the physical path?
    > >
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > > Server.MapPath("/_db/my.mdb") & ";"
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > > Source="d:\inetpub\wwwroot\_db\my.mdb;"
    >
    > No. However, the advantage isn't just about being oblivious to the path
    at
    > step 1, it's also about being immune to changes to the path indefinitely.
    > With the first method, your ISP could change the folder structure of its
    > webroot 80 times, and you wouldn't be affected...
    Good answer. I had seen quite a few people use MapPath and I usually don't
    so I wondered what the benefit would be and this is obviously a good reason
    to use it.

    Thank you.

    --
    Roland

    This information is distributed in the hope that it will be useful, but
    without any warranty; without even the implied warranty of merchantability
    or fitness for a particular purpose.


    Roland Hall Guest

  7. #6

    Default Re: ADODB.Connection


    "McKirahan" wrote:
    > "Roland Hall" wrote:
    > > Is there an advantage of one of these over the other, other than not
    > having
    > > to know the physical path?
    > >
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > > Server.MapPath("/_db/my.mdb") & ";"
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > > Source="d:\inetpub\wwwroot\_db\my.mdb;"
    >
    > Nope; MapPath() "Returns the full physical path ...".
    >
    > Note, you mistyped "Date Source=" above.
    Ah, the infamous typo. Somehow I have a feeling it won't be my last.
    Thank you.


    Roland Hall Guest

  8. #7

    Default Re: ADODB.Connection

    "Bob Barrows" wrote:
    > Roland Hall wrote:
    > > Is there an advantage of one of these over the other, other than not
    > > having to know the physical path?
    > >
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
    > > Server.MapPath("/_db/my.mdb") & ";"
    > > strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Date
    > > Source="d:\inetpub\wwwroot\_db\my.mdb;"
    >
    >
    > I suppose there might be a nanosecond or two saved by not having to run
    the
    > MapPath function, but ...
    >
    > Bob Barrows
    I thought it might have some overhead but didn't think it would be
    traumatic, even if you made a lot of calls to the database.
    Thank you.


    Roland Hall 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