S
SpotNet
Hello Newsgroup,
Started a job where an Access 2003 database is accessed with a custom
assembly that wraps\encapsulates the relevant System.Data.OleDb classes
needed for the application. Briefly structured as such;
MS Access 2003 Database <-> Jet40DataAccess (the custom OleDB wrapper
mentioned) <-> Business Logic <-> User Interface.
Jet40DataAccess basically contains (all wrapped up as) & all relevant
members are wrapped in the classes,
OleDbConnection (Jet40Connection)
OleDbCommand (Jet40Command)
OleDbParameterCollection (Jet40ParamterCollection)
OleDbDataReader. (Jet40Reader)
Hence Jet40DataAccess only needs referencing in the business logic part and
does not need to reference System.Data & System.Data.OleDb classes. I want
to include the OleDbParameter class wrapped up as Jet40Parameter, which is
no problem. I can fit it into the assembly pass it to
Jet40ParamterCollection as OleDbParameter fits into
OleDbParameterCollection, but for all obvious reasons I cannot construct a
for each loop to enumerate through parameters that works. Such as;
foreach (Jet40Parameter j40param in j40params) {//j40param stuff.}
for (int i = 0; i < j40params.Count; i++) {j40param = j40params;
//j40param stuff}
works.
Question, what can I do (if it's possible) to get Jet40ParamterCollection to
be an actual collection of Jet40Parameter and Jet40ParamterCollection is a
legitimate parameter collection of Jet40Command? Everything works except the
foreach loop, not essential but I wouldn't mind getting it to work like the
original classes it wraps. Thanks Newsgroup.
Regards,
SpotNet.
Oh yes, MS Access 2003 and VS .NET 2003-C#.
Started a job where an Access 2003 database is accessed with a custom
assembly that wraps\encapsulates the relevant System.Data.OleDb classes
needed for the application. Briefly structured as such;
MS Access 2003 Database <-> Jet40DataAccess (the custom OleDB wrapper
mentioned) <-> Business Logic <-> User Interface.
Jet40DataAccess basically contains (all wrapped up as) & all relevant
members are wrapped in the classes,
OleDbConnection (Jet40Connection)
OleDbCommand (Jet40Command)
OleDbParameterCollection (Jet40ParamterCollection)
OleDbDataReader. (Jet40Reader)
Hence Jet40DataAccess only needs referencing in the business logic part and
does not need to reference System.Data & System.Data.OleDb classes. I want
to include the OleDbParameter class wrapped up as Jet40Parameter, which is
no problem. I can fit it into the assembly pass it to
Jet40ParamterCollection as OleDbParameter fits into
OleDbParameterCollection, but for all obvious reasons I cannot construct a
for each loop to enumerate through parameters that works. Such as;
foreach (Jet40Parameter j40param in j40params) {//j40param stuff.}
for (int i = 0; i < j40params.Count; i++) {j40param = j40params;
//j40param stuff}
works.
Question, what can I do (if it's possible) to get Jet40ParamterCollection to
be an actual collection of Jet40Parameter and Jet40ParamterCollection is a
legitimate parameter collection of Jet40Command? Everything works except the
foreach loop, not essential but I wouldn't mind getting it to work like the
original classes it wraps. Thanks Newsgroup.
Regards,
SpotNet.
Oh yes, MS Access 2003 and VS .NET 2003-C#.