I also think he was looking for something that actually works.
The code given above will determine if the code is running from within powerbuilder (running man), or is running as an EXE file. It does not however tell you that you are the 2nd copy of 'my appname' that is opening.
Here is a...
You will need the deployment DLLs (aka Virtual Machine) installed as a prerequisite to running the application you created.
What DLL's are needed depend on your version of pb and what you are doing with it (i.e. don't use the rich text control, you can ignore the RTC DLL).
Do a search on...
Instead of running a seperate batch file, I would wrap the program you are running in a batch file and populate the return code from application close event. This number would be available in the batch file as the ERRORLEVEL variable.
you would have to pass your parms to the batch program via...
In my humble opinion you are using the wrong level of embedded SQL to do an table alter.
I would:
Execute Immediate "alter this add that"
Just make sure your autocommit is set correctly, since data definition (DDL) should/must not be running within a transaction.
I've run across this before.
You should check the return code from the SetTransObject to see if you got a good datawindow object assignment.
If the datawindow doesn't exist (ie. is 'mispellet' or the PBL got dropped from the libary list) SetTransObject will fail.
I would first check that the LIKE operator in a datawindow expression will work in you version of PowerBuilder. I know it works in 7 and greater, but I am not sure of prior to that (I know it didn't exist in 3 when I started with PB).
The best way to do this is to put the resolved expression...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.