I'm trying to write a console application in VB.net that will query an openedge 10.1b database and return the results (yeah, I could use the Progress tools but I wanna do other stuff with the data independent of the openedge server - this is just a proof of concept)
The connection seems to open ok - but having problems running a query.
I've attached my code - which fails at line 10.
The error returned is:
DBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Table/Vie
w/Synonym not found
Presumably there is something wrong with my query? The table removals definitely exists, and definitely contains the fields r-num and r-name - which are both
Dim DbConnection As New OdbcConnection("DSN=removedforsecurity;Uid=sysprogress;Pwd=")
Dim DBcmd As New OdbcCommand
DBcmd = DbConnection.CreateCommand
DBcmd.CommandText = "SELECT r-num, r-name FROM removals"
Dim DBReader As OdbcDataReader
DBReader = DBcmd.ExecuteReader()
Dim strcol1 As String
Dim strcol2 As String
strcol1 = DBReader.GetString(DBReader.GetOrdinal("r-num"))
strcol2 = DBReader.GetString(DBReader.GetOrdinal("r-name"))
Console.WriteLine(strcol1, " - ", strcol2)