We've used it for many years and it is of great value. It performs great, it is easy to read and use and combined with IceBreak you have easy access to build on-the-fly generated SQL statements (dynamic SQL). It is even possible to use the build in SQL syntax for doing string manipulations in just a couple of lines instead of writing a long procedure to do the same in RPG. If you need to combine data from multiple files/tables it sure is a must.
Remember also that you can use the IceBreak "build in" function SQL_Execute (without the Sql installed ). The function takes four parameters:
•Format. The output format to be returned:
•HTML
•XML
•JSON as JavaScript Table View
•JSON as javaScript Result set
•JSON as extJS result set (no meta)
•JSON as extJS result set (incl. meta)
SqlStmt (The Sql statement to be executed)
Maxrows (max number of rows to return in the result set)
Start (Optional: From starting row in the result set)
The following sample returns the first 1000 records to the browser formatted in HTML:
/free
SqlCmd = 'Select * from product';
Limit = 1000;
Start = 1;
SQL_Execute(
I_HTML: //' Return in formated HTML
SqlCmd: //' The SQL statement to run "Select ..."
limit: //' Max number of rows to return
start //' Starting from row number
);
The field I_HTML is a constant holding the value needed to tell the format used for by the function. All the formats described above have a constant value defined:
I_HTML
I_XML
I_JSTV
I_JSRS
I_EXTJS
I_EXTJSMETA
I hope you can use it.
Re: RPGSQL or SQLRPG
We've used it for many years and it is of great value. It performs great, it is easy to read and use and combined with IceBreak you have easy access to build on-the-fly generated SQL statements (dynamic SQL). It is even possible to use the build in SQL syntax for doing string manipulations in just a couple of lines instead of writing a long procedure to do the same in RPG. If you need to combine data from multiple files/tables it sure is a must.
Best regards,
John Foldager
www.izone.dk
www.icebreakforum.org
Re: RPGSQL or SQLRPG
Hi John, thank you ....
Giving me the light....
BTW, What is it actually??
Re: RPGSQL or SQLRPG
What embedded SQL is?
If you have no idea, then you should go read on the topic... I promise you.... you won't regret
When you create an ILE RPG program you can do the following:
You see? You can embed SQL syntax directly into your ILE RPG programs.
Is this great or what?
If you need more examples, go to the tutorials section in the administration interface in IceBreak (standard is port 7000) or search the net.
Best regards,
John Foldager
www.izone.dk
www.icebreakforum.org
Re: RPGSQL or SQLRPG
OOo so the meaning of those two word only for using SQL directly inside RPG pgm..
Wow its a good one....awesome....
Many thank
Re: RPGSQL or SQLRPG
That's correct
Best regards,
John Foldager
www.izone.dk
www.icebreakforum.org
Re: RPGSQL or SQLRPG
Hi,
Remember also that you can use the IceBreak "build in" function SQL_Execute (without the Sql installed ). The function takes four parameters:
•Format. The output format to be returned:
•HTML
•XML
•JSON as JavaScript Table View
•JSON as javaScript Result set
•JSON as extJS result set (no meta)
•JSON as extJS result set (incl. meta)
SqlStmt (The Sql statement to be executed)
Maxrows (max number of rows to return in the result set)
Start (Optional: From starting row in the result set)
The following sample returns the first 1000 records to the browser formatted in HTML:
The field I_HTML is a constant holding the value needed to tell the format used for by the function. All the formats described above have a constant value defined:
I_HTML
I_XML
I_JSTV
I_JSRS
I_EXTJS
I_EXTJSMETA
I hope you can use it.
Regards,
Bent
Re: RPGSQL or SQLRPG
some nice examples here.
http://www.code400.com/viewsamples.php?lang_id=3
Re: RPGSQL or SQLRPG
HI all,
Many thanks for the the Enlightenment.
NOw the lamp is On...
Many thanks