I have a visual basic 2005 application where I am storing some data in a Sequel Server Database. It's my first attempt using SQL Server. It was developed on my machine and the database is on my local hard drive.
It was put onto an industrial PC and shipped last December (the vb app is an HMI).
Our service guy is installing the machine and asked for some changes to the VB screens. I ran my app (on my computer) and it crashed when I selected the screen where I use the db.
So I decided to look at the database using Visual Basic and I get the following error:
Microsoft Visual Basic 2005 Express Edition
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
I then tried to create a new database via Visual Basic and get the same error. My boss has it installed on his machine. Same error there. These are both machines that had no problem back in December!
I also have a industrial PC on my desk to test my app and it STILL WORKS there. That one though is not connected to the internet and hasn't gotten any updates or changes or whatever since I last had it on in December. I don't know if it was a windows update or a network change? But as I said, I'm not connecting remotely - SQL Server and the db are on our local machines.
Interesting enough, if I go to the control panel | Administrative Tools | Services, SQL Server (SQLEXPRESS) is set to automatic and is NOT started. I attempt to start it and get an error
Services
Windows could not start the SQL Server (SQLEXPRESS) on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 3417.
I am lost.
Thanks in advance for any help!
The concensus seems to be that this is related to compressed folders. Check out the posting here to check out where I got this crazy idea and the solutions that worked for others. I would also suggest checking out the log as the error recommends if you haven't already. Often the log contains more information that the error message. (Other times, it doesn't.)
Mike
|||Thanks Mike!
There were several solutions listed at the link you provided. I tried in order:
1) compressed folder/files. I went to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data, right-clicked on each file. "Compress contents" was NOT checked. However I unchecked "ready to archive". I got a different error (instead of 26 it was 40) when I tried to create a new database.
2) I ran SQLdiag found in C:\Program Files\Microsoft SQL Server\90\Tools\Binn. It ran. There didn't seem to be a difference.
3) I right-clicked on SQLExpress in Services and changed the Log On to "Local System Account" with the box check. That did it for me.
Interesting enough, the industrial PC I have on my desk works and still has the Log On as "This Account" - but that's not connected to our server with any of our group policy stuff.
THANKS AGAIN Mike! I really appreciated your help.
No comments:
Post a Comment