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.

286 Developing: Applicati<strong>on</strong>s — <str<strong>on</strong>g>Migrating</str<strong>on</strong>g> <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> FormsFigure 17.5 shows the different comp<strong>on</strong>ents that make up a master-detail block ascreated by the Data Block Wizard.Figure 17.5Code generated by <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> Forms Builder Data Block Wizard in creating a master-detail blockBy capturing a query <strong>on</strong> a table, a block can also be designed <strong>to</strong> show <strong>on</strong>e or morerecords at a time. These are called single-record blocks or multi-record blocks,respectively.Visual Basic .NET developers can use <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> Forms Builder <strong>to</strong> look at the generatedcode <strong>to</strong> find out about the relati<strong>on</strong>ships between the blocks. For example, in Figure 17. 5,code in the ON-POPULATE-DETAILS trigger <strong>on</strong> the DEPT block suggests that it is themaster block of the EMP block.In Visual Basic .NET, the equivalent of an <str<strong>on</strong>g>Oracle</str<strong>on</strong>g> Form data block is a Dataset in<strong>to</strong> whichdata can be read from the database, and <strong>on</strong> the visual side, a DataGrid c<strong>on</strong>trol bound <strong>to</strong>the Dataset will be capable <strong>to</strong> display the data. Dataset is just <strong>on</strong>e opti<strong>on</strong>. In additi<strong>on</strong> <strong>to</strong>the Dataset, ADO.NET offers DataReader <str<strong>on</strong>g>for</str<strong>on</strong>g> read-<strong>on</strong>ly data access.Additi<strong>on</strong>al properties c<strong>on</strong>vey the associati<strong>on</strong> between a data block and a table, such asthe WHERE clause and ORDER BY clause that will be used <strong>to</strong> create <strong>SQL</strong> <str<strong>on</strong>g>for</str<strong>on</strong>g> theVisual Basic .NET Dataset. The Insert Allowed, Update Allowed, and Delete Allowedproperties will tell the Visual Basic .NET developer whether the block will insert, update,or delete any records.

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

Saved successfully!

Ooh no, something went wrong!