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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem in DSN using SQL Server Driver

Status
Not open for further replies.

FarzanaSaleem

Programmer
Jun 17, 2003
63
PK
I have made a System DSN with the following details:

Name: ABCDSN
Server: F123 (SQL-Server)
SQL Server Authentication Selected
Connect to SQL Server to obtain default settings (checked)
Login ID: abc
Password: abc

I have chosen SQL Server as a driver, when it is asked at the beginning of creating new data source.

In a VB form (VB 6.0), I dragged an ADO data control. I selected ABCDSN in Use ODBC Data Source Name Combo box. In the RecordSource tab, when I selected adcmdTable in Command Type combo box, following error message was shown:

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'domainname\username'

Domain Name and User Name, displayed in the error message, were those with which I logged in to the Local Area Network and not abc.

 
When you choose SQL authentication.You shouldnt put domain name.Because domain name is for NT authentication.Just type the account which has been added in the remote server as a sql authentication user!
 
I typed the account in SQL Server DSN Configuration Dialog Box as follows:

Login ID: abc
Password: abc

But I am still facing some problems:

1. When I finish the Configuration Wizard, ABCDSN appears in the System DSN tab. When I click Configure ... button, Login ID box shows abc but Password box is blank (I want to save password as well).

2. In Crystal Reports, I cliked Database -> Visual Linking Expert -> Tables -> Add Table -> ODBC -> ABCDSN. I again got the same error ([Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'domainname\username'. When I cliked the OK button on this error message box, a form was shown with caption SQL Server Login. Other details on this form were as follows:

Data Source: ABCDSN
Use trusted connection checked
Login id box: showing username with which I logged on to LAN and not abc. This text box was diabled
Password box: blank and disabled

I unchecked Use trusted connection checkbox. Login id and password box were now enabled. I typed abc in both boxes and clicked OK. Now all tables were shown in ABCDSN node in data explorer.

What I need is to avoid all this work, that is, when I click Database -> Visual Linking Expert -> Tables -> Add Table -> ODBC -> ABCDSN, all tables be shown immediately without any need to uncheck trusted connection and enter login id and password for each report.


 
In ADO connection string on your application,you should be having trusted connection = 'true' , you are supposed to have 'false'.

 
Forgot to answer question (1),because System DSN need to encrypt the password that has been setted up.Though you see blank pwd after creating it.It does contain the pwd you setted up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top