Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset query

Status
Not open for further replies.

mogura

Programmer
Sep 6, 2003
22
GB
I want to create a component with objects that will represent records in a database table. Each object will represent a single record and expose a read-only property for each field.

Should I create a class module that opens a Recordset in its initialise event, make the initialise event use the primary key as a parameter and then create Property Get procedures for each field? OR should I create a class module that opens a Recordset each time an object is created, create the object with a method that uses a parameter for the primary key then create Property Get procedures for each field? Or are neither of these right?

Any help would be great.
 
I think I could create a class module that opens a Recordset in its intialize event. The initialize event would use the primary key as a parameter
and Property get procedures would be created for each field.

mogura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top