Solved

Database Connection Err .

Posted on 2001-07-19
6
199 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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