Recent

Author Topic: zeoslib using manual  (Read 7958 times)

notebook

  • New Member
  • *
  • Posts: 21
zeoslib using manual
« on: July 31, 2011, 01:07:51 pm »
I don't want use visual component, but all defined in code, I try but this don't work????


nicke85

  • Jr. Member
  • **
  • Posts: 92
  • #13#10
Re: zeoslib using manual
« Reply #1 on: July 31, 2011, 02:00:02 pm »
You must create each component which use in visual developing..
eg.
Code: [Select]
var
connection : TZConnection;
table: TZTable;
begin
connection := TZConnection.Create(nil);
table := TZTable.Create(nil);
with connection do
 begin
  HostName := 'your host machine';
  Database := ' name of your database';
  User := 'user name';
  Password := 'your password';
  Protocol := 'set which kind of database you use';
 end;
 connection.connect;
 table.TableName := 'your table name'; // or use ZQuery but define first and than create
 
.. ..
than set properties for each commponent
« Last Edit: July 31, 2011, 02:08:22 pm by nicke85 »
ArchLinux X64 (XFCE) & Windows 7 SP1 Ultimate X64
FPC 2.7.1 / Lazarus 1.1 / ZeosDBO / fortes4lazarus -- all svn

JD

  • Hero Member
  • *****
  • Posts: 1909
Re: zeoslib using manual
« Reply #2 on: July 31, 2011, 02:53:47 pm »
I don't want use visual component, but all defined in code, I try but this don't work????

Put the required files in the "Uses" clause of your project files. Once you do that, you can manipulate the Zeos library all you want.
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 832
    • Blog personal
Re: zeoslib using manual
« Reply #3 on: July 31, 2011, 08:17:10 pm »
I don't want use visual component, but all defined in code, I try but this don't work????
Why?, is there any advantage?

/BlueIcaro

notebook

  • New Member
  • *
  • Posts: 21
Re: zeoslib using manual
« Reply #4 on: July 31, 2011, 10:28:41 pm »
I don't want use visual component, but all defined in code, I try but this don't work????
Why?, is there any advantage?

/BlueIcaro

yes, You can create one unit  and one method with parameter(for connection and query), and only call method with parameter.
parameter ia one string(query)
in other unit you can put Bussines layer.

and you have multi layer app which is easy for maintenance.


 

TinyPortal © 2005-2018