从网站连接本地数据库 [英] Connect Local Database from Website

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

问题描述

大家好,
我使用vb.net和sqlserver完成了一个项目,现在我将启动一个小型Web应用程序,以从我的sqlserver数据库中获取一些在本地计算机中连接的信息.托管Web应用程序后,是否可以连接本地数据库?如果可能的话,有什么先决条件..请帮助我找到更好的解决方案.

HI all,
I done a project using vb.net and sqlserver, now i am going to start a small web application for getting some in formations from my sqlserver database which one is connected in the local machine. is it possible to connect my local database after hosting of my web application ? if it is possible what are the prerequisites.. please help me to find a better solution.

推荐答案

不,您必须将数据库上传到某个托管服务提供商,然后必须从他们那里连接数据库.
No, you have to upload your database to some hosting provider and then have to connect your database from them.


一种解决方案是根据该建议,建议您既托管应用程序又托管数据库一台服务器.主要原因是,如果您仅托管应用程序,那么应用程序将如何知道其数据库的位置?需要用一些IP地址来指定,这是您可以在其中找到我的数据库的位置,对吗?因此,如果您需要使用自己的pc作为数据库源,那么在这种情况下,您需要为其获取静态IP.然后,它很简单.只需将托管在Internet上任何位置的应用程序指向计算机的静态IP即可表示要连接的数据库.

希望这将是您要搜索的足够的和可选的信息.

谢谢与问候,
Mr.Ashish Gandhi
One solution is as per the guy suggested that you need to host both of your application as well as database one server. The main reason is if you will only host your application then how the application will know where the database for it is located? It needs to be specified with some ip address that, this is the location from where you can find my database,right ? so if in the case you need to use your own pc for database source , then in that case you need to get a Static IP for it. Then its simple. Just point your application hosted anywhere on interntet , with the Static IP of your computer for denoting the database to connect to.

Hope this would be the sufficient and opt information you are searching for.

Thanks & Regards,
Mr.Ashish Gandhi


Rajmin,一种解决方案是,如果您不想在托管站点使用sql server,则可以将sql server数据库转换为ms-access或mysql,因为是免费的托管数据库.因此,将您的数据库迁移到ms-access或mysql中,然后上传到托管站点.

为此,您只有3个解决方案:
1.在托管站点上占用sql服务器空间

2.获取静态IP并将您的应用程序连接到静态IP地址.按照Ashish Gandhi先生的回答.他给出了正确的答案.

3.将数据库迁移到Ms-Access或MySql.


希望您能满意我的建议.
Rajmin, one solution is that if you don''t want to take sql server at hosting site then you can convert sql server database into ms-access or mysql because it is free database on hosting. so migrate your database into ms-access or mysql and upload to hosting site.

For this purpose you have only 3 solution :
1. Take sql server space on Hosting site

2. Get Static IP and connect your application with Static IP address. as per Mr.Ashish Gandhi answer. he give right answer.

3. Migrate your database into Ms-Access or MySql.


Hope you will satisfy with my suggestion.


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

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