Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Proc has strange double-take?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00757915
Message ID:
00758879
Views:
19
Hmmm...no replies after 2 days, so I will guess this is not a known bug, perhaps even a normal behavior that seems unusual (assuming anyone is able to understand my explanation below, which was difficult). I'll do a "more serious" testing on the odd event sequence when I have time.


>Not sure what the heck is going on (bug, maybe known?) but here we go (VFP7 SP1):
>
>I'm making an SP to auto-delete records > 5 years old in a certain table. I selected AfterOpenTable for the SP. Key points:
>
>1) I have a table with different file name (call it "Name1.dbf") and DBC name (call this "Name2"), nothing too unusual.
>
>2) The SP parameter is Name2, the DBC name, that works normally every fire.
>
>3) When the SP fires, it runs twice in a row. Not sure why that is yet.
>
>4) The 1st time it runs, the internal SP code demands the table be referenced as Name1. Verifying with debugger, Name1 is indeed the selected table ALIAS().
>
>5) The 2nd time it runs, ALIAS Name1 disappears, and the internal SP code demands it be referenced as Name2, and again, a check shows this table is indeed open.
>
>6) The table remains open as Name2, the normal DBC name.
>
>7) I actually put some "dual" code in the SP to handle both ALIASes out of curiousity, and it works, as a workaround. But this seems pretty weird.
>
>The unusual thing seems to be the Name1 reference and ALIAS, right? And perhaps the fact it runs twice, though that could be something funny in my code, I'll check later. But I just had to ask if anyone knew what is going on here?
>
>(Note: I should mention, that I checked through all the code to ensure that the table was not ever opened with an ALIAS of Name1)
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform