.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Cannot create database diagrams for sqlexpress .mdf file in Visual studio server explorer

Posted By:      Posted Date: September 27, 2010    Points: 0   Category :Sql Server


I've look around the forums but I can't get the solution for my problem. I've installed Visual studio 2010 with sqlexpress edition. Then I have renamed my computer. After renaming my computer I've deleted the directory C:\Users\uporabnik\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS. After restart, I have started VS2010, open Server explorer and I've added the connection to a new database. I've been able to add new tabels, bu when I've tried to add a diagram, it didn't work. In properties window od the database I saw, the the database owner was oldComputerName\username not newComputerName\userName. In sql server management studio I've reanmed the user oldComputerName\userName to newComputerName\userName. After attaching the database it worked fine.

I've returned to Visual studio 2010. When creating new database, the owner of new database is oldComputerName\userName. The next tip was renaming the  SQLServerMSSQLUser$ComputerName$SQLEXPRESS(and other names with sql...) in Local Users and gorups in Mange My computer. After restarting the compter I've got the same result. When creating new .mdf file in server explorer of visual studio, the database owner is oldComputerName\userName.<

View Complete Post

More Related Resource Links

Cannot Create Database Diagrams - SQL Server 2008 Management Studio

I cannot create a database diagram with my client-side SQL Server Management Studio.  I can do this if I am on the actual db server itself.  Please help.

Using a SQL Server CE database in Visual Studio 2010

I am working on a VS 2010 C# project that is supposed to connect to a Sql Server 2008 CE 3.5 database.  I added the database to the project, and am trying to establish a new SqlConnection. The directory path of the database is: W:\MCT\Development\LocalReportExample\LocalReports\TestCEDatabase.sdf  I am trying to set my ConnectionString as follows: test = @"Data Source=W:\MCT\Development\LocalReportExample\LocalReports\TestCEDatabase.sdf"; connection.ConnectionString = test; connection.Open();  When the code executes, it throws an error message stating that the database was not found, or is inaccesible.  Is my ConnectionString wrong?  Is there possibly something I haven't configured correctly in the database setup?

Server Explorer not showing up on Visual Studio

I tried to do the following : select View, Server Explorer from the menu but still it does not show up.  I also reset my settings, still no success.  Please suggest.  

Problem trying to attach database file to Microsoft SQL Server Management Studio

I was trying to attach a database to SQL Server MGT Studio and got an exception error.  The message stated that the database file I was trying to attach could not be opened because it was version 661.  The SQL Server shows to support version 655 and earlier.  It states that a downgrade path is not supported. Question:  Is there some download ; fix; I can make to SQL Server 2008 that will allow me to attach the version 661????  I am not technical at all.  Please speak slowly.  :)  Thanks

Create Visual Studio Workflow in a remote Sharepoint server

Hi all, I have my sharepoint server in United States. I working in Europe. I want to use Visual Studio 2008 in my PC to create workflows in the remote server, but when I try to create a Sharepoint 2007 Sequential Workflow Project in VS2008 it gives me an error saying that I don't have Sharepoint installed in my PC. Is not possible to create workflows in a remote server? I need to have local Sharepoint? Daniel 

SQL Server 2008 R2 Developer with Visual Studio 2010 Pro always defaults using SQLEXPRESS


I had un-installed SQL Server 2008 Express that came with the Visual Studio 2010 Pro.

I had installed SQL Server 2008 R2 Developer, and Im able to connect through the Management Studio and Visual Studio itself.

The problem is: whenever I create a new ASP.NET Web Application, the web.config always defaults using SQLEXPRESS.

How can I change this within Visual Studio 2010 so that the web.config defaults to the new database SQL Server 2008 R2 Developer that I installed?

Can't attach my project database (.mdf file) using SQL Server Management Studio R2

Hi.  I've encountered a strange issue in SQL Server Management Studio (not the express version).  I had to uninstall SQL Server 2008 Developer in order to install SQL Server 2008 R2 Developer.  As a result of doing this, the database from one of my ASP.NET MVC projects is not attached to the database server.  I see the ".mdf" file in my project's AppData folder in Windows Explorer, but I can't navigate to it in SQL Server Management Studio.  I go to "C:\Users\<my name>" and the attach database interface will not let me go any further.  The folder that I need to access is "C:\Users\<my name>\Documents\Visual Studio 2010\NerdDinner\NerdDinner\App_Data".  How can I access this directory from SQL Server Management Studio?  Is there some sort of strange permission issue?  Thanks in advance for any help.

Can we backup a sql server database (.bak) using Visual Studio?

I am unable to install sql server in my computer since the hardware and software are not met. So please tell me if there is any way to restore the .bak file to its' original using visual studio 2008.

Failed to create new database in SQL Server Management Studio Express



I don't know why I can't create a new database in SQL Server Management Studio Express.



This is the reason:


CREATE DATABASE permission denied in database 'master'. (.Net SqlClient Data Provider)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=262&LinkId=20476

Server Name: Ning-PC\SQLEXPRESS
Error Number: 262
Severity: 14
State: 1
Line Number: 1

Program Location:

   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndW

Problem to create visual studio 2008 environment in windows server 2008


I am working on FTS (File Text Search) for file extension like .doc, docx, ppt, pptx, txt, pdf.

For developing FTS I used environment:

Development IDE:  Visual Studio 2008

Language: C#


Connestion string create any database server

This links important to how to create connection string to any data base sever.

HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


Team System: Building a Visual Studio Team Explorer Extension


There's no magic behind how the TFS Power Tools were integrated with Team Explorer, and we'll show you how to expose your own custom features inside the Team Explorer window.

Brian A. Randell, Marcel de Vries

MSDN Magazine December 2009

Toolbox: Database and OR/M Tools, Oren Eini and Custom Visual Studio Tabs


This month we look at tools for enhancing the LINQ to SQL and Entity Framework designers, Oren Eini's .NET development blog, Visual Studio tab customization, and more.

Scott Mitchell

MSDN Magazine December 2009

Toolbox: Easy File Backup, Exploring Files And Folders Inside Visual Studio, Multiple Monitor Softwa


If the responsibility for creating, managing, and executing routine backups is yours, these tools will make it easier. Also see how you can browse folders and files from inside Visual Studio.

Scott Mitchell

MSDN Magazine May 2009

Data Joins The Team: Introducing Visual Studio 2005 Team Edition for Database Professionals


Here Brian Randell presents everything you need to know to get started with Visual Studio 2005 Team Edition for Database Professionals.

Brian A. Randell

MSDN Magazine February 2007

Use The Source, Luke: Source Server Helps You Kill Bugs Dead In Visual Studio 2005


The latest releases of WinDBG and Visual Studio know exactly how to use source server, so its benefits are available to both .NET and native C++ developers. See why this is so important in tracking down bugs.

John Robbins

MSDN Magazine August 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend