Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Visual Studio .NET Data Connection to MS ACCESS

Posted on 2004-08-19
10
Medium Priority
?
273 Views
Last Modified: 2008-03-06
I am using VS .NET 2003, and have several Data Connections set up to SQL Servers. Now though, I want to add a Data Connection for a .mdb file on my F: network drive.  I set up an ODBC connection to it, this ODBC connection works fine. But there is no option in the Data Conenction configuration tool to use the ODBC connection, on the Provider tab.

Basically I want to get the connection string to put in my web.config file, if some knows how to put together a connection string to a .mdb file that would work for me too.

I tried to use the OLEDB Simple Provider driver in the Provider tab, but this did not work, it didn't recognize my F: drive path.

Ideas?
0
Comment
Question by:RichardFox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 17

Accepted Solution

by:
AerosSaga earned 700 total points
ID: 11842220
It can be done like so:

<appSettings>
            <add key="SiteDB" value="Provider=Microsoft.Jet.OleDb.4.0;Data Source=C:\Inetpub\wwwroot\DOTNETShoppingCart\Database\Site.mdb;"></add>
            <!-- <add key="SiteDB" value="Provider=Microsoft.Jet.OleDb.4.0;Data Source=D:\LocalUser\INET_savoyfurniture\Includes\Site.mdb;"></add> -->
      </appSettings>

Regards,

Aeros
0
 
LVL 28

Assisted Solution

by:mmarinov
mmarinov earned 300 total points
ID: 11842243
Hi,

go to http://www.connectionstrings.com/ and get the needed connection string

Regards,
B..M
0
 

Author Comment

by:RichardFox
ID: 11842468
tried both of these

      <add key="CLOSBIND_MDB"
         value="driver={Microsoft Access Driver (*.mdb)};Dbq=F:\ODBC\closbind.mdb;"/>
      <add key="CLOSBIND2_MDB"
         value="provider=Microsoft.Jet.OleDb.4.0;data source=F:\odbc\closbind.mdb;"/>

getting errors:

Keyword not supported: driver
and
Keyword not supported: provider
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 28

Expert Comment

by:mmarinov
ID: 11842515
have you checked the link i've send you ?

B..M
0
 

Author Comment

by:RichardFox
ID: 11842535
Yes, that site's strings are reflected in my connection strings (I try both ODBC and OLEDB). Case has no effect
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11842563
provider should be Provider

data source should be Data Source
0
 

Author Comment

by:RichardFox
ID: 11842601
Ooops, stand by I was trying to use SqlConnection with OLEDB and ODBC connection strings...
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11842656
lol that'll do it
0
 

Author Comment

by:RichardFox
ID: 11842695
That's wierd. Now I'm getting

'F:\ODBC\closbind.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

But I assure you this is a valid path to a network drive. Could it be that IIS cannot resolve this path though?
0
 
LVL 17

Expert Comment

by:AerosSaga
ID: 11842750
If the server can resolve the path then IIS should be able to as well, I'm guessin theres some other issue at work here
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question