Check SQL Values

lifeasalounge

New member
Joined
Sep 13, 2006
Messages
2
Programming Experience
1-3
I'm trying to create program in vb that will check a MySQL database and display alerts according to data retrieved (such as the ebay toolbar).

Should i use php and just get vb to read variables from a php generated page (such as i would using a text file) or is there another way to go about it?

Thanks.
 
I am not following your post. What type of alerts? Are you refferig to db errors/alerts that occur during queries? If so,the propper way to catch this in .net to use a try, catch. Each type of sql adapter in .net will pass the error back to the application, so if you wanted to display it you would simply use
try

'Code to connect to your mysql
Catch ex as exception
'you can do whatever you want with the message
dim x as string = ex.message
end try

If this is not what you are reffering to, please clearify your question.
 
Sorry it's been misunderstood.

I have a php/mysql driven website. This website allows users to signup and send messages to different members. When a users receives a message, it will be displayed when they next login.

I want to create a VB program that a member can download. When this program is running, i want it to check a mysql database to see if a member has received any messages. If they have, the program on their computer will let them know they have mail without them having to login to the website.

QUESTION: What is the best way to go about this? Should i have php create a page of variables that the program should then read? Or do i need to go into more complicated data handling methods.
 
You mean you want to ahve a VB program connect to a website, download HTML that is generated by a php code connecting to a database, parse it and break it up, format it and then show it?

Why dont you just connect the VB program to the MySQL database?
 
Now I see what you mean. There are a few ways to accomplish this. To save a lot of headaches, I would use web services. Have the program on intervals submit the webservice request (It's just a xml packet) to the server. Whn the Server retrieves it have it respond with the message. This will allow you to grow with the program, and build some cool modification. It's very easy to setup. Just do a search on Sample webservice applications in google and it'll give you a good start.
 
vinnie, why would you shoe db access through an HTTP layer, causing much loss of functionality and wasted time in coding the adapter? MySQL database can accept a connection over tcp..

lifeasalounge; why go this route at all.. surely you would jsut write an RSS news reader?
 
I never allow my db direct access, it's a security risk. I always setup the webserver in a dmz, then have the webserver connect to the network with the db. Allowing direct access opens a lot of additional security issues.
 
So does running a webserver :)

I'd prefer to run a readonly accessible database than a web server for client app stuff.. :)
 
So does running a webserver :)

I'd prefer to run a readonly accessible database than a web server for client app stuff.. :)

According to the first posts, there is a webserver already running the site. He is just adding functionality to notify to come to that site, or that something has changed. Hence my sugestion of using webservices. It eliminates having two open ports, and is very secure.
 
true.. i just feel it's usually more of a headache to wrap a perfectly good, flexible access method up in a http wrapper.. however, looking at the OP's question, i still think RSS would be the most sensible way - most of the devlopment effort is already invented (and it also fits within your web services model :) )
 
Back
Top