Re: Newbie, True and False
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 06 Apr 2007 21:32:44 +0200
On Sat, 31 Mar 2007 15:39:27 +0100, tclancey wrote:
The application I'm working on at the moment needs to connect to Access,(snip)
MsSql or MySql, this will be decided by the customer and set in the software
by a hardware key.
Any help would be greatfully recevied as I currently have no idea how to get
around this!
Hi Tull,
Since Access, SQL Server, and MySQL all have different proprietary ways
to handle boolean and/or bit values, the best way to get the same code
working against all databases would be to avoid these proprietary types
altogether. Just use (for isntance) a CHAR(1) datatype, with a CHECK
constraint to only alllow the values 'T' and 'F' (for true and false).
It might be a bit more work for the front end since you can't use the
standard boolean types, but that's easily offset by the fact that you
only need one code base for the three databases.
--
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
.
- Prev by Date: Re: Can't find client
- Next by Date: Re: User authentication
- Previous by thread: Re: Newbie, True and False
- Next by thread: Encryption and Decryption
- Index(es):
Relevant Pages
|
Loading