![](/img/trans.png)
[英]Postgresql odbc driver error c# [IM002] [Microsoft][ODBC Driver Manager] Data source name not found
[英]PostgreSQL Connection String with ODBC driver in C#, Keyword not supported: driver
如果要使用ODBC連接到PostgreSQL數據庫,請使用OdbcConnection
然后,您可以使用DSN作為ODBC數據源標識符來實例化連接。
OdbcConnection DbConnection = new OdbcConnection("DSN=PostgreSQL30");
作為指定在這里
還有其他不使用ODBC驅動程序而連接到PostreSQL的方法。 您可能想看看Npgsql .net庫或帶有Npgsql庫的EntityFramework。 有關用法的更多信息,請參見此處
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.