Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with update from local views
Message
From
28/03/2002 07:54:14
 
 
To
27/03/2002 16:49:35
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00638145
Message ID:
00638328
Views:
15
Hi!

In addition to what was said already:

When error happened inside of some trigger, there is an approach developed for default-generated referential Integrity triggers - by using a public array with information about the error or problem happened ins ome table. In such case, I agree, you will have also only the table name for which the trigger fired.

Here there are 2 soluions.

1. Is just like a wild bear go through all views opened in current data session and check which one use that table. You can do this by using DBGetProp abd CursorGetProp functions (do not remamber details).

2. Create and maintain tables and store in them information about all tables and views, as well which tables are used by which view. Then you will get the view just by querying these tables and comparing result to opened views.

Finally, what if some table is used by more than one view currently opened? How you will determine which view was offending?

In any case, I still could not imagine a situation when this is required at all. When you issue a tableupdate() command, you always can know what table is currently updated, right? Why not just change the system in the place of using tableupdate()? FOr example, create your own function that accepts the same parameters as tableupdate(). However, it also logs view name and possible other things into public variables or by some otehr way, so you will know in other places what is going on when error happened. And no need in super-complex approaches to determine whch view uses the table.

HTH.

>Hi! Sorry for bad English.
>I'm tring to manage updating conflicts (Error 1585) with onerror function.
>I'm using AEEROR() for realize number of workarea where error is occured. But AERROR() contain only number of workarea for "parent" table, not of my view wich i must revert or update with force updates. How am i can realize workarea or alias of view what causes the error?
>If anyone is interesting this problem i can write two of my variants of solving it. (But i don't like them)
>
>Thanks for advance.
>
>Mikla.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform