Connecting to SqlServer 2000 by BDE

Hi

  I want to connect to SqlServer2k by BDE.My application
is in Delphi 7 and i use MSSQL from BDE to connect.
When i try this i get this message:

BDE Error:10036
Unknown user name or password.

BDE Error:13059
Server Error:18452
Login failed for user 'username'. Reason: Not associated with a trusted SQL Server connection.

BDE Error:13059
Server Error:10003
Login incorrect.

I can connect to SqlServer by ADO without problem.

Thanks
s_arbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TAZICommented:
Hi

Install SQLLinks onto the machine and then do the following

Drop a TDatabase Component on your form and set the properties as follows

AliasName = <blank> or <null>
Connected = False
DatabaseName = Your DB Name
KeepConnected = False
LoginPrompt = False
Name = Database1

Add the following procedure to your application

procedure TForm1.Reconnect;
begin
   Database1.KeepConnection := False;
   Database1.Connected := False;
   Database1.params.clear;
   Database1.params.Add('USER NAME=sa');
   Database1.params.Add('PASSWORD=' + DBPassword.Text);
   Database1.params.Add('DATABASE NAME='+DatabaseName.Text);
   Database1.params.Add('SERVER NAME='+ServerName.Text);
   Database1.params.Add('MAX QUERY TIMEOUT=-1');
   Database1.params.Add('HOST NAME=' + WindowsUserName);
   Database1.params.Add('TIME OUT=-1');
   Database1.Connected := True;
end;

procedure TForm1.OnFormCreate(Sender : TObject)
begin
  Reconnect; //This will connect you to sql server
end;

Hope this information helps
Regards
TAZI
0
s_arbAuthor Commented:
I tried that but i got the same error.
0
TAZICommented:
Hi

I use this all the time ... but I do it via Delphi5

I don't see why you're having a problem

Will continue checking and keep you informed

Regards
TAZI
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

TAZICommented:
Hi

I've just tested it on a machine thats running Windows 2000 and Delphi 7 connecting to SQL SERVER 2000.  It works 100% no errors.

Make sure you have the BDE SQL Links installed.

There are 2 files that are required

ntwdblib.dll and dbnmpntw.dll ..... they should reside in the system32 folder.

Regards
TAZI
0
TAZICommented:
If this does not work ... send me your test app

email: mumtazm@mbd.co.za

I will then look at it from this side.

Regards
TAZI
0
mocartsCommented:
check authentication mode of your SQL server, ensure SQL Server authentication mode is selected (in Enterprise Manager you can change this in Server Properties dialog under Security tab clear (uncheck) "Windows NT only" check box)
wbr, mo.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mocartsCommented:
to chagne in Registry:
under HKEY_LOCAL_MACHINE\Software\Microsoft\MSSqlserver\MSSqlServer\ key find LoginMode subkey and change it to 2 (Hexdecimal)

more info:
http://support.microsoft.com/default.aspx?scid=KB;en-us;q325022#7a

wbr, mo.
0
s_arbAuthor Commented:
Thank to all of you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.