Solved

MYSQL V4 - VB.NET Connection

Posted on 2010-09-08
1
306 Views
Last Modified: 2012-05-10
Hi,

I am writing a small (but urgent) application with VB.NET in visual studio V2005 trying to connect to a MYSQL V4 database which is hosted on a Windows 2003 server.

I have used the MYSQL Connector Net v5.1.0.0 as this version connects to the v4 MYSQL Database, and the application connects without problem on my development machine.

However I cannot get this MYSQL NET connector to install on the windows server (MSI fails saying that it can not complete) - any have given up hope of getting this method to work- I can not install the latest MYSQL net connector as it does not support MYSQL V4 (or so I believe)

Therefore is there any other method of connecting that I can use?

Below is a section of the existing code (hard coded connection string is for testing purposes only) and I do add the reference to the mysql data file.

Can anyone please take my code and show me anyother way of connecting and what files / references I will need to add or install on the machine hosting the application.

Many thanks

------------------
Imports MySql.Data
Imports MySql.Data.MySqlClient

Module Daily_Report

    Sub Main()

        ' ########################################################
        ' #              Create Database Connections             #
        ' ########################################################

        Dim DBconnectString As String

        Dim DBconnection1 As New MySqlConnection
        Dim DBsqlstatement1 As String
        Dim DBsqlcommand1 As New MySqlCommand
        Dim DBsqlreader1 As MySqlDataReader

        ' ########################################################
        ' #              Connection to Database    #
        ' ########################################################

        DBconnectString = "server=10.10.1.3;user=testuser;database=sdata;port=5002;password=testing"
        DBconnection1 = New MySqlConnection(DBconnectString)
        DBconnection1.Open()

        DBsqlstatement1 = "select company_id, company name from daily_customer_report"
        DBsqlcommand1 = New MySqlCommand(DBsqlstatement1, DBconnection1)
        DBsqlreader1 = DBsqlcommand1.ExecuteReader()

        While (DBsqlreader1.Read())
        ................etc............etc.............


0
Comment
Question by:Dan560
1 Comment
 
LVL 53

Accepted Solution

by:
Dhaest earned 500 total points
ID: 33634035
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
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…

911 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

16 Experts available now in Live!

Get 1:1 Help Now