更改数据源 [英] Changing the DataSource

查看:78
本文介绍了更改数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改数据库的数据源.
使用按钮和文本框.
该按钮将定位数据库所在的数据库,文本框将成为数据库的路径.

how to change the data source of your database.
Using a button and a textbox.
The button will locate the database where it was located and the textbox will be the path of the database.

推荐答案

什么?您是什么意思,按钮将定位数据库?文本框是路径吗?

假设您想即时设置连接字符串(基于文本框的文本),则无需执行任何操作.在按钮单击事件上,使用在texbox中输入的文本作为连接字符串,然后尝试使用该文本访问数据库.
What? What do you mean button will locate the database? textbox is path?

Assuming that you want to set the connection string on the fly(based on the text of the textbox), you don''t need to do anything. On button click event, use the text entered in the texbox as connectionstring and try to access the database using that.


这篇关于更改数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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