SDAC

Demo Projects

SDAC includes a number of demo projects that show off the main SDAC functionality and development patterns.

The SDAC demo projects consist of one large project called SdacDemo with demos for all main SDAC components, use cases, and data access technologies, and a number of smaller projects on how to use SDAC in different IDEs and how to integrate SDAC with third-party components.

Most demo projects are built for Delphi and Borland Developer Studio. There are only two SDAC demos for C++Builder. However, the C++Builder distribution includes source code for all other demo projects as well.

Where are the SDAC demo projects located?

In most cases all SDAC demo projects are located in "%Sdac%\Demos\".

In Delphi 2007 for Win32 under Windows Vista all SDAC demo projects are located in "My Documents\Devart\Sdac for Delphi 2007\Demos", for example "C:\Documents and Settings\All Users\Documents\Devart\Sdac for Delphi 2007\Demos\".

The structure of the demo project directory depends on the IDE version you are using.

For most new IDEs the structure will be as follows.

Demos

|—SdacDemo [The main SDAC demo project]

|—TechnologySpecific 

|  |— MSSQLCompact [Win32 version of the demo, using SQL Server Compact Edition]

|—ThirdParty

|  |— [A collection of demo projects on integration with third-party components]

|—Performance [Demo project, that compares performance of SDAC with another components (BDE, ADO, dbExpress)]

|—Miscellaneous

   |— [Some other demo projects on design technologies]

 

SdacDemo is the main demo project that shows off all the SDAC functionality. The other directories contain a number of supplementary demo projects that describe special use cases. A list of all the samples in the SDAC demo project and a description for the supplementary projects is provided in the following section.

Note: This documentation describes ALL the SDAC demo projects. The actual demo projects you will have installed on your computer depends on your SDAC version, SDAC edition, and the IDE version you are using. The integration demos may require installation of third-party components to compile and work properly.

Instructions for using the SDAC demo projects

To explore an SDAC demo project,

  1. Launch your IDE.
  2. In your IDE, choose File|Open Project from the menu bar.
  3. Find the directory you installed SDAC to and open the Demos folder.
  4. Browse through the demo project folders located here and open the project file of the demo you would like to use.
  5. Compile and launch the demo. If it exists, consult the ReadMe file for more details.

The included sample applications are fully functional. To use the demos, you have to first set up a connection to SQL Server. You can do so by clicking on the "Connect" button.

Many demos may also use some database objects. If so, they will have two object manipulation buttons, "Create" and "Drop". If your demo requires additional objects, click "Create" to create the necessary database objects. When you are done with a demo, click "Drop" to remove all the objects used for the demo from your database.

Note: The SDAC demo directory includes two sample SQL scripts for creating and dropping all the test schema objects used in the SDAC demos. You can modify and execute this script manually, if you would like. This will not change the behavior of the demos.

You can find a complete walkthrough for the main SDAC demo project in the Getting Started section. The other SDAC demo projects include a ReadMe file with individual building and launching instructions.

Demo project descriptions

SdacDemo

SdacDemois one large project that includes three collections of demos.

Working with components

A collection of samples that show how to work with the basic SDAC components.

General demos

A collection of samples that show off the SDAC technology and demonstrate some ways to work with data.

SQL Server-specific demos

A collection of samples that demonstrate how to incorporate SQL Server features in database applications.

SdacDemo can be opened from %Sdac%\Demos\SdacDemo\SdacDemo.dpr (.bdsproj). The following table describes all the demos contained in this project.

Working with Components

Name Description
ChangeNotification This demo uses the TMSChangeNotification component to automate synchronization of local data with the actual data on the server. Synchronization happens immediately after changes are applied to the server from a different connection.
ConnectDialog Demonstrates how to customize the SDAC connect dialog . Changes the standard SDAC connect dialog to two custom connect dialogs. The first customized sample dialog is inherited from the TForm class, and the second one is inherited from the default SDAC connect dialog class.
CRDBGrid Demonstrates how to work with the TCRDBGrid component. Shows off the main TCRDBGrid features, like filtering, searching, stretching, using compound headers, and more.
Dump Demonstrates how to backup data from tables with the TMSDump component. Shows how to use scripts created during back up to restore table data. This demo lets you back up a table either by specifying the table name or by writing a SELECT query.
Loader Uses the TMSLoader component to quickly load data into a server table. This demo also compares the two TMSLoader data loading handlers: GetColumnData and PutData .
Query Demonstrates working with TMSQuery , which is one of the most useful SDAC components. Includes many TMSQuery usage scenarios. Demonstrates how to execute queries in both standard and NonBlocking mode and how to edit data and export it to XML files.
Note: This is a very good introductory demo. We recommend starting here when first becoming familiar with SDAC.
ServiceBroker Demonstrates working with the TMSServiceBroker component. This sample shows how to organize simple messaging.
Sql Uses the TMSSQL component to execute SQL statements. Demonstrates how to work in a separate thread, in standard mode, in NonBlocking mode, and how to break long-duration query execution.
StoredProc Uses the TMSStoredProc component to access an editable recordset from an SQL  Server stored procedure in the client application.
Table Demonstrates how to use TMSTable to work with data from a single table on the server without writing any SQL queries manually. Performs server-side data sorting and filtering and retrieves results for browsing and editing.
Transaction Demonstrates usage of the TMSTransaction component to control distributed transactions. The demo shows how to ensure consistent data changes across two connections.
UpdateSQL Demonstrates using the TMSUpdateSQL component to customize update commands. Lets you optionally use TMSSQL and TMSQuery objects for carrying out insert, delete, query, and update commands.
VirtualTable Demonstrates working with the TVirtualTable component. This sample shows how to fill virtual dataset with data from other datasets, filter data by a given criteria, locate specified records, perform file operations, and change data and table structure.

General Demos

Name Description
CachedUpdates Demonstrates how to perform the most important tasks of working with data in CachedUpdates mode, including highlighting uncommitted changes, managing transactions, and committing changes in a batch.
FilterAndIndex Demonstrates SDAC's local storage functionality. This sample shows how to perform local filtering, sorting and TVirtualTable by multiple fields, including by calculated and lookup fields.
MasterDetail Uses SDAC functionality to work with master/detail relationships. This sample shows how to use TMSMetaData local master/detail functionality. Demonstrates different kinds of master/detail linking, including linking by SQL, by simple fields, and by calculated fields.
Pictures Uses SDAC functionality to work with BLOB fields and graphics.. The sample demonstrates how to retrieve binary data from SQL Server database and display it on visual components. Sample also shows how to load and save pictures to files and to the database.
StoredProcUpdates Demonstrates updating a recordset using stored procedures. Update events are tied to stored procedure calls in design time, and every recordset change causes the corresponding stored procedure call to be performed. The commands to call stored procedures are stored in the SQLInsert , SQLDelete , SQLUpdate properties of TMSQuery .
Threads Demonstrates how SDAC can be used in multithreaded applications. This sample allows you to set up several threads and test SDAC's performance with multithreading.

SQL Server-specific Demos

Name Description
Lock This demo shows how to ensure database consistency with locking mechanism of SQL Server through the SDAC functionality. Basing on your choice, a record can be locked exclusively, or just protected from writing.
LongStrings Demonstrates SDAC functionality for working with long string fields (fields that have more than 256 characters). Shows the different ways they can be displayed as memo fields and string fields.
ServerCursors Compares performance of opening a large recordset with different cursor types : client cursor in FetchAll =True mode, client cursor in FetchAll =False mode, and server cursor.
Text Uses SDAC functionality to work with text. The sample demonstrates how to retrieve text data from SQL Server database and display it on visual components. Sample also shows how to load and save text to files and to the database.
UDT This demo demonstrates SDAC abilities for working with CLR User-defined Types (UDT) of SQL Server. The demo folder includes the demo itself, and the sources of a sample type used in this demo. For more information on how to perform all necessary settings, see the Readme.html file in the demo folder.

Supplementary Demo Projects

SDAC also includes a number of additional demo projects that describe some special use cases, show how to use SDAC in different IDEs and give examples of how to integrate it with third-party components. These supplementary SDAC demo projects are sorted into subfolders in the %Sdac%\Demos\ directory.

Location Name Description
ThirdParty FastReport Demonstrates how SDAC can be used with FastReport components. This project consists of two parts. The first part is several packages that integrate SDAC components into the FastReport editor. The second part is a demo application that lets you design and preview reports with SDAC technology in the FastReport editor.
InfoPower Uses InfoPower components to display recordsets retrieved with SDAC. This demo project displays an InfoPower grid component and fills it with the result of an SDAC query. Shows how to link SDAC data sources to InfoPower components.
IntraWeb A collection of sample projects that show how to use SDAC components as data sources for IntraWeb applications. Contains IntraWeb samples for setting up a connection, querying a database and modifying data and working with CachedUpdates and MasterDetail relationships.
QuickReport Lets you launch and view a QuickReport application based on SDAC. This demo project lets you modify the application in design-time.
ReportBuilder Uses SDAC data sources to create a ReportBuilder report that takes data from SQL Server database. Shows how to set up a ReportBuilder document in design-time and how to integrate SDAC components into the Report Builder editor to perform document design in run-time.
TechnologySpecific MSSQLCompact Demonstrates how to create applications that work with Microsoft SQL Server Compact Edition. Demo connects to a database and opens a table. If the specified database does not exists, it will be created automatically. User must have SQL Server Compact Edition installed to test this demo. This is the Win32 version of the project.
Miscellaneous CBuilder A general demo project about creating SDAC-based applications with C++Builder. Lets you execute SQL scripts and work with result sets in a grid. This is one of the two SDAC demos for C++Builder.
Dll Demonstrates creating and loading DLLs for SDAC-based projects. This demo project consists of two parts - an MSDll project that creates a DLL of a form that sends a query to the server and displays its results, and an MSExe project that can be executed to display a form for loading and running this DLL. Allows you to build a dll for one SDAC-based project and load and test it from a separate application.
FailOver Demonstrates the recommended approach to working with unstable networks. This sample lets you perform transactions and updates in several different modes, simulate a sudden session termination, and view what happens to your data state when connections to the server are unexpectedly lost. Shows off CachedUpdates, LocalMasterDetail, FetchAll, Pooling, and different Failover modes.
Midas Demonstrates using MIDAS technology with SDAC. This project consists of two parts: a MIDAS server that processes requests to the database and a thin MIDAS client that displays an interactive grid. This demo shows how to build thin clients that display interactive components and delegate all database interaction to a server application for processing.
Performance Measures SDAC performance on several types of queries. This project lets you compare SDAC performance to BDE, ADO, and dbExpress. Tests the following functionality: Fetch, Master/Detail, Stored Procedure Call, Multi Executing, and Insert/Post.
VirtualTableCB Demonstrates working with the TVirtualTable component. This sample shows how to fill virtual dataset with data from other datasets, filter data by a given criteria, locate specified records, perform file operations, and change data and table structure. This is one of the two demo projects for C++Builder
SdacDemo SdacDemo [Win32 version of the main SDAC demo project - see above]
© 1997-2019 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback