Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent of logical
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00082133
Message ID:
00082286
Vues:
38
>>>>>When moving a Visual FoxPro table to Client/Server, what is the equivalent of the logical field?
>>>>>
>>>>>I looked in the SQL Server and couldn't find a field for that.
>>>>
>>>>i think 1 or 0.
>>>
>>>Do you mean SQL Server will convert to a character type with 1 or 0 or in a numeric type?
>>
>>numeric if i remember correctly.
>
>Yes, as Nick said, Tiny Integer.

As previously noted (Hi Marat!), SQLServer has a bit datatype. The VFP Upsizing Wizard converts logicals to the bit type by default. Bit type values are represented as 0 or 1 and cannot be NULL. The nice thing about this is that when you query the SQLServer back end and put the results into a cursor, the ODBC driver automatically converts bit fields to VFP logicals (.T. or .F.).

A big hassle with this for us is that ORACLE (and perhaps others?) does not have a bit datatype. If your app will need to run against different back ends, keep this in mind.

Its never easy :-(
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform