Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

The best way to open MYSQL tables in visual basic 2008

Posted on 2010-09-06
9
Medium Priority
?
350 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 46

Expert Comment

by:aikimark
ID: 33612734
@jbredariol

VS2008 is a VB.NET development environment.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

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

Accepted Solution

by:
aikimark earned 1000 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 46

Assisted Solution

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

Author Closing Comment

by:Jose Bredariol
ID: 33648635
Thanks all
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

972 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