2

I have a problem connecting to SQL Server Express 2005 from Visual Studio 2008.

This is the connection string...

Public connect As New SqlConnection( _
    "Data Source=MERSI_IT_04\SQLEXPRESS;Initial Catalog=MERSIFAM;
    Integrated Security=True")

When running locally the connection completes successfully, however when the client running the script there is a connection error.

How can I fix this?

4
  • Client running connection were - in their environment? Also, is this an ASP.NET, WinForm or other application? And finally seeing actual error message would help too. As well as line of code that causes it Commented Oct 1, 2013 at 2:12
  • winform yuriy galanter Commented Oct 1, 2013 at 2:14
  • did you open the connection? connect.Open()? Commented Oct 1, 2013 at 2:46
  • yes iceheaven.. connect.open and connect.close Commented Oct 1, 2013 at 3:22

1 Answer 1

1

You most create one connection with UserName and Password.

And set SQL Server authentication on mix mode.

or you can use Windows authentication if you use Active Directory and all client are part of domain .

For create a Connection String in mix mode use this

Server=myServerAddress;Database=myDataBase;User Id=myUsername;
Password=myPassword;

and en total you can see this link : http://www.connectionstrings.com/sql-server/

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.