Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
| Search | Today's Posts | Mark Forums Read
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old February 19th, 2008, 07:19 PM
Registered User
 
Join Date: Apr 2006
Location: Kincheloe, Mi., USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connecting to Access 20007 DB with vb.net

 I created a database using Access 2007.
I am now trying to connect to that DB using VB.Net 2003 code (Visual Basic).
I cannot connect to the database.
I think it has something to do with the fact that Access 2007 database
files end with the extension .accdb instead of .mdb.
The code that I used to creat a connect to open a similar DB using an older version of Access(Access 2000?) does'nt work (after changing the .mdb file extension to .accdb in the path to the DB).

I can't figure it out. Can anyone please help?

thanks

JohnBoy

  #2 (permalink)  
Old May 21st, 2008, 01:26 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello John,

Take a peek at this link

 http://daron.yondem.com/PermaLink.as...a-aba91d24b315


Below is the text.

The new office suite version 2007 comes with brand-new file formats. One of them is the new Access database format version 2007 with accdb extension. Of course there is a new connection string for those new access databases. You can use the connection string below to access your accdb databases through asp.net.

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\database1.accdb;Persist Security Info=False;

In addition, if you are using passwords to access your database, you can include it in your connection string like below;

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\database1.accdb;Jet OLEDB:Database Password=MyDbPassword;

However, your hosting provider will not be aware of this upgrade or probably you don't want to install Access 2007 on your server. Actually, you don't need to. Just install 2007 Office System Driver: Data Connectivity Components..

Hope this helps.





Thanks,

John


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB.Net - Access DB - Date compare johneecc VB How-To 4 August 7th, 2008 04:23 PM
How to connect to Access db thru VB.NET? am_kuthus Visual Studio 2008 1 June 3rd, 2008 04:48 AM
Connecting database using ms access and vb.net adil_farooq Access 0 October 27th, 2005 11:54 PM
Connecting VB Proj to a local Access DB jpaulptr Access VBA 0 May 27th, 2004 12:30 PM
Connecting to Access DB using Visual Basic .NET Lieth Access 6 September 26th, 2003 06:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.