gmn prosesnya untuk MySQL ?
thx

On Fri, Sep 4, 2009 at 11:27 AM, GALIH PERSADHA
<[email protected]>wrote:

>
>
> CARA MEMBUAT CONNECTION STRING DENGAN MS ACCESS KE SQL SERVER
>
>     buat 1 form. misal Form1
>
>     4 textbox.
>     txtNamaServer
>     txtNamaDatabase
>     txtNamaUser
>     txtPassword
>
>     2 CommandButton
>     cmdKonek
>     cmdGakJadi
>
>     Private Sub cmdKonek_Click
>        Konek txtNamaServer. value, txtNamaDatabase. value, txtnamauser.
> value, txtPassword. value
>     end sub
>
>     Private Sub cmdGakJadi
>         docmd.close 'check lagi sintaksnya
>     end sub
>
>
>     Function Konek(pServer, pDB, pUser, pPwd) As Boolean
>             Konek = True
>             On Error GoTo Konek_Err
>
>                 bc = "PROVIDER=SQLOLEDB;" & _
>                      "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
>
> semoga membantu
>
> salam..
>
> ------------------------------
> Lebih Bersih, Lebih Baik, Lebih Cepat - Rasakan Yahoo! Mail baru yang
> Lebih Cepat hari ini! <http://id.mail.yahoo.com>
> 
>

Kirim email ke