When you're inside Visual Studio you can use the Server Explorer to add a Data Connection. Once you've added the data connection you can browse the schema, execute queries, etc.
Another developer mentioned that EF might have this functionality. With the EF designer, you would already have a connection setup and even have the list of tables mapped as well. It would be great to right click on a model in the designer and view the data, or execute queries.
This would allow a user to open a solution and instantly (well almost) view the data being used, whereas right now you would need to add the connection to the Server Explorer (again).
Does anything like this exist, either in Visual Studio, NuGet Package, Service Pack, Tools Update, or even an extension?
Not in Visual Studio but as separate tool called LINQPad.
Edit:
If you create EDMX model through the Wizard it will create connection for you in Server explorer but this connection is VS feature. It has nothing to do with Entity designer which works just with connection string.
Related
Is there any way to implement change data capture on SQL to Azure EventHub without using exe?
The code needs to run in the context of SQL Server only
SQL Server Version : 2014
Tried SQL CLR with Azure EventHub but not able to create all required assemblies on SQL database.
I'm trying to create the list of references by clicking adding new assemblies on SQL databases. These are the assembly references required as per my Visual Studio project
But adding one it requires another one and it seems end less. I'm not able to find all the assemblies on my system and i got few assemblies from internet. Many assemblies are added as UNSAFE. While I'm adding, getting always unsafe warning. After lot of struggles added only these assemblies
I am just starting out in ASP.NET with previous experience in C++ and was wondering if you can help me out/point me in the right direction here.
I know how to link an Access database to visual studio's web forms however when showing the data I have found the tables to be very ugly so wanted to populate classes with the data.
In my "product details" database are; product name, price, description, rating, cost etc.
Using this information from the database I understand that my code should attempt to connect to the database server then attempt to access the specified database schema.
By giving the database any table name I hoped to return an array of all rows with all data inside it, possibly within a function called selectingData? As it loops through each row, it stores the data as an associative array which is then saved as a new array element.
I could then apply some styling...
<div style="float:left; width:50%;"> ...logic of code... </div>
<div style="clear:both;"></div>
You should use Sql Server Express 2008 or 2012, might as well use 2012. Download and install, make sure to include Sql Server Management Studio with your installation package install. You can choose server only but you want the Sql Server Management Studio tool included in your install as well.
Sql Server Management Studio will easily import your Access database and make a Sql Database of it. Right click your localhost server after you install in Sql Server Management Studio and click Import and follow wizard options, there is a source type setting for Microsoft Access database.
From here you want to use Entity Framework 5 or 6 via Visual Studio 2012 or 2013. Visual Studio 2012 or 2013 Web Express are always free and the best IDE ever. You can generate a model of your imported access database. Just create a new ASP.NET Website (go with MVC) and then right click the project and select Add -> Add New Menu Item -> EF5.x or EF 6.x DbContext Generator. This will give you the functionality you need via Linq to query tables, get result sets, manipulate those result sets and bind them to your display HTML.
You might as well do things the right way since you are getting into ASP.NET. This path is a treat and easy to learn but you will have a day or two of a learning curve ahead of you.
I have also encountered the problem to create a data source in VS2012 with MySQL connector, while many thanks for the connector updates from Oracle.
Than I installed the MySQL connector version 6.6.5, it looks work well while there is no directory in the "Data Source" sub-window but the Model has been created after I created the data source.
When I configuring the insert process to the data using Linq, VS2012 tells there is no such method "AddTo".
Therefore, according the things happened during my programming:
Is it common that the data source will not be shown in that sub window after I have already add the data entities?
Why there is no such method "AddTo" (Actually no any methods at all in the definition) when I using Linq with VS2012?
Many thanks in advance,
Harry
I am trying to use SSRS in a multi-tenant situation. The base version we want to support is SQL Server 2008 but if R2 is needed we might be ok with that.
I am currently using the ReportingService2005.asmx endpoint which seems to expose the ReportService2005SoapClient class (even though all samples seem to show ReportingService2005 class).
When we run a report I want to make a copy of that report from the server, add an embedded datasource, point the datasets to that datasource and then run the report.
I have gotten as far as:
getting the RDL from the server
modifying the XML to add the DataSource
pointing the datasets to point to the new datasource
...but when I try to "CreateReport" I get the following error:
System.Web.Services.Protocols.SoapException: The dataset ‘DataSet1’ refers to the data source “mydatasource_LOCAL”, which does not exist.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.ExecuteBatch(Guid batchId)
at Microsoft.ReportingServices.WebServer.ReportingService2005.ExecuteBatch()
I have added the dataset to the RDL, it looks the same as when I add one in the designer. However, I assume something needs to be added to the server? What am I missing?
(As an aside, I know MS Dynamics enabled multi-tennant SSRS in a single instance, but I see no info on how they did it. If they have any code or anything they share someone could point me to that would be awesome.)
You're using the correct endpoint, more or less. From MSDN:
The ReportService2005 and ReportService2006 endpoints are deprecated in SQL Server 2008 R2. The ReportService2010 endpoint includes the functionalities of both endpoints and contains additional management features.
In any case, you mention you modify the RDL to use a new data source in step 2. I might be wrong, but I think you probably still need to add a DataSource item to your report catalog using the ReportingService2010 CreateDataSource(...) method.
If you deploy a new report from Visual Studio to report server it wil also mention in the log that it's deploying the data source before it deploys the report.
Of course you could also create that data source on the server beforehand, using the report manager (though "mydatasource_LOCAL" may not be an ideal name).
I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005.
The database has the same name, and all tables are identical but the hostname is different.
The only way I have found to make my app work from one machine to the next is to re-open the code in Visual Studio, delete all of the objects referring to the SQL express instance from my .mdbl, save the project, connect to the other server, drag all of the references back on, and rebuild the application for release once more.
an answer here suggested that one can simply modify the app.config/web.config file - whih would work for asp.net, but this is a winforms application. What's the correct way of making LINQ to SQL apps use a new database without having to re-open the app in visual studio?
If I understand your problem correctly, you simply change the database's connection string in your app.config / web.config.
Edit, post clarification: You have the connection strings stored somewhere. They might be in the app.config of your server. Still, you get them from somewhere and that somewhere may be in an app.config. Use that then :)
One good solution is to add another connection to the dbml file itself. You can get to this by right-clicking on the field of the design surface and selecting properties. From there, you can add another connection string. Instead of deleting everything and redragging, just change the string and recompile.
But if you want to get fancy-schmancy, you can have the program auto-detect whether it is being run locally or not, using this neat utility function: detect local
And go from there to set the appropriate connection string based on the results.
A more useful answer...
app.config ends up as appname.exe.config when it has been built.
rather than opening Visual Studio and modifying app.config, you can simply edit the appname.exe.config file, and restart the app.
I believe you can store the connection information in an app.config file and retrieve it from there. Here is a post about doing that with LINQ to SQL. Once you deploy it to a production server, you can just edit the XML to change the data source.