如何连接到SQl数据库文件 [英] How Can I Connect To SQl Database File

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

问题描述

您好我想创建一个将信息存储到数据库中的应用程序我想使数据库成为一个附件,应用程序可以在任何地方和任何状态(在线/离线)工作如何使用C#和sql server做到这一点??

Hello I would Like to make an application that stores information into database i would like to make database an attachment with the application to be work anywhere and in any state(online/offline) how can i do that using C# and sql server ??

推荐答案

首先,您需要了解如何从C#访问数据库。请通过以下链接,它是一个初学者指南,通过C#访问SQL服务器。



初学者指南,通过C#访问SQL Server [ ^ ]



样本展示 - 简单 - ado-net-连接 [ ^ ]



您可以在安装应用程序时部署数据库。
First of all you need to learn how to access the DB from C#. Please go through below links, Its a beginners guide to access the SQL server through C#.

Beginners guide to accessing SQL Server through C#[^]

Samples-to-show-simple-ado-net-connectivity[^]

You can deploy the database when you installed your application.


您可以访问数据库通过Webservice。所以,首先尝试实现webservice并通过它访问所有数据库值。你可以在本地IIS或远程机器上托管它。



一个很好的教程是:

http://msdn.microsoft.com/en-us/library/ms950421.aspx [ ^ ]
you can access Database through Webservice. so, first try to implement webservice and access all the Database value through this. you can host it on local IIS or remote machine.

A good tutorial is:
http://msdn.microsoft.com/en-us/library/ms950421.aspx[^]


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

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