12.07.2015 Views

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

Solution Guide for Migrating Oracle on UNIX to SQL Server - Willy .Net

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>Soluti<strong>on</strong></str<strong>on</strong>g> <str<strong>on</strong>g>Guide</str<strong>on</strong>g> <str<strong>on</strong>g>for</str<strong>on</strong>g> <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> <strong>on</strong> <strong>UNIX</strong> <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> <strong>on</strong> Windows 271●Data providerDataSetThe DataSet is a copy of the data retrieved from the database cached in memory. Datacan be loaded in<strong>to</strong> a DataSet from any valid data source, such as a <strong>SQL</strong> <strong>Server</strong>database, or an XML file. The DataSet persists in memory, and the data therein can bemanipulated and updated independent of the database. When appropriate, the DataSetcan then be used <str<strong>on</strong>g>for</str<strong>on</strong>g> updating the database.Data ProviderA data provider <str<strong>on</strong>g>for</str<strong>on</strong>g>ms the link between the Visual Basic .NET program and the database.A data provider is not a single comp<strong>on</strong>ent; rather it is a set of related comp<strong>on</strong>ents thatwork <strong>to</strong>gether <strong>to</strong> provide data in an efficient, per<str<strong>on</strong>g>for</str<strong>on</strong>g>mance-driven manner.Two data providers are available <str<strong>on</strong>g>for</str<strong>on</strong>g> Visual Basic .NET. The <strong>SQL</strong> <strong>Server</strong> Data Provider isdesigned specifically <strong>to</strong> work with <strong>SQL</strong> <strong>Server</strong> 7 or later, and the OLE DB Data Provider,which can also c<strong>on</strong>nect <strong>to</strong> other types of databases. Each data provider c<strong>on</strong>sists ofversi<strong>on</strong>s of the following generic comp<strong>on</strong>ent classes:● The C<strong>on</strong>necti<strong>on</strong> object provides the c<strong>on</strong>necti<strong>on</strong> <strong>to</strong> the database.● The Command object executes a command against a data source. It can executen<strong>on</strong>-query commands, such as INSERT, UPDATE, or DELETE, or return aDataReader with the results of a SELECT command.● The DataReader object provides a <str<strong>on</strong>g>for</str<strong>on</strong>g>ward-<strong>on</strong>ly, read-<strong>on</strong>ly, c<strong>on</strong>nected recordset.● The DataAdapter object populates a disc<strong>on</strong>nected DataSet or DataTable with dataand per<str<strong>on</strong>g>for</str<strong>on</strong>g>ms updates.The following classes are also offered: Transacti<strong>on</strong>, CommandBuilder, Parameter,Excepti<strong>on</strong>, Error, and ClientPermissi<strong>on</strong>.For more in<str<strong>on</strong>g>for</str<strong>on</strong>g>mati<strong>on</strong> <strong>on</strong> data provider comp<strong>on</strong>ents, refer <strong>to</strong>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpc<strong>on</strong>usingad<strong>on</strong>etproviders<strong>to</strong>a ccessdata.asp.Even though the syntax and use of the functi<strong>on</strong>s differ, ADO.NET provides equivalentdatabase functi<strong>on</strong>s <str<strong>on</strong>g>for</str<strong>on</strong>g> <strong>SQL</strong> <strong>Server</strong>. It is important <strong>to</strong> ensure that these functi<strong>on</strong>s aretranslated <strong>to</strong> the new envir<strong>on</strong>ment during the rewriting process.Scenario 1: Rewriting Pro*C <strong>to</strong> the .NET Plat<str<strong>on</strong>g>for</str<strong>on</strong>g>mRewriting the applicati<strong>on</strong> <str<strong>on</strong>g>for</str<strong>on</strong>g> Windows makes use of native <strong>SQL</strong> <strong>Server</strong> APIs, ADO.NET,Microsoft ActiveX Data Objects (ADO), or Open Database C<strong>on</strong>nectivity (ODBC) runningnatively in the Windows subsystem. Rewriting the applicati<strong>on</strong> can result in a more stableand integrated c<strong>on</strong>figurati<strong>on</strong> after the project is complete.Case 1: Rewrite the Applicati<strong>on</strong> using Visual Basic.NETVisual Basic.NET provides all the functi<strong>on</strong>ality of the C programming language as well asseveral interfaces <strong>to</strong> <strong>SQL</strong> <strong>Server</strong> databases <strong>to</strong> execute <strong>SQL</strong> statements. This scenariodescribes how <strong>to</strong> rewrite a Pro*C applicati<strong>on</strong> with Visual Basic .NET.The figure that follows shows a graphical representati<strong>on</strong> of howthe Pro*C code willmigrate over <strong>to</strong> Visual Basic .NET during the rewrite.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!