简体   繁体   English

vb.net和asp.net的数据库

[英]database for vb.net and asp.net

is it possible to use same database for both vb.net appplication and asp.net?? 是否可以对vb.net应用程序和asp.net使用相同的数据库? and if is possible, how can to connect it??? 如果可能的话,如何连接它??? now..i'd build vb.net application and asp.net in my laptop... it can connect..but i wonder how to make the database connect for vb.net and asp.net in real... thank you in adnvance 现在..我将在我的笔记本电脑中构建vb.net应用程序和asp.net ...它可以连接..但我不知道如何使vb.net和asp.net的数据库真正连接起来...谢谢提前

Short answer... Yes. 简短答案...是的。

Databases are meant to be shared by many different applications as well as many different types of applications. 数据库应由许多不同的应用程序以及许多不同类型的应用程序共享。

For VB.net and ASP.NET (in the code behind), you can use the same code to access the database... 对于VB.net和ASP.NET(在后面的代码中),您可以使用相同的代码来访问数据库...

Using _conn as New SqlConnection(connectionString)
  'Do Stuff'
End Using

For databases to use for free, you can get MS SQL Express edition , Oracle XE , MySql , and a few others. 对于要免费使用的数据库,您可以获取MS SQL Express EditionOracle XEMySql等。

如果将数据访问层(DAL)编写为Web服务(或WCF应用程序),则ASP.NET站点和Winforms应用程序都可以调用DAL,并可以访问同一数据库中的相同数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM