Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I access stored procedures in the database
Message
 
 
To
21/11/2001 23:45:22
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00584798
Message ID:
00584805
Views:
42
This message has been marked as the solution to the initial question of the thread.
>Hi
>
>How do I access stored procedures in the database

You call them just like any other proc or function. However, if you have a proc/func of the same name somewhere else, like in the current prg file, that will be the one that will most likely fire. For example, I have a proc called GetNextID in the SP of my DBCs. All I have to do to get my next PK ID is issue a lnKeyID = GetNextID('MyTable')

>Also,
>
>I have placed the following code in the OpenTables method of the Data Environment because I want the initial position of the tables to be set
>
>DODEFAULT()
>GO TOP IN prsched
>SET KEY TO RANGE prsched.code+prodserv.code,;
> prsched.code+prodserv.code+'~~~~~~~~~~';
> IN specprice
>GO TOP IN specprice
>
>Unfortunately I get an 'Error 1966 Data Environment is alreay loaded'
>
>Why is this?

You do not need the DoDefault(). I also suggest you do not need that code there. Move it to the LOAD of the form. LOAD also only fires once per instanciation of the form unless you explicitly call it which you should not really do.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform