Currently I'm looking at something like this:
Code: Select all
Public Function GetInfo() as string
Dim connection As New PgSqlConnection(connectionString)
connection.Open()
Dim command As New PgSqlCommand("SELECT * FROM TABLE", connection)
Dim reader As PgSqlDataReader = command.ExecuteReader
While reader.Read
'do something with the data
End While
connection.Close()
Return "Done"
End Function