----- Original Message -----
From: Enrico Cima
To: IBObjects@yahoogroups.com
Sent: Wednesday, August 01, 2001 10:27 AM
Subject: PACKAGE sample
Dear Everybody,
I'm trying to create a component package in CBUILDER5 using a database connection done from the MAIN program. So I've seen the sample of IBC_SEACHGRID that do the same, but using DATASET from MAIN program.
Attached there is the code I've written for doing such a thing, but, unfortunately, sometimes works, sometimes not. In any case, when i put in the package the IB_NAVIGATION_BAR i obtain an error.
There is somebody who can give me some datails on how operate?
Many thanks to all.
----------
#include <vcl.h>
#pragma hdrstop
#include "U_Ins.h"
#include "DAT_GEN.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//
static inline void ValidCtrCheck(DAT_GEN *)
{
new DAT_GEN(NULL);
}
//---------------------------------------------------------------------------
__fastcall DAT_GEN::DAT_GEN(TComponent* Owner)
: TWinControl(Owner)
{
FDataConn = new TList();
// FDataTrans = new TList();
SetConnection(0);
// SetTransaction(0);