0000045: LAZARUS - Unit1.pas(9,3) Fatal: Can't find unit ZCo

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
tatamata
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 10.06.2007, 13:45
Location: Zagreb, Croatia

0000045: LAZARUS - Unit1.pas(9,3) Fatal: Can't find unit ZCo

Post by tatamata »

I installed Zeos 6.6.1 Beta in Lazarus 0.9.22 (FPC 2.0.4), on Windows XP and successfully connected to PostgreSQL in design time. I got results in DBGrid successfully. But, when I try to compile the project I get the following error:
"Unit1.pas(9,3) Fatal: Can't find unit ZConnection", so I can't build the project. The same happens with trunk and testing Zeos versions. It works in design time, but the project can't be compiled.

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
ZConnection, ZDataset, db, DBGrids;

type

{ TForm1 }

TForm1 = class(TForm)
Datasource1: TDatasource;
DBGrid1: TDBGrid;
ZConnection1: TZConnection;
ZQuery1: TZQuery;
private
{ private declarations }
public
{ public declarations }
end;

var
Form1: TForm1;

implementation

initialization
{$I unit1.lrs}

end.

object Form1: TForm1
Left = 257
Height = 500
Top = 144
Width = 737
HorzScrollBar.Page = 736
VertScrollBar.Page = 499
Caption = 'Form1'
object DBGrid1: TDBGrid
Left = 13
Height = 424
Top = 64
Width = 715
AutoFillColumns = True
DataSource = Datasource1
FixedColor = clBtnFace
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit]
OptionsExtra = [dgeAutoColumns, dgeCheckboxColumn]
ParentColor = False
TabOrder = 0
TabStop = True
end
object ZConnection1: TZConnection
Protocol = 'postgresql-8'
HostName = 'localhost'
Port = 5432
Database = 'MONITORINGZ_DEMO'
User = 'postgres'
Password = 'nadaneumire'
Connected = True
end
object ZQuery1: TZQuery
Connection = ZConnection1
Active = True
SQL.Strings = (
'SELECT'
0000009'"departments"."department",'
0000009'"plants"."plant",'
0000009'"batches_microbs"."sampling_type",'
0000009'"batches_microbs"."batch",'
0000009'"batches_microbs"."sampling_datetime",'
0000009'"batches_microbs"."status",'
0000009'"batches_microbs"."batch_commentary",'
0000009'"results_microbs"."area",'
0000009'"results_microbs"."area_description",'
0000009'"results_microbs"."class",'
0000009'"results_microbs"."sample",'
0000009'"results_microbs"."sample_description",'
0000009'"results_microbs"."alert_limit",'
0000009'"results_microbs"."action_limit",'
0000009'"results_microbs"."result",'
0000009'"results_microbs"."measuring_unit",'
0000009'"results_microbs"."sample_commentary",'
' alert_limit_exceeds("results_microbs"."result",'
' "results_microbs"."alert_limit",'
' "results_microbs"."action_limit") as "alert_limit_exceeds",'
' alert_limit_passes("results_microbs"."result",'
' "results_microbs"."alert_limit") as "alert_limit_passes",'
' action_limit_exceeds("results_microbs"."result",'
' "results_microbs"."action_limit") as "action_limit_exceeds",'
' action_limit_passes("results_microbs"."result",'
' "results_microbs"."action_limit") as "action_limit_passes",'
' exceeds_sum("results_microbs"."result",'
' "results_microbs"."alert_limit",'
' "results_microbs"."action_limit") as "exceeds_sum",'
' exceeds_total(exceeds_sum("results_microbs"."result",'
' "results_microbs"."alert_limit",'
' "results_microbs"."action_limit")) as "exceeds_total"'
'FROM'
0000009'"public"."batches_microbs" "batches_microbs" '
0000009#9'INNER JOIN "public"."results_microbs" "results_microbs" '
0000009#9'ON "batches_microbs"."batch" = "results_microbs"."batch" '
0000009#9#9'INNER JOIN "public"."plants" "plants" '
0000009#9#9'ON "plants"."plant" = "batches_microbs"."plant" '
0000009#9#9#9'INNER JOIN "public"."departments" "departments" '
0000009#9#9#9'ON "departments"."department" = "plants"."department" '
0000009#9#9'GROUP BY'
0000009#9#9#9'"departments"."department",'
0000009#9#9#9'"plants"."plant",'
0000009#9#9#9'"batches_microbs"."sampling_type",'
0000009#9#9#9'"batches_microbs"."batch",'
0000009#9#9#9'"batches_microbs"."sampling_datetime",'
0000009#9#9#9'"batches_microbs"."status",'
0000009#9#9#9'"batches_microbs"."batch_commentary",'
0000009#9#9#9'"results_microbs"."area",'
0000009#9#9#9'"results_microbs"."area_description",'
0000009#9#9#9'"results_microbs"."class",'
0000009#9#9#9'"results_microbs"."sample",'
0000009#9#9#9'"results_microbs"."sample_description",'
0000009#9#9#9'"results_microbs"."alert_limit",'
0000009#9#9#9'"results_microbs"."action_limit",'
0000009#9#9#9'"results_microbs"."result",'
0000009#9#9#9'"results_microbs"."measuring_unit",'
0000009#9#9#9'"results_microbs"."sample_commentary"'
)
Params = <>
top = 40
end
object Datasource1: TDatasource
DataSet = ZQuery1
top = 80
end
end
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Was entered as Mantis Bug 45.
Solution : Add source directories to the search path or put zeoslib package in <lazarusdir>/components directory.
Bug closed when reporter confirmed it worked.

Mark
Post Reply