J
Jim Heavey
I am writing (or trying to write) a base class which will be used for all
my Database access.
I have created a base class which implement the IDbCommand, IDbDataAdapter,
IDbDataParameter methods, where this class is creating the specif type of
Command (Sql, OLDB, etc.) and returning the appropriate "ID" object.
My current "design issue" is how to properly handle the DbTypes. Not all
of the SQLDbTypes translate into DbTypes and likewise for OleDbTypes. At
some point the application calling my "base" will have to provide me with a
"SqlDbType" or an "OleDbType" to create a parm for that specific database.
Is that correct, or is ther another way around this issue?
What ever calls my base class would have to undergo some sort of change
if/when a changed was ever made between "the current" data and a new
database.
Should I desgn my base class to handle these type of issues or should I
have yet another class handle the "Database specific" issues?
my Database access.
I have created a base class which implement the IDbCommand, IDbDataAdapter,
IDbDataParameter methods, where this class is creating the specif type of
Command (Sql, OLDB, etc.) and returning the appropriate "ID" object.
My current "design issue" is how to properly handle the DbTypes. Not all
of the SQLDbTypes translate into DbTypes and likewise for OleDbTypes. At
some point the application calling my "base" will have to provide me with a
"SqlDbType" or an "OleDbType" to create a parm for that specific database.
Is that correct, or is ther another way around this issue?
What ever calls my base class would have to undergo some sort of change
if/when a changed was ever made between "the current" data and a new
database.
Should I desgn my base class to handle these type of issues or should I
have yet another class handle the "Database specific" issues?