Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 14th, 2003, 02:25 PM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default connecting mysql with vb

Hello,
         I am new to MySQL but familiar with vb and sql server 2000,any body can help me to connect vb with MySQL

anoop


 
Old January 8th, 2004, 01:44 PM
Registered User
 
Join Date: Jan 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i just found this having the same problem

i dont know if u already found it if you do i would like to know how u did it

i am currently using this code for a sql.. which needs to be changed to a mysql code :)

Public Sub conectarse()
    Set BdSQL = New ADODB.Connection

    Set BdSQL = New ADODB.Connection
    BdSQL.ConnectionString = "DRIVER={SQL Server}; " & _
                             "SERVER=pcpaola; " & _
                             "UID=XXXXX;" & _
                             "PWD=XXXXX"

    BdSQL.Open
    BdSQL.DefaultDatabase = "aduana"
    If BdSQL.State = adStateClosed Then
        BdSQL.Open BdSQL.ConnectionString
    End If
    If BdSQL.State = 1 Then
        conectado = True
    Else
        conectado = False
        MsgBox "Hubo un Error, No se pudo conectar al Servidor... Consulte con un Administrador", vbCritical
    End If
End Sub
The code i found but didnt use is can be found on

http://www.vbmysql.com/mike/blog/archives/000001.php




 
Old January 9th, 2004, 04:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

this site http://www.able-consulting.com/ADO_Conn.htm is v useful for connection strings.

Another good way to get a connection string is to create a blank .udl file, double-click it, fill in the details in the dialog that appears, then open the udl file in Notepad when you've finished and you've got your connection string.

hth
Phil
 
Old February 5th, 2004, 02:43 PM
Authorized User
 
Join Date: Feb 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As a further bit of info, if not all that useful..
You can connect to the MySql server using the Microsoft ADO if you download the appropriate .dll from the MYSQL website.
All instructions are given online if you look at:

http://www.mysql.com/products/myodbc
and the manual
http://www.mysql.com/products/myodbc/manual.html

Simon

Don't think, do!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connecting to MYSQL from C / C++ ? oloeriubogdan Linux 1 December 15th, 2006 10:50 AM
Connecting to mySQL WIx ASP.NET 1.0 and 1.1 Basics 3 October 17th, 2004 04:13 PM
connecting to mysql using Php webmoron BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 6 August 24th, 2004 04:30 AM
Connecting to MySQL with VB .NET CFerthorney Pro VB.NET 2002/2003 1 October 23rd, 2003 04:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.