Desktop App连接到数据库 [英] Desktop App connection to data base

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

问题描述

嘿伙计们,非常重要的一个问题:去年我开发了一个winforms桌面应用程序,帮助用户整理账单和金钱。如上所述的软件,用winforms编写,数据库是ms访问(因为并非所有用户都在个人计算机上使用sql server)。

现在,我想升级我的软件。首先,我想把它全部写在WPF平台上但不是主要的东西。

我希望我的软件连接到远程数据库(sql server)以便检索数据,许可和更新。

这是我第一次尝试任何东西像这样,我想知道如何开始。

我是否需要一个支持windows并具有sql server的远程服务器?

什么是连接字符串?

你能告诉我一些代码片段吗?

拜托,这对我来说非常重要。任何提示,链接,建议或代码都会有所帮助! : - )

Hey guys, very important question comming up:
in the last year i developed a desktop application in winforms that help the user to organize his bills and money. the software, as said, written in winforms and the database was ms access (because not all of the users are using sql server on there personal computers).
Now, i want to upgrade my software. for start, i want to write it all down on the WPF platform but that not the main thing.
I want my software to connect to a remote database (sql server) in order to retrive data, license and updates.
this is the first time i'm trying anything like this and i would like to know how to get started.
Do i need a remote server that support windows and has sql server?
what will be the connection string?
can u please show me some code snippet?
please, this is very important to me. any tip, link, advice or code will help! :-)

推荐答案

请参阅我对SQL服务器和Access上的注释的问题的评论。另请参阅:

Microsoft Access - 维基百科,免费的百科全书 [ ^ ],

客户端 - 服务器模型 - 维基百科,免费的百科全书 [ ^ ],

拉动技术 - 维基百科,免费的百科全书 [ ^ ],

SQL Server - 维基百科,免费的百科全书 [ ^ ]。



它是可能使用Access的经验给你错误的印象关于真正的数据库工具应该做什么。缺乏事件的数据库工具客户端 - 服务器模型几乎不能形成数据库技术的清晰视野。



您不需要任何其他服务器来访问SQL服务器。至于连接字符串,你已经从Homero Rivera那里得到了很好的建议,使用 ConnectionStrings.com - 忘记了连接字符串?在这里获取! [ ^ ]。



快速建议:使用ADO.NET,学习它:

ADO.NET - 维基百科,免费的百科全书 [ ^ ],

ADO.NET [< a href =http://msdn2.microsoft.com/en-us/library/aa286484.aspxtarget =_ blanktitle =New Window> ^ ]。



此CodeProject文章将帮助您立即开始:为初学者使用ADO.NET [ ^ ]。



-SA
Please see my comment to the questions with the notes on SQL server and Access. See also:
Microsoft Access - Wikipedia, the free encyclopedia[^],
Client–server model - Wikipedia, the free encyclopedia[^],
Pull technology - Wikipedia, the free encyclopedia[^],
SQL Server - Wikipedia, the free encyclopedia[^].

It's possible that experience with Access gave you wrong impression on what "real" database tools should do. The database tool lacking event the client-server model hardly can form a clear vision of database technology.

You don't need any other server to access an SQL server. As to connection strings, you already got a good advice from Homero Rivera to use ConnectionStrings.com - Forgot that connection string? Get it here![^].

The quick advice would be: use ADO.NET, learn it:
ADO.NET - Wikipedia, the free encyclopedia[^],
ADO.NET[^].

This CodeProject article will help you to get started in no time: Using ADO.NET for beginners[^].

—SA


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

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