Guest User

Untitled

a guest
Jan 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. //Connect to a database
  2. Dim db As New PostgreSQLDatabase
  3. db.Host = "127.0.0.1"
  4. db.Port = 5432
  5. db.DatabaseName = "TestDB"
  6. db.UserName = "XojoUser"
  7. db.Password = "secret"
  8. //Is the database connected?
  9. If db.Connect = True Then
  10. MsgBox "The database is connected"
  11. Else
  12. MsgBox "There is an error with the database: " + db.ErrorMessage
  13. End If
Add Comment
Please, Sign In to add comment