Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving current line of code in a module
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00360934
Message ID:
00360962
Views:
7
>Larry,
>
>Ok I see, you're trying to fake out an ON ERROR type of operation.
>
>One design approach I would probably investigate would be to encapsulate the entire SQLExec stuff into an object. Perhaps with a structure such that the SQLExec that gets executed is created by setting properties of this object and then calling a method that builds and executes the command. This way, if an error occurs the object's properties could be investigated to find out what the context was without the assign method needing to know the line of code for the SQLExec. Essentially it would always be the same line of code.

Yes I could do this. I already have an object like this with (among other things) one function that is wrapper for the SQLConnect function. If a valid connection is made, it sets some default properties for me.

It will be fairly simple to expand on this concept and create a SQLExec wrapper. I could set properties for program(), lineno() and anything else I wanted. I could then pass this information along. I still like the idea of everything going through the generic error clearing house so I think I'll go with this for now.

Thanks.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform