Procedure?

wenger

New Member
i have tried to create a very simple procedure
(CREATE TABLE helloworld (fld1 CHAR(100)); )

CREATE PROCEDURE HelloWorld ()
BEGIN
SQLIStatement Insert_HelloWorld = new SQLIStatement
("INSERT INTO HelloWorld(fld1) values (’Hello World!’)");
Insert_HelloWorld.execute();
END

In 'Procedure Editor' error :
** Unable to understand after -- "PROCEDURE HelloWorld". (247)
** Could not understand line 1. (198)

In 'SQL Explorer' error:
=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

I cann't understand. plz help!

Note : Progress 9.1e, windows xp
 
Try
Code:
PROCEDURE HelloWorld:

END.
to create a working procedure.
Concerning the Insert-Statement and the handling with records you can look in the documentations.
 
i have tried to create a very simple procedure

In 'Procedure Editor' error :
** Unable to understand after -- "PROCEDURE HelloWorld". (247)
** Could not understand line 1. (198)

In 'SQL Explorer' error:
=== SQL Exception 1 ===
SQLState=42000
ErrorCode=-20003
[JDBC Progress Driver]:Syntax error (7587)

I cann't understand. plz help!

Note : Progress 9.1e, windows xp

You appear to be getting SQL and 4GL mixed up.

Use the procedure editor to enter 4GL procedures (this is a completely different language to SQL; as different, say, as VB).

Use SQL explorer for SQL (and good luck).

It might be worth reading some basic documentation to understand the differences between the two approaches before you proceed further.
 
You appear to be getting SQL and 4GL mixed up.

Use the procedure editor to enter 4GL procedures (this is a completely different language to SQL; as different, say, as VB).

Use SQL explorer for SQL (and good luck).

It might be worth reading some basic documentation to understand the differences between the two approaches before you proceed further.
thanks!
but why 'that code' doesn't run in 'sql explorer'?
 
Well, SQL Explorer is a law unto itself, or at least I've always found it difficult to work with (hence my 'good luck').

So, it may be a configuration issue, or it may be a syntax issue, neither of which I can help you with as I don't use SQL.

Hopefully someone else will point you the way, however, there is a section in the Open Edge "Data Management > SQL Development" manual devoted to SQL procedures and triggers. I would assume much of it will apply to 9.1E (although I believe SQL explorer has been dropped in the later version).

http://www.psdn.com/library/entry.jspa?externalID=111&categoryID=194

If you are going to be using Progress to a great extent, it would also be worth considering the very powerful 4GL for your business logic.
 
Well, SQL Explorer is a law unto itself, or at least I've always found it difficult to work with (hence my 'good luck').

So, it may be a configuration issue, or it may be a syntax issue, neither of which I can help you with as I don't use SQL.

Hopefully someone else will point you the way, however, there is a section in the Open Edge "Data Management > SQL Development" manual devoted to SQL procedures and triggers. I would assume much of it will apply to 9.1E (although I believe SQL explorer has been dropped in the later version).

http://www.psdn.com/library/entry.jspa?externalID=111&categoryID=194

If you are going to be using Progress to a great extent, it would also be worth considering the very powerful 4GL for your business logic.

so, what book should i read to begin learning 4GL? :D
thanks so much,
 
It is worth downloading the whole set, then you can browse at leisure locally.

In the meantime, some books to get you started:
NB. Books are written for OE10, but most will still apply to your version.

Main Page:
http://www.psdn.com/library/kbcategory.jspa?categoryID=193

Studio Overview:
http://www.psdn.com/library/entry.jspa?externalID=417&categoryID=201

AppBuilder:
http://www.psdn.com/library/entry.jspa?externalID=448&categoryID=260

4GL Handbook (mentioned above):
http://www.psdn.com/library/entry.jspa?externalID=474&categoryID=261

4GL Reference:
http://www.psdn.com/library/entry.jspa?externalID=437&categoryID=261

Database Management:
http://www.psdn.com/library/entry.jspa?externalID=82&categoryID=194

Database Essentials:
http://www.psdn.com/library/entry.jspa?externalID=311&categoryID=201
 
Back
Top