ivylnm
asked on
Database Connection Err .
I cannot understand how to connect to database located at another machine. This is what I have done for the program and the error message shown below appears.
sList := TStringList.Create;
sList.add('Server Name=\\IVY\C\IVYFOLDER\ABC DB.GDB);
sList.add('User Name=' + 'SYSDBA');
sList.Add('SQLQRYMODE:SERV ER');
Session.AddAlias('ABCDBAli as', 'INTRBASE', sList);
Session.SaveConfigFile;
FDatabase := TDatabase.create(applicati on);
with FDatabase do begin
AliasName := 'ABCDBAlias';
DatabaseName := 'db';
LoginPrompt := false;
with Params do begin
Clear;
Add('user=sysdba');
Add('password=masterkey');
end;
Connected := true;
end;
Project abc.exe raised exception class
EDBEngineError with message
'Unknown database. Unable to
complete network request to
host "Ivy". Fialed to establish
a connection.
Alias:db'. Process stopped. Use
Step or Run to continue.
For information, I am using Delphi4 and I have LAN network over my PC and 'IVY' Pc.
sList := TStringList.Create;
sList.add('Server Name=\\IVY\C\IVYFOLDER\ABC
sList.add('User Name=' + 'SYSDBA');
sList.Add('SQLQRYMODE:SERV
Session.AddAlias('ABCDBAli
Session.SaveConfigFile;
FDatabase := TDatabase.create(applicati
with FDatabase do begin
AliasName := 'ABCDBAlias';
DatabaseName := 'db';
LoginPrompt := false;
with Params do begin
Clear;
Add('user=sysdba');
Add('password=masterkey');
end;
Connected := true;
end;
Project abc.exe raised exception class
EDBEngineError with message
'Unknown database. Unable to
complete network request to
host "Ivy". Fialed to establish
a connection.
Alias:db'. Process stopped. Use
Step or Run to continue.
For information, I am using Delphi4 and I have LAN network over my PC and 'IVY' Pc.
which network-protocol is used?
ASKER
Network protocol?? What do you mean? Netbeui??
from borland:
--- paste begin
Problem:
How to specify my protocol of choice via the connect string.
Solution:
Supported protocols by platform:
Unix:
TCP/IP
Windows:
TCP/IP
NetBeui
Novell:
TCP/IP
IPX/SPX (InterBase 16bit only) InterBase version V4.0A(4)
IPX/SPX (InterBase 32bit) InterBase version V4.2.2
"Remote" connection string syntax:
TCP/IP
(syntax) = "server_name:drive:pathmyd atabase.gd b"
(example) = "mtnbkr:d:ibserverexamples employee.g db"
SPX/IPX
(syntax) = "server_name@volume:pathmy database.g db"
(example) = "flash@sys:interbasexample semployee. gdb"
NetBeui
(syntax) = "server_namedrive:pathmyda tabase.gdb "
(example) = "mtnbkrd:ibserverexamplese mployee.gd b"
-- paste end
see also
http://community.borland.com/article/interbase/trbshot_ib_connection_errs.pdf
meikl ;-)
--- paste begin
Problem:
How to specify my protocol of choice via the connect string.
Solution:
Supported protocols by platform:
Unix:
TCP/IP
Windows:
TCP/IP
NetBeui
Novell:
TCP/IP
IPX/SPX (InterBase 16bit only) InterBase version V4.0A(4)
IPX/SPX (InterBase 32bit) InterBase version V4.2.2
"Remote" connection string syntax:
TCP/IP
(syntax) = "server_name:drive:pathmyd
(example) = "mtnbkr:d:ibserverexamples
SPX/IPX
(syntax) = "server_name@volume:pathmy
(example) = "flash@sys:interbasexample
NetBeui
(syntax) = "server_namedrive:pathmyda
(example) = "mtnbkrd:ibserverexamplese
-- paste end
see also
http://community.borland.com/article/interbase/trbshot_ib_connection_errs.pdf
meikl ;-)
ASKER
so if my protocol is NetBeui, i just make changes as below ya:
sList := TStringList.Create;
sList.add('Server Name=IVY:C:IVYFOLDER\ABCDB .GDB);
sList.add('User Name=' + 'SYSDBA');
sList.Add('SQLQRYMODE:SERV ER');
Session.AddAlias('ABCDBAli as', 'INTRBASE', sList);
Session.SaveConfigFile;
FDatabase := TDatabase.create(applicati on);
with FDatabase do begin
AliasName := 'ABCDBAlias';
DatabaseName := 'db';
LoginPrompt := false;
with Params do begin
Clear;
Add('user=sysdba');
Add('password=masterkey');
end;
Connected := true;
end;
I will try later on if above is correct.
sList := TStringList.Create;
sList.add('Server Name=IVY:C:IVYFOLDER\ABCDB
sList.add('User Name=' + 'SYSDBA');
sList.Add('SQLQRYMODE:SERV
Session.AddAlias('ABCDBAli
Session.SaveConfigFile;
FDatabase := TDatabase.create(applicati
with FDatabase do begin
AliasName := 'ABCDBAlias';
DatabaseName := 'db';
LoginPrompt := false;
with Params do begin
Clear;
Add('user=sysdba');
Add('password=masterkey');
end;
Connected := true;
end;
I will try later on if above is correct.
ASKER
I actually test on IVYC:IVYFOLDER\ABCDB.GDB as mentioned . But it failed!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.