Link to home
Start Free TrialLog in
Avatar of sumeesh
sumeesh

asked on

Problem while creating alias names

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?
Avatar of sumeesh
sumeesh

ASKER

Urgent
ASKER CERTIFIED SOLUTION
Avatar of nestorua
nestorua

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Why don't you use TDatabase component?

Ivan
Avatar of sumeesh

ASKER

i need around 50 alias per fin. year.. for the next year i want 50 more also...
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...
Same as Stuart Johnson

Ivan