如何使用企业库与SQL Server 2008建立连接 [英] How to Make Connectivity With SQL Server 2008 Using Enterprise Library

查看:75
本文介绍了如何使用企业库与SQL Server 2008建立连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!



我必须使用带有SQL Server 2008后端数据库的Visual Studio 2013在VB.NET中创建一个项目。



我不想制作普通的连接字符串,但我想与SQL Server 2008建立连接使用Microsoft Enterprise Library。



任何人都可以帮我一些示例项目的例子吗?



谢谢!



问候:

Muhammad Asim Mughal

Hi !

I have to make a project in VB.NET using Visual Studio 2013 with Back End Database of SQL Server 2008.

I don't want to make the ordinary connection-string but i want to establish connectivity with SQL Server 2008 Using Microsoft Enterprise Library.

can anyone help me with examples of some sample projects ??

Thanks !

Regards:
Muhammad Asim Mughal

推荐答案

总会有一个连接字符串。但最好从代码中禁止它。实际上硬编码连接字符串是一个非常糟糕的做法。但是你仍然需要在某处配置数据库连接。 DAAB提供抽象提供程序和配置工具。点击此处: http://www.4guysfromrolla.com/articles/030905-1.aspx [< a href =http://www.4guysfromrolla.com/articles/030905-1.aspxtarget =_ blanktitle =New Window> ^ ]
There will always be a connection string. But it is best practice to ban it from your code. Actually hardcoding connection string is a really bad practice. But you still need to configure database connection somewhere. DAAB provides abstract provider and a configuration tool. Check here: http://www.4guysfromrolla.com/articles/030905-1.aspx[^]


这篇关于如何使用企业库与SQL Server 2008建立连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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