更新数据库的申请
我已经发布了我的网站...它是一个动态网站..所以我有数据库连接..现在我想在 VB 中创建一个应用程序来使用我的应用程序更新我的数据库..我的意思是我不想登录该网站并更新我的数据库,而不是使用我的应用程序更新它。我想将我的应用程序连接到已发布站点的数据库,并从我想要使用该应用程序的任何地方更新它......这可能吗?
我该怎么做?请给我指出正确的方向...很紧急。
i have published my website...its a dynamic site..so i have database connectivity..now i want to make an application in VB to update my database using my application..i mean i do not want to login to the site and update my database rather update it using my application..i want to connect my application to the database of the published site and update it from anywhere i want using the application...is it possible??
How can i do it??Please point me to the right direction...its urgent.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在 SQLServer 中打开
AllowRemoteConnections
。因此您的应用程序从任何地方都可以连接到它并更新数据库。但最佳实践是使用
WCF 服务
。您应该将更新数据库的方法放在 WCF 服务场中,然后使用 Windows 窗体或 WPF 编写客户端应用程序以连接到 WCF 服务并使用 WCF 服务中提供的方法更新数据库。you can turn on
AllowRemoteConnections
in your SQLServer. so your application from any where can connect to it and update the DB.but the best practice for this is using a
WCF Service
. You should place your methods for updating the DB in a WCF Service farm and then write a client application using Windows Forms or WPF to connect to WCF Service and update the DB using Provided methods in WCF Service.尽管您想做的事情是可能的,但您可能不想这样做。如果您通过 ISP 托管您的网站,托管公司将需要提供访问权限。
然而,正如 Farzin 所建议的,您需要在应用程序和数据库之间有一个集成层。
您可以使用 WCF 服务,但如果它很简单,您甚至可以使用 MVC 之类的东西公开您的数据。
您基本上需要的只是数据库周围的安全性。
Although what you want to do is possible you probably don't want to do that. If you are hosting your site with an ISP the hosting company will need to provide the access.
However, as Farzin suggests, you need an integration layer between your application and the database.
You could go with a WCF Service but if it is something simple you could even expose your data using something like MVC.
All you basically need is the security wrapped around your database.
你看过 Lightswitch 吗?它目前是 Beta2,但仍然相当强大。使用 Lightswitch,您可以快速设置一个对数据库执行 CRUD 操作的应用程序。
Have you taken a look at Lightswitch? It is currently Beta2 but still quite robust. Using Lightswitch you can quickly set up an app which performs CRUD operations on your database.