MS Access and distributable
What do I need to distribute with an application that uses a Microsoft
Access (mdb) database as its source for reports?
It works well on all development machines but gives an ODBC parameter error
when previewing a report on any other machine. Even though the machines
have M/S Access loaded. I looked in the demos\end User databases but didn't
quite understand what I was supposed to do. It also only showed a folder
for access97 and not 2000 (I am running reportBuilder 7).
Thanks in advance for any help,
Karen
Access (mdb) database as its source for reports?
It works well on all development machines but gives an ODBC parameter error
when previewing a report on any other machine. Even though the machines
have M/S Access loaded. I looked in the demos\end User databases but didn't
quite understand what I was supposed to do. It also only showed a folder
for access97 and not 2000 (I am running reportBuilder 7).
Thanks in advance for any help,
Karen
This discussion has been closed.
Comments
1. To link in the ReportBuilder DADE plug-in for ADO, you need to include
daADO in the uses clause of the application.
2. Delphi enables applications to be compiled by linking all .dcu's into a
single .exe or by dynamically linking packages (i.e. build with run-time
packages). If you are building the application with run-time packages, then
the .exe is smaller, but you need to deploy the run-time packages. See the
RB Developers Guide for a list.
3. ReportBuilder uses Delphi's ADO data-access components. Here is an
article that found by searching Google. It discusses how to deploy Delphi
ADO applications.
http://delphi.about.com/library/weekly/aa021502a.htm
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
The daADO was already in there. The library path is included and I am not
using the runtime packages. To be safe I gave them those just in case - no
difference.
We also loaded the latest version of the MDAC with no change.
It ONLY fails on the Report Builder reports - accessing and editing the
database works fine from the application so I don't think it is a delphi ADO
issue. They can pull up the report in the Print Previewer (data, calc and
design tabs only), look at the data settings (which appear correct), but if
they preview the report, they get the error below. Any development machine
works fine.
[Microsoft][ODBC] Microsoft Access driver too few paramers. Expected 2.
Its confusing because it works all day on other machines. Any other
direction I can look?
Thanks,
Karen
The Designer.DataSettings are used to create new queries. Once a query is
created, the DataSettings are saved as part of the query definition. You may
have created some reports that contain querys that do not reference a valid
connection object.
We recommend that you place a TADOConnection component on the
form/datamodule that contains the TppReport component. Configure the
TADOConnection component with the appropriate connection parameters for the
database. Configure the TppDesigner.DataSettings.DatabaseName property to
reference the TADOConnection component. With this configuration all new
queries will use the TADOConnection and you can modify its connection string
at any time to change the connection.
ReportBuilder does not itself contain any ADO logic other than the daADO.pas
unit which uses the Delphi TADOConnection and TADOQuery classes.
We have thousands of users using ADO and ReportBuilder but no reports of
deployment issues - so I am guessing at what might be causing the issue.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
reported it as a sql error. On inspection the database on the two machines
WERE different (one had more fields than another) and since the 'all fields'
option was used when the report was made it was referencing a field that was
not there.
A stupid error on my part - sorry to have taken up your time. Your help was
greatly appreciated.
Karen
Glad to hear the issue is resolved.
--
Nard Moseley
Digital Metaphors Corporation
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com