Re: Newbie, True and False



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,
MsSql or MySql, this will be decided by the customer and set in the software
by a hardware key.
(snip)
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
.



Relevant Pages

  • Re: SQL server vs mySQL ???
    ... SQL Server has the broadest range of tools and support utilities of any database system on the planet--by far. ... MS SQL versus MySQL? ... As of 5.0, MySQL finally supports stored procedures, so they are very similar there (you can genericize your data access a bit due to sprocs in both). ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL command to show only databases that contain a particular table
    ... client-projects. ... mySQL so each client could see only their data. ... databases used to collect data have the same tables. ... This group is intended for supporting MS SQL Server users. ...
    (comp.databases.ms-sqlserver)
  • Re: FP2003 & Databases: MSDE, MYSQL, SQL
    ... I might mention that MySql certainly IS supported by ... databases. ... > The easiest way to get a .csv file into sql server is to use bulk insert ... > assume this would work on MSDE too, no idea about mysql) All you need to ...
    (microsoft.public.frontpage.programming)
  • RE: Transfer LARGE DB from MySQL to SQL Server 2K5 problems
    ... newsgroups are managed (and making that a selling point for MSDN ... forums, which, needless to say, drives me away from the MS web sites, and is ... I am going through the MySQL ODBC v3.51 driver, ... streaming across the wire to my SQL Server box. ...
    (microsoft.public.sqlserver.dts)
  • Re: Recommendations for RAD (web) application development..?
    ... Can use a variety of databases, esp. ... MySQL and SQL Server ...
    (Ubuntu)

Loading