how to connect sql server 2008 R2 with windows store application - sqlite

I am currently developing a windows store application, I need to connect my app with sql server 2008 R2 Db, some sql classes are not working in the WinRT API, please any one suggest me on this and tell me which RDBMS I can use to connect with.
Thanks

You can't. The reason being that you can't put that kind of restriction on a store app, you should have no dependancy on an external database being available.
You can use sqlite however, and here is a guide: http://timheuer.com/blog/archive/2012/08/07/updated-how-to-using-sqlite-from-windows-store-apps.aspx
If you are wanting to connect to a database to pull data from it (as an enterprise app for example) then you can use web services as a wrapper around the database.

Related

Is it possible to easily migrate data from light SQL Server Express to Azure with a dacpac file?

I'm currently trying to deploy a website with Azure which I did following these steps
https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-aspnet-core-ef-step-05?view=vs-2019#publish-to-azure-app-service
however the data from the database didn't get saved, like it did in the video. I think this may be because I have 2 data contexts; one for users and one for general app models.
I believe I have to figure out how to migrate my data from SQL Server Express provided by Entity Framework to Azure.
It seems like it should be doable from this link
but then this one makes it sound like you need a .bak file.
Just want to know if my Visual Studio data can easily transferred to Azure this way. would it be easier to publish my "data tier application" or extract and copy what I need to azure. Kind of overwhelmed at all the documentation trying to find the easiest way the small amount of data for my test website.
How to migrate my data from SQL Server Express provided by Entity Framework to Azure?
No you can not do that, import and export feature is not available with SQL Server Express. You can reference this link: Limitations of SQL Server Express.
As you posted the screen shoot, no function can help you migrate the database to Azure.
So if you really want migrate the database from local SQL Server to Azure, you'd better using the Microsoft SQL Server Management Studio(SSMS). There are so many ways, such as:
Migrate on-premises SQL Server or SQL Server on Azure VMs to Azure SQL Database using the Data Migration Assistant
Tutorial: Migrate SQL Server to a single database or pooled database in Azure SQL Database offline using DMS
Copy data to and from SQL Server by using Azure Data Factory
Migrating SQL Database to Azure SQL Database using SSMS Export/Import
If you are first time to migrate, we suggest to you use the Azure Data Migration Assistant as Alberto Morillo said.
Hope this helps.
Before trying to migrate the database to Azure you need to first verify the database and its objects are compatible to Azure SQL Database. If you don't do that the migration may fail.
My suggestion is to use Azure Data Migration Assistant (DMA) to perform an assessment of your database and make sure there are no blocking points that can make the migration not possible. Make adjustments based on the report generated by the DMA tool and then use any migration method (including extracting\importing a Data-tier Application) to migrate your database to Azure SQL Database. DMA can also migrate your database to Azure SQL Database and for me is the easiest way to do it.
About restoring a native backup to Azure SQL Database, that is not possible. You can export your database as bacpac and then import it to Azure SQL Database, or you can use DMA or Data Migration Service to migrate your databases to Azure SQL Database.
Adding to what is already said . You can dump all the data in txt or csv file and put that in the local drive . In Azure we have the Azure data factory (ADF) , which has a copy activity , this is very powerful and looks like will be good for your scenario . As mentioned before the data types are the key . You will have to install something called integrated Runtime ( IR ) and it should work .

SQL Server edition for desktop application with no network

I have been tasked with building an application for a Windows laptop that engineers can take out into the field where there is no internet access. Then, they will add data through a form and once they get back and have internet access, they can then hit a "Sync" button and send the data they collected to an external SQL Server database.
The database is SQL Server 2016 and the application is going to be a C# .NET desktop application. My question is what options are available for the database when there is no internet access? I don't really want to do Excel or Access. I really like SQL Server Compact but it seems dated. Is SQL Server Compact still relevant with the latest .NET Framework or is there something newer that everyone uses?
You could try creating a ssis package that syncs data between the offline database and live database.
The ssis package can be executed either as a sql server job that runs at intervals
or
from a stored procedure . Please find the below link on how to execute a package from stored procedure.
https://msdn.microsoft.com/en-us/library/jj820152.aspx
The stored procedure can then be called from inside the application.

How can I get my application database offline?

I've got an internal ASP.Net application which I would like to send to someone. The problem I have is that the app is using local SQL Server database. Is it possible to have a copy of the database to the file and just replace the access to the db for the file? If yes how?
Personally, I would sign up for a free Microsoft Azure account, use the free Azure Migration tool to copy your database to Azure, then just change your web.config to point at the Azure database.
This saves having to buy any SQL Server licenses, and requires the fewest amount of changes to your app.
No, they'll need SQL Server as well. They can install a free Express edition if they're eligible for the license.
If you set up your application properly, it should be easy to replace the data layer with a portable database like SQLite, so they don't have to install anything.

Advice required: Creating desktop application with database connectivity

I want to create a desktop application, I normally work on web based applications so have very little knowledge about creating console applications using .Net and visual studio.
So now in this application I'l also be using database connectivity and stored procedures (SQL server). But how should I start doing this as I dont want to install SQL server on my clients system.
thanks in advance..
I think it depends on the goal of your application, the amout and sturcture of the data and the environment. The last point aims to the client system, if the client is part of an enterprise network (e.g. Active Directory) or is a common user at home.
maybe you can use xml or json files to store the data
if you need a database, you can create a setup project for your application which automatically installs a SQL Server express
another way is, if it's applicable for you, your application can consume a webservice which provide the data
you could use SQL Server compact http://msdn.microsoft.com/en-us/library/cc645984(v=sql.100).aspx or SQL Lite to embark your DB in your application without external dependencies.
Otherwise, if offline isn't a requirement, you could go the "cloud" way, with web APIs

Pushing data to web-hosted database (SQL Server)

I have a client who wants to maintain both a local winforms price list installed in their office PCs and an online price list (web hosted app with SQL Server) accessible to their customers. Problem is they don't want to fully migrate their local database online and now I need to find a way to push their data to the online database on a daily basis.
My question is - is there a way to remotely connect to a SQL Server database and update the online pricelist using my client's winforms app?
Yes it is possible. Construct your connectionString for remote database.

Resources