Create button in "Add Connection" dialog is not working (VS 2008) - database

I'm running Windows 7 x86, and VS2008
1) In "Server View" panel, right click to open menu and select "Add Connection...".
Dialog appears.
When I click on the Create button (left of the Browse button), dialog just closes and nothing happens.
It should open new dialog where I can create new database.
I'm using Microsoft SQL Server Compact 3.5
While installing VS2008 i selected only C# and Obfuscator. Later I tried to add SQL Server 2005 Express to see if it helps, but it didn't.
Does anyone know where can be the problem?
I also tried to look at the code Microsoft provided http://code.msdn.microsoft.com/Connection
but Create button click event is not handled there.
2) I tried to use existing database (sample database Northwind.sdf), but after I successfully tested the connection to database, clicked OK and I had my database in project.
But any table creation or table fetch operation fails with "Failed to retrieve data for this request" error message. I'm really desperate here.
3) Don't know if this can be the case, but before VS2008 install i uninstalled VS2005 and VS2008 Express.

Check your Windows Event log for any errors.
If there is any service for SQL compact(not sure), then start it.
Try installing SP1 for VS 2008 and see if that helps.
PS: If you install SQL 2005 and want to create a database in it, select "Microsoft SQL Server" in the Add Connections dialog and not "Microsoft SQL Server Compact 3.5".

See this reply on MSDN http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/31ddcfa8-c566-49c7-ad19-74b1a651e1af/

Related

How to solve an error when trying to create tables using the menu and the right button in the mouse in SQL Server?

My problem is this: when I try to create a table in SQL Server database using the right click button in the mouse and then choosing "New > Table", an error message appears
This back-end version is not supported to design database diagrams or tables. (MS Visual Database Tools)
I tried downloading the Database Tools but still the same error message appears.
Any ideas?
Thank you all!
It normally happens when the database version is newer than the database Tool you are using.
Its always better to use a newer version of SSMS or datatools than the database
I also have the similar question.
When I use the SQL Server Management Studio 2014 to connect to the SQL Server 2017 and right click "New -> Table" the error appears.
error message screenshot
But if I use the SSMS 2014 to connect the SQL Server 2012 and also right click "New -> Table", the table design page occurs normally.
It is not suggested to do operations via using the GUI for SSMS which version is earlier than SQL Server.
As workarounds:
1. please use the T_SQL to execute operations instead of GUI.
2. please use the matched or higher versions for SSMS.
By the way, from SQL Server 2016, SSMS is not installed along with SQL Server. You can download the latest SSMS separately from the link.
Download SQL Server Management Studio (SSMS)

unable to view table design in microsoft sql server management studio

I have microsoft sql server management studio installed for existing databases and I can connect and write queries without a problem. However I experience problems when right clicking on the table to open the design view. I get the following error, has anyone seen this before?
If I click okay on this error message the right click context menu displays, i.e. displaying options for new table, design view, select top 1000 rows, edit top 20 rows etc.. and then I get the following error message (see image 3).
Any help greatly appreciated.
Error message
Version of SQL
If I click design view in the right click context menu
Thanks,
It means your Management Studio's version is not >= the version of SQL Server.
If you, for example, use Management Studio 2008 R2 to connect to SQL Server 2014, you'll get this message.
You'll need to install the latest version of SSMS.
If both versions show 2008, it's still possible you have a different version, because there is SQL Server 2008 and SQL Server 2008 R2.

Connections to SQL Server database files (.mdf) require LocalDB or SQL Server Express to be installed and running on the local computer

I am using Visual Studio 2015 professional. When I tried to add Service-based Database to my project I got this error.
Connections to SQL Server database files (.mdf) require LocalDB or SQL Server Express to be installed and running on the local computer. You may need to modify the setup and ensure Microsoft SQL Server Data Tools is selected and install the current version at: http://go.microsoft.com/fwlink/?Linkid=125883
I also have Microsoft SQL Sever 2014 installed on my computer.
really need help.
Just in case it helps others, I recently received this error in Visual Studio. The error states to go to http://go.microsoft.com/fwlink/?Linkid=125883. When going to this URL, it now redirects to https://www.microsoft.com/en-us/server-cloud/products/sql-server/. The new URL do not seems to have an obvious instructions on how to get Microsoft SQL Server Data Tools. Here is what worked for me.
In Visual Studio, select Tools > Extensions and Updates
In the Extensions and Updates pop-up box, select Installed > Updates
Highlight Microsoft SQL Server Update for database... and click the Update button. If Microsoft SQL Server Update for database... is not listed, you can download SSDTSetup.exe from https://msdn.microsoft.com/en-us/mt186501. 
Your default Web browser will prompt a download of SSDTSetup.exe
In your Downloads folder, run SSDTSetup
Follow the prompts of the installer
After doing this, just to play it safe, I restarted Visual Studio. This might not be necessary. I then did the following in Visual Studio.
In Visual Studio, if you do not already have a folder named App_Data, in the Solution Explorer panel, right-click the name of your site and select Add > New Folder. Name the new folder App_Data.
With the App_Data folder highlighted, press Ctrl + Shift + A (or right-click and select Add > New Item)
In the Add New Item pop-up box, select Visual Basic or C# > Data > SQL Server Database. Click Add.
The error should not appear, and in Solution Explorer should now be a file named database1.mdf.
Just do this. On Visual Studio, go to Tools > Options > Database Tools > Data Connections. Here clear the "SQL Server Instance Name (blank for default)" option and write SQLEXPRESS
The error message is quite clear. You need to have either LocalDB or SQL Server Express installed and running on the local computer, and you apparently don't.
Do as the error message instructs, go to the link provided in that error message, select Microsoft SQL Server Data Tools, and install the latest version.

Visual Studio 2013 crashes when building connection string to microsoft sql server

I am trying to migrate my application from mysql to microsoft sql server 2014. When I create a new application and attempt to build a connection string to a microsoft sql server 2014, I can test the connection and it returns an successful connection but vs2013 crashes when I click the OK button. This process works on the mysql connection I have on another application so I suspect it is looking at a bad reference to the sql-server dll. I have looked everywhere and there is no reference to this problem.
This is exactly the same problem as this post
Microsoft Visual Studio 2013 Stopped Working when adding connection but user, B413, never post a fix to his problem
I found a work around for this problem. It's not pretty but it works.
Go to Server Explorer and right click on data connections
Select "Create a new SQL database"
Click the down arrow for the server name and select your sql server
Give your database a name like "test"
This will create a new database in the sql server
Now go and right click on the new instance of your new database in server explorer and chose "Modify Connection"
Now click the "advanced" button
Now scroll down to the Source section and change the name of "Initial Catalog" to the database you wish to connect to.
Ok out of everything and you should be able to see your tables.
Go the Sql Server and delete the instance of the new database you created for this exercise.
Good Luck...I hope this helps.
For me the solution was to (temporarely) remove the MySQL DataProvider entry in the registry as explained here. Hope it helps others!

How do I create tables in Microsoft SQL Server 2008 R2 Express

I have installed Microsoft SQL Server 2008 Express R2 with tools. In windows start menu now I have an option for SQL Server Management Studio. So I click on that and a dialogue window pops up asking me to connect to a server. I don't know what server to enter into here and all I want to do is create a new database so I can store some simple information in tables. I did press cancel on the dialogue box and looked around in the management studio but I couldn't find a "create new table" option or anything particularly like that.
It's looking for <%ComputerName%>\SQLEXPRESS
If you don't know the name of your compter then...
Click Start
Right Click on My Computer
Click Properties
Click ComputerName tab
I haven't played around with the manager studio in a while, but I hope this helps
http://msdn.microsoft.com/en-us/library/ms186312.aspx
Use localhost as your server if you don't need to connect to an external server. Then in Object Explorer you'll be able to create new Databases and Tables within those databases

Resources