Monthly ArchiveSeptember 2009
Software development 04 Sep 2009 12:40 pm
Checking Field Exists in VB6 RecordSet
If you try to access a record in an ADODB record set where the record does not exist, you’re likely to get an exception. The first question to ask of course is why you’re writing code for a field that might not exist, but certainly in my example, I was developing a class that was extensible and ready to be scaled depending on the requirements. To be more specific, it was populating the properties of a class once a record set had been filled by a fetch from the database. I had no guarantee that the SQL statement would meet specs, so I needed some error catching, just populating those properties that had corresponding record set fields.
Continue Reading »
