Webspeed Newbie - Basic SQL Usage Question

Mr. Dobalina

New Member
Greetings All,

I am new to WebSpeed. In my previous life I did ASP.Net with C#, ASP, JavaScript, etc. Database work with Teradata, DB2, SQL Server.

Basically, I'm having the same trouble with 4GL as a 4GL guy would have with SQL Server.

We are on OpenEdge 10.1B. I am looking for a way to maximize my productivity by integrating some basic SQL when developing Webspeed pages. We currently haven't fully adapted AppServer, but are working primarily with inline scripting 4GL.

I've used the desktop application to pull data w/basic selects, and performance is good when written appropriatly. My problem is integrating into pages as I've had a hard time finding examples. (and I've seen posts where people highly recommend against it, but I am hoping that this is because they were on previous versions of Progress.

Can someone help me with a basic example of pulling data with a SELECT statement and displaying that data in a table on the web? The only example I've found uses speedscripting and performes very poorly. A statment that runs in 1 second on my desktop takes 10 to return via the web.

http://www.geocities.com/ResearchTriangle/3737/dlc/sql.html

Any assistance is greatly appreciated!
 

Cecil

19+ years progress programming and still learning.
Try using the ABL native query language rather that using SQL. I know this will be hard to shake off.

Code:
<TITLE>SQL example</TITLE>

<table border=1><tr><th>number</th><th>Name</th><th>Address</th></tr>

<SCRIPT LANGUAGE="Speedscript">
FOR EACH customer NO-LOCK
     BY customer.number:  [COLOR="SeaGreen"]/*Sort the list by customer number*/[/COLOR]
</SCRIPT>
     
<tr>
   <td>`customer.number`</td>
   <td>`customer.name`</td>
   <td>`customer.address`</td>
</tr>

<SCRIPT LANGUAGE="Speedscript">
END. [COLOR="SeaGreen"]/* End of the FOR EACH block....*[/COLOR]/
</SCRIPT>
</table>
 

webguy

Member
Cecil is right try using native 4gl code. Once you get use to 4gl and webspeed you'll find you can whip stuff out pretty quickly.

Another way to do your example.

<html>
<head>
</head>
<body>
<table>
<!--WSS for each customer no-lock by customer.number: -->
<tr>
<td>`customer.number`</td>
<td>`customer.name`</td>
<td>`customer.address`</td>
</tr>
<!--WSS end. -->
</table>
</body>
</html>
 

agnaldo.macedo

New Member
Are no different.
Both have the same problem.
4GL generating HTML as the interface layer.

Using Flex, note the complete separation between screen and 4GL.

 
Top