Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing the Primary Key
Message
From
12/12/2001 11:01:45
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00591952
Message ID:
00593282
Views:
22
Hi Victor - yeah, who is that guy David?

Thanks for the thoughts. I actually had newid() as the default value for the primary key of my VFP tables. The problem is, it uses a stored procedure which requires the table in question to be the currently selected alias, or to have the name of the table passed as a parameter.

I was able to solve the problem by updating my tables to pass the parameter - i.e in the titles table, the default value is now newid("titles").

Thanks for your input. I can see by your posts that I'm going through many of the same "learning" experiences you did. It's encouraging to see that I'm not alone. I threw myself to the wolves with this one. I have a prospect who wants me to demo some new functionality, and I decided to build it in MM - so I basically forced myself to learn the framework in 3 weeks! And I hate to say that I'm starting to get it, because every time I think that I'm thrown for a loop.

Sounds like you go a lot from Kevin's training - I will definately have to take that when I get the chance/funding.


Hi, David! Meet David! I just think it's funny when people respond to their own posting. :-)
>
>
>Here's the solution to your problem:
>
>Kevin has setup a stored procedure that he calls when creating a new record. What you need to do is put "NEWID()" in the default value of your VFP table which should be contained in a DBC. Make sure the PK is updatable in your view.
>
>However, if you don't have your tables in a DBC when you need to over-write the method generating the "NEWID" with your own. I when through these same problems when I was moving an FP for DOS System to VFP.
>
>Hope this helps!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform