Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi to all,
I have a doubt in Access Multiple Database Based On year changed Dropdown in Login Page. Here i using DAC for ConnectionString. I need to Change Database(SQL) Using Selected Value in login page. Or Else Have Any Procedure Doing This for Access Multiple Database in Single Login Page.Thanks in Advance.

What I have tried:

Here I access Database Using Session From Login But Session Show null so cant open even Login Page Also. I Dont Have Idea using This.
Posted
Updated 22-Oct-17 9:27am
v2

1 solution

With Access that's simple: the database filename is part of the connection string:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyFolder\MyAccessFile.accdb;
Persist Security Info=False;

Just change the path to the appropriate file.
 
Share this answer
 
Comments
JOTHI KUMAR Member 10918227 20-Oct-17 9:09am    
Not Like that For Ex: if i have two year datas in database but database name different like (2016,2017). If i login if i select 2016 i need to access that 2016 , if i select another one i need to access that 2017...in my scenario database Differnt,USername password also Different
OriginalGriff 20-Oct-17 9:13am    
Are you trying to say "table name" instead of "database name"?
Because if so, they are very different things. A "Database" is a collection of "Tables", they are not synonymous.
JOTHI KUMAR Member 10918227 20-Oct-17 9:31am    
no i need to access Different "Database" Not Table.
OriginalGriff 20-Oct-17 9:58am    
Each database in Access is stored in a separate file: so as I originally said "Just change the path to the appropriate file".

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900