?currently i am facing the issues , i am having a file new.w in that file i have browse to display the sport2000 customer table when i am connected to sports2000 database s connected the same file new.w i when i right click and opened n procedure editor and wen i run the file throws an error unknown table customer but my objective t should connect automatically to the sports database i have tried using connect statement,pf file is there any way to figure this out? thanks.
Direct manipulation of .w is not encouraged.
You can have a wrapper procedure file which connects to the database and then runs your .w file like:
connect mydb.db -1. /*Assuming database is not served*/ run new.w. disconnect mydb.
Hello,
Since you want to automatically connect to the database, the simplest approach is to specify the database connection as a startup parameter to the OpenEdge client.
Examples:
prowin32 sports2000
prowin32 sports2000 -param a.p
prowin32 -db sports2000 -p _ab.p
prowin32 -pf my_pf_file.pf -p _ab.p
These examples are for the Procedure Editor and the AppBuilder.
Do you have Progress Developer Studio installed?
If so, you can just create a database connection from the environment.
The following thread has a similar subject:
community.progress.com/.../35063.aspx
I hope this helps.
To be clear, connection to the database must be "outside" the procedure or class which accesses the database. This can be via a startup parameter, i.e., the connection is established prior to running any actual ABL code or it can be done in ABL code, but if done in code one must go one level farther down, i.e., into a run .p or .w or into a newed class before that connection can be used.