Solved

The best way to open MYSQL tables in visual basic 2008

Posted on 2010-09-06
9
334 Views
Last Modified: 2012-05-10
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()
0
Comment
Question by:Jose Bredariol
[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
  • 4
  • 3
9 Comments
 
LVL 12

Expert Comment

by:GMGenius
ID: 33612480
What OS are you running the application in?
are you sure the MySQL port is not blocked?
0
 

Author Comment

by:Jose Bredariol
ID: 33612670
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
 
LVL 45

Expert Comment

by:aikimark
ID: 33612734
@jbredariol

VS2008 is a VB.NET development environment.
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:Jose Bredariol
ID: 33612773
It´s the same as VB.NET ?
0
 
LVL 45

Accepted Solution

by:
aikimark earned 250 total points
ID: 33612874
>>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
 

Author Comment

by:Jose Bredariol
ID: 33612890
Sorry for that. So what´s the better way to access MYSQL for desktop application ?
0
 
LVL 45

Assisted Solution

by:aikimark
aikimark earned 250 total points
ID: 33612945
0
 

Author Closing Comment

by:Jose Bredariol
ID: 33648635
Thanks all
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

737 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