Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,

I want my desktop application to connect in Website database (MySQL Database is used).

Will I use the website URL, e.g., http://www.codeproject.com as my host?

Please help.

Thanks in advance.
Posted
Updated 25-Jun-11 15:40pm
v3
Comments
Dalek Dave 10-Dec-10 4:54am    
Edited for Syntax and Readability.

TRY this CODE in VB ..
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate("http://login.website.co/")
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.Document.GetElementById("login").SetAttribute("value", TextBox1.Text)
        WebBrowser1.Document.GetElementById("passwd").SetAttribute("value", TextBox2.Text)

        WebBrowser1.Document.GetElementById(".save").InvokeMember("click")
    End Sub

End Class


(Register from the website and login from the program suitable for online gaming.)
(Or you can put a small webbrowser inside your program and just when you click "Login", it will load and log into your website.)

For the "Login" and "passwd" 6-7 line in the code, you need to edit the HTML code of the website by using a webbrowser like Internet Explorer, Mozzila, Opera, etc. and see if they are the same or not, if not just copy and replace them in the code.

If you have more problems, just contact me on Cassanovazzz@live.com or facebook.com/Bo00oDy.
 
Share this answer
 
v2
Comments
#realJSOP 25-Jun-11 6:10am    
This question is 1.5 years old. Why are you answering it?
what do you mean by website database..,

You mean that database is located in another server, that have a public IP., if yes change the host address with that public IP.
 
Share this answer
 
Comments
jleonorlane 30-Nov-10 8:59am    
...yes a website database...
But how..?i really dont know about on it...
There is no such thing as a "website database."

Assuming you really mean "How do I connect to a web service that provides data," the only possible answer is "Consult with the documentation and/or help desk of the company that is providing the data." Connecting and communicating with a web service depends on how the interface contracts are written; there is no one-size-fits-all answer. As far as writing a web service, that is a very complicated process with no simple answer. There are several examples here at Code Project that you can reference, and plenty of text books and other resources.
 
Share this answer
 
You may require the port which is being used for mySQL on your server, if it's not the default one.

http://www.connectionstrings.com/mysql[^]
 
Share this answer
 
Firstly make sure that you have downloaded the MySql Connector package found here Download the ADO.NET Driver for MySQL (Connector/NET) [^]

A good place to read about connection strings is as follows MySql Connection Strings[^]

Examples of MySQl Data connections can be found here MySQL connection example[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900