Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Begginers VB and MYSQL Connection

Hi,
I'm a beginner with VB6. I don't know very much, but have been attempting to build a program whereas on the completion of the loading of a certain web page within the browser embedded on the form, the program connects to a passworded MYSQL database which i have already created on my webhost server, and adds one credit to the value for the current user.

I have a problem, however, within the connection of VB to the MYSQL.

I havent got a clue how to do it, or even where to start. i've been onto the ODBC reference manual on mysql.com, but i need something in plain English, and something i can basically copy and paste into my code (i can take the time to study it later, but am on a tight schedule)

Any help, tutorials, diagrams, or copy and paste code i could use would be great.

The server is db1.valuehost.co.uk and the database is genesis3_tox1

so basically, if anyone could incorporate that (and point out where to put my user and pass because i'm not posting such info on a public board) into a copy/paste code, i would be eternally grateful.

Cheers

Whitey

Comments

  • GideonOmegaGideonOmega Member Posts: 617
    : Hi,
    : I'm a beginner with VB6. I don't know very much, but have been attempting to build a program whereas on the completion of the loading of a certain web page within the browser embedded on the form, the program connects to a passworded MYSQL database which i have already created on my webhost server, and adds one credit to the value for the current user.
    :
    : I have a problem, however, within the connection of VB to the MYSQL.
    :
    : I havent got a clue how to do it, or even where to start. i've been onto the ODBC reference manual on mysql.com, but i need something in plain English, and something i can basically copy and paste into my code (i can take the time to study it later, but am on a tight schedule)
    :
    : Any help, tutorials, diagrams, or copy and paste code i could use would be great.
    :
    : The server is db1.valuehost.co.uk and the database is genesis3_tox1
    :
    : so basically, if anyone could incorporate that (and point out where to put my user and pass because i'm not posting such info on a public board) into a copy/paste code, i would be eternally grateful.
    :
    : Cheers
    :
    : Whitey
    :

    you can start with:
    [code]
    dim Conn as ADODB.Connection
    set Conn = new ADODB.Connection
    Conn.Open "Provider=MySQLProv;DataSource=http://db1.valuehost.co.uk/yourpage/genesis3_tox1;User Id=myUsername;Password=myPassword"
    [/code]

    now I'm not sure about the path to the webserver - that may not work - although I would suggest using php or asp to make the web page in question - as the page would connect and update the database for u - way easier, as I said you may have to research the datasource a bit more as I have never had a app that connected to a web hosted db before - you will most likely have to include some other things to allow you access the the db in the first place.

    Good luck.
    [blue]
    C:Dos
    C:Dos Run
    Run Dos Run
    [/blue]

Sign In or Register to comment.