how to insert record into a table

xinweizaixian

New Member
Hi,

i might ask a naive question, but i really do not know how to insert record into a table, progress database is a little strange, for example, when i use either oracle or db2 or some other database, they have either console or a gui interface for developer log in and write sql code such as insert, create table, update table or merge etc. but in progress, i do not how to do the similar thing, i have the following problems,

first of all, when i open administration tool, i try to log into the database, it asks me to give physical file, logical name, does a physical database could have more than one logical name? and when i log in it, i even do not need to input the username and password, why? i think i do not know the mechanism of this database.

secondly, does progress use standard sql statement?
 

Jupiter

Member
but i really do not know how to insert record into a table, progress database is a little strange, for example, when i use either oracle or db2 or some other database, they have either console or a gui interface for developer log in and write sql code such as insert, create table, update table or merge etc. but in progress, i do not how to do the similar thing, i have the following problems,

first of all, when i open administration tool, i try to log into the database, it asks me to give physical file, logical name, does a physical database could have more than one logical name? and when i log in it, i even do not need to input the username and password, why? i think i do not know the mechanism of this database.

secondly, does progress use standard sql statement?

There are many ways to insert record in a table. For that you need to log into the database. You can log in either from 4GL interface using a CONNECT statement.

e.g. For multiusermode:
CONNECT <dbname> -H <hostname> -S <servicename> -N <network protocol type> NO-ERROR.
Or we can connect using data dictionary or data administration interfaces.

After connecting to the database you can can use various ways to insert data into table, depending upon your requirement. I would suggest you to seek help from a guide to give you a jump start in the world of Progress.

As for Physical and Logical Names are concerned, if we want to connect two different databases of same name, we have to use different logical names.
Also there are cases when two dbs (say db_1 and db_2) have same schema and we want the source code written for one db_1 should work for db_2 also. This can be achieved by connecting db_2 with logical name db_1.

Lastly, Progress support SQL and that may be slightly different from what you mean by Standard SQL.

Regards
 

lord_icon

Member
progress database is a little strange,

>> Only if U do not know how to manipulate it. Progress database is actually VERY good.

If U require to enter data direct, you require an interface.
PSC's ADM / ADM 2 methodology is suited for this.
Basic syntax:
Create row in a table (CREATE tableName)
Assign row attributes values (populate the fields of the created row)

PSC advise to seperate UI design and database interaction. Which is WHY PSC is here.
The db works AND there is a good 4GL no third parties are required, trash the ODBC.
4GL has gone with the 90s, the ABL is here use that.
 

joey.jeremiah

ProgressTalk Moderator
Staff member
whenever possible try using a self-service connection (also called shared memory connection). here's a link to a thread that mentions self-service connections, among others and a few horror stories :)

http://www.progresstalk.com/showthread.php?t=96905

the server code is apart of the progress client (4gl client). the client can either connect to the database through a server process with a network connection or access the database directly through or using shared memory. funny, a client that doesn't need the server to access the database :)

because of how the 4gl network connection is implemented there are substantial performance improvements using a self-service connection. whenever possible a self-service connection is recommended.


progress has a standard sql92 (with some sql99 features) engine but the performance and features highly depend if you're using a recent release. of course like everything that's meant to be standard they're different, extensions etc. as the saying goes sql is sql but sql isn't equal :)

in version 9 and 10 progress comes with the sql explorer util for executing queries and sql commands, from release 10.1 the eclipse ide also includes sql querying tool (i think it's part of the db navigator view).


i'd also highly recommend that you get to know peg.com, and psdn.com.

here's a link to the entire progress documentation, that also covers progress sql -

http://download.psdn.com/documentation/openedge/pdf_zip_files/101b/oepdfs.zip

hope this helps.
 

amit.kanyan

New Member
write following code on progress editor. after that press F2. Progress ask you for enterening fields value for the record

INSERT table-name.
 
Top