Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-05

IBConnection isc_attach_database() remote server connection

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

Hi all,

i don't know if this is fixed already, but for Interbase/Firebird to connect to a remote server you need to add the FQDN/IP to the database name, i.e. HostName + ':' + DatabaseName for the the second and third arg on isc_attach_database function call.

It's on the API ;)

Some examples,
http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_prog_api

regards,

Dimitrios Chr. Ioannidis Firebird Project Administrator www.firebirdsql.org IBPhoenix, Ltd www.ibphoenix.com

Reply by email

Michael Van Canneyt
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 6 lines
Hi all, i don't know if this is fixed already, but for Interbase/Firebird to connect to a remote server you need to add the FQDN/IP to the database name, i.e. HostName + ':' + DatabaseName for the the second and third arg on isc_attach_database function call.

And where exactly is this a problem ?

Michael.

Reply by email

Dimitrios Chr. Ioannidis
to Michael Van Canneyt

Michael Hi,

Show quoted text 6 lines
> i don't know if this is fixed already, but for Interbase/Firebird to > connect to a remote server you need to add the FQDN/IP to the > database name, i.e. HostName + ':' + DatabaseName for the the second > and third arg on isc_attach_database function call. And where exactly is this a problem ?

in TIBConnection there is a property Hostname. So, people expect to put there the Server Name or IP and the location of the DB in the DatabaseName property. But in IBConnection unit in isc_attach_database, only the DatabaseName is used.

Of course if you include the Server Name / IP in DatabaseName all is working fine but i think that in that case the HostName property just confuse people.

regards,

Dimitrios Chr. Ioannidis Firebird Project Administrator www.firebirdsql.org IBPhoenix, Ltd www.ibphoenix.com

Reply by email

Joost van der Sluis
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 6 lines
in TIBConnection there is a property Hostname. So, people expect to put there the Server Name or IP and the location of the DB in the DatabaseName property. But in IBConnection unit in isc_attach_database, only the DatabaseName is used.

Can you submit a bug-report to www.freepasbal.org/bugs ?

Joost

Reply by email

Dimitrios Chr. Ioannidis
to Joost van der Sluis

Joost Hi,

Show quoted text 9 lines
> in TIBConnection there is a property Hostname. So, people expect to > put > there the Server Name or IP and the location of the DB in the > DatabaseName property. But in IBConnection unit in > isc_attach_database, > only the DatabaseName is used. > Can you submit a bug-report to www.freepasbal.org/bugs ?

I don't see any reason. :)

In Lazarus 0.9.14 Beta for Win32 in interbase unit there is :

Show quoted text 5 lines
FSQLDatabaseHandle := nil; if isc_attach_database(@FStatus, Length(DatabaseName), @DatabaseName[1], @FSQLDatabaseHandle, Length(DPB), @DPB[1]) 0 then CheckError('DoInternalConnect', FStatus);

but in fpc/fcl/db/sqldb/interbase HEAD ( checked out today ) in same interbase unit there is :

Show quoted text 8 lines
FSQLDatabaseHandle := nil; if HostName '' then ADatabaseName := HostName+':'+DatabaseName else ADatabaseName := DatabaseName; if isc_attach_database(@FStatus, Length(ADatabaseName), @ADatabaseName[1], @FSQLDatabaseHandle, Length(DPB), @DPB[1]) 0 then CheckError('DoInternalConnect', FStatus); SetDBDialect;

so there is no issue for TCP/IP Remote connection, only for WNET ( NetBeui ) for windows.

Maybe a Win32 ifdef property named, let's say, Protocol with enumerated values ( Embedded, TCP/IP, NetBeui ) must be implemented for Win32 ? I'm still looking at the code to be familiar with it ...

regards,

Dimitrios Chr. Ioannidis

Reply by email

Joost van der Sluis
to Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 13 lines
Joost Hi, >> in TIBConnection there is a property Hostname. So, people expect to >> put >> there the Server Name or IP and the location of the DB in the >> DatabaseName property. But in IBConnection unit in >> isc_attach_database, >> only the DatabaseName is used. >> > > Can you submit a bug-report to www.freepasbal.org/bugs ? I don't see any reason. :) In Lazarus 0.9.14 Beta for Win32 in interbase unit there is :

Ah, already fixed. ;)

Show quoted text 6 lines
so there is no issue for TCP/IP Remote connection, only for WNET ( NetBeui ) for windows. Maybe a Win32 ifdef property named, let's say, Protocol with enumerated values ( Embedded, TCP/IP, NetBeui ) must be implemented for Win32 ? I'm still looking at the code to be familiar with it ...

I would say: kick NetBeui. And for embedded you need also some ifdefs...

Joost.

Reply by email

Michael Van Canneyt
to Joost van der Sluis
Joost van der Sluis wrote 25 lines
On Thu, 2006-05-11 at 21:16 +0300, Dimitrios Chr. Ioannidis wrote: > Joost Hi, >>> in TIBConnection there is a property Hostname. So, people expect to >>> put >>> there the Server Name or IP and the location of the DB in the >>> DatabaseName property. But in IBConnection unit in >>> isc_attach_database, >>> only the DatabaseName is used. >>> >> >> Can you submit a bug-report to www.freepasbal.org/bugs ? > I don't see any reason. :) > > In Lazarus 0.9.14 Beta for Win32 in interbase unit there is : Ah, already fixed. ;) > so there is no issue for TCP/IP Remote connection, only for WNET ( > NetBeui ) for windows. > > Maybe a Win32 ifdef property named, let's say, Protocol with enumerated > values ( Embedded, TCP/IP, NetBeui ) must be implemented for Win32 ? > I'm still looking at the code to be familiar with it ... I would say: kick NetBeui. And for embedded you need also some ifdefs...

Not true.
Embedded works already, I took care of that :-)

Michael.

Reply by email