Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7547601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:29:42+00:00 2026-05-30T09:29:42+00:00

Using OleDb I am connecting to MS Access (v2003) database and my Project folder

  • 0

Using OleDb I am connecting to MS Access (v2003) database and my Project folder is MyHotApps and my OleDb Connection String is

MyConString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source='C:\Users\Some User\Documents\Visual Studio 2010\WebSites\MyHotApps\Database\MyDbFile.mdb'";

As mentioned above my Project folder is MyHotApps and database file MyDbFile.mdb is located in Project_Folder<MyHotApps>\Database\MyDbFile.mdb

So, its too local for me that database file is inside the project folder and I need a Portable Connection String where ever I take the project folder I shouldn’t rewrite Connection String for that I tried the below manner which didn’t work

MyConString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source'=~Database\MyDbFile.mdb'";

Can anybody help me how to build a Portable Connection String I read some forms that says Database file should be placed inside App_Data file and I don’t know how to do that also. Anybody please tell me someway to build portable connection string.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:29:43+00:00Added an answer on May 30, 2026 at 9:29 am

    You can make use of HttpRequest.PhysicalApplicationPath

    And do something as below might resolve your protable path issue easily…

    Request.PhysicalApplicationPath
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an MDB file I access using OleDB: OleDbConnection connection = new OleDbConnection(Provider=Microsoft.Jet.OLEDB.4.0;Data
I'm using this connection string to access excel(2007,2010) files oleConnection.ConnectionString = @Provider=Microsoft.ACE.OLEDB.12.0;Data Source= +
Here's my connection string: sConnection = @Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\ + lstNet.SelectedItem.ToString() + \SharedDocs\Documents\Debug\App_File\ggbase.mdb;Jet OLEDB:Database Password=g3n3r4l;;
a usual connection string would look like Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\file.csv;Extended Properties=text;HDR=Yes;FMT=Delimited; but i need a
I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop,
In my C# application I am using the Microsoft Jet OLEDB data provider to
I am connecting to a MS-Access 2007 database using VB 2010 and OLEDB. Conducting
I'm using OleDb to interact with an Access database, and I'm trying to find
I've been using Microsoft.Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 to read in .csv, .xls, and .xlsx files.
With SQL Server 2005 using SSMS, when I run this: SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.