开发者

Get records from mySQL using PHP and send it to VB.net

I have a开发者_C百科 PHP script which accepts an argument and adds record in the mySQL database if its not available and if its already available it gives a message 'Record already found'.

How can i read this message from vb.net and do appropriate action such as

if data_is_in_db then msgbos("your record already found in the database")

if data_is_not_in_db then msgbox("your record has been added in the database")

Please help me for this, as i am a newbie.

Thanks


It would be simpler to integrate a database connection inside your VB.NET application instead of trying to communicate with a PHP script. Just my two cents.


You can (amongst many other possibilities) use the http status message for that.

E.g send a 201 Created when the record has been added and a 409 Conflict if the record is already there.

see also:
void header ( string $string [, bool $replace = true [, int $http_response_code ]] )
HttpWebResponse.StatusCode Property

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜