Data provider class for sql database - sql

I need to write a data provider class to pull data from a sql database for use in a webpage that will display a bing map. Does anyone have a link they could provide with a tutorial on how to do this?
I have very little experience using a db to provide dynamic data for a web page so any help is appreciated. The Database is a sql Azure databse.

You need to research Data Access in .NET and ORM technologies for .NET. This question deals with similar concepts.
Simple Data Access Layer
Note: There is nothing "special" you need to do to apply the standard .NET data technologies to Azure SQL.

Related

How to get/set information in an SQL database via internet connection

I'm currently creating an SQL database that will eventually be accessed by web applications, both mobile and desktop platforms.
Setting up the SQL database is easy.
What I'm currently having trouble with is how I'm going to allow clients to access to information in the database without having direct access to the database, for security purposes.
For example, let's say I have a list of employees, and I'm creating employee profiles for a mobile application. I would like for the mobile application to be able to use a function such as get(employee_name), which will call the database and retrieve the information about the employee in the form of a JSON.
How would I go about doing this?
To see a very nice solution on using JSON on sql server tables please look at Phil Factors article Consuming JSON Strings in SQL Server at:
https://www.simple-talk.com/sql/t-sql-programming/consuming-json-strings-in-sql-server/

OData with a plain SQL (odbc) data source

I have an oracle data source that i would like to expose using odata.
The reason i need to use odata is that there are many parameters and it is hard to write a query for each combination.
How can i connect my oracle database to odata to achieve this given that the database is version 10.2g which as i have read does not support Entity framework.
Thanks
One of the solutions is using NHibernate, and here is a sample: http://aspnet.codeplex.com/SourceControl/latest#Samples/WebApi/OData/v4/NHibernateQueryableSample/.

Business Connectivity Services for a large scale database having several stored procedures

I am working on a project having a large scale database with several stored procedures and I need to use the data in SharePoint 2013, the database is in SQL Server 2008 R2
According to my understanding I have two options:
1) is to create a Web service, using entity framework to interact with the database and most probably will use WebAPI. My logic will be in Stored procedures or DAL layer.
2) Secondly, I did a little research and got to know about the Business connectivity services provided by the SharePoint 2010/2013 as I am working with 2013 so I will be using visual studio 2012. Now learning more about the BCS I understood that I can map each table as a content type and then somehow define relationship. Anwyay, implementing BCS is a separate issue which I think I will somehow manage.
My question is how am I going to import/include my stored procedures? and if not stored procedures then where will I write my queries to get the data from the BCS?
Please direct me to right direction. Thank you.
Using a custom BCS connector you implement the way you want to retrieve the data from the DB (directly in C#), so you can query directly the table, or stored procedures.
If you want to try a BCS connector to create an external content type to use in SharePoint, take a look at my blog. My example is related to indexing sql data for the search, but the way it's done in SharePoint is creating an external content type, and this content type is the one that you index. So you'll find useful information on how to create that BCS connector.

Examples of WCF CRUD operations for Oracle?

I'm working on exposing access to an Oracle database table for a SharePoint implementation.
From what I've seen, Oracle is not directly supported by BDC, so I'm trying to write a WCF service to perform the CRUD operations against my table.
I've been researching on Google with very limited success. Can anybody point me to an example of using WCF to modify data in an Oracle database?
I was able to figure this out by following this tutorial (leaving out the Silverlight stuff since I didn't need Silverlight)
How to connect to Oracle database using WCF in Silverlight

VB.NET Network Database

What concepts/steps shall i need to learn to access a central database(server). The system will have a software(manipulate by users) which access the database in the server. System like inventory systems, billing, etc..
First of all you need to know vb/C#.net (which I assume you know). Next you must be able to write SQL queries, stored procs, T-sql, etc. to communicate to the database. Finally you need to know ADO.net to communicate between your application and database.
You can start your ADO.net study from here:
http://msdn.microsoft.com/en-us/library/e80y5yhx.aspx
http://www.codeguru.com/vb/gen/vb_database/adonet/article.php/c15033
Here is a link which will help you under stand the data access layer: http://msdn.microsoft.com/en-us/library/aa581778.aspx
Hope this helps...!!!