Wednesday, March 7, 2012

Error connecting to Database

Hi guys,

I created a database using SQL Server EXpress edition but now i need to use SQL Server Development edition. I cant connect to the database now?

Anyone tell me what the problem is.

Hi carrics,

In the SQL Server Express, you might be attaching the database dynamically at runtime. I assume that you're putting the .mdf under App_Data folder, so that when the application runs, the database file will be attached to database.

However, this is not applicable under other edition of SQL Server. I suggest you use SQL Server Management Studio to attach the database to SQL Server. Then modify your connection string to make "Data Source=ServerName\InstanceName; Initial Catalog=DatabaseName".

HTH. If this does not answer you question, please feel free to mark it as Not Answered and post your reply. Thanks!

|||

Hi,

I discovered this myself last night.

Thanks for the reponse.

No comments:

Post a Comment