Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Boolean across technologies
Message
De
21/02/2008 19:05:41
 
 
À
21/02/2008 03:16:31
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01294595
Message ID:
01295126
Vues:
16
>>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?
>
>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.
>
>But you would have to worry that "newer" trends in backends might grow a boolean type. Thus it should be delegated to the adapter between business and data tier.
>
>>Any feedback on how you negotiate with that when dealing with VFP/SQL Server environment?
>
>If you have any kind of tiered approach I'd argue strongly against directly programming to [0,1].

Thanks, this is exactly what I thought.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform