VB.net通过PHP Web服务连接到在线MySQL。 [英] VB.net Connect to Online MySQL through PHP Web Service.

查看:99
本文介绍了VB.net通过PHP Web服务连接到在线MySQL。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



请注意,我是这个论坛的新手。希望你能帮助我。



我有一个必须连接到在线MySql数据库的VB.Net应用程序。

我已经有了MySql数据库和我使用MySql连接器(新实例和直接连接)从VB.net连接到它。



我想做的就是连接到这个数据库通过PHP Web服务,这将实现快速连接,同时可以连接更多用户。

我试图搜索这个,我认为解决方案简单易行,但是我不太了解PHP;如何通过VB.net中的Web服务参考上传文件和连接。



我下载了这些文件:RemoteMySQLDatasetWS.zip和RemoteMySQLTest.zip。来自:http://code.google.c.../downloads/list。其中包含.php/.wsdl/。dll文件和VB.Net测试解决方案。

我上传了文件(.php/.wsdl/。 dll)到我创建数据库的cPanel中的FTP管理器。

问题是,

首先:我不知道这些文件是否正常工作。

第二:我尝试了很多时间来访问文件server.php而没有任何结果。

如果你能帮助我解决这个问题,我将感激不尽。

但是,如果问题不清楚或者是否有人有其他解决方案,请告诉我。这将非常有帮助。



谢谢。

Hi All,

Kindly note that I''m new to this forum. Hope that you can help me.

I have a VB.Net application that must connect to online MySql database.
I already have a MySql database and I connected to it from VB.net using the MySql connector (new instance and direct connect).

All I want to do is to connect to this database via a PHP web service, this will make a fast connection and more users can be connected at the same time.
I tried to search for this, and I think that the solution is easy and simple, but I don''t know a lot about PHP; how to upload files and connect via Web service Reference in VB.net.

I downloaded these files: RemoteMySQLDatasetWS.zip And RemoteMySQLTest.zip. from: http://code.google.c.../downloads/list. which contains ".php" / ".wsdl" / ".dll" files and a VB.Net test solution.
I uploaded the files (".php" / ".wsdl" / ".dll") to the FTP manager in the cPanel where I created the database.
The problem is,
First: I don''t know if these files are working.
Second: i tried many time to access the file "server.php" without any result.
I''ll be thankful if you can help me solve this problem.
However, if the question wasn''t clear or if anyone has another solution, please let me know it. It will be very helpful.

Thank you.

推荐答案

您可以尝试将数据发布到php app,有php解码你发布的内容并执行mysql查询并可选择返回一些输出。 VB.net将使用http(s)下载php文件。



你可以从php中的请求中获取POST数据:

You could maybe try posting data to the php app, the having the php decode what you posted and executing the mysql query and optionally returning some output. The VB.net would just "download" the php file using http(s).

You can get the POST data from requests in php with:


post =
post =


_POST [' var_name'];
// 对发布数据执行某些操作
print 任何输出文本,包括这个,都会被发回;
print 到您的vb.net应用。;
_POST['var_name']; //do something with the post data print "Any output text, including this, is what gets sent back"; print " to your vb.net app.";





如果有帮助请告诉我!



Let me know if this helps!


这篇关于VB.net通过PHP Web服务连接到在线MySQL。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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