Skip to content

Instantly share code, notes, and snippets.

@skazuki0430
Last active May 25, 2018 16:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skazuki0430/4b1c46a29d4fd67693cd0c7341f8c320 to your computer and use it in GitHub Desktop.
Save skazuki0430/4b1c46a29d4fd67693cd0c7341f8c320 to your computer and use it in GitHub Desktop.
ExecuteQuery from VBA
Private Sub CommandButton1_Click()
Dim TestDB As New dbaccess
Dim host As String: host = "192.168.0.1"
Dim db As String: db = "TestDB"
Dim userid As String: userid = "sa"
Dim password As String: password = "mypassword"
Call TestDB.Connect(host, db, userid, password)
Call TestDB.ExecuteQuery("")
Call TestDB.Disconnect
Set TestDB = Nothing
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment