连接到与Visual Studio防爆preSS版本的SQL Server [英] Connecting to SQL Server with Visual Studio Express Editions

查看:146
本文介绍了连接到与Visual Studio防爆preSS版本的SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得很奇怪的是,在Visual C#2008前preSS版,当您使用数据库浏览器,你的选择是:

I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are:


  1. 的Microsoft Access

  2. 的SQL Server Compact 3.5,

  3. SQL Server数据库文件。

但如果你使用的Visual Web Developer 2008防爆preSS,您可以连接到一个普通的SQL服务器,Oracle,ODBC等。

BUT if you use Visual Web Developer 2008 Express, you can connect to a regular SQL Server, Oracle, ODBC, etc.

有关人士开发的命令行或需要跟一个SQL Server数据库等C#应用程序,你真的需要一个IDE(Visual Web Developer中)和你的程序中建立你的LINQ /数据访问code另一个(的Visual C#)?

For people developing command-line or other C# apps that need to talk to a SQL Server database, do you really need to build your LINQ/Data Access code with one IDE (Visual Web Developer) and your program in another (Visual C#)?

这不是一个很难解决办法,但它似乎不可思议。如果微软想强迫你升级到Visual Studio连接到SQL Server,为什么他们会在其免费的IDE之一,但不是其他的功能?我觉得我可能会失去了一些东西(比如如何做到这一切在Visual C#)。

It's not a hard workaround, but it seems weird. If Microsoft wanted to force you to upgrade to Visual Studio to connect to SQL Server, why would they include that feature in one of their free IDEs but not the other? I feel like I might be missing something (like how to do it all in Visual C#).

推荐答案

您应该能够选择SQL Server数据库文件选项,以获得正确的数据库(即 System.Data.SqlClient的供应商),然后手动更正连接字符串以指向你的数据库。

You should be able to choose the SQL Server Database file option to get the right kind of database (the system.data.SqlClient provider), and then manually correct the connection string to point to your db.

我认为落后于数据库的选择的理由很可能是这样的:

I think the reasoning behind those db choices probably goes something like this:


  • 如果您使用的防爆preSS版,而你的的使用Visual Web开发人员,你可能会建立一个桌面程序。

  • 如果您正在构建一个桌面程序,以及您所使用的前preSS版,你可能是一个业余爱好者或uISV-ER在家工作而不是做开发的公司。

  • 如果你不为某公司开发,您的应用程序可能是发往最终用户和数据存储很可能将自己的本地计算机上。

  • 您真的不应该部署的服务器级的数据库,以最终用户的桌面。一个的过程中的的如SQL Server精简或MS Access数据库中会更合适。

  • If you're using the Express Edition, and you're not using Visual Web Developer, you're probably building a desktop program.
  • If you're building a desktop program, and you're using the express edition, you're probably a hobbyist or uISV-er working at home rather than doing development for a corporation.
  • If you're not developing for a corporation, your app is probably destined for the end-user and your data store is probably going on their local machine.
  • You really shouldn't be deploying server-class databases to end-user desktops. An in-process db like Sql Server Compact or MS Access is much more appropriate.

然而,这样的逻辑并不完全成立。即使每个这些4点是真实的90%的时间,你的时间应用他们四个它只适用于〜你的听众,这意味着前preSS市场高达35%的65%可能合法想谈一个服务器级分贝,这是一个显著组。因此,简化(贪婪)版本:

However, this logic doesn't quite hold. Even if each of those 4 points is true 90% of the time, by the time you apply all four of them it only applies to ~65% of your audience, which means up to 35% of the express market might legitimately want to talk to a server-class db, and that's a significant group. And so, the simplified (greedy) version:


  • 一个真正的数据库服务器(并运行它的硬件)的成本真金白银。如果你有机会到这一点,你应该能够至少买得起的Visual Studio标准版。

这篇关于连接到与Visual Studio防爆preSS版本的SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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