writing to a database on my website

Posted on 2012-09-13
Last Modified: 2012-09-18
I am fairly new to using databases.  I currently have a windows form application that has it's own database to save client information.  The database is stored locally on the user's computer, and I can easily access it to pull records and update client information.

When an error occurs in the software it sends out an email to me with the error code and the line number so that I can correct it.  Also, when the user registers the software, I am sent another email with the registration code and expiration date for the software.

What I would like to do is have a database that is stored on my website so that if an error occurs, the program will attempt to write the error message to my online database, then if it fails, proceed with sending the email so that I can still receive the error code.  I would like the same idea for the registration and expiration date to be stored on a website database instead of emailing to me.

I don't have any work to show, because I am completely stumped at line 1.  Can someone send me in the right direction to accomplish this?  Essentially, each user should have their own local database, but all users' programs can write to a single error and registration database on my website.

I am using, visual studio 2010, and I have a godaddy website.
Question by:lostinthegame
    LVL 35

    Expert Comment

    Do you have a database already? If not, I suggest you use MySQL. it is open source and is supported by godaddy

    Author Comment

    I built a quick on using godaddy's website.  I was actually tooling around with it when you posted.  I may be getting somewhere because it gave me a php connection string.  I guess I just need to figure out how to connect using
    LVL 12

    Expert Comment

    I have very limited experience with this, but you should look into sending SOAP messages from the client and  consuming them with a web service.
    LVL 35

    Accepted Solution

    MySqlConnection conn = New MySqlConnection()
    conn.ConnectionString = “server=” & server & “;” _
    & “user id=” & Username & “;” _
    & “password=” & Password & “;” _
    & “database=dbname”
    MessageBox.Show(“Connection Opened Successfully”)
    Catch myerror As MySqlException
    MessageBox.Show(“Error Connecting to Database: ” & myerror.Message)
    End Try

    Open in new window


    Assisted Solution

    I tried that.  First I had to download and install MySQL Connector Net 6.5.4 and add the reference to my project.

    I get the error: Unable to connect to any of the specified MySQL hosts.

    here is what i'm using:

            'Connect To Database
            Dim MysqlConn As MySqlConnection
            MysqlConn = New MySqlConnection()
                MysqlConn.ConnectionString = "server="server given to me on godaddy's site"; user id="mylogin"; password="mypassword"; database=lostinthegame"
                MsgBox("Connection to Database has been opened.")
            Catch ex As Exception
            End Try

    Open in new window


    Author Closing Comment

    Got it working between both installing Mysql connector and writing the connection string as listed.  The issue was that the godaddy database was restricted from direct access.  Made a new database, and now I'm good to go.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
    Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now