Subject Re: Connection problems next
Author hypmarie23
Thanks a lot for your comments. They make things clear.
Sorry but I have a few more questions :
1) How will I read the aliases.conf file ? Do I just have to put the
alias name in the connection property Aliasname or is there another
procedure ?
2)I have added "DefaultTransaction := IB_Transaction1;" to my code
concerning IB_Connection, so that they are now assigned both ways.
OK ?
3)I don't know what a TS desktop is.

--- In IBObjects@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 08:49 PM 2/06/2006, you wrote:
> >The location of the database on the new machine is : C:\Program
> >Files\Cocagne_Gest_Prod\Database\BDCOCAGNE_PLC.FDB
>
> If you are going to deploy this with a hard-wired location in a
> directory tree with spaces in the names, i.e. "Program Files" then
at
> least do it properly and use aliases.conf. That way, all you need
to
> do in your installer is write a record to aliases.conf for
the "root"
> of your application.
>
> It's also not a good idea to have database files inside the
Program
> Files tree. It's much better to have databases in their own tree
> with a short, spaceless name like "data".
>
> >The Server, Path and Protocol properties for my IB_connection are
> >defined in the part of code hereunder (Server ="", Path = FDBPath
> >( := ExtractFilePath(Application.ExeName)
> >+ 'Database\BDCOCAGNE_PLC.FDB'; protocol = cpLocal)
> >I installed a Super server on the other machine with the same
> >install exe as on my machine.
>
> cpLocal access isn't available if the application user is on a TS
> desktop. You should check that.
>
> >About your question concerning the last block of code (with
> >IB_Transaction1 do...) it's because I have an IB_Transaction
> >attached to the IB_Connection. Is there some thing wrong with it ?
>
> Well...your code is first connecting with the default transaction,
> which is created internally for the connection. Then it is
testing
> an unassigned transaction to see if it is started. How could it
be
> started if it doesn't belong to a connection?
>
> If you want your transaction to be the default transaction for the
> connection, assign it both ways *before* you start the connection,
> i.e. assign the ib_connection property of the transaction to your
> connection and assign that transaction to the connection's
> DefaultTransaction property.
>
> On the other hand, if you want to use the internal transaction as
the
> default transaction then just assign the ib_connection at design
time
> and keep it there until you are ready to use it for something.
>
> Helen
>