Boolean Issues with SQL Server and Access

Results 1 to 2 of 2

Thread: Boolean Issues with SQL Server and Access

  1. #1
    Join Date
    Dec 1969

    Default Boolean Issues with SQL Server and Access

    I am upgrading an Access database to SQL Server and I have run into some problems with the True/False fields in Access. When I upsized the access database, all of the True/False fields were converted to bit. This is fine except for the fact that a lot of my SQL statements are dynamically generated via ASP and use a lot of True/False syntax. For example, the following statement woks fine in Access but not in SQL Server:<BR><BR>SELECT * FROM MyTable WHERE MyField = True<BR><BR>if I change the statement to <BR><BR>SELECT * FROM MyTable WHERE MyField = 1 <BR><BR>it works fine in SQL Server.<BR><BR>My question - what is the best way to go about solving this problem? Do I use a different field type (other than bit) so that I can continue my True/False syntax? If so, what field type do I use? Should I go through my ASP pages and change the True/False syntax to 1 and 0? Will this pose other problems if I try to execute the same statement against other databases in the future? What are some best practices in the arena? Any feedback and/or suggestions is greatly appreciated.<BR><BR>Take care,<BR><BR>Kyle<BR>

  2. #2
    Join Date
    Dec 1969

    Default Answer is in your question

    Your *Upgadeing* <BR>change to SQL Server syntax

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts