Connection String
-
Saturday, December 08, 2012 9:12 PM
Hello there, I have created a windows form using ADO.NET inside of it to write/update/delete from a table in my SQL server.
Now my porject is working fine with no problems with I use it on my PC where I created my SQL database table, but what I want not is to install this windows form on another machine which is connected to the same network at my work, but I dont know how can I change the connection string so that the other machine could access it from my machine through our work network.
Here is my connection string right now which is working fine locally:
Dim cn As New SqlConnection cn.ConnectionString = "Data Source=.;Initial Catalog=master;Integrated Security=True"
Now to access my pc at work I have to enter a user namer and password for windows to be able to be logged in, lets say my user name is operator and pass is 123, what changes do I have to do to this code to make it work? Note that I am using Visual Studio 2010 and VB.NET, thanx in advance.- Moved by ArthurZMVP Monday, December 17, 2012 2:57 PM Does not relate to SSIS (From:SQL Server Integration Services)
All Replies
-
Saturday, December 08, 2012 9:51 PM
Hi,
Have a look at; -
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI,MCC, PGD SoftDev (Open), MBCS http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood
-
Saturday, December 08, 2012 9:52 PM
Sounds like you are asking a VB.net question, not an SSIS question.
Might want to take a look at this code - it is in C#, but shows you how to impersonate a user and then execute code in their context.
http://www.codeproject.com/Articles/10090/A-small-C-Class-for-impersonating-a-User
Chuck Pedretti | Magenic – North Region | magenic.com
- Proposed As Answer by Alexander SunModerator Thursday, January 10, 2013 9:11 AM
-
Monday, December 17, 2012 1:54 PM
Please find the answer on; -
Kind Regards,
Kieran.
If you have found any of my posts helpful then please vote them as helpful. Kieran Patrick Wood MCTS BI,MCC, PGD SoftDev (Open), MBCS http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood
- Proposed As Answer by Kieran Patrick Wood Monday, December 17, 2012 1:55 PM
- Marked As Answer by Alexander SunModerator Thursday, January 10, 2013 9:10 AM
-
Monday, December 17, 2012 3:29 PM
I would check out the below link for the appropriate connection string. It isn't clear to me whether you are using SQL Server Express or SQL Server (or what version). In addition, the network settings for your SQL Server (Express) may not be configured properly if the database was installed locally.
http://connectionstrings.com/sql-server-2008
Paul ~~~~ Microsoft MVP (Visual Basic)
- Marked As Answer by Alexander SunModerator Thursday, January 10, 2013 9:10 AM

