O
Olaf Rabbachin
Hi everybody,
I am building an application that needs to alternatively connect to either
SQL Server (2000) or a local Access backend. That is, if users are
connected to the LAN, they may use data from the SQL Server, but when
they're out in the field, they'll use the Access backend on their local PC.
Assuming that, on the SQLS side, a class handles all data-access and is
thus declared on the form-level I could also create a class that exposes
the exact same methods/properties as the SQLS-class.
A property in forms could then determine whether SQLS or MsAccess is to be
used and return the appropriate class'es object. In that case though, I
could not use Option Strict.
OTOH, each call to one of the both classes could be determined separately,
resulting in either the SQLS- or the MsAccess-class actually being used.
This, however, would involve many lines of redundant code.
Is there a more "elegant" way to switch between the two and still use
strong types?
Cheers & TIA,
Olaf
I am building an application that needs to alternatively connect to either
SQL Server (2000) or a local Access backend. That is, if users are
connected to the LAN, they may use data from the SQL Server, but when
they're out in the field, they'll use the Access backend on their local PC.
Assuming that, on the SQLS side, a class handles all data-access and is
thus declared on the form-level I could also create a class that exposes
the exact same methods/properties as the SQLS-class.
A property in forms could then determine whether SQLS or MsAccess is to be
used and return the appropriate class'es object. In that case though, I
could not use Option Strict.
OTOH, each call to one of the both classes could be determined separately,
resulting in either the SQLS- or the MsAccess-class actually being used.
This, however, would involve many lines of redundant code.
Is there a more "elegant" way to switch between the two and still use
strong types?
Cheers & TIA,
Olaf