Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Database Connection Err .

Posted on 2001-07-19
6
Medium Priority
?
202 Views
Last Modified: 2010-05-18
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\ABCDB.GDB);
    sList.add('User Name=' + 'SYSDBA');
    sList.Add('SQLQRYMODE:SERVER');
    Session.AddAlias('ABCDBAlias', 'INTRBASE', sList);
    Session.SaveConfigFile;
    FDatabase := TDatabase.create(application);
    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.
0
Comment
Question by:ivylnm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6301063
which network-protocol is used?
0
 

Author Comment

by:ivylnm
ID: 6301203
Network protocol?? What do you mean? Netbeui??
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6301285
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:pathmydatabase.gdb"
  (example) = "mtnbkr:d:ibserverexamplesemployee.gdb"

SPX/IPX
  (syntax) = "server_name@volume:pathmydatabase.gdb"
  (example) = "flash@sys:interbasexamplesemployee.gdb"

NetBeui
  (syntax) = "server_namedrive:pathmydatabase.gdb"
  (example) = "mtnbkrd:ibserverexamplesemployee.gdb"


-- paste end

see also
http://community.borland.com/article/interbase/trbshot_ib_connection_errs.pdf

meikl ;-)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:ivylnm
ID: 6301346
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:SERVER');
   Session.AddAlias('ABCDBAlias', 'INTRBASE', sList);
   Session.SaveConfigFile;
   FDatabase := TDatabase.create(application);
   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.
0
 

Author Comment

by:ivylnm
ID: 6301363
I actually test on IVYC:IVYFOLDER\ABCDB.GDB as mentioned .  But it failed!
0
 
LVL 1

Accepted Solution

by:
Johnch earned 300 total points
ID: 6301439
Try the following to connect to

NameofServer:Drive:\Folder\database.gdb

So I presume IVY is your Server and your database is located at c:\ivyfolder\abcdb.bdg


IVY:C:\IVYFOLDER\ABCDB.GDB



John.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question