Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: .Net Cobol SqlDataReader

$
0
0
Untested, off the top of my head: perform until not dr::Read declare aStudent = new Student set aStudent::ID to dr::GetInt32(dr::GetOrdinal("ID")) set aStudent::Name to dr::GetString(dr::GetOrdinal("Name")) set aStudent::DateOfBirth to dr::GetDateTime(dr::GetOrdinal("DateOfBirth")) invoke student::Add(aStudent) end-perform That's not how I'd actually implement this method (I'd use the COBOL.NET portable list syntax and I'd refactor the GetOrdinal invocations out of the loop), but it ought to work.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



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