Home DADE

SQL Anywhere and Report Builder

edited December 2003 in DADE
Hi,

I am trying to create a dataView and dataModule on the report for the data
dictionary selection.
I have downloaded and installed the NativeDb support for Report Builder.
I am using :- Delphi 7.0, SQLA 8.0/9.0 and RB 7.02 version

Here is a sample code for it .

procedure TfrmQueryWizard.CreateDataView;
var
lDataView: TdaNDBQueryDataView;

begin
lDataModule := daGetDataModule( Report);
FreeObject( lDataModule);
lDataModule := tdaDataModule.CreateForReport( Report);
lDataModule.FreeNotification( self);

lDataView := TdaNDBQueryDataView.Create( lDataModule);
lDataView.FreeNotification( self);
lDataView.Parent := lDataModule;
lDataView.Init;
SQL := lDataView.SQL;
// set SQL properties
SQL.Session := lDataView.Session;
SQL.DataDictionary := ReportWriterApplication.Dictionary.DataDictionary;
SQL.DatabaseName := LocalDataName;
end;

Native Db sample application work's great but when i used with the above
code it give me an access violation.

Can you help me what I'am missing here.



Thanks

-Bhoj

Comments

This discussion has been closed.