Solved

Problem while creating alias names

Posted on 2002-03-14
7
209 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
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.

 
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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…

856 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