Community
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.
Solved by mucip. Go to Solution.
Hi,
I found a solution here. Thanks.
https://forums.autodesk.com/t5/vba/saving-data-to-mdb-from-autocad-vba/td-p/350175
Regards,
Mucip:)