can someone please tell me whats wrong with my conn.ConnectionString
VB Code:
Private Sub cmdDB_Click() Set conn = New ADODB.Connection Dim strSvr As String Dim strUid As String Dim strPwd As String strSvr = txtIP.Text strUid = txtUsername.Text strPwd = txtPassword.Text conn.CursorLocation = adUseClient conn.ConnectionString = "DRIVER={MYSQL ODBC 3.51 Driver}; " & _ "SERVER=" & strSvr [color=red] & ";" [/color]& _ "UID=" & strUid [color=red] & ";"[/color] & _ "PWD=" & strPwd [color=red] & ";"[/color] & _ "OPTIONS=" & 1 + 2 + 8 + 32 + 2048 + 16384 conn.Open conn.ConnectionString CreateDB DoEvents CreateTable cmdDB.Enabled = False txtIP.Text = "" txtUsername.Text = "" txtPassword.Text = "" txtIP.SetFocus End Sub


Reply With Quote