Umit tas wrote:
hello i'm umit Tas;

i have a problem.

i'm writing programme in visual basic 6.0 but i must use MySQL server.

i'm installed MySQL server and executing my program (no problem) but my problem is :

MySQL must be installed "A" computer and my programme must be installed "B" computer

in LOCAL area network :( pls help

Private Function dbConnect()
'{
    'If we hit an error, go on to the next command
    On Error Resume Next

    'Create a new instance of the ADODB connection onject
    Set conn = New ADODB.Connection

    'Control the cursors on the client side
    conn.CursorLocation = adUseClient

    'Create the DSN string using properties from the preference file
    conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
       & "SERVER=" & strDBHost & ";" _
       & "DATABASE=" & strDBName & ";" _
       & "UID=" & strDBUser & ";" _
       & "PWD=" & strDBPass & ";" _
       & "OPTION=" & 1 + 2 + 8 + 32 + 2048 + 163841 'SET ALL PARAMETERS

    'Open the MySQL database connection
    conn.Open

    'Sanity check - verify we have a connection to the database
    If conn.State <> 1 Then
    '{
        MsgBox "Error connecting to the database")
    '}
    Else
    '{
        MsgBox("Connected to the database.")
    '}
    End If

    'Return a reference to the database connection object
    Set dbConnect = conn
'}
End Function

--
Erich Beyrent
--------------------------
http://www.beyrent.net

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to