Subject | Re: [IBO] Re: Connecting to Mac OS |
---|---|
Author | Helen Borrie |
Post date | 2011-06-16T08:15:34Z |
At 10:41 AM 16/06/2011, you wrote:
In TIB_Connection and its derivatives you have:
Server: the host name of the server where Firebird and the databases live
Path: the path (local to the host and using the host's file system naming conventions, which are not the same as Windows')
Protocol: which for a Windows client accessing a MacOSX server, can not be anything but cpTcp_ip.
It is the Path element that you store in aliases.conf on the Mac. Use the POSIX filesystem convention, not the Windows one, or it won't work.
If you want your app to connect to a test DB on a Windows host, set its (local to Windows) Path in aliases.conf, using the same alias name you are using for the production server on the MacOSX host.
Never hard-code anything if there's a way not to. Forget "DatabasePath" - it's an old legacy from the Borland/Paradox model that is present in IBO for compatibility with the BDE, which has been dead for more than a decade. Just don't use it at all...leave it nil EVERYWHERE. Use the IB_Connection and IB_Transaction properties of statement objects to hook them up to the IB_Connection object.
Helen
>> But if you're developing on Windows (as you must be) and deploying the server on another platform, then you have the strongest possible reason to get away from "the database path" at application level and use aliases.conf.Umm...study the IBO documentation and the Firebird Quick Start Guides and make yourself clear about the elements of a remote connection.
>>
>> Helen
>
>If I add an alias named "customers" to aliases.conf, then I just change the TIB_Connection.DatabaseName to "Customers" and that's all there is to it?
In TIB_Connection and its derivatives you have:
Server: the host name of the server where Firebird and the databases live
Path: the path (local to the host and using the host's file system naming conventions, which are not the same as Windows')
Protocol: which for a Windows client accessing a MacOSX server, can not be anything but cpTcp_ip.
It is the Path element that you store in aliases.conf on the Mac. Use the POSIX filesystem convention, not the Windows one, or it won't work.
If you want your app to connect to a test DB on a Windows host, set its (local to Windows) Path in aliases.conf, using the same alias name you are using for the production server on the MacOSX host.
Never hard-code anything if there's a way not to. Forget "DatabasePath" - it's an old legacy from the Borland/Paradox model that is present in IBO for compatibility with the BDE, which has been dead for more than a decade. Just don't use it at all...leave it nil EVERYWHERE. Use the IB_Connection and IB_Transaction properties of statement objects to hook them up to the IB_Connection object.
Helen