问题描述
我正在尝试连接到托管在 Win 10 系统上的 Postgresql 服务器。我正在尝试使用 JetBrains Rider 从 .net 控制台应用程序连接到它。我已经安装了 unixodbc,它目前是 2.3.9 版,但是当我尝试运行以下代码时出现错误
Dim connstr As String = "Driver={Postgresql};Server=myipaddress;Port=5432;Database=postgres;Uid=VBUser;Pwd=********;"
Dim sqlcon As New OdbcConnection
sqlcon.ConnectionString = connstr
'Try
sqlcon.open()
我得到的错误是
System.DllNotFoundException: Dependency unixODBC with minimum version 2.3.1 is required.
libodbc.2.dylib assembly:<unkNown assembly> type:<unkNown type> member:(null)
at System.Data.Odbc.OdbcConnection.Open () [0x00049] in <ce77ea0becbc4b50b8b47fc6247f02d4>:0
at (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcConnection.open()
at LoginSystem.Module1.Main () [0x00015] in <b75c3dde9ff84c1baa0fec544d77266b>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: Dependency unixODBC with minimum version 2.3.1 is required.
libodbc.2.dylib assembly:<unkNown assembly> type:<unkNown type> member:(null)
at System.Data.Odbc.OdbcConnection.Open () [0x00049] in <ce77ea0becbc4b50b8b47fc6247f02d4>:0
at (wrapper remoting-invoke-with-check) System.Data.Odbc.OdbcConnection.open()
at LoginSystem.Module1.Main () [0x00015] in <b75c3dde9ff84c1baa0fec544d77266b>:0
我的 odbcinst -j :
unixODBC 2.3.9
DRIVERS............: /usr/local/etc/odbcinst.ini
SYstem DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /Users/elliottreid/.odbc.ini
sqlULEN Size.......: 8
sqlLEN Size........: 8
sqlSETPOSIROW Size.: 8
你能提出解决方案吗
TIA
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)