Free Computer Education, Free Software Serial Number, Free All Tutorial
Visual basic dikoneksikan dengan postgreSQL itu sangat memungkinkan
untuk konkesinya buat sebuah modul dengan source code dibawah ini :
Public CON As New ADODB.Connection
Public REC As New ADODB.Recordset
Sub Open_Connection()
on error goto hell
CON.Open “Driver={PostgreSQL ANSI};Serv...er=localhost;Port=5432;Database=Contoh;Uid=namauser;Pwd=password;”
hell:
IF Con.State = 1 THEN MsgBox “Sukses” ELSE “Gagal”
End Sub
Sub Close_Connection()
con.close
end sub
Label: Visual Basic Programming