Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I access stored procedures in the database
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00584798
Message ID:
00584805
Vues:
45
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform