c#链接postgresql

1.首先需要添加2个dll文件:Mono.Security.dll; Npgsql.dll。

2.配置文件增加

<appSettings>
<!--<add key="Conn" value="Server=localhost;Port=5432;UserId=postgres;Password=123456;Database=WX_BSS;Encoding=UNICODE"/>-->
<add key="Conn" value="Server=11111111;Port=5432;UserId=111;Password=111;Database=111;Encoding=UNICODE"/>
</appSettings>

3.公共帮助类添加

posted @ 2016-09-09 13:48  饮水思源^0^  阅读(740)  评论(0编辑  收藏  举报