Hello guys....
I have a problem here. Here my code....
procedure LoadPMINOData;
begin
DataModule_SP.QueryLookup.SQL.Clear;
sSQL := 'Select distinct (rg_person.current_icno)scurrent_icno, (rg_person.old_icno)sold_icno, (rg_person.date_of_birth)sdate_of_birth, ';
sSQL := sSQL + '(rg_person.first_name)sfirst_name, (rg_person.last_name)slast_name, (rg_person.email)semail from rg_person ';
sSQL := sSQL + 'inner join rg_patient on rg_patient.person_id = rg_person.id ';
sSQL := sSQL + 'where rg_patient.pmino = ' + '"' + pminonyer + '"';
DataModule_SP.QueryLookup.SQL.Add(sSQL);
DataModule_SP.QueryLookup.ExecSQL;
DataModule_SP.DataSourceSP.DataSet.Open;
While Not DataModule_SP.DataSourceSP.DataSet.eof do
Begin
frameBiodata.edtNewICNumber.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('scurrent_icno').asString;
frameBiodata.edtOldICNumber.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sold_icno').asString;
frameBiodata.edtDOB.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sdate_of_birth').asString;
frameBiodata.edtFirstName.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sfirst_name').asString;
frameBiodata.edtLastName.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('slast_name').asString;
frameBiodata.edtEmail.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('semail').asString;
DataModule_SP.DataSourceSP.DataSet.Next;
End;
end;
...this code ip in UnitBiodata and I want call it UnitMainMenu(it is onder buttonclick)
Can someone teash me how to call this procedure in UnitMainMenu.
Please help me
TQ
I have a problem here. Here my code....
procedure LoadPMINOData;
begin
DataModule_SP.QueryLookup.SQL.Clear;
sSQL := 'Select distinct (rg_person.current_icno)scurrent_icno, (rg_person.old_icno)sold_icno, (rg_person.date_of_birth)sdate_of_birth, ';
sSQL := sSQL + '(rg_person.first_name)sfirst_name, (rg_person.last_name)slast_name, (rg_person.email)semail from rg_person ';
sSQL := sSQL + 'inner join rg_patient on rg_patient.person_id = rg_person.id ';
sSQL := sSQL + 'where rg_patient.pmino = ' + '"' + pminonyer + '"';
DataModule_SP.QueryLookup.SQL.Add(sSQL);
DataModule_SP.QueryLookup.ExecSQL;
DataModule_SP.DataSourceSP.DataSet.Open;
While Not DataModule_SP.DataSourceSP.DataSet.eof do
Begin
frameBiodata.edtNewICNumber.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('scurrent_icno').asString;
frameBiodata.edtOldICNumber.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sold_icno').asString;
frameBiodata.edtDOB.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sdate_of_birth').asString;
frameBiodata.edtFirstName.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('sfirst_name').asString;
frameBiodata.edtLastName.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('slast_name').asString;
frameBiodata.edtEmail.Text := DataModule_SP.DataSourceSP.DataSet.FieldByName('semail').asString;
DataModule_SP.DataSourceSP.DataSet.Next;
End;
end;
...this code ip in UnitBiodata and I want call it UnitMainMenu(it is onder buttonclick)
Can someone teash me how to call this procedure in UnitMainMenu.
Please help me
TQ