Link to home
Start Free TrialLog in
Avatar of tzigan
tziganFlag for Germany

asked on

lost alias

Using:
- Windows 95 A
- DBase IV Tables

From time to time the alias is lost
create new alias is not every time practicable
Avatar of ZifNab
ZifNab

Hi tzigan,

Thus this happens on a particular moment?

Zif.

Avatar of tzigan

ASKER

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.
Then it's very difficult to trace the problem..
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
hey, williams, great idea!
ASKER CERTIFIED SOLUTION
Avatar of rpetruni
rpetruni

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
..I for got the line:

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

should be the physical database path and filename