简体   繁体   中英

Not able to connect to Postgres database in Visual Studio 17 using vb.net

I'm using Postgres version 9.3, my application is using this connection string

Driver={PostgreSQL UNICODE(x64)};Server=IP address;Database=myDataBase;
Uid=myUsername;Pwd=myPassword;

while trying to open connection in visual studio I get following error:

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

I have setup my ODBC Data Source in Administrative tool correctly and it is giving Connection Successfull message. I have setup both 32bit and 64bit.

Visual Studio 2017 itself is a 32 bit application, so to connect to your DB in VS, you would need the 32 bits driver ( PostgreSQL UNICODE ).

Note that this apply to Visual Studio itself (VS functions and extensions). It is NOT related to the application you are building, which can be either 32 or 64 bits.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM