Question Tutorial for simple crud application

raphaelmsx

New Member
Hi people.

Just downloaded and installed Progress OpenEdge 12.2 classroom edition, but most of the tutorial links are either broken or needs flash player.

I just wanted to build a very simple crud application (not web, only for windows desktop), is there a tutorial (or book) available anywhere that you can recommend me?

I also downloaded the full documentation, but it's overwhelming with thousands of pages... I mean, I would read everything eventually, but right now I just needed some simple "quick start", if there's such a thing for OpenEdge (I hope there is)...

Thanks!
 

Osborne

Active Member
In the old manuals Progress used to do some really basic examples and you may find these in the programming/ABL handbooks in the OpenEdge 9.1E Documentation and OpenEdge 10.1C Documentation downloads:


I seem to recall various sample files but can find only two and these are attached. These will run against the Sports2000 database and the .w can be opened in the AppBuilder.
 

Attachments

  • p-txn12.p
    1.4 KB · Views: 21
  • uibtest1.w
    11.5 KB · Views: 20

raphaelmsx

New Member
Hi, I started the basic tutorial of OpenEdge 9.1E, and everything went ok, connected to the sports2000 database, etc, until I had to work with some sample files mentioned in the guide, those aren't present in the current version...

I know 9.1E is already obsolete and unsupported, but I would love to have a trial edition (or "dev edition" like current), but couldn't find anywhere.

I love old computer technology (going back to the 70s), and would love to use stuff again that I used back then, but especially stuff that I didn't have the opportunity or knew back then (like Progress).

This in particular is not for a commercial project, it's really just a hobby of mine... (but who knows, in the future I maybe influence on using Progress where I work, with current versions, of course :D)
 

Osborne

Active Member
Unfortunately the only samples available are for the later versions and do not think they exist anywhere for 9.1E:-


Depending on your PDF viewer, can you not copy and paste from the 9.1E proghand.pdf and paste into the procedure editor? You lose all the indentation but at least it saves having to type all the code.
 

raphaelmsx

New Member
Hello people.

I made a clone of sports database and managed to do something very basic in App Builder (just a browse object inside a window), when I run with F2, it works ok, I can browse the three fields I selected before.

Then I compiled with Application Compiler, from the sports.w it generated a sports.r file.

I tried running with:

prowin c:\sports\sports.db -p c:\sports\sports.r

but it returned an error: There is no server for database c:\sports\sports (1423)

Also tried -1 in the command line and the error was: The database c:\sports\sports is in use in single-user mode (263)

Using OEDK 12.2 Classroom Edition on Windows 10.

What am I doing wrong?

Thanks.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Also tried -1 in the command line and the error was: The database c:\sports\sports is in use in single-user mode (263)
This means that some process is currently connected to the database. It could be a single-user client session or a utility, for example the compiler session you mentioned.

prowin c:\sports\sports.db -p c:\sports\sports.r
This command line assumes the database is open in multi-user mode, i.e. that a broker has been started for the database, via the proserve command.

Exit the process that has the database open, then open the database in multi-user mode: proserve c:\sports\sports. Then your prowin command will work.

If you have trouble finding the process that has the DB open, a quick way to find it is with a handle search. Run Resource Monitor (Start | Run | resmon), click the CPU tab, type the fully-qualified path of the .db file (c:\sports\sports.db) in the search box in "Associated Handles" and hit enter.
 

raphaelmsx

New Member
There was no handle found in resmon, so just tried again, and in singleuser mode it worked ok, and with proserve c:\sports\sports worked ok in multiuser mode, thanks for this tip!

Just one more question for now, when I exit the application, it opens a blank Procedure Editor... how to prevent that?

Thanks!
 

raphaelmsx

New Member
Try adding a quit. as the last statement in the procedure.

Well, I couldn't see how to do this in App Builder, so I opened sports.w in notepad and added QUIT. after END. in the Main Block (I though it was logical, but I could be wrong), and the compiler gave the following error:

Code:
12:42:51 Looking for C:\sports\sports.w
Compiling C:\sports\sports.w
Unknown or ambiguous table Customer. (725)
** C:\sports\sports.w Could not understand line 94. (196)

relevant sports.w section below:

Code:
/* ***********************  Control Definitions  ********************** */

/* Define the widget handle for the window */
DEFINE VAR C-Win AS WIDGET-HANDLE NO-UNDO.

/* Definitions of the field level widgets */
/* Query definitions */
&ANALYZE-SUSPEND
DEFINE QUERY BROWSE-8 FOR 
Customer SCROLLING.
&ANALYZE-RESUME

Line 94 is Customer SCROLLING.

Removing QUIT. and compiling again produced the same error.

Opening sports.w in App Builder worked ok with F2, saved there, tried compiling, same error.

The only way that I could compile successfully again was to delete sports.w, and did everything in App Builder from scratch.
 

raphaelmsx

New Member
The compile error means that you don't have the database connected while compiling.

So, I was making some modifications all the time in App Builder and recompiling without problems.

Then, I quit App Builder, opened the .w code in notepad++, added a single line to the code, saved, that single action got the database disconnected?

Also, I tried to recompile with App Builder opened (I know it's not logical, but whatever at this point), same problem.

As I said, the only way I could compile again, was start from scratch.

What I could deduce from all of this, is I can't modify .w code outside App Builder, but I'm not certain, I know nothing about Progress, and am here to learn something to get going.

Thanks.
 

Cringer

ProgressTalk.com Moderator
Staff member
You can modify code outside AppBuilder - sure. You can edit wherever you like.
Can I suggest a few things:
  1. Don't develop in the AppBuilder. It's old, and is no longer being updated maintained. Use PDSOE (Progress Developer Studio for OpenEdge). It's an Eclipse based IDE. You can set up workspaces and projects easily and manage your database connections from within it.
  2. Have a read up on how to serve and connect to a database locally. PDSOE can be set to auto-start your databases if that's easier, but it's good to have an understanding.
  3. Find and use a getting started guide. Here's an example: OpenEdge 11.7 Documentation
 
Top