Hi,
I am learning SQL Yoga, and it is a real pleasure.
Actualy i am testing a simple application like adress book (only one table).
I can connected to my database
Populate a datagrid and display data into fields when i select a row from my datagrid
Retrieve data with elementary search...
My application looks like this:
Field : Socit摲
field : adresse
Field : ID
field: Acteur .... etc
Navigate Buttons : < and >
Create data button : + delete data button: -
Now i would like navigate in my database and display data into fields when i click on navigate Buttons : < or >.
I read the sql Yoga documentation about
"command sqlquery_moveToFirstRecord @pQuery" but i don't understand.
Every body Can explain me the right way to do that?
After that i can use the script below
The Handler to display the data into fields when i select a row of my Datagrid :
script on group "dataGrid 3" is
Code: Select all
--> all handlers
global theRecordAShow
on selectionChanged pHilitedIndex, PrevHilitedIndex
put the dgDataOfIndex[pHilitedIndex] of group "datagrid 3" into theRecordAShow
showRecord theRecordAShow
--uiViewRecord
end selectionChanged
script into card is:
on showRecord theRecordA
put printKeys(TheRecordA)
put theRecordA[ "cl_Societe"] into field "cl_Societe"
Put theRecordA["cl_Activite"] into field "cl_Activite"
put theRecordA["cl_Adresse_complete"] into field "cl_Adresse_complete"
put theRecordA["cl_CP"] into field "cl_CP"
...... etc
end showRecord