Subject | RE: [IBO] Any progress yet on the IBO 4.6Bc bug with Parsing of Joins when using FB2.0? |
---|---|
Author | Jason Wharton |
Post date | 2006-11-17T17:40:02Z |
Adrian wrote:
begin
If Gender = 'M' Then
begin
with FormAnimalLookup.IB_QueryLookupAnimals do
begin
Close;
SQL.Clear;
SQL.Add('SELECT A.ANIMALIDENTIFICATION, A.ANIMALNAME,');
SQL.Add('A.ANIMALREGIST RATIONNUMBER, A.ANIMALHERDSTATUS,
A.ANIMALDOB,');
SQL.Add('A.ANIMALGENDER, A.ANIMALTAGCOLOUR, A.ANIMALID,');
SQL.Add('S.ANIMALSIRESTATUS, S.ANIMALFIRSTSIREDATE');
SQL.Add('FROM ANIMAL A, ANIMALACTIVESIRES S');
SQL.Add('where (A.ANIMALID = S.ANIMALSIREID) AND');
SQL.Add('(A.ANIMALGENDE R = ''' + Gender + ''')');
SQL.Add('ORDER BY A.ANIMALIDENTIFICATION');
Prepare;
Open;
IF sID <> '' then // Don't search if no value.
Locate('ANIMALIDENTIFICATION',sID,[]);
end;
end;
...
end;
I'll have a look at it.
Jason Wharton
> I tried the following Query in code, in my application, and stillprocedure TFormAnimalInfo.AnimalLookup(Gender, sID: String);
> getting the error.
>
> The following code snippet, may indicate what is causing the error:
begin
If Gender = 'M' Then
begin
with FormAnimalLookup.IB_QueryLookupAnimals do
begin
Close;
SQL.Clear;
SQL.Add('SELECT A.ANIMALIDENTIFICATION, A.ANIMALNAME,');
SQL.Add('A.ANIMALREGIST RATIONNUMBER, A.ANIMALHERDSTATUS,
A.ANIMALDOB,');
SQL.Add('A.ANIMALGENDER, A.ANIMALTAGCOLOUR, A.ANIMALID,');
SQL.Add('S.ANIMALSIRESTATUS, S.ANIMALFIRSTSIREDATE');
SQL.Add('FROM ANIMAL A, ANIMALACTIVESIRES S');
SQL.Add('where (A.ANIMALID = S.ANIMALSIREID) AND');
SQL.Add('(A.ANIMALGENDE R = ''' + Gender + ''')');
SQL.Add('ORDER BY A.ANIMALIDENTIFICATION');
Prepare;
Open;
IF sID <> '' then // Don't search if no value.
Locate('ANIMALIDENTIFICATION',sID,[]);
end;
end;
...
end;
> I get error on prepare: FieldThis should be easy enough to reproduce.
> ANIMALACTIVESIRES.ANIMALSIRESTATUS not found.
I'll have a look at it.
Jason Wharton