Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating Unique ID
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586682
Message ID:
00586882
Views:
22
This message has been marked as a message which has helped to the initial question of the thread.
Hi Nadya,

I think, you can use ADATABASES( ) Function to get a list of open databases, loop thru that list and use INDBC( ) Function to check if table belongs to the current DBC. This way you don't have to know an alias.


>Hi Sergey,
>
>Regardless of the alias I need to add records to the AllFunctions table. If I open this table under AllFunctions alias, my code works, if under different alias, it gives SP error (with only OK and Help functions available). I know, it fails on line cursorgetprop. I don't see right now a correct resolution of this problem (I'll think more while sleeping :)). Just would be grateful, if you have ideas of fixing this problem.
>
>See my reply to Steve for more detailed explanation, why I want to check owning database name.
>
>
>>Hi Nadya,
>>
>>I don't see anything wrong with your code. It doesn't matter under what alias you open table AllFunctions under because in the end result all records are added to that table. That's why all id's should be generated for AllFunctions table and not the alias it's open under. Does it make sense or I'm missing something?
>>
>>>>What if it's open two or more times using USE AGAIN? Which of aliases would you want?
>>>>
>>>
>>>Oops! Haven't thought about this possibility...
>>>
>>>So, do you have suggestions of fixing my SP code?
>>>
< snip >
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform