Subject | Re: Unable to open IBOTable in run-time |
---|---|
Author | Danie |
Post date | 2006-07-17T09:19:59Z |
Hi Helen,
Thanks for the reply,
I am opening the connection and the dataset explisitly, but it only
works when I open it from within the module which contains the
IBODatabase or IB_Connection,
//This works fine
//This code is from a connect function in a datamodule, which
//contains the connection component
dbPanstrat.Server := #ServerName;
dbPanstrat.Path := #Path_to_db;
dbPanstrat.Username := #Username;
dbPanstrat.Password := #Password;
dbPanstrat.SQLDialect := 1;
dbPanstrat.Protocol := cpTCP_IP;
dbPanstrat.Connect;
//After this the login screen is shown, and on the OnShow event the
//following tables are opened:
dmConfiguration.wtblUsers.Open;
dmConfiguration.wtblTills.Open;
dmConfiguration.wtblShifts.Open;
*dmConfiguration is a datamodule
When the any of these Open commands are executed the application
hangs but if I were to Open these datasets from within the
datamodule which contains the connection component, it works.
Thanks for the reply,
I am opening the connection and the dataset explisitly, but it only
works when I open it from within the module which contains the
IBODatabase or IB_Connection,
//This works fine
//This code is from a connect function in a datamodule, which
//contains the connection component
dbPanstrat.Server := #ServerName;
dbPanstrat.Path := #Path_to_db;
dbPanstrat.Username := #Username;
dbPanstrat.Password := #Password;
dbPanstrat.SQLDialect := 1;
dbPanstrat.Protocol := cpTCP_IP;
dbPanstrat.Connect;
//After this the login screen is shown, and on the OnShow event the
//following tables are opened:
dmConfiguration.wtblUsers.Open;
dmConfiguration.wtblTills.Open;
dmConfiguration.wtblShifts.Open;
*dmConfiguration is a datamodule
When the any of these Open commands are executed the application
hangs but if I were to Open these datasets from within the
datamodule which contains the connection component, it works.
--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 06:01 PM 17/07/2006, you wrote:
> >I am working with Firebird 1.5 and Delphi 7.
> >
> >I am using the latest evaluation version of IBO and used the
GReplace
> >tool to convert the BDE components to IBO, all of which worked
fine.
> >
> >The problem now is that I can open the IBOTable components at
> >design-time, but at run-time, I can only open the component from
> >within the datamodule that contains the database or connection
> >component, if I try to open a IBOTable component from within
another
> >datamodule or form it fails.
> >
> >I have tried to create a new unit and drop a IBOTable component on
> >it, but I get the same result, if I try to open the IBOTable
> >component my application just hangs.
> >
> >The same thing happens with IBOQuery and TIB_Query components.
> >
> >Any help on this issue would be appreciated.
>
> IBO's normal behaviour is to require you to open both the
connection
> and the datasets explicitly, unlike the BDE, which opens
everything
> by default. What does your data access code look like at present?
>
> Helen
>