[thelist] CF: Determining which DB used.

rudy r937 at interlog.com
Wed Sep 12 11:24:03 CDT 2001


> the simplest way is to only use sql that will run on all platforms.  
> this is next to impossible to achieve though.

sad but true

one strategy that deserves consideration is to create
table views that isolate specific database syntax
and allow you to deal with "standard" result values that
you determine to be the easiest or simplest to deal with

for example, you could write a microsoft access query

   select   IIf(foo='Yes',1,0) as foo

in order to transform the access Yes/No values to 1/0
and then query this query (which is the way you "implement"
a view in access)

nevertheless, it seems to me that this is barking up the
wrong tree

for one thing, INSERTs will be hell to implement this way

the effort that you put into making your sql database-proof
(i.e. generic enough to be used in the app no matter which
database you're running against) could probably be better
invested in designing the tables to be platform-agnostic
in the first place

for example, sure booleans are great, but a small integer
serves just as well

i realize this is small comfort if you are already working
with an established database design

stick as close to the sql standard as possible, and the
ripple effect should be minimal


rudy





More information about the thelist mailing list