Uploading Connection String?

Discussion in 'ASP .Net' started by =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?=, Jul 3, 2004.

  1. I've got a Web App developed via VBNet. I'm using WebForms and a small Access database. It's easy enough to set the connection string when the database is on my local machine. However...I need to upload both the app and the database. Is there a way I can set the connection string similar to the old App.path routine?

    Thanks
    =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?=, Jul 3, 2004
    #1
    1. Advertising

  2. Hi Arne,

    I suspect you are looking for server.mappath("accessdb.mdb") to use in
    building the connection string.

    Ken


    "Arne Beruldsen" <> wrote in message
    news:...
    > I've got a Web App developed via VBNet. I'm using WebForms and a small
    > Access database. It's easy enough to set the connection string when the
    > database is on my local machine. However...I need to upload both the app
    > and the database. Is there a way I can set the connection string similar
    > to the old App.path routine?
    >
    > Thanks
    Ken Cox [Microsoft MVP], Jul 3, 2004
    #2
    1. Advertising

  3. Thanks...
    I think that's what I need...should the line in the connection string look like this?
    ....
    "DataSource=server.mappath("MyDB.mdb"); " & _
    ....

    It doesn't seem to accept it the way I have it written.

    Thanks...


    "Ken Cox [Microsoft MVP]" wrote:

    > Hi Arne,
    >
    > I suspect you are looking for server.mappath("accessdb.mdb") to use in
    > building the connection string.
    >
    > Ken
    >
    >
    > "Arne Beruldsen" <> wrote in message
    > news:...
    > > I've got a Web App developed via VBNet. I'm using WebForms and a small
    > > Access database. It's easy enough to set the connection string when the
    > > database is on my local machine. However...I need to upload both the app
    > > and the database. Is there a way I can set the connection string similar
    > > to the old App.path routine?
    > >
    > > Thanks

    >
    >
    =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?=, Jul 4, 2004
    #3
  4. Hi Arne,

    More like:

    "DataSource=" & server.mappath("MyDB.mdb") & "; " & _

    "Arne Beruldsen" <> wrote in message
    news:...
    > Thanks...
    > I think that's what I need...should the line in the connection string look
    > like this?
    > ...
    > "DataSource=server.mappath("MyDB.mdb"); " & _
    > ...
    >
    > It doesn't seem to accept it the way I have it written.
    >
    > Thanks...
    >
    Ken Cox [Microsoft MVP], Jul 4, 2004
    #4
    1. Advertising

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. Dung Ping
    Replies:
    10
    Views:
    938
    Chaddy2222
    Jan 16, 2006
  2. Sylvain Thenault
    Replies:
    0
    Views:
    325
    Sylvain Thenault
    Apr 14, 2005
  3. Replies:
    3
    Views:
    830
    Samuel R. Neff
    Aug 3, 2007
  4. Phil Johnson
    Replies:
    3
    Views:
    927
    Phil Johnson
    Apr 9, 2008
  5. Wei  Lu
    Replies:
    2
    Views:
    5,826
    Wei Lu
    Feb 16, 2009
Loading...

Share This Page