Topic: show record using script?
sir, how to show record using script when click a button?
My Visual Database → Script → show record using script?
sir, how to show record using script when click a button?
I have made example for you.
procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
var
sID: string;
sDate: string;
begin
if Form1.GridEmployees.dbItemID<>-1 then // if there is selected record in TableGrid
begin
sID := Form1.GridEmployees.sqlValue; // id of record for show
frmEmpScript.edLastName.Text:= SQLExecute('SELECT lastname FROM employees WHERE id='+sID); // get lastname
frmEmpScript.edFirstName.Text:=SQLExecute('SELECT firstname FROM employees WHERE id='+sID); // get firstname
// date
sDate := SQLExecute('SELECT dateofbirth FROM employees WHERE id='+sID);
if sDate <>'' then frmEmpScript.DateTimePicker1.Date := SQLDateTimeToDateTime (sDate)
else frmEmpScript.DateTimePicker1.Checked:= False;
frmEmpScript.ShowModal; // show form
end;
end;
And how to display the records into a grid when getting the variable from a textbox?
And how to display the records into a grid when getting the variable from a textbox?
I think the same question, to which I replied at this topic
http://myvisualdatabase.com/forum/viewtopic.php?id=1118
Yes it is, sorry for the double post
My Visual Database → Script → show record using script?
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi