how to create a database in MS Visual Studio 2013? - c#

I have tried and searched a lot on internet but found no way of creating a database in Ms Visual Studio 2013.
I am learning basics in c#. I have SQL Server 2008 at bakend.

If you not only want to create a database, but plan longer development using Visual Studio, then create new project of database type (File -> New Project, then select Templates, Other Languages, SQL Server, SQL Server Database Project). You will be able to use favorite version control system, make database releases in form of DACPAC and BACPAC packages, easily create upgrade scripts, do schema compare and so on. This is included in Visual Studio 2013 and available as separate free addon for Visual Studio 2010 and 2012 (so called SQL Server Data Tools). Definitely take your time to acquaint with it.
This is new, developer-oriented way of professional database development. SQL Server Management Studio is more administrative tool than a full blown developer tool.

In VS 2013 go to New Project > Installed > Templates > Other Languages > SQL Server. There you can create a new Database Project and use that.

Related

SQL Project not showing C# in the SQLCLR property

I am trying to create a SQL Server Project in SSDT but in the properties I can't see C# in the language dropdown. When I open a previously created SQL Project I can see the C# option.
What do I need to do to create a SQL Project having C# language?
Software Versions installed on the system-
Microsoft Visual Studio 2013 Shell (Integrated)
Version 12.0.21005.1 REL
Microsoft .NET Framework
Version 4.8.04084
Installed Version: IDE Standard
Common Azure Tools 1.6
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 12.0.5000.0
SQL Server Data Tools 12.0.61021.0
Microsoft SQL Server Data Tools
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 12.0.2430.0
SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 12.0.2430.0
Windows Installer XML Toolset 3.10.2.2516
Windows Installer XML Toolset version 3.10.2.2516
Steps to create the SQL Project and reproduce the issue -
Open Visual Studio
Click on File -> New -> Project -> Template – SQL Server -> SQL Server Database Project.
Give the Name and select the location of solution.
Database project will be created.
Go to Solution Explorer -> Right click on Solution -> Properties.
Click on SQLCLR. Click on the Language drop down. Here I should see the C# option but it is missing.
What should I do to get the C# option in language?
SSDT is Visual Studio 2013 shell (integrated) for developing SQL Server projects. It does not come with C#. You need to install C# separately as part of Tools > Extensions.
Refer to the pdf documentation

Can't open rptproj file in VS 15 Preview 4

I have downloaded BIDS and SSDT for 2015, but these don't seem to allow me to open a .rptproj file in my sln. It tells me that the application is not installed. How can I open this? It opens perfectly fine on vs 2012.
Currently the SQL BI project types (SSAS, SSRS, SSIS) are not supported on Visual Studio "15" Preview releases. The BI projects rely on some things not available yet (for example SSIS requires VSTA) and so support is not yet available in that product. The list of available versions to install is on the SSDT download page and will be updated when future versions are supported.
For now, Visual Studio 2015 is the recommended version to use - it is backwards compatible for all project types through SQL Server 2012-2016, with relational DB projects, SSAS and SSRS supported back through SQL Server 2008.

How do I open SSRS (.rptproj) files in Visual Studio 2013?

How do I open .rptproj in Visual Studio 2013 Pro? When I try to open SSRS projects originally created in VS2008, in VS2013 I get:
Unsupported
This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
It can be opened with Microsoft SQL Server Data Tools - Business Intelligence for VS2013:
http://www.microsoft.com/en-us/download/details.aspx?id=42313
The download is live again as of 6/2/14
You should install Business Intelligence Studio, it comes as part of MS SQL Server installation.
Business Intelligence Development Studio (BIDS) — is a part of MS SQL Server. BIDS is a IDE for rdl reports development based on Visual Studio Shell. BIDS allows you to open .rptproj files. If you install BIDS on the same box with your regular Visual Studio, you will be able to open .rptproj and .csproj files from one IDE.
The issue is that SQL Server installations include BIDS based on previous version of Visual Studio Shell, i.e. SQL Server 2008 R2 will provide you BIDS integrated to Visual Studio 2008, while SQL Server 2012 BIDS will be based on Visual Studio 2010.
As far as I know, there is no BIDS that integrates into VS2013.
There is version for VS2012.
SQL Server 2014 will ship BIDS based on VS2012 as well.
I believe we will see BIDS for VS2013 not earlier than in SQL Server 2016.
SSRS is not a part of VS2013, it is part of SQL Server. You need the BI Dev Studio installed in order to be able to open SSRS projects (rptproj). It uses VS2013 just as a shell similar to what other products do...
For Visual Studio 2017 you need to download an install SSDT for VS 2017 (standalone installer) with SQL Server Reporting Services.
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017

Visual Studio 2008 Business Intelligence SQL Server, Install C#?

I have Visual Studio 2008 Business Intelligence version that was installed along with Reporting Services for SQL Server 2008 R2. I want to work with C#, but there are no options to create a C# project. I haven't been able to find any way to install a C# package or something.
Is there a way to add on C# functions, are they already built in but hidden, or should I just download a full version?
Thanks
UPDATE:
So I finally managed to find a download of Visual Studio 2008 Express, and installed the C# version. After installing I launched visual studio and it was the same thing, only the sql server projects came up as templates.
I found a forum that said to go into import and export settings and to reset my settings to general development settings, but I still cannot make a c# project.
UPDATE2:
I'm going to try installing VS 2012 Express to see if that works for me, since its the only download microsoft has that you can easily find now.
UPDATE3:
VS 2012 Express has been working just fine for me, and I still don't have the project templates in VS 2008 though.
You'll need to install one of the stand-alone editions of Visual Studio. Business Intelligence Studio, bundled with SQL Server, doesn't allow you to work with C# or other language projects.
SQL Server 2008 Business Intelligence Development Studio ("BIDS") is just an add-on over standard Visual Studio (VS 2008 in this case).
If you hadn't had Visual Studio installed before deploying BIDS, the most basic VS shell was installed along BIDS that does not allow you to work with projects other than the SQL Server BI family.
For you to work with .Net projects, despite being able to edit basic C# files already, you will need to reinstall any version of regular Visual Studio 2008 (e.g. licensed, express). This won't break your BIDS.

How to populate database with generated data in visual studio 2010 / SSMS 2008?

In my (c#) Visual Studio 2010 project i have a reference to a database.
However, the database is empty. I would like to insert some bogus data in this database so that i can test my app.
Are there any tools / methods for doing so?
Thanks!
If you're using sql I would recommend redgate's sql data generator it isn't free but does a very good job of creating useful test data
If you have created or create a database project in VS2010 there are tools built in to generate data:
http://msdn.microsoft.com/en-us/library/aa833267(v=vs.100).aspx
It says you need Visual Studio Premium but I am using VS2010 Profesional and I can do it.

Categories