CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2001
    Location
    Islamabad , QAU,Pakistan
    Posts
    61

    Question how to connect vb application with mysql( running on Solaris)

    Hi
    I want to retrieve data from MySQL (running on Solaris) from my application developed for windows using vb 6.0.
    Can anybody guide me , how to connect with database while window and solaris are two different plateforms.
    Will it work like ordinary ways ( I mean using an ODBC driver can I connect my appliation with mysql on Solaris.).
    Any help will be appriciated.
    Thanks

    Imran

  2. #2
    Join Date
    Aug 2003
    Location
    London
    Posts
    515
    You should be able to connect using an ADODB connection object and a valid connection string...it shouldn't matter that your client is on windows while the server is on a different platform

    To connect to a local database (using MyODBC Driver)

    oConn.Open "Driver={mySQL};" & _
    "Server=MyServerName;" & _
    "Option=16834;" & _
    "Database=mydb"

    To connect to a remote database

    oConn.Open "Driver={mySQL};" & _
    "Server=db1.database.com;" & _
    "Port=3306;" & _
    "Option=131072;" & _
    "Stmt=;" & _
    "Database=mydb;" & _
    "Uid=myUsername;" & _
    "Pwd=myPassword"

    For more information, check out Connection Strings

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured