Archive for February, 2010

VB6 and MySQL Connection string

Saturday, February 27th, 2010
Di bawah adalah sebagai nota bagaimana untuk buat connection dari vb6 ke MySQL. 

'========================
'Database Connection Part
'========================
'Change to IP Address if not on local machine
'Make sure that you give permission to log into the
'server from this address
'Make sure that you d/l and install the MySQL Connector/ODBC 3.51 Driver 

Sub OpenConn(ByRef conn As ADODB.Connection)
 Dim strConnString As String
 On Error GoTo errCon
 strConnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost; " & _
                 "DATABASE=mydb;UID=myUserId;PWD=myPassword;OPTION=16427"
 Set conn = New ADODB.Connection
 conn.ConnectionString = strConnString
 conn.CursorLocation = adUseClient
 conn.Open

 Exit Sub
errCon:
 MsgBox Err.Description
End Sub

Rujukan : 1. http://www.connectionstrings.com/mysql#p27, dan sini

Malam minggu

Saturday, February 27th, 2010

Lepak bersama mamat ni.. hehehe. Serius giler.. dia bukan perasan pun apa yang sedang berlaku kat keliling dia..

Selamat datang..

Saturday, February 27th, 2010

Assalamualaikum dan salam sejahtera,

Selamat datang ke blog saya. Semoga kita dapat bertukar-tukar maklumat untuk kebaikan bersama.

Terima kasih.