sudah saya tulis seperti ini tapi kok invalid conection string yaaaa
informasi
sql server 2000
namaserver : ICHA
namadatabase : masukan
namauser : sa
password : malang
---------------------------------------------------------------------------------------
Function Konek(pServer, pDB, pUser, pPwd) As Boolean
Konek = True
On Error GoTo Konek_Err
bc = "PROVIDER=SQLOLEDB. 1;" & _
"PERSIST SECURITY INFO=True;" & _
"DATA SOURCE=" & pServer & ";" & _
"USER ID=" & pUser & ";" & _
"PASSWORD=" & Nz(pPwd, "") & ";" & _
"INITIAL CATALOG=" & pDB
' first close current connection
CurrentProject.CloseConnection
' then establish new connection
CurrentProject.OpenConnection (bc)
Konek_Exit:
Exit Function
Konek_Err:
MsgBox Err.Description, vbCritical, "Caution"
Konek = False
Resume Konek_Exit
End Function
Private Sub cmdGakJadi_Click()
DoCmd.Close 'check lagi sintaksnya
End Sub
Private Sub cmdKonek_Click()
Konek txtNamaServer.Value, txtNamaDatabase.Value, txtNamaUser.Value,
txtPassword.Value
End Sub
mohon bantuannya
Nikmati chatting lebih sering di blog dan situs web. Gunakan Wizard
Pembuat Pingbox Online. http://id.messenger.yahoo.com/pingbox/