如何根据年份选择过程更改不同的数据库 [英] How do I change different database based on year selection process

查看:95
本文介绍了如何根据年份选择过程更改不同的数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我对基于登录页面的年份更改下拉列表的Access多数据库存有疑问。这里我使用DAC连接ConnectionString。我需要在登录页面中使用选定的值更改数据库(SQL)。或者其他任何程序在单一登录页面中为访问多个数据库执行此操作。提前感谢。



我尝试过:



这里我使用会话从登录访问数据库但会话显示null所以甚至无法打开登录页面。我没有想法使用这个。

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.

推荐答案

使用Access很简单:数据库文件名是连接字符串的一部分:

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.


这篇关于如何根据年份选择过程更改不同的数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆