How to connect Visual basic with mysql

Discussion in 'PHP' started by prof_site, Jan 29, 2007.

  1. #1
    Hey
    Small help needs :I want ot know how to connect Visual basic with mysql .i could be able to connect locally but i couldn't be able to connect on server(website) .
    Whether i need to install ODBC mysql driver needs to be install on server.

    Help would be great .thanks in advance.
     
    prof_site, Jan 29, 2007 IP
  2. Kalyse

    Kalyse Peon

    Messages:
    1,221
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ummm....


    I havent touched visual basic for 2 years. So please dont quote me when I use the abbreviations and everything.

    Basically firstly you need to use the ODBC connector. version 3.51 is the latest I believe and you can download it from the mysql website.


    Next you need to decide how you are going to connect to your database..

    Either through code.. or through your controls..

    I would probably advise using a control if you havent done it before.

    You need to set up the ADODC (No idea if thats right, I cant remember what it stands for at all) control and then if you right click on it, you can enter all the mysql server connection properties.

    It will ask things like address, database, password, username, and also what connector to actually use, (mysql)

    You then also need to make sure that the server running mysql will allow connections and that you can make connections, this is crucial cause you will just get errors and you wont know why in visual basic unless you do some validation which you dont want to do this yet!

    let me know how it goes..

    eventually when you get the hang of the controls, you want to switch over to just code to connect, i cant remember the reasons why but i found it ALOT easier.

    O yeah, also, once you have learnt VB, you will want to stop, forget it all and learn a better language :D
     
    Kalyse, Jan 29, 2007 IP