Solved

Database Connection Err .

Posted on 2001-07-19
6
193 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
  • 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now