Subject Re: [IBO] DatabaseName cannot be blank?
Author Steve Harp
--- In, Helen Borrie <helebor@t...> wrote:
> At 12:08 PM 5/05/2005 +0000, you wrote:
> >--- In, Helen Borrie <helebor@t...> wrote:
> > > At 01:00 AM 5/05/2005 +0000, you wrote:
> > > >Hi All,
> > > >
> > > >I've started getting this error with an existing application
when it
> > > >tries to open a TIBOQuery object. I don't understand the error
> > > >because the DatabaseName property for the TIB_Connection and the
> > > >TIBOQuery are both set. In fact, the DatabaseName for the
> > > >is populated automatically when the IB_Connection property is set.
> > > >
> > > >I'm sure this is a simple fix, but what have I done to screw
things up?
> > >
> > > Check whether you have inadvertently deleted/altered any of the
> > > TIB_Connection properties Path, Server or Protocol.
> > >
> >I'm setting Server, UserName, Password, Path, PageSize, and Protocol.
> > Besides, the TIB_Connection object is openning without errors; it's
> >the TIBOQuery object that's failing. The TIBOQuery object has the
> >IB_Connection property set to the TIB_Connection object which, inturn,
> >sets the DatabaseName property.
> This sounds fuzzy. TIB_Connection constructs DatabaseName in the
IDE and
> ignores it thereafter. You can use it for a "friendly name" of your
> choice, if you wish.
> If you're using an IB_Connection object instead of a TIBODatabase, then
> drop a TIBOTransaction into your datamodule. Set its IB_Connection
> property and, if you are only using a single transaction, select this
> transaction for your IB_Connection's DefaultTransaction.
> Set the IB_Connection property of the TIBOQuery to your
IB_Connection. IBO
> should then do all the necessary things and make sure that the query is
> linked to the right database.
Setting the DefaultTransaction had no effect. The only thing I've
changed with respect to the data module is that I've added a 2nd
TIB_Connection object to connect to a 2nd database. Both
TIB_Connections share the same TIB_Transaction object (IB_Connection
and IB_Connection1). The TIBOQuery that I'm having trouble with is
connected to the first/original TIB_Connection and no changes were
made to this. The 2nd TIB_Connection is used by other query objects
in another data module. Since the program fails on the first
TIBOQuery it tries to open, I don't know if queries in that other data
module would work or not. If I comment out the 1st query, the next in
line fails with the same error.