Solved

The best way to open MYSQL tables in visual basic 2008

Posted on 2010-09-06
9
302 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
  • 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
 

Author Comment

by:Jose Bredariol
ID: 33612773
It´s the same as VB.NET ?
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

757 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