Download - Creative Data Technologies, Inc.
Transcript
T A B L E O F C O N T E N T S Table of Contents Table of Contents............................................................................................................................. 1 Chapter 1 – DataLayer.NET Overview ............................................................................................ 3 1.1 Overview of the DataLayer.NET Components ........................................................ 3 1.2 Summary............................................................................................................................. 4 Chapter 2 – Using the DataConnection Component ..................................................................... 5 2.1 Adding a Reference to the DataLayer.NET assembly.......................................... 5 2.2 Adding the Project Level IMPORT for the CDT.DATALAYER Namespace ..... 6 2.3 Connecting to the Database ........................................................................................ 7 2.4 Automatic Null Conversions ........................................................................................ 9 2.5 RunSQLStatement Routine .......................................................................................... 10 2.6 Scalar Functions ............................................................................................................. 11 2.7 Using Parameterized SQL for best practices ........................................................ 13 2.8 Transaction Handling Routines in DataLayer.NET .............................................. 14 2.9 Summary for the DataConnection component ...................................................... 15 Chapter 3 – Using the DataHandler Component ......................................................................... 16 3.1 Using the Code Generator Program......................................................................... 16 3.2 Importing newly generated Class Source files into your Project .................. 18 3.3 Decorating your class files with Attributes .......................................................... 20 3.4.1 C# Generated DataHandler Class Files............................................................... 20 3.4 Using your DataHandler classes for ANYTHING ! Really! ............................... 22 3.5 Using the DataHandler classes in read-only mode ............................................. 23 3.6 Using Parameterized Queries for best practices ................................................ 23 3.7 The DataSet buffer; where the data is kept while you are working with it 24 3.8 Retrieving Data into the DataSet buffer using the GetAllRows() routine.... 24 3.9 Retrieving Data into the DataSet buffer using the Paging routines .............. 25 3.10 Strongly Typed Interface for the DataHandler Classes .................................. 26 3.11 Adding and Deleting Rows ....................................................................................... 27 3.12 Updating DataSet buffer data using 3 available methods ............................. 28 3.13 Sending Updates to the database ......................................................................... 28 1