[thelist] CF: Determining which DB used.

Raymond Camden jedimaster at macromedia.com
Wed Sep 12 10:33:07 CDT 2001


> Thanks, that's already the case. What I was hoping to accomplish was 
> to reduce on step on the installation of my apps.
> 
> The specific case that Access uses 'Yes' and 'No' for booleans, 
> whereas MySQL uses '1' and '0'. I was hoping that I could have the 
> app automatically detect it.
> 
> Looks like I'll have to declare something like Application.DBType or 
> Request.DBType as a global, and include a small chunk of code that 
> will return the appropriate syntax for my queries, inserts and 
> updates.

You can also do, Application.Yes = "'Yes'" and change it to
Application.Yes = 1 when you move backends, oh, and then use the app var
in your query. (Don't forget to use PreserveSingleQuotes. When you use
Access, it will preseve the single quotes around Yes, and when you use
MySQL, it will do nothing.)

-Ray





More information about the thelist mailing list