First , the configuration of PostgreSQL
1. Installing the ODBC driver
: http://www.postgresql.org/ftp/odbc/versions/msi/
2.
Open Control Panel, administrative Tools, data source ODBC, as follows
3. Need to configure PostgreSQL to allow remote connections
Http://www.cnblogs.com/jevonsea/archive/2013/01/24/2874184.html
Test succeeded
Two
WebService, the Web service, enables different applications running on different machines to exchange data or integrations without the help of specialized third-party software or hardware.
The data returned by WebService is XML.
1. Create the. NET Framework 4 version of the ASP. Web application in vs New Project
In Server Explorer, add connections, select Other ODBC,
Clicking the test connection has the following problem:
Search and find that the PostgreSQL should not match the driver version, both 64-bit or 32-bit. Download the 32-bit driver and reconfigure it.
Test the connection again successfully. But when you click OK, the following reminder appears:
Struggled for a long time to give up ... Download SQL Server
Reference: http://blog.csdn.net/yexuanbaby/article/details/9029605/
WebService connecting PostgreSQL (failed attempt)