Referencing MySQL.dll file

Posted on 2006-05-04
Last Modified: 2012-08-14

I have added a reference to mySQL using the .net 2.0 connector in my vb project

but when i want to use a mySQL control (for eg the mySQLConnection) I have to type

Dim myConnection as MySql.Data.MySqlClient.MySqlConnection

The part of "MySql.Data.MySqlClient" is a hassle cuz its so long to type plus it makes the code less readable

I know in C# you could go
using MySql.Data.MySqlClient

and in Java you can do something similar

but I cannot seem to find out how to do it in VB 2005

is there anyway for me to do it so i dont have to type that whole thing all the time...or am i out of luck

Question by:foobarr
    LVL 62

    Accepted Solution

    Imports MySql.Data.MySqlClient
    LVL 7

    Author Comment


    LVL 62

    Expert Comment

    by:Fernando Soto
    Glad I was able to help. :=)

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 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

    23 Experts available now in Live!

    Get 1:1 Help Now