Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: Visual COBOL equivalent to C# "Using" statement?

$
0
0

Below is an example:

          perform using cn as type SqlConnection = new SqlConnection(connectString)          

              set cmd to cn::CreateCommand()

              set cmd::CommandText to "select * from dbo.evantb"

              invoke cn::Open()

              perform using rdr as type SqlDataReader = cmd::ExecuteReader()

                  invoke rdr::Read()

                  display rdr["EMPNAME"]::ToString()

              end-perform

           end-perform  


Viewing all articles
Browse latest Browse all 4356


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>