Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

lost alias

Posted on 1998-12-22
8
Medium Priority
?
358 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
This collection of functions covers all the normal rounding methods of just about any numeric value.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
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…

636 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