I've googled this a lot and can't find and answer (probably because it's so rudimentary).
I'm creating a simple VB application to search for items in a pervasive database. I've managed to connect to the database, but can't figure out how to create and execute a query. I'm quite new to this, but here's what I have.
Dim idText As String
Dim myPsqlConnection As PsqlConnection = New PsqlConnection()
myPsqlConnection.ConnectionString = "ServerName=FILESERVER;ServerDSN=myDSN"
myPsqlConnection.Open()
'run query here, but I don't know how!
myPsqlConnection.Close()
I'm looking for a way to execute a simple 'select * from table where feild=something' kind of query, no inserts, deletes, or updates.. read only.
You need to look at PsqlCommand and PsqlDataReader objects.
A very simple VB.NET app that executes a query is: