J
JimS
I'm developing a class module. Not sure it's necessary, but it's good
practice. Class is called clsBillofMaterial.
One method in the class is called "clone". Its job is to clone a bill of
material from one work order to another. I can do it in sql, though the
statement is long and requires parameterization. So, I have a couple
questions:
1. Should I create the action queries to insert the header and detail, then
simply refer to them (docmd.runsql...) from the routine, or should I set up
the action query from scratch in the routine to include the parameters (Model
ID, New ID, etc.)?
If I should create those queries in the db and refer to them, how do I
assign values to the needed parameters in the runsql command? I'm also
comfortable with ADO commands if that makes more sense....(.command and
..execute methods...)
2. Would it be more sensible to instantiate ADO recordsets in the class
initialization routine and use them in loops rather than using sql statements?
Jim
practice. Class is called clsBillofMaterial.
One method in the class is called "clone". Its job is to clone a bill of
material from one work order to another. I can do it in sql, though the
statement is long and requires parameterization. So, I have a couple
questions:
1. Should I create the action queries to insert the header and detail, then
simply refer to them (docmd.runsql...) from the routine, or should I set up
the action query from scratch in the routine to include the parameters (Model
ID, New ID, etc.)?
If I should create those queries in the db and refer to them, how do I
assign values to the needed parameters in the runsql command? I'm also
comfortable with ADO commands if that makes more sense....(.command and
..execute methods...)
2. Would it be more sensible to instantiate ADO recordsets in the class
initialization routine and use them in loops rather than using sql statements?
Jim