在 vb.net 控制台应用程序(x64)上使用 odbc 连接器(x64)连接到 postgresql 数据库时出现问题,错误, http://www.sumarlidason.com/tmp/120312/odbc_capture1.png
Dim ConnectionString = "Driver={PostgreSQL UNICODE};Server=myPGSrv;Port=5432;Database=dbDefault;Uid=postgres;Pwd=pw;"
'Dim ConnectionString = "ODBC;dsn=PostgreSQL35W"
conn = New OdbcConnection(ConnectionString)
'Open connection to an instance of the PostgreSQL database.
Try
conn.Open()
Catch Ex As Exception
MsgBox(Ex.Message)
End Try
Dim commonOdbcCommand = New OdbcCommand
commonOdbcCommand.Connection = conn
conn.Close()
另外,我在控制面板中配置了数据库,见这里.. http://sumarlidason.com/tmp/120312/odbc_capture.png