Reading the application folder..

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pete Smith

    #1

    Reading the application folder..



    I have written an ASP.Net application which reads the data from MS Access
    file.

    Here is the connection string value.

    "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=MyDB.mdb ;User
    Id=admin;Passwo rd=;"

    What should be the database path name If I keep the .mdb file in the
    application folder.

    ..Net Framework 1.1.

    Thank you,

    Pete






  • vbnetdev

    #2
    Re: Reading the application folder..

    Try This....substit ue App_Data for folder db is in.

    Public Function App_Path() As String
    Return System.AppDomai n.CurrentDomain .BaseDirectory( )
    End Function

    "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=" & App_Path() &
    "\App_Data\MyDB .mdb;User
    Id=admin;Passwo rd=;"


    --
    Get a powerful web, database, application, and email hosting with KJM
    Solutions




    "Pete Smith" <PeteSmithAl@ho tmail.com> wrote in message
    news:uI7DkgXQGH A.1556@TK2MSFTN GP09.phx.gbl...[color=blue]
    >
    >
    > I have written an ASP.Net application which reads the data from MS Access
    > file.
    >
    > Here is the connection string value.
    >
    > "Provider=Micro soft.Jet.OLEDB. 4.0;Data Source=MyDB.mdb ;User
    > Id=admin;Passwo rd=;"
    >
    > What should be the database path name If I keep the .mdb file in the
    > application folder.
    >
    > .Net Framework 1.1.
    >
    > Thank you,
    >
    > Pete
    >
    >
    >
    >
    >
    >[/color]


    Comment

    Working...