Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Oracle/VFP data types
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00134372
Message ID:
00138952
Views:
15
>>The approach I took was to change all my code which references logical fields from "IF = .T." to "IF = TRUE" where TRUE is a constant defined as 1 and FALSE is a constant defined as 0. Then make sure all your logical data types in Oracle are numeric 1 and can only contain the values of 0 and 1. This way, you'll be able to maintain a lot of your GUI which uses checkboxes for logical data types (by default they'll use 0 for FALSE and 1 for TRUE) and the only thing you'll have to change in your code is .T./.F. to TRUE/FALSE.<<

Very Nice! I took a different approach because I had to do something a couple of weeks ago. I created a function zLogical() that returns .t. if the input is 1 or .t., so instead of saying " if v_car.completed " this is changed to " if zlogical(V_car.completed)". The advantage is that I can continue using logicals in VFP (and SQL*Server) and use numerics in oracle with same code. Downside is that is more work and less intuitive than your approach, which means my way takes more maintenance.

Thanks for your reply.

Kevin
Kevin Emmrich
www.jkt9000.com
Previous
Reply
Map
View

Click here to load this message in the networking platform