Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper technique for Functions/Procedures
Message
From
28/04/1998 12:37:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00095133
Message ID:
00095449
Views:
28
>>I used to define functions and procedures in my SCAFFOLD.PRG in the pre-VFP5 days. If I were to take oo programming seriously, what would be the proper way to deal with such things nowadays? What are the advantages and pitfalls?
>>
>>TIA
>
>Nick, Cetin and James have all given good replies. If you're using Private Datasessions and have a global object for your functions, I've found that if you have any that operate on tables or views, you'll need to instantiate it within the specific private datasession. This means you can't create it in your "main" and have it always accessible but you can drop it on your form.
>
>But here's another thought.....and I'm wondering if anyone else has done this;
>This is for private datasessions and because the database needs a separate open instance for each one, you could simply put your functions in the database as stored procedures guaranteeing that they would be accessible in the proper datasession. Anyone ever put generic functions in as stored procedures?
>
>Steve
Yes Steve,
Good point. I also put localized capitalization, lowercase, propercase, PKGenerate, Save (affecting triggers), encrypt, decrypt, canupdate, global set(s) etc routines in stored procs. All those I also want to be available when opened independent of a form, menu etc.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform