|
Microsofts' website.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yeah but for that we need to pay right? I am asking for free is it available ? or is there any other means of getting this software?
|
|
|
|
|
What software? You've deleted the first message in the thread, so there is no context to your reply.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
No, there's a free version.
I'm not going to give you the link, it is not hard to find.
Iamateur wrote: or is there any other means of getting this software? Yes, buy it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Can anyone help me on VB.NET 2005 with Ms Access connectivity coding (ADO.NET)
With Thanks
Sudipta
|
|
|
|
|
|
|
Hi,
I am new to visual studio and C#. I have setup a localDB using SQLServer LocalDB and created a database. Now I am trying to create a simple windows form that takes first name, last name and phone number and a button to insert them to the database. How can I do the connection between VS and my localDB?
A step by step explanation would be perfect.
Thanks in advance.
|
|
|
|
|
|
|
I am new to the MVC and Html helpers.please explain the how to send data from controller to view
|
|
|
|
|
|
|
I have visual studio solution with two projects. Both use an identical connection string to access a SQLExpress DB. Project A works without problem. Project B cannot connect to the DB, throwing the following error message:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I have been reading various forums for months and have confirmed the SQL Server settings, firewall settings are correct. I feel confident that the SQL Server side settings are correct, given Project A connects without issue.
I developed this project many years ago, and the run time application has been in use without issue. I now open the solution to make a change to the source code and cannot recompile due to this connection error. Any advice would be greatly appreciated.
|
|
|
|
|
Either the server side settings are incorrect, or the connectionstring is.
Mtt123456789 wrote: I now open the solution to make a change to the source code and cannot recompile due to this connection error. You should still be able to compile, it is a runtime error, not a compile-error.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Your right, i can compile, but the application will then throw an exception when accessing the SQL Server in runtime.
I am sure the connection string is correct because:
a) Syntax check is Ok on connection string builder
b) I have used this same connection string in many other applications without error
c) Another project in the same solution uses this Connection string.
And if it works in Project A, I cannot understand why project B does not work using the same conditions.
|
|
|
|
|
Mtt123456789 wrote: And if it works in Project A, I cannot understand why project B does not work using the same conditions. Because there might be other details.
What about you post them both here; we'll take a look at each option and verify for both servers.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: verify for both servers
I would like to clarify that both projects are accessing the same SQL Server/DB, using the same connection string.
The connection string is:
"Data Source=SQL1\SQLEXPRESS2;Initial Catalog=DB1;Integrated Security=True"
The data access for Project A code is as follows:
Dim conn As New SqlConnection("Data Source=SQL1\SQLEXPRESS2;Initial Catalog=DB1;Integrated Security=True")
Dim strSQL As String = "SELECT Column1, Column2, Column3 FROM [DB1].[dbo].[Table1] WHERE Column1 = 3"
Dim cmd As SQLCommand = New SQLCommand(strSQL, conn)
conn.Open()
The data access for Project B code is as follows:
Dim conn As New SqlConnection("Data Source=SQL1\SQLEXPRESS2;Initial Catalog=DB1;Integrated Security=True")
Dim strSQL As String = "SELECT Column3, Column5, Column7 FROM [DB1].[dbo].[Table1] WHERE Column7 = 9"
Dim cmd As SQLCommand = New SQLCommand(strSQL, conn)
conn.Open()
|
|
|
|
|
Where is the DB server installed? On the same PC as Project A? If yes, check whether SQL Server is allowing remote connections.
Are all the computers on a domain?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
The DB is on a remote server. The application is on my local PC which is part of a Domain.
The server does allows remote connections.
|
|
|
|
|
Mtt123456789 wrote: The application is on my local PC Project A or B? Is any of both on the DB-server? If yes, is TCP/IP enabled?
Create a console application, minimal setup; check if you can connect to the server, not selecting a database, using the SA account
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Project A and Project B are both in the same Visual Studio Solution, on my local PC. (Not on DB Server)
In any case TCP/IP is enabled.
I have created a console app as you suggested. I can connect to the server using both Integrated Security and using the sa account.
If Project A can connect and the console application can connect, it would be a reasonable assumption that the SQL config and the connection string are correct.
...But back to the error message "Error locating Server\instance"
Matt
|
|
|
|
|
Are both projects being run by the same user account?
|
|
|
|
|
Yes Dave, both projects are being run by the same user account.
|
|
|
|
|
The only other thing I can think of is outbound firewall rules on the client machine. An exception may exist for one project and not the other. This would cause the error you're seeing on the project that doesn't work.
|
|
|
|