Solved

MYSQL V4 - VB.NET Connection

Posted on 2010-09-08
1
310 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 195
Web Form VB.Net  import CSV 4 38
Help Required 2 32
Query group by data in SQL Server - cursor? 3 34
This article will show, step by step, how to integrate R code into a R Sweave document
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

777 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