Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Mar 2009
    Posts
    15

    Exclamation Unanswered: how to connect my vb6-mysql to php-mysql

    pls help me....

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so what are you trying to connect
    you can IIRC use VB6 code in PHP usung a COM interface
    Im willing to bet you cannot use PHP INSIDE VB, but you could shell out to PHP from VB (in a similar manner to vbscript)
    MySQL is just MySQL, it doens't care if you are talking from PHP or VB, or anything else

    so what is the requirement to
    to connect my vb6-mysql to php-mysql
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Mar 2009
    Posts
    15
    im trying to connect the two database so my vb6 prog can get the msg posted on the web page which is the php using my sql database...

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you connect the vb6 app to the same physical db as the php app. that assumes that you have access to that db.

    the problem is oging to be whether your user accoutn permissions allow you to access the db that the php app is using. if its on a remote host (say an ISP) then unless they grant you access you will no tbe able to access that data directly. in that even you will have to import the data from the remote host into your local db server

    as an alternative if the two databases are on the same physical server you c an exploit a feature of MySQL and connect ddirectly to the other db

    eg
    in your VB6app
    select my,column,list from myPHPdb.table
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Mar 2009
    Posts
    15
    can you give me a sample code?..

    EX: im a manager and i like to announce that i will be late. and i like to post it on a bulletin board(vb6-prog). so i will do is i will go to that web site and post a msg that i will be late... so the vb-prog will get that msg from that website to post the msg on a LCD monitor to announce that i will be late...

    pls help me on my problem

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    to do what?

    I don't know what your db setup is (ie are both db's on the same server), is the php db server accessable from your VB6 environment

    if all you want to do is post a message saying I'll be late, then personally I'd suggest you get someone you trust to post that message on your behalf on the PHP app
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Mar 2009
    Posts
    15
    can you give me a sample prog or codes.... on how to connect my vb6 to php...

  8. #8
    Join Date
    Mar 2009
    Posts
    15
    pls help me....

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Code:
    rs.connect
    -PatP

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so whats it to be
    are both MySQL databases on the same physical server
    what language are you wanting to use to update the data

    assuming that both databases are on the same physical server you can get inforamtion from another database in a single query. this assumes that you are connected to a db server, and the the same userid and password has similar or the same rights to either db.

    the syntaxt is
    select a.my,a.column,b.list
    from database1.tablename as a, database2.tablename as b
    where
    a.acolumn=b.acolumn

    you could do aub select which extracts the value form db2 and inserts it into db1
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    Mar 2009
    Posts
    15
    i wonder how to connect the program of vb6 into the database of php,


    i mean how will vb6 get the msg stored from the database of the website(php)...

  12. #12
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Im wondering too, as you seem unable to provide any information about how you are trying to do this or how the systmes are currently set up.
    it well nigh impossible to provide an off the shelf answer, but in your case its totally impossible as you haven't really provided any information. As others have said of me, I'm not psychic, just psychotic
    I'd rather be riding on the Tiger 800 or the Norton

  13. #13
    Join Date
    Mar 2009
    Posts
    15
    ohhh...

    im trying to create a electronic bulletin board system w/ an web site .. in that site you will be able to post a msg.... then the bulletin board system(vb6) will get the msg from the site.. and post it in lcd monitor...

  14. #14
    Join Date
    Mar 2009
    Posts
    15
    the programs (vb6) (php) is ready my problem is how will i connect there database so that the msg posted in the site will be pass thru the other database(vb).

    and will be show in the bulletin board sys.

  15. #15
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    So I'd guess the way to do this would be to push the value fromt eh PHP system to the 'other MySQL server
    so If I were you I'd look at the PHP code that writes the original message and (assuming that the 'other' MySQL database is on the same server I'd write directly to that database, or if they are not then I'd send an email message or other form of communication to inform the other db of the changes)

    As you haven't said if both database's are on the same server , you seem relucatnat to open up the code and understand what is happening in your code I feel pretty relucatant to dive in and waste my time.

    I think you have a clear choice
    either show what you are doing
    hire someone to do what you want
    consider a manual workaround (ie get one of your employees to update the "other" db when you are having an out of office experience)

    In the two days you have been kicking this question around you don't seem able to provide anything except the vaguest answers, so Im not prepared to assist further. to me you either haven't a clue on what either system does (in which case it would be very very scary for you and anyone else for you to dabble with the code in case they inadvertantly break something) or you cannot be bothered
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •