Thanks for your reply, Yale I think i refer the Npgsql.dll correctly. I try to test link by other method. it runs great. Private Sub test_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles test_btn.Click Dim ConnStr As String = “Server=localhost;User Id=postgres; password=password; database=template_postgis;” Dim conn As NpgsqlConnection = New NpgsqlConnection(ConnStr) Dim da As NpgsqlDataAdapter = New NpgsqlDataAdapter(“select * from twn_county;”, conn) Dim ds As DataSet = New DataSet da.Fill(ds) DataGridView1.DataSource = ds DataGridView1.DataMember = “Table”
conn.Open() MessageBox.Show(“Connection is OK!!” + vbNewLine + “Link State:” + conn.State.ToString()) conn.Close() End Sub
So, I don’t know what’s wrong in my postgresql…could you give me some idea?
have any idea??? PostgreSqlFeatureLayer(connection, tableName, featureIdeColumn) I want to make sure featureIdeColumn is…? number from 1 to N? number from 0 to N? or any else?
We have upgraded Npgsql from 1.98.2 to 2.0.6, but from your screen-shot, I noticed that you still refer the old version. Could you try to refer the new one and let me know the test result?
About the Feature Id issue, the number is depending on what you organize the data, we just use the column you pass in, the number is totally controlled by your side.
That’s the problem, you should refer the Npgsql which is we provide in our product package, the version of it should be matched the versio of our product.
Because the Npgsql is not compliant with previous version. We couldn’t support that sutiable for any version of it. Sorry about that.
Please refer the Npgsql.DLL from “Developer Reference” folder in MapSuite installation folder.
The Npgsql.dll is in the folder “Developer Reference\Spatial Extensions\Postgre Extension”. Also, you should make sure that the Mono.Security.dll is at the same folder with Npgsql.dll.
Hope this helps and any more questions please let us know.