Subject Re: [IBO] DatabaseName cannot be blank?
Author Helen Borrie
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 TIBOQuery
> > >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.