Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Boolean across technologies
Message
From
26/02/2008 14:38:52
 
 
To
21/02/2008 00:38:50
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01294595
Message ID:
01296551
Views:
9
Michel,

If your SQL database is using a bit, you can still pass an integer for the boolean value. And, as long as it is not something greater than 1, it works fine. So there is no need to do any conversion.

~~Bonnie



>If I would be back in time, when designing a table in VFP, I would have avoided any logical type and used a numeric 1 to hold 0 for False and 1 for True. Despite the fact that we have a Bit type in SQL Server, when doing the query, we have to consider using something like MyField=1 or MyField=0. The numeric value should seem more universal in SQL commands that a logical/boolean type. Is that correct?
>
>As is the case now, in order to support those two environments, when comes time to deal with a SQL Server backend, I have to convert, at the framework level, any boolean parameter into a bit 0/1 if I hit a SQL Server backend. But, if that parameter would have been originally a numeric 1, I wouldn't have to deal with that at all and simply pass 0 or 1 in my parameter without worrying to convert based on the backend, if applicable, as the numeric 1 would be universal.
>
>Any feedback on how you negotiate with that when dealing with VFP/SQL Server environment?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform