I would like to connect my Visual Studio 2013 project (Windows 8.1 app, x86) to an external SQL Server database to get, visualize and set some values. Therefore I found out that I need to use ADO.NET.
Unfortunately the related template in Visual Studio seems to be missing. So I googled that problem and found some solution possibilities (reset visual studio settings and user data, reinstall Visual Studio, run newest version of EFTools,...), but nothing could help me. I tried for hours now...
So what could be the problem here? I have installed VS13 Ultimate from MSDNAA. Why are the templates missing? Is there another easy way to access the external SQL Server database?
Thank you very much!
edit:
It seems to be that a so named "Universal App" doesn't support ADO.NET (for other projects I easily can add an "ADO.Net Entity Data Model". What else can I do to access a SQL Server database? What is the right way in such case?
Most convenient way to implement database access would be with EntityFramework as you figured out already. What marc_s meant is that for your app, you cannot implement it directly in this type of the project.
Implement your Data Access Layer in a separate project of Class Library and expose the data using either WCF or WEB API projects (your services layer) that will make use of he DAL. For both Entity Framework and for services there are numerous tutorials all over the internet. When your services are working (and tested!) you just add a reference to your universal app and call the services from there. That way the database access is isolated from the application and all the vulnarable and time consuming logic stays on the server side.
P.S. Services and DAL does not need to be kept in the same machine as the database, however it's recommended to keep it in the same network.
Related
At university we have a server lab in which we do development using VS2012 for web modules such as ASP.NET. For such modules, we use Microsoft's SQL server.
My question is which extension in VS2012 would enable you to right click inside an 'open' table giving you options such as Check Constraints, Relationships etc.
I ask this because I have downloaded VS2012 to work on my own personal projects, but on opening a table and right clicking it, I receive an entirely different set of options, and I don't really want to write the SQL myself.
Any help would be very much appreciated. I have installed Sql Server 2012 with management tools etc on my machine here but not really sure what that's meant to achieve or how to integrate it into VS.
We can use Excel to connect to a TFS server and then select a work item query. Based on the query a list of work Items shows up in excel. The data can be edited and published (saved) back to server.
I would like to know the architecture / technology that TFS excel add-in uses to save the data back to TFS.
Main question is does excel access data using which one of the following:
a web service that TFS exposes
the code in add-in using some TFS client side object model or
is it using some SQL server or SharePoint out of the box functionality to do it.
I’m pretty sure Excel is using TFS SDK libraries that are using TFS Web service in the background to achieve this.
I can tell you for sure that it’s not directly connecting to TFS database – that simply wouldn’t work every time remote connections on TFS database server are disabled. It would also require you to enter user/password for SQL Server instance it needs to connect to.
Here are couple links to get you started in the right direction.
Extending Team Foundation
Connect to Team Foundation Server from a Console Application – I’m not 100% sure but I guess excel is using something similar to this…
Hope these links helps you to understand more.
http://msdn.microsoft.com/en-us/library/vstudio/bb649552.aspx#self_service_excel
Olap data cube http://msdn.microsoft.com/en-us/library/bb649557.aspx
I like to deploy SQLServer CE privately on my VSPackage application.
I already tried the following information:
Using Entity Framework with an SQL Compact Private Installation
as well as this one:
How to deploy SQL Server Compact Edition 4.0?
But I still get the following exception message:
The specified store provider cannot be found in the configuration, or is not valid
I guess the above methods do not work for me because my VSPackage will appear as a DLL, while the above methods work for an .EXE application.
Any suggestion how can I do it?
Thanks
Most likely, Visual Studio cannot find and load one of SQL Server Compact Edition assemblies. By default, Visual Studio don’t look dependent assembles in a VSPackage folder if VSPackage code have not explicit reference to such assembles. I described several ways to solve this problem here. Hope it help you.
I'm looking to build a specialized msi installer, preferably with VS2010 to do the following:
Be able to configure SQL server connection.
Pick the database to be used from the SQl server.
Create database table with specified credentials.
Assign a new DB user a set of permissions.
Also configure the IIS application.
I looked into a default installer project in VS2010 and it has nothing related to dealing with SQL server and IIS. Any idea how can I do all this?
Visual Studio setup projects do not offer support for SQL scripts and IIS. The best you can do is write some custom actions (using custom code) to handle this during install.
Commercial setup authoring tools offer the most control over SQL scripts and IIS elements. You can find a list here: http://en.wikipedia.org/wiki/List_of_installation_software
You can also try WiX. It has a steep learning curve, but it's free and gets the job done.
After learning how to use SQL this past semester, I would like to put it to use in an application. After coming upon the realization that my application would require SQL Server software installed in order for it to work, I asked around and was directed to SQLite.
I'm wondering if anyone can give a quick tutorial on how to use SQLite with a Windows Form Application, or direct me to one (I can't seem to find one).
deploying winform application with embedded sqlite
You may also consider SQLCE (Compact Edition). It is a free sql implementation from microsoft. Last time I looked at SQL Lite I think it was out of development (I'm sure someone will correct me if I am wrong).
SQLCE is easy to use from visual studio and sql server managagement studio. Anyone using your application will need the runtime installed or you can build your deployment to handle that.