Solved

Problem while creating alias names

Posted on 2002-03-14
7
210 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…

756 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