Read database from SQL Server - WP8 Application in C# - c#

I have an database in my MS SQL Server and I want to create a WP8 App which can log in and can read over sql query or update the database.
In c# there is it easy to connect to a SQL Server, but in WP8 its more complicated. Can anybody help me? I want to connect to a database over a username and a password and I want to read and edit the database.

you can develop a web service talking to your database, deploy it to IIS on your Azure instance and then consume it from your Windows 8 application (by adding a web reference to your web service in Visual Studio)

Related

Deploying SQL Server & Web App to Azure

Can someone please tell me how to create my own SQL server database, & host it on Microsoft Azure?
I've followed this tutorial: https://learn.microsoft.com/en-us/azure/sql-database/sql-database-get-started-portal
But, it just shows you how to make essentially a copy of Microsoft's template database.
Can you please tell me how to deploy an SQL server database to Azure?
I know how to create a local web app, & then add a database to that later on, but I don't know how to deploy it to Azure?
Go to portal.azure.com
1) create sql server
2) after that, select the newly created sql server and then click on New Database
3) when the database is created, select the sql server again, go to properties, note admin login and server name
4) add your ip in sql server firewall settings
5) remotely connect to the server using your sql server management studio by providing server name and admin login noted in step#3
6) run create database script

Database application using SQL Server 2008 or any dbms

I'm developing a database application using SQL Server 2008. Since I finished my project and I thought I should see it working on another PC or friend. There is a problem in the database server it wants to connect. I want my app connects to the SQL Server every time it runs on a PC of mine, or any other's without losing any data.
I'm using Microsoft SQL Server 2008 installed. I want to use my app other pc without installing Microsft SQL Server.
If you want to make your database 'portable' you have a few options:
Use a online database service, like Microsoft Azure. You can have one central database which you can use with an internet connection;
Save the database next to the application, something like 'embedded', you can use LocalDB for that. Make sure you copy the database file along with the application.
When you want to run your application on another pc, one way is updating connectionString of DB.

Connecting to SQL Server from Visual Studio 2010 for windows phone environment

I am developing a mobile application for windows phone and I am using Visual Studio 2010 express for Windows phone to do so. I should be able to retrieve the data stored in a table in SQL Server. I tried using LINQ to SQL . But it can access the data present in local folder. Is there any way we can access data present in SQL server present at some other location.
You can't directly interact with a SQL Server from a Windows Phone app. The best way would be to create a service layer around your database which exposes all the operations you need.This service will be called from the mobile app. The most popular technologies for doing so on the Microsoft stack are WCF and ASP.NET Web API. Which one you choose is up to you and depends on several factors.
ref : http://social.msdn.microsoft.com/Forums/wpapps/en-US/a653ad41-59f7-41b7-82e8-3b2c76d7dec6/sql-server-connection-for-windows-phone-8

Developing a windows service to communicate between a SQL server database and web service

We have developed an iPhone application which communicates with SQL server database via asp.net hosted on a public server. We have completed all the development and we need to test this with live server data.
Now we understand that live server database is using dynamic ports and cannot be accessed from our asp.net script. Database administrator is against changing the dynamic ports as they are worried about the security threat. We tried asking them to change this by giving access to the server where we host the asp.net web service but they are not willing to do this.
The solution they are asking is to develop a windows service which would act as a middleware between their SQL server database and our web service. They are ready to open ports for running that windows service on their server. Our iphone app need to take values from database as well as insert values to the databse.
We need to know if this is feasible to develop a windows service and if yes, can someone can guide us how to develop this?
Their server is running windows 2003 and SQL server version is 2008
this are good reads on how to start creating a window service
http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx
http://tech.pro/tutorial/895/creating-a-simple-windows-service-in-csharp

IIS 7 Can't read data from ASP.Net application services tables

I'm working on deploying a web application written in C# with ASP.Net Application services databases.
The application runs fine on the development machine.
Windows Server 2003 has been built to test the application.
The database has been scripted across using MS SQL Server GUI.
ASP.Net application services tables were created using an utility.
The connection strings are stored in the web.config and connectionStrings.config.
The application connects to the database successfully, but then it times out after 10 seconds.
I think we'll need more than this to figure out why the timeout is happening. How do you know that the application is successfully connecting to the database?
If that's all the information I had and I observed those symptoms, I'd likely try to run SQL Server Profiler against the SQL instance in question to see what activity against the database is timing out.
Connection string was hardcoded somewhere in the app...ahhh

Categories

Resources