连接USB时连接数据库 [英] Connecting the database when the USB is connected

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

问题描述

亲爱的,

我在c#中有一个Windows应用程序,该应用程序的要求是每当他将USB插入计算机时就启用了USB中的数据库.当前我使用SQL Server 2008是我的计算机中安装的数据库.是否安装sql server 2008在USB上或建议使用适合于USB的数据库.还请提供将sql server 2008的数据更改为该数据库的步骤.连接后如何在USB中启用该数据库.请帮助我.

感谢所有人,

Ananya

Dear,

I have an windows application in c# .The requirement for the application is whenever he plug the USB to a computer the database in usb is enabled.Currently I use the SQL Server 2008 is the database installed in my computer.Whether i install sql server 2008 on USB or please suggest the database suitable for installing in usb.Also please give the steps to change the data from sql server 2008 to that database.How can i enable the database in usb when it is connected.Please help me.

Thanks to All,

Ananya

推荐答案

您需要嵌入式数据库引擎.

如果您使用的是SQL Server,请尝试 http://www.vistadb.net/ [ http://www.sqlite.org/ [
You need an embedded database engine.

If you are using SQL Server then try http://www.vistadb.net/[^] as it is a drop in replacement for it.

You can check out : http://www.sqlite.org/[^]


我的建议是创建一个Windows服务,使您能够知道USB设备何时具有使用System.Diagnostics.EventLog连接;那时您应该连接到Db.

您应该了解有关事件日志的更多信息:
http://msdn.microsoft.com/en-us/library/system.diagnostics. eventlog.aspx [ ^ ]
My suggestion is to create a windows service which enables you to know when a USB device has connected using System.Diagnostics.EventLog; That time you should connect to Db.

You should know more about event log:
http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx[^]


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

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