Login failed error

  • One of my VB.Net programs would not connect to SQL Server. I get the following error when I try to connect to server.

     

    Login failed for user ‘HQPROD\honlot’.

     

    I can login as my self and run the program without any problem. On the client pc user ‘honlot’ has administrative rights. On the Windows 2000 server ‘honlot  is a member of Administrators. On the SQL Server 2000 honlot has db owner permissions to the all the databases. HQPROD is the name of our domain. The PC that’s try to connect to is part of the WORKGROUP group, but not part of the domain. Why is it saying login failed for ‘HQPROD\honlot’ with domain name attached to user name. How do I have to do to connect SQL server?

     


    Kindest Regards,

    Shami

  • If you are trying to use Windows Authentication and have only logged into a workgroup, then that is what the problem is!

    You need to get the workstation configured to join the Windows Domain. Alternatively, you could use SQL Server Authentication if you do not wish to have that workstation join a Windows Domain.


    Kindest Regards,

  • I don't want to join the workstation to the domain, because if the domain goes down the workstation goes down too. We use to have all our workstation join to the domain and when the domain control goes down all the workstations go down too.

     

    I think my problem is in the connection string. Here is the connection string I use to connect to a database in VB 6.0.

     

    ConnectString=Provider=SQLOLEDB.1;Persist Security Info=true;User ID=honlot;Password="";Initial Catalog=LotCtrlS9V;Data Source=sqlv

     

    I tried to use the same connection string in VB.net but it didn’t work. So I changed the connection string to this:

     

    ConnectString=Server=SQLV;Database=LotCtrlS9V;Integrated Security=True

     

    How should I update this connection string to work with my VB.Net program and use SQL Server authentication?

     

    Also my development pc is using TCP/IP protocol. And the workstation is Named Pipes. I don’t know how to change it to TCP/IP since SQL server is not installed on the Workstation. Could this be a problem too?  


    Kindest Regards,

    Shami

  • If you want to use SQL Server authentication create a SQL login named honlot and update your first connection string to include the password.

    To change the protocol to TCP/IP on the workstation, run cliconfg.exe, which is installed by default on all computers running MDAC.

    I hope this helps.


    Joseph

  • I learned yesterday of the website for connection strings named appropriately:

    http://www.connectionstrings.com/

     

    Go to this website, click SQL Server and then click SQLConnection (.NET). There are several connection strings for standard and integrated security

    There is also a lot of connection strings for all databases and all type of drivers for those databases.

    Yelena

     

    Regards,Yelena Varsha

  • I changed my coneection string to the following and it works now.

    ConnectString=Persist Security Info=true;User ID=honlot;Password="";Initial Catalog=LotCtrlS9V;Data Source=sqlv

    Thank you all for your help.


    Kindest Regards,

    Shami

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply