?
Solved

Connecting to SqlServer 2000 by BDE

Posted on 2003-03-04
8
Medium Priority
?
2,841 Views
Last Modified: 2013-11-23
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
0
Comment
Question by:s_arb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 1

Expert Comment

by:TAZI
ID: 8063286
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
 

Author Comment

by:s_arb
ID: 8063688
I tried that but i got the same error.
0
 
LVL 1

Expert Comment

by:TAZI
ID: 8063736
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Expert Comment

by:TAZI
ID: 8063798
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
 
LVL 1

Expert Comment

by:TAZI
ID: 8063807
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
 
LVL 9

Accepted Solution

by:
mocarts earned 210 total points
ID: 8064943
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
 
LVL 9

Expert Comment

by:mocarts
ID: 8065074
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
 

Author Comment

by:s_arb
ID: 8069843
Thank to all of you
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

777 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