?
Solved

MYSQL V4 - VB.NET Connection

Posted on 2010-09-08
1
Medium Priority
?
317 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 33634035
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Six Sigma Control Plans
Suggested Courses

649 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