.net db2 select problems and setup
Hello. I am old school mainframer trying to learn new things.
I am trying to run visual cobol against db2 community version on windows 11.
i am able to connect in the windowsform but i can not get a select statement without format errors.
i did saw something about installing ibm.data.db2 but i do not know if that is a option.
below is my code snippet.
try
invoke conn::Open()
set label1::Text to "DB2 Connected"
move 'y' to db2-connected
set cmd to new System.Data.OleDb.OleDbCommand("SELECT LastName FROM Employee WHERE EmployeeID = 1", conn)
set reader to cmd::ExecuteReader()
catch ex as type Exception
set label1::Text to "it did not connect"
end-try
the set cmd and set reader both have red underline errors.
is there something i ned to install or is there another way to do this.
The connect works so why not the select.
Going nuts can’t figure it out!