![]() |
|
#1
|
|||
|
|||
|
In MySql Views Query:
Select depotcode, depotname, employee_id From depot_profile Where employee_id=(VarEmployeeId) This is what I want to do: I want to pass a parameter from Delphi 2006 to supply the VarEmployeeID in my MysqlViews query. How will I do that Sir and Mam? Note: to connect to the server I used Zeos components. |
|
#2
|
|||
|
|||
|
Drop a TZQuery on your form (and a TDataSource component if you are going to connect the database fields to data aware components - such as DBGrid or DBEdit)
Set the Connection property to your ZConnection (assumed to be properly configured and set to connected) Code:
ZQuery1.SQL.Text := 'Select depotcode, depotname, employee_id From depot_profile Where employee_id= :ParamEmpID';
ZQuery1.ParamByName('ParamEmpID').AsInteger := <EmpIDValue>;
ZQuery1.Open;
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|