?
Solved

lost alias

Posted on 1998-12-22
8
Medium Priority
?
354 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
[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
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
LVL 8

Expert Comment

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

Accepted Solution

by:
rpetruni earned 400 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

801 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