Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC Connection Error

Status
Not open for further replies.

Rob7

Programmer
Dec 12, 2001
152
US
I have an executable that is trying to connect to a SQL database through and ODBC connection. It is failing to connect with the following error, and I am hoping that all I have to do is sync up user names and passwords in SQL but I am not sure. The failure is this:
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'servername\username'

Any help is appreciated.

Cytec Corporation
rbrown@cyteccorp.com
 
What is your connection string? That error shows that you didn't pass a correct username or password or both.

Borislav Borissov
 
This is the real problem. It is an exe that I can't open to see the code.

Rob

Cytec Corporation
rbrown@cyteccorp.com
 
can you create an user in ur sql with that login? then you dont need to change any code
 
There already is one. The user name has full rights to the target database.

Rob

Cytec Corporation
rbrown@cyteccorp.com
 
I dont know if this will helps, but if this application use a File DSN the file must be placed in c:\program files\Common Files\ODBS\Data Sources, you can open it and see how the application try to connect.
Also you can Start the Trace of the ODBC (I am not sure if in trace username and password are saved but you can try). Control Panel->Administration Tools->ODBC->Tracing

Borislav Borissov
 
This is a system DSN and I was able to trace the prgrammer who wrote the code. He says its a DSN-less connection and that he will re write the code to include a configuration file.

Thanks for your help

Rob

Cytec Corporation
rbrown@cyteccorp.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top