Thursday, April 11, 2013

Porting MS NorthWind Tables to Oracle Database in asp.net

Porting MS NorthWind Tables to Oracle Database

This tutorial explains how to create Microsoft Popular NorthWind Database Tables in Oracle Database.

MS NorthWind Database tables script  for Oracle 11g available here 




Step 1) Executing NorthWind Script in Oracle.


SQL>@NorthWind.SQL



Step 2) Create a ASP.NET Website.

In VS2010/2012 Express-> Goto Tools-> Connect to Database.


  1.  Change Data Source to Oracle Database(OracleClient).
  2. If not found download from http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
  3. Add Server name as  Localhost or XE(oracle Instance name)
  4. Enter user name and password (in script file username & password is northwind).
  5. Test the Connection.

Once Connection is successful, Expand the Tables. 
All tables specified in Northwind.sql will be available here.

Oracle Connection String.
    <add name="NorthWndOracle" connectionString="Data Source=localhost;User ID=northwind;password=northwind"
      providerName="System.Data.OracleClient" />

Setp 3) Adding Typed DataSet for Oracle DataBase .


1) Right click on WebApplication
 ->Add New item->Data->DataSet.
Name it as "NorthWndOracleTypedDataSet.xsd"





Select All tables from Database Explorer  just Drag & Drop into Typed DataSet surface.(as shown above).


Rebuild the Project.


Step 4)  Create a Web Page.  Name it as NorthWndImports.aspx



No comments:

Post a Comment