Code: Select all
put the dgData of group "dgGridMed" into theDataA
put the dgIndexes of group "dgGridMed" into theIndexes
#& cr after
repeat for each item theIndex in theIndexes
put theDataA[theIndex]["Medicine"] & cr after Medicine
put theDataA[theIndex]["Preparation"] & cr after Preparation
put theDataA[theIndex]["dosage"] & cr after dosage
put theDataA[theIndex]["Frequency"] & cr after Frequency
end repeat
put "insert into hos_tblmedicineOrder(medName,preparation,dosage,frequency) values (' " &\
Medicine &" ' , ' " & Preparation& " ' , ' " &dosage & " ', ' " & Frequency& " ' )" into sqlQuery
revExecuteSQL connID,sqlQuery