>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