Solved

lost alias

Posted on 1998-12-22
8
338 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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)…
Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

757 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

18 Experts available now in Live!

Get 1:1 Help Now