BrendaLeigh
Programmer
Hi There,
I am upgrading Crystal 16 bit 6.5 reports to Crystal 32 bit 8.5 reports. I am running them through Delphi 5. I can connect and run the reports fine if I use the SQL Query built by Crystal, but when I try to manipulate the SQL through code I get 'Error 534: Error Detected by Database DLL' I have verified that
1. The select portion is exactly the same in Delphi as it is in Crystal.
2. I have all the necessary dll's and they are up to date and in the right folder.
3. I have set the report name and connect properties before I attempt to change the SQL.
4. I have used the correct synatx to dynamically link to my database.
Here is a small sample code:
procedure TForm1.Button1Click(Sender: TObject);
begin
with crpe1 DO
begin
reportname := 'c:\ais32\reports\myreports\rpt1.rpt';
connect.userid := 'SYSDBA';
connect.password := 'masterkey';
connect.databasename := '<CRWDC>Database=' + 'ib6svr:d:\ais\testing\als-548.gdb';
SQL.Query.Add('Select Account_Balance from Address');
SQL.Query.Add('where adtype = "' + 'PH' + '"');
output := towindow;
show;
end;
end;
end.
I have tried using Retrieve to get the SQL before I change it, even though the help file says I don't need to , but nothing works! This is very frustrating as I have about 30 reports where I need to modify the SQL based on user selection. Any help is greatly appreciated.
I am upgrading Crystal 16 bit 6.5 reports to Crystal 32 bit 8.5 reports. I am running them through Delphi 5. I can connect and run the reports fine if I use the SQL Query built by Crystal, but when I try to manipulate the SQL through code I get 'Error 534: Error Detected by Database DLL' I have verified that
1. The select portion is exactly the same in Delphi as it is in Crystal.
2. I have all the necessary dll's and they are up to date and in the right folder.
3. I have set the report name and connect properties before I attempt to change the SQL.
4. I have used the correct synatx to dynamically link to my database.
Here is a small sample code:
procedure TForm1.Button1Click(Sender: TObject);
begin
with crpe1 DO
begin
reportname := 'c:\ais32\reports\myreports\rpt1.rpt';
connect.userid := 'SYSDBA';
connect.password := 'masterkey';
connect.databasename := '<CRWDC>Database=' + 'ib6svr:d:\ais\testing\als-548.gdb';
SQL.Query.Add('Select Account_Balance from Address');
SQL.Query.Add('where adtype = "' + 'PH' + '"');
output := towindow;
show;
end;
end;
end.
I have tried using Retrieve to get the SQL before I change it, even though the help file says I don't need to , but nothing works! This is very frustrating as I have about 30 reports where I need to modify the SQL based on user selection. Any help is greatly appreciated.