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!
Related
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)
http://msdn.microsoft.com/en-us/data/jj193542
I'm following the tutorial in the link above, and when I get to the step "Connect to either LocalDb ((localdb)\v11.0) or SQL Express (.\SQLEXPRESS), depending on which one you have installed" in the "Where's my data" section, the server name drop down is blank. I have LocalDB installed, and the program is writing to a database since following the previous steps of the tutorial I created two tables that were saved, but for some reason I can't add a connection to any server in Database Explorer.
I'm using Visual Studio 2012 Express for Desktop.
If it's blank it means you never set it up before so add it manually, if you are not sure what to put as the server name you can try .
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
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/
How can I use SQLServer (instead of SQL Express) as my database?
I'm trying to go thru the ContactManager tutorial, but I can't seem to get it to use SQLServer - when I pick SQLServer from the "Add New Item" dialog, I get an error telling me that SQL Express isn't installed.
I know I must be missing something basic...
Most tutorials on the ASP.NET site are written in such a way, that you don't have to buy any software to do them. They use Visual Studio Express and SQL Express in their examples.
However, You can still follow along with the tutorial. Just make a few adjustments. Go to the Server Explorer to create a Connection to your SQL Server, and create the database and tables.
Then when it comes to the step of creating the EntityDataModel, create a new connection to the database you just created.
Only SQL Express can attach your database at runtime. If you have a non express version of SQL Server you will need to create the SQL Server using SSMS. If you want the file to physically live in app_data then when asked where to put the database file and the ldf indicate the app_data folder. Once you have created it, it is easy enough to simply add it as an exsisting item, although it can't be checked into source safe without creating obvious issues. I hope this helps.
If you're using a full-fledged instance of SQL Server, you don't need to use the "Add New Item" dialog at all. Rather, connect to your SQL Server instance (via Visual Studio or SQL Server Management Studio), and create the new database there.