View Full Version : Code connect to database and query select data from database in Ms Access 2007


veasna
01-11-2010, 04:12 PM
Dear Access members,

Could you tell me to code connect to database and the query to select a field of data from database?

Thanks,

di.miller
11-29-2010, 11:18 AM
Hi Veasna,

You can find the correct connection string to connect to your database at:
http://www.connectionstrings.com/

They list connection strings to any database you need!:)

-Diana

di.miller
11-29-2010, 11:25 AM
Hi Veasna,

For Access 2007 standard security string:

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

If your database has a password:


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

-Diana