Solved

lost alias

Posted on 1998-12-22
8
345 Views
Last Modified: 2013-11-24
Using:
- Windows 95 A
- DBase IV Tables

From time to time the alias is lost
create new alias is not every time practicable
0
Comment
Question by:tzigan
8 Comments
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352444
Hi tzigan,

Thus this happens on a particular moment?

Zif.

0
 

Author Comment

by:tzigan
ID: 1352445
I don't know the circumstances when alias ist lost.
But on the developing machine (Windows 98 / Windows 95 OSR2)
then problem was never to see - only on the cust machine with Wondows 95 A.
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1352446
Then it's very difficult to trace the problem..
0
 
LVL 3

Expert Comment

by:williams2
ID: 1352447
I have been working with DBase and Intrbase quite a lot, I used to create a custom alias at runtime, which is removed automatically after exiting.

It doesn't seem to be any slower than having one allready defined and your other applications can use the same handle aswell, but in all cases you don't have to register your alias at all. Tell me If you are interested.

Regards,
Williams
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 8

Expert Comment

by:ZifNab
ID: 1352448
hey, williams, great idea!
0
 
LVL 1

Accepted Solution

by:
rpetruni earned 100 total points
ID: 1352449
Yes, williams, good idea, i'm using it too.
Tzigan, your problem is really hard to trace, so i would recomend you to use aliasses at runtime, the process is really easy:
1.Put TDatabase on your MAinForm (or if you are using some other program for lounching your application - i doo - on it)
2. Double click on it
3.In Database Name, give your alias name,
4. In Database  DriverName, put STANDARD
5.Click on defaults:
You wil have those lines:
Path=
DefaultDriver=DBASE
Enable BCD=false
In path write path to your databases and woila, you have alias until you exit your application.
You could all this in code too...

0
 
LVL 3

Expert Comment

by:williams2
ID: 1352450
I guess this one is easier then?

and it works! No need for any special handling at all, this is it, and I have been using it on both Delphi2/3 in both win95/98/NT4.0 ..and it works in DOS command console mode too.

.

var
  DB1: TDatabase;
  Quesry: TQuesry

implementation

  procedure InitDB_and_Query(DatabaseName: String);
  begin
    db1 := TDatabase.create(nil);
    db1.databasename := DatabaseName;
    db1.drivername   := 'INTRBASE';

    db1.params.clear;
    db1.params.add('SERVER NAME=C:\DBELEV.GDB');
    db1.params.add('USER NAME=SYSDBA'); //Default name I've been using
    db1.params.add('OPEN MODE=READ/WRITE');
    db1.params.add('SCHEMA CACHE SIZE=8');
    db1.params.add('LANGDRIVER=');
    db1.params.add('SQLQRYMODE=');
    db1.params.add('SQLPASSTHRU MODE=SHARED AUTOCOMMIT');
    db1.params.add('SCHEMA CACHE TIME=-1');
    db1.params.add('MAX ROWS=-1');
    db1.params.add('BATCH COUNT=200');
    db1.params.add('ENABLE SCHEMA CACHE=FALSE');
    db1.params.add('SCHEMA CACHE DIR=');
    db1.params.add('PASSWORD=masterkey');//Default password I've been using

    db1.loginprompt  := false;
    db1.connected    := true;

    Query:= TQuery.create(nil);
    Query.databaseName:= DatabaseName;
    Query.requestLive:= true

  end;

initialization
  InitDB('test');
end.

Regards,
Williams
0
 
LVL 3

Expert Comment

by:williams2
ID: 1352451
..I for got the line:

db1.params.add('SERVER NAME=C:\DBELEV.GDB');

should be the physical database path and filename
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

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…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

910 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