An error occurred while logging on to the application interface using BDE to connect to SQL Server 2000. Why?

Source: Internet
Author: User
Tags sql server driver odbc sql server driver
An error occurred while logging on to the application interface using BDE to connect to SQL Server 2000. Why? Delphi/Windows SDK/API
Http://www.delphi2007.net/DelphiDB/html/delphi_20061218213005232.html
I use BDE to connect to SQL Server 2000 in the Application Program An error occurred while logging on to the interface. The prompt is as follows:
[Microsoft] [odbc SQL Server Driver] [SQL Server] user '(null)' Login Failed. Cause
It is not associated with a trusted SQL server connection.
What is the problem. Login button Code As follows:
Procedure tloginform. button1click (Sender: tobject );
VaR
Aname, apassword: string;
Begin
Aname: = trim (edit1.text );
Apassword: = trim (edit2.text );
Table1.open;
Table1.setkey;
Table1.fields [0]. asstring: = aname;
If table1.gotokey then
If table1.fields [1]. asstring = apassword then
If table1.fields [2]. asstring = 'internal Postmaster 'then
Begin
Table1.close;
Loginform. Hide;
Manageform. Show
End
Else
Begin
Table1.close;
Loginform. Hide;
Serveingform. Show
End
Else
Begin
Messagedlg ('you are not a legal user. Please exit! ', Mtinformation, [mbok], 0 );
Table1.close;
Loginform. close;
End;
End;
Thank you for your guidance.

Params in tdatabase is not assigned a value,
Database: = 'user name = sa Password = password '.

Is the database local or on another server? Are you authorized to access the database? The user name and password must be added when accessing the database ,,

The user and password for accessing the database are not set. The setting is OK.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.