Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have PostgreSQL ODBC SystemDSN and tested connection successfully.
I have below VB code and connecting PostgreSQL without problem.
Dim SQLKomut As String
Dim MyCommand As OdbcCommand
Dim myConnectionString As String = ("Dsn=PostgreSQL35W;Server=127.0.0.1;Port=5432;Database=NameOfUser;Uid = postgres;Pwd=PASS")
Dim myConnection = New OdbcConnection(myConnectionString)
Try
myConnection.Open()
Catch ex As Exception
MsgBox("Veri tabanına ulaşılamıyor!")
MsgBox(ex.Message)
Exit Sub
End Try
SQLKomut = "DELETE from agac_takas;"
MyCommand = New OdbcCommand(SQLKomut, myConnection)
MyCommand.ExecuteNonQuery()
But I could not do the same thing in VBA?
Regards,
Mucip:)
Solved! Go to Solution.