The best way to open MYSQL tables in visual basic 2008

I´m trying to use the code bellow to open Mysql databe on my network. But its not working, What´s the problem ?: and this is the best way to open the databe on a network environment ?


      Dim strConnect As String
        Dim strProvider As String
        Dim usr_id As String      
        Dim pass As String        
        Dim mySqlIP As String    
        mySqlIP = "127.0.0.1"    


        usr_id = "root"  
        pass = "xxxxxxxxx"


        strConnect = "driver={MySQL ODBC 5.1 Driver};server=" & mySqlIP & ";uid=" & usr_id & ";pwd=" & pass & ";database=usuarios"

        adoDataConn = New ADODB.Connection

        adoDataConn.CursorLocation = adUseClient
        adoDataConn.Open(strConnect)

        rsMySQL = New ADODB.Recordset
        rsMySQL.CursorType = adOpenStatic
        rsMySQL.CursorLocation = adUseClient
        rsMySQL.LockType = adLockPessimistic
        rsMySQL.Source = "Select * From clients"
        rsMySQL.ActiveConnection = adoDataConn

        rsMySQL.Open()
Jose BredariolPMPAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
aikimarkConnect With a Mentor Commented:
>>It´s the same as VB.NET ?

Yes.  VS2008 is a .Net development tool, capable of generating .Net assemblies in VB or C# (maybe other languages).
0
 
GMGeniusCommented:
What OS are you running the application in?
are you sure the MySQL port is not blocked?
0
 
Jose BredariolPMPAuthor Commented:
It´s Visual Studio VB 2008. I´m not using .NET
I´m running it on my machine Windows Vista, I turned My firewall off.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
aikimarkCommented:
@jbredariol

VS2008 is a VB.NET development environment.
0
 
Jose BredariolPMPAuthor Commented:
It´s the same as VB.NET ?
0
 
Jose BredariolPMPAuthor Commented:
Sorry for that. So what´s the better way to access MYSQL for desktop application ?
0
 
Jose BredariolPMPAuthor Commented:
Thanks all
0
All Courses

From novice to tech pro — start learning today.