【发布时间】:2014-07-24 00:50:40
【问题描述】:
我已经在http://postgres-project-1241043.j.layershift.co.uk/ 主机中安装了postgresql 数据库。
我想使用 C# 连接到数据库。我使用带有以下连接字符串的 Npgsql。
connectionString = @ "Server = postgres-project-1241043.j.layershift.co.uk, Port = 5432, User Id = postgre; Password = abcdef; Database = dbluanvantn;";
但我无法连接到服务器并出现错误:
Npgsql.NpgsqlException: 连接失败 'postgres-project1241043.j.layershift.co.uk'。
我是否使用了正确的连接字符串?帮我修一下。
【问题讨论】:
-
您能否使用来自同一主机的其他任何设备进行连接?任何类型的数据库管理工具?
-
我用geoserver主机连接数据库
标签: c# postgresql connect jelastic