Solved

Problem while creating alias names

Posted on 2002-03-14
7
205 Views
Last Modified: 2011-10-03
I'm Working with Delphi 5 and MSSQL 7. and using around 50 databases.. so i have to create aliases for each databases..now l can't create more aliases, while creating the alias thru alias manager this error occurs " Unable to write to configuration file" i think it is a config. settings problem. How can i create more aliases?
0
Comment
Question by:sumeesh
  • 2
  • 2
  • 2
  • +1
7 Comments
 

Author Comment

by:sumeesh
ID: 6864821
Urgent
0
 
LVL 4

Accepted Solution

by:
nestorua earned 50 total points
ID: 6865229
HI,
What a number of aliases is the maximum in your case?
Sincerely,
Nestorua.
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6866202
Hi Sumeesh,

When you say 50 databases, do you mean 50 databases or 50 tables?

Here's the code I use to create a BDE alias to a MS-SQL Server 2000 database:

var
  Params: TStringList;
begin
  Params := TStringList.Create;
  try
    Params.Add('USER NAME=SA');
    Params.Add('SERVER NAME=MSSQL2KSVR');
    Params.Add('DATABASE NAME=NEW17LOCAL');
    Session.AddAlias('TESTMSSQL','MSSQL', Params);
    Session.SaveConfigFile;
  finally
    Params.Free;
  end;
end;

If you're still getting configuration file errors, then you have a corrupt BDE.  Try reinstalling the BDE off the Delphi CD.

Hope this helps,

Stu
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Expert Comment

by:IPCH
ID: 6867470
Why don't you use TDatabase component?

Ivan
0
 

Author Comment

by:sumeesh
ID: 6868575
i need around 50 alias per fin. year.. for the next year i want 50 more also...
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 6876023
sumeesh,

Can I ask why nestorua got the points for this question when he provided no answer?  I provided working code as to how to create an alias within Delphi and you didn't even give me the courtesy of providing a reason why my code was useless too you.  I have no problems with other people getting points for something, but not when their post was a question, and especially when I provided a working answer!

Kindly explain...
0
 
LVL 2

Expert Comment

by:IPCH
ID: 6876166
Same as Stuart Johnson

Ivan
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

911 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

15 Experts available now in Live!

Get 1:1 Help Now