Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Express Connection Problem

Status
Not open for further replies.

adalli

Programmer
Feb 8, 2005
44
MT

Hi,

I have created a SQL Server database on a PC having SQL SERVER 2005. I revoked all access except to just two users which I created. I took a copy of the mdf file and ldf file onto another PC and included them in the App_Data. This PC has VS 2005 and SQL Express installed.

The connection string I am using is as follows:-
"Provider=SQLNCLI;Server=myServer;Database=App_Data/myDb.mdf;UID=NORMALUSER;PWD=myPassword".

I am getting the error:-

System.Data.OleDb.OleDbException was unhandled by user code
ErrorCode=-2147467259
Message="Login timeout expired
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.
VIA Provider: The specified module could not be found."

Can anyone please help - have been trying all sorts of connection strings but to no avial.

Thanks
 
Do you have access to the SQL server from SQL Server Enterprise manager?
Are you using Windows or SQL server authentication?

AS jbenson says, use the site for making connection string to your database, if all is set well.

Sharing the best from my side...

--Prashant--
 
After 'wasting' a long time on trail and error I decided to recreated the database on the PC and worked liked a gem.

Many thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top