I have been trying to get a Visual basic connection to my postgres DB for days, till i finaly came acros your site. it seems to be working like a charm. At least it seems to be connected to the DB.
I try to run a select command, as seen on your documentation
Code: Select all
Dim myConn As PgSqlConnection = New PgSqlConnection()
myConn.ConnectionString = "User Id=myId;Password=Password;Host=192.168.1.250;Port=5432;Unicode=true;"
myConn.Open()
Dim command As PgSqlCommand = myConn.CreateCommand()
command.CommandText = "select col from table"
Using readers As PgSqlDataReader = command.ExecuteReader()
While readers.Read()
For i As Integer = 0 To readers.FieldCount - 1
TextBoxA.Text = readers.GetValue(i).ToString() & vbNewLine
Next
End While
End Using
myConn.Close()
readers As PgSqlDataReader = command.ExecuteReader()
The error is
The postgres isntallation is on a lan computer, and i think i did everything ok. To be honest its the first postgres lan installation i did, but i assume everything is set up.permission denied for relation table
Do you have any idea what might be the problem?