Welcome to ComponentOne WebDataObjects for ASP.NET

Untitled Document ComponentOne WebDataObjects for ASP.NET Untitled Document E-mail sent to documentation@componentone.com is for documentation feedback only. We welcome any suggestions to help improve our documentation.

Welcome to ComponentOne WebDataObjects for ASP.NET

Welcome to ComponentOne WebDataObjects for ASP.NET. C1WebDataObjects is a part of ComponentOne Studio for ASP.NET. If you like WebDataObjects for ASP.NET, you can check out our other products by visiting our web site at http://www.componentone.com.

ComponentOne has a user-friendly distribution policy. We want every programmer to obtain a copy of WebDataObjects for ASP.NET to try for as long as they wish. Those who like the product and find it useful may buy a license for a reasonable price. The only restriction is that unlicensed copies of WebDataObjects for ASP.NET will display a ComponentOne banner every time they are loaded to remind developers to license the product.

We are confident that you'll like WebDataObjects for ASP.NET. If you have any suggestions or ideas for new features or tools that you'd like to see included in a future version please call us or write:

Corporate Headquarters

ComponentOne LLC
201 South Highland Avenue
3rd Floor
Pittsburgh, PA 15206 USA
412.681.4343
412.681.4384 (Fax)

http://www.componentone.com

Overview

What's New in ComponentOne WebDataObjects for ASP.NET

Installing WebDataObjects for ASP.NET

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

Licensing FAQs

Technical Support

Redistributable Files

Namespaces

Creating an ASP.NET Project

Adding the C1WebDataObjects Components to the Toolbox

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Overview

Overview

C1WebDataObjects is a part of ComponentOne Studio for ASP.NET. It enhances the ComponentOne comprehensive data framework with functionality specific to WebForms (ASP.NET). For full description of C1DataObjects functionality, see ComponentOne DataObjects Help also included in ComponentOne Studio for ASP.NET.

Especially important is server-side caching. Since HTTP is a stateless protocol, it is usually necessary to cache data on the server to achieve satisfactory performance. Although facilitated to a certain degree by ASP.NET, this task is perhaps the most challenging in building web database applications, requires extensive manual coding. Even more importantly, the need to cache data on the server in absence of proper tools often forces developers to abandon rich data models such as data sets in favor of primitive data sources such as forward-only data readers. The inability to effectively use data sets on the server leads to dramatic increase in development time for WebForms applications in comparison with WinForms.

The goal of caching facilities in C1WebDataObjects is to provide automatic support for server-side data caching, so developers can concentrate on their application logic instead of technicalities of caching data. Using C1WebDataObjects, you can build your data and business logic for WebForms using the same rich model as in WinForms, the same data set objects and the same data libraries. Essentially, it allows you to work with data in WebForms in the same manner and with the same code as in WinForms. You can create a data library encapsulating your data and business logic and use it both in WinForms and in WebForms.

Why is it so hard to work with data in ASP.NET using only ADO.NET, without C1WebDataObjects caching support? Simply because an ADO.NET data set cannot live on the server for the duration of a user session. Every time the user sends a request to the server (usually doing so-called post-back in ASP.NET), the data set has to be re-created, if it is not cached. There is no support for caching in ADO.NET except for storing whole data sets on the server, which is usually unacceptable for scalability reasons. Since post-back are very common in ASP.NET, and unavoidable if you want to exploit rich ASP.NET capabilities, this is usually the main obstacle to using the rich data set model on the web.

Using C1WebDataObjects, you take advantage of its automatic server-side caching. You do not need to write sophisticated code or sacrifice performance. You just set performance tuning properties for your data schema, specifying which of the supported caching modes to use with which data sets and table views (or, in Express Edition, with which connections and tables), and C1WebDataObjects does the rest automatically. The most important paradigm that dramatically enhances developer productivity is that C1WebDataObjects supports:

· Application-wide (global) cache, where data belonging to different users are stored in a centralized repository while preserving each user’s personal data modifications without conflicts.

· Session cache, storing data on a per-user basis.

· Memory-resident pre-fetched table views allowing immediate access to large amounts of read-only data.

NOTE: You can consider your data set objects with all the business logic you associated with them as always existing and functional on the WebForms server in the same way as they exist on a WinForms client. Your data objects in WebForms no longer have to be read-only or otherwise deprived of the rich functionality available in WinForms.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What's New in ComponentOne WebDataObjects for ASP.NET

What's New in ComponentOne WebDataObjects for ASP.NET

This documentation was last revised on July 19, 2005.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Feature Overview

Feature Overview

There are no new features in WebDataObjects for .NET at this time.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Installing WebDataObjects for ASP.NET

Installing WebDataObjects for ASP.NET

This section describes the setup files and system requirements for WebDataObjects for ASP.NET. It also explains how to install demonstration versions of ComponentOne products and uninstall WebDataObjects for ASP.NET.

WebDataObjects for ASP.NET Setup Files

System Requirements

Installing Demonstration Versions

Uninstalling DataObjects for .NET

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WebDataObjects for ASP.NET Setup Files

WebDataObjects for ASP.NET Setup Files

The installation program will create the directory C:\Program Files\ComponentOne Studio.NET, which contains the following subdirectories:

bin | Contains copies of all binaries (DLLs, EXEs) in the ComponentOne Visual Studio.NET package.
Common | Contains support and data files that are used by many of the demo programs.
Help | Contains online documentation for all Studio components.
DataExpress and Data Objects | Contains samples and tutorials for DataExpress for .NET and DataObjects for .NET

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


System Requirements

System Requirements

· Operating Systems:

- Windows 2000

- Windows 2003 Server

- Windows NT 4

- Windows XP, sp1, sp2

· Web Server:

- Microsoft Internet Information Services (IIS) 5.x

- Microsoft Internet Information Services (IIS) 6.x

· Environments:

- .NET Framework 1.0

- .NET Framework1.1

- ASP.NET

- C# .NET

- Delphi

- Internet Explorer 4.x

- Internet Explorere 5.x

- Internet Explorer 6.x

- Netscape 4

- Netscape 6

- Netscape 7

- Visual Basic .NET

· Hard Disk Space: 39 mb hard disk space for storage of the software

· Disc Drive: CD or DVD-ROM drive if installing from CD

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Installing Demonstration Versions

Installing Demonstration Versions

If you wish to try WebDataObjects for ASP.NET or any of our other products and do not have a registration key, follow the steps through the installation wizard and use the default serial number.

The only difference between unregistered (demonstration) and registered (purchased) versions of our products is that registered versions will stamp every application you compile so a ComponentOne banner will not appear when your users run the applications.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Uninstalling DataObjects for .NET

Uninstalling DataObjects for .NET

To uninstall WebDataObjects for ASP.NET, open the Control Panel and select the Add or Remove Programs. Select WebDataObjects for ASP.NET and click the Remove button.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

END-USER LICENSE AGREEMENT FOR COMPONENTONE SOFTWARE

IMPORTANT-READ CAREFULLY: This End User License Agreement (this "EULA") contains the terms and conditions regarding your use of the SOFTWARE (as defined below). This EULA contains material limitations to your rights in that regard. You should read this EULA carefully and treat it as valuable property.

I. THIS EULA.

1. Software Covered by this EULA. This EULA governs your use of the ComponentOne, LLC ("C1") software product(s) enclosed or otherwise accompanied herewith (individually and collectively, the "SOFTWARE"). The term "SOFTWARE" includes, to the extent provided by C1: 1) any revisions, updates and/or upgrades thereto; 2) any data, image or executable files, databases, data engines, computer software, or similar items customarily used or distributed with computer software products; 3) anything in any form whatsoever intended to be used with or in conjunction with the SOFTWARE; and 4) any associated media, documentation (including physical, electronic and on-line) and printed materials (the "Documentation").

2. This EULA is a Legally Binding Agreement Between You and C1. If you are acting as an agent of a company or another legal person, such as an officer or other employee acting for your employer, then "you" and "your" mean your principal, the entity or other legal person for whom you are acting. However, importantly, even if you are acting as an agent for another, you may still be personally liable for violation of federal and State laws, such as copyright infringement.

This EULA is a legally binding agreement between you and C1. You intend to be legally bound to this EULA to the same extent as if C1 and you physically signed this EULA. By installing, copying, or otherwise using the SOFTWARE, you agree to be bound by the terms and conditions contained in this EULA. If you do not agree to all of the terms and conditions contained in this EULA, you may not install or use the SOFTWARE. If, for whatever reason, installation has begun or has been completed, you should cancel installation or un-install the SOFTWARE, as the case may be. (You may click on the "exit" button or its equivalent to immediately abort installation.) If you do not agree to all of these terms and conditions, then you must promptly return the SOFTWARE to the place of business from which you obtained it in accordance with any return policies of such place of business. Return policies may vary between or among resellers, and you must comply with your particular reseller's return policies as agreed at the point of purchase. If the place of business from which you purchased the SOFTWARE does not honor a complete refund for a period of thirty (30) days from the date of proof of purchase, then you may return the SOFTWARE directly to C1 for a period of thirty (30) days from the date of your purchase. To return the product directly to C1, you must obtain a C1 Return Authorization Number by contacting C1, and you must forward all items purchased, including the proof of purchase, directly to C1. The return must be postage-prepaid, and post-marked within thirty (30) days from the proof of purchase, time being of the essence. The return option to C1 is only available to the original purchaser of an unopened factory packaged item.

II. YOUR LICENSE TO DEVELOP AND TO DISTRIBUTE.

As provided in more detail below, this EULA grants you two licenses: 1) a license to use the SOFTWARE to develop other software products (the "Development License"); and 2) a license to use and/or distribute the Developed Software (the "Distribution License"). Both of these licenses (individually and collectively, the "Licenses") are explained and defined in more detail below.

1. Definitions. The following terms have the respective meanings as used in this EULA:

"Network Server" means a computer with one or more computer central processing units (CPU's) that operates for the purpose of serving other computers logically or physically connected to it, including, but not limited to, other computers connected to it on an internal network, intranet or the Internet. "Web Server" means a type of Network Server that serves other computers more particularly connected to it over an intranet or the Internet.

"Developed Software" means those computer software products that are developed by or through the use of the SOFTWARE. "Developed Web Server Software" means those Developed Software products that reside logically or physically on at least one Web Server and are operated (meaning the computer software instruction set is carried out) by the Web Server's central processing unit(s) (CPU). "Developed Legacy Software" means those Developed Software products that are not Developed Web Server Software, including, for example, stand-alone applications and applications accessed by a file server only. "Redistributable Files" means the SOFTWARE files or other portions of the SOFTWARE that are provided by C1 and are identified as such in the Documentation for distribution by you with the Developed Software. "Developer" means a human being or any other automated device using the SOFTWARE in accordance with the terms and conditions of this EULA.

"Developer Seat License" means that each Developer using or otherwise accessing the programmatic interface or the SOFTWARE must obtain the right to do so by purchasing a separate End User License.

“Source Code” shall mean computer software code or programs in human readable format, such as a printed listing of such a program written in a high-level computer language. The term "Source Code" includes, but is not limited to, documents and materials in support of the development effort of the SOFTWARE, such as flow charts, pseudo code and program notes.

2. Your Development License. You are hereby granted a limited, royalty-free, non-exclusive right to use the SOFTWARE to design, develop, and test Developed Software, on the express condition that, and only for so long as, you fully comply with all terms and conditions of this EULA.

The SOFTWARE is licensed to you on a Developer Seat License basis.

The Developer Seat License means that you may perform an installation of the SOFTWARE for use in designing, testing and creating Developed Software by a single Developer on one or more computers, each with a single set of input devices, so long as such computer/computers is/are used only by one single Developer at any given time and not concurrently. Conversely, you may not install or use the SOFTWARE on a computer that is a network server or a computer at which the SOFTWARE is used by more than one Developer. You may not network the SOFTWARE or any component part of it, where it is or may be used by more than one Developer unless you purchase an additional Development License for each Developer. You must purchase another separate license to the SOFTWARE in order to add additional developer seats, whether the additional developers are accessing the SOFTWARE in a stand-alone environment or on a computer network.

In all cases, you may not use C1's name, logo, or trademarks to market your Developed Software without the express written consent of C1; (b) you must include the following C1 copyright notice in your Developed Software documentation and/or in the "About Box" of your Developed Software, and wherever the copyright/rights notice is located in the Developed Software (“Portions Copyright © ComponentOne, LLC 1991-2002. All Rights Reserved.”); (c) agree to indemnify, hold harmless, and defend C1, its suppliers and resellers, from and against any claims or lawsuits, including attorney's fees that may arise from the use or distribution of your Developed Software; (d) you may use the SOFTWARE only to create Developed Software that is significantly different than the SOFTWARE.

3. Your Distribution License.

License to Distribute Developed Software. Subject to the terms and conditions in this EULA, you are granted the license to use and to distribute Developed Software on a royalty-free basis, provided that the Developed Software incorporates the SOFTWARE as an integral part of the Developed Software in machine-language compiled format (customarily an ".exe", or ".dll", etc.). You may not distribute, bundle, wrap or subclass the SOFTWARE as Developed Software which, when used in a "designtime" development environment, exposes the programmatic interface of the SOFTWARE. You may distribute, on a royalty-free basis, Redistributable Files with Developed Software only.

4. Specific Product Limitations. Notwithstanding anything in this EULA to the contrary, if the license you have purchased is for any of the following products, then the following additional limitations will apply:

a. ComponentOne Reports for .NET Designer Edition. ComponentOne Reports for .NET Designer Edition includes at least: 1) one dynamic link library (c1.win.c1reportdesigner.dll) file known as C1ReportDesigner Component, 2) one executable (ReportDesigner.exe) file known as C1ReportDesigner Application and, 3) the Source Code of the C1ReportDesigner Application. The C1ReportDesigner Component is subject to the general terms and restrictions set forth in this EULA. The C1ReportDesigner Application is an executable file used to design and prepare reports; the C1ReportDesigner Application may be distributed, free of royalties, only in conjunction with the Developed Software.

Subject to the terms and conditions in this EULA, C1 hereby grants you the right to use the C1ReportDesigner Application Source Code. You are hereby also granted the right to modify such Source Code and to create derivative works that are based on the licensed Source Code. You may distribute the derivative works that you develop, solely in object code format and exclusively in conjunction with and/or as a part of the Developed Software. You are expressly not granted the right to distribute, disclose or otherwise make available to any third party the licensed Source Code, any modified version, derivative work, or any portion thereof, in source code format.

C1 shall retain all right, title and interest in and to the licensed Source Code, and all C1 updates, modifications or enhancements thereof. Nothing herein shall be deemed to transfer any ownership or title rights in and to the licensed Source Code from C1 to you.

SOURCE CODE IS LICENSED TO YOU AS IS. C1 DOES NOT AND SHALL NOT PROVIDE YOU WITH ANY TECHNICAL SUPPORT FOR YOUR SOURCE CODE LICENSE.

b. VSView Reporting Edition. VSView Reporting Edition includes at least one executable file listed as “VSRptX.exe” (where X indicates the version number i.e.7,8, etc.), known as “Designer.” The file "VSRptX.exe”, or any upgrade or future versions of the Designer, are subject to the restrictions set forth in this EULA and may not be distributed with your Developed Software or in any other way.

c. Doc-to-Help and ComponentOne Natural Search. You may use Doc-To-Help to create online help, manuals or other documentation in electronic or printed format (the "Output Documents"). You may distribute and incorporate in such Output Documents those files identified in the documentation as Redistributable Files. Except for those specific Redistributable Files, you MAY NOT distribute the SOFTWARE, in any format, to others.

d. Studio Products. You may not share the component parts of the Studio Products licensed to you with other Developers, nor may you allow the use and/or installation of such components by other Developers.

e. ComponentOne Response and SOAP Channel. ComponentOne Response is intended to be installed on a Network Server. C1 grants to you the following rights to the SOFTWARE: a) Installation: You may install one copy of the SOFTWARE on a single Network Server; b) Use: When installed and initialized, the SOFTWARE creates a database file which contains the embodiment of a solution knowledge base (the database hereinafter referred to as the "Knowledge Base").

You may use the SOFTWARE to create Knowledge Bases on one Network Server only. To create or to operate Knowledge Bases in more than one Network Server, you must purchase one additional SOFTWARE license for each additional Network Server.

5. Updates/Upgrades; Studio Subscription. Subject to the terms and conditions of this EULA, the Licenses are perpetual. Updates and upgrades to the SOFTWARE may be provided by C1 from time-to-time, and, if so provided by C1, are provided upon the terms and conditions offered at that time by C1 in its sole discretion. C1 may provide updates and upgrades to the SOFTWARE for free or for any charge, at any time or never, and through its chosen manner of access and distribution, all in C1's sole and complete discretion.

C1 licenses certain of its separately-licensed products bundled together in a product suite, called the C1 "Studio" product line (the "Studio Products"). The exact separately-licensed products that are bundled into the Studio Products may change from time-to-time in C1's sole discretion. If the SOFTWARE is identified as a C1 "Studio" product, then the SOFTWARE is one of the Studio Products. The SOFTWARE and the Studio Products are revised from time-to-time (meaning, for example, revised with updates, upgrades and, in the case of Studio products, possibly changes to which specific products are included in the bundle). For you to be entitled to receive any such revisions to the SOFTWARE or the Studio Products, as the case may be, you must have a valid SOFTWARE license or a valid Studio subscription. The original purchaser of the SOFTWARE or of a Studio product receives a one-year subscription from the date of purchase of the SOFTWARE. After one year, the Studio subscription and/or the SOFTWARE license must be renewed to continue to be entitled to receive the SOFTWARE and/or the Studio Products revisions as the case may be.

6. Serial Number. Within the packaging of the SOFTWARE, a unique serial number (the "Serial Number") is included, which allows for the registration of the SOFTWARE. The Serial Number is subject to the restrictions set forth in this EULA and may not be disclosed or distributed either with your Developed Software or in any other way. The disclosure or distribution of the Serial Number shall constitute a breach of this EULA, the effect of which shall be the automatic termination and revocation of all the rights granted herein.

7. Evaluation Copy. If you are using an "evaluation copy" or similar version, specifically designated as such by C1 on its website or otherwise, then the Licenses are limited as follows: a) you are granted a license to use the SOFTWARE for a period of thirty (30) days counted from the day of installation (the "Evaluation Period"); b) upon completion of the Evaluation Period, you shall either i) delete the SOFTWARE from the computer containing the installation, or you may ii) contact C1 or one of its authorized dealers to purchase a license of the SOFTWARE, which is subject to the terms and limitations contained herein; and c) any Developed Software may not be distributed or used for any commercial purpose.

III. INTELLECTUAL PROPERTY.

1. Copyright. You agree that all right, title, and interest in and to the SOFTWARE (including, but not limited to, any images, photographs, animations, video, audio, music, text, and “applets” incorporated into the SOFTWARE), and any copies of the SOFTWARE, and any copyrights and other intellectual properties therein or related thereto are owned exclusively by C1, except to the limited extent that C1 may be the rightful license holder of certain third-party technologies incorporated into the SOFTWARE. The SOFTWARE is protected by copyright laws and international treaty provisions. The SOFTWARE is licensed to you, not sold to you. C1 reserves all rights not otherwise expressly and specifically granted to you in this EULA.

2. Backups. You may either: (a) copy the SOFTWARE solely for backup or archival purposes; or (b) install the SOFTWARE on a single computer, provided you keep the original solely for backup or archival purposes. Notwithstanding the foregoing, you may not copy the Documentation.

3. General Limitations. You may not reverse engineer, decompile, or disassemble the SOFTWARE, except and only to the extent that applicable law expressly permits such activity notwithstanding this limitation.

4. Software Transfers. You may not rent or lease the SOFTWARE. You may transfer the SOFTWARE to another computer, provided that it is completely removed from the computer from which it was transferred. You may permanently transfer all of your rights under the EULA, provided that you retain no copies, that you transfer all the SOFTWARE (including all component parts, the media and printed materials, any dates, upgrades, this EULA and, if applicable, the Certificate of Authenticity), and that the recipient agrees to the terms and conditions of this EULA as provided herein. If the SOFTWARE is an update or upgrade, any transfer must include all prior versions of the SOFTWARE.

5. Termination. Without prejudice to any other rights it may have, C1 may terminate this EULA and the Licenses if you fail to comply with the terms and conditions contained herein. In such an event, you must destroy all copies of the SOFTWARE and all of its component parts.

6. Export Restrictions. You acknowledge that the SOFTWARE is of U.S. origin. You acknowledge that the license and distribution of the SOFTWARE is subject to the export control laws and regulations of the United States of America, and any amendments thereof, which restrict exports and re-exports of software, technical data, and direct products of technical data, including services and Developed Software. You agree that you will not export or re-export the SOFTWARE or any Developed Software, or any information, documentation and/or printed materials related thereto, directly or indirectly, without first obtaining permission to do so as required from the United States of America Department of Commerce's Bureau of Export Administration ("BXA"), or other appropriate governmental agencies, to any countries, end-users, or for any end-uses that are restricted by U.S. export laws and regulations, and any amendments thereof, which include, but are not limited to, the following:

Restricted Countries: Restricted Countries currently include, but are not necessarily limited to Cuba, Iran, Iraq, Libya, Montenegro, North Korea, Serbia, Sudan, and Syria.

Restricted End-Users: Any End-User whom you know or have reason to know will use SOFTWARE or Developed Software in the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons. Any national of any of the Restricted Countries, wherever located, who intends to transmit or transport the SOFTWARE or Developed Software to one of the Restricted Countries.

Restricted End-Uses: Any use of SOFTWARE and Developed Software related to the design, development, or production of missiles and missile technology, nuclear weapons and weapons technology, or chemical and biological weapons.

These restrictions change from time to time. You represent and warrant that neither the BXA nor any other United States federal agency has suspended, revoked or denied your export privileges. C1 acknowledges that it shall use reasonable efforts to supply you with all reasonably necessary information regarding the SOFTWARE and its business to enable you to fully comply with the provisions of this Section. If you have any questions regarding your obligations under United States of America export regulations, you should contact the Bureau of Export Administration, United States Department of Commerce, Exporter Counseling Division, Washington DC. U.S.A. (202) 482-4811, http://www.bxa.doc.gov.

7. U.S. Government Restricted Rights. The SOFTWARE and documentation are provided with RESTRICTED RIGHTS. For solicitations issued before December 1, 1995, by the United States of America, its agencies and/or instrumentalities (the "Government"), other than the Department of Defense, the use, duplication or disclosure of the software and documentation provided to the Government under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at 48 CFR ch.1 52.227-19. For solicitations issued before September 29, 1995, by the Department of Defense, the use, duplication or disclosure of the software and documentation provided under this EULA shall be subject to the RESTRICTED RIGHTS as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at 48 CFR ch.2 252.227-7013. You will comply with any requirements of the Government to obtain such RESTRICTED RIGHTS protection, including without limitation, the placement of any restrictive legends on the SOFTWARE, and any license agreement used in connection with the distribution of the SOFTWARE. Manufacturer is ComponentOne, LLC, 201 South Highland Avenue, 3rd Floor, Pittsburgh, Pennsylvania 15206 USA. For solicitations issued by the Government on or after December 1, 1995 and the Department of Defense on or after September 29, 1995, the only rights provided in the software and documentation provided herein shall be those contained in this EULA. Under no circumstances shall C1 be obligated to comply with any Governmental requirements regarding the submission of or the request for exemption from submission of cost or pricing data or cost accounting requirements. For any distribution of the SOFTWARE that would require compliance by C1 with the Government's requirements relating to cost or pricing data or cost accounting requirements, you must obtain an appropriate waiver or exemption from such requirements for the benefit of C1 from the appropriate Government authority before the distribution and/or license of the SOFTWARE to the Government.

IV. WARRANTIES AND REMEDIES.

1. Limited Warranty. C1 warrants that the original media, if any, are free from defects for ninety (90) days from the date of delivery of the SOFTWARE. EXCEPT AS OTHERWISE PROVIDED IN THE PRECEDING SENTENCE, AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, C1 EXPRESSLY DISCLAIMS ANY WARRANTY FOR THE SOFTWARE, DOCUMENTATION AND ANYTHING ELSE PROVIDED BY C1 HEREBY AND C1 PROVIDES THE SAME IN “AS IS” CONDITION WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE AND DOCUMENTATION REMAINS WITH YOU. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS WHICH VARY FROM STATE TO STATE.

2. Limited Remedy. C1's entire liability and your exclusive remedy under this EULA shall be, at C1's sole option, either (a) return of the price paid for the SOFTWARE; (b) repair the SOFTWARE through updates distributed online or otherwise in C1's discretion; or (c) replace the SOFTWARE with SOFTWARE that substantially performs as described in the SOFTWARE documentation, provided that you return the SOFTWARE in the same manner as provided in Section I.2 for return of the SOFTWARE for non-acceptance of this EULA. Any media for any repaired or replacement SOFTWARE will be warranted for the remainder of the original warranty period or thirty (30) days, whichever is longer. THESE REMEDIES ARE NOT AVAILABLE OUTSIDE OF THE UNITED STATES OF AMERICA. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL C1 BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFIT, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF C1 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES IN CERTAIN CASES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

V. MISCELLANEOUS.

1. This is the Entire Agreement. This EULA (including any addendum or amendment to this EULA included with the SOFTWARE) is the final, complete and exclusive statement of the entire agreement between you and C1 relating to the SOFTWARE. This EULA supersedes any prior and contemporaneous proposals, purchase orders, advertisements, and all other communications in relation to the subject matter of this EULA, whether oral or written. No terms or conditions, other than those contained in this EULA, and no other understanding or agreement which in any way modifies these terms and conditions, shall be binding upon the parties unless entered into in writing executed between the parties, or by other non-oral manner of agreement whereby the parties objectively and definitively act in a manner to be bound (such as by continuing with an installation of the SOFTWARE, "clicking-through" a questionnaire, etc.) Employees, agents and other representatives of C1 are not permitted to orally modify this EULA.

2. You Indemnify C1. . You agree to indemnify, hold harmless, and defend C1 and its suppliers and resellers from and against any and all claims or lawsuits, including attorney's fees, which arise out of or result from your breach of any of the terms and conditions of this EULA.

3. Interpretation of this EULA. If for any reason a court of competent jurisdiction finds any provision of this EULA, or any portion thereof, to be unenforceable, that provision of this EULA will be enforced to the maximum extent permissible so as to effect the intent of the parties, and the remainder of this EULA will continue in full force and effect. Formatives of defined terms shall have the same meaning of the defined term. Failure by either party to enforce any provision of this EULA will not be deemed a waiver of future enforcement of that or any other provision. Except as otherwise required or superseded by law, this EULA is governed by the laws of the Commonwealth of Pennsylvania, without regard to its conflict of laws principles. The parties consent to the personal jurisdiction and venue of the Commonwealth of Pennsylvania, in the County of Allegheny, and agree that any legal proceedings arising out of this EULA shall be conducted solely in such Commonwealth. If the SOFTWARE was acquired outside the United States, then local law may apply.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Licensing FAQs

Licensing FAQs

This section describes the main technical aspects of licensing. It may help the user to understand and resolve licensing problems he may experience when using ComponentOne .NET and ASP.NET products.

What is Licensing?

How does Licensing Work?

Common Scenarios

Troubleshooting

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


What is Licensing?

What is Licensing?

Licensing is a mechanism used to protect intellectual property by ensuring that users are authorized to use software products.

Licensing is not only used to prevent illegal distribution of software products. Many software vendors, including ComponentOne, use licensing to allow potential users to test products before they decide to purchase them.

Without licensing, this type of distribution would not be practical for the vendor or convenient for the user. Vendors would either have to distribute evaluation software with limited functionality, or shift the burden of managing software licenses to customers, who could easily forget that the software being used is an evaluation version and has not been purchased.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


How does Licensing Work?

How does Licensing Work?

ComponentOne uses a licensing model based on the standard set by Microsoft, which works with all types of components.

Note: The Compact Framework components use a slightly different mechanism for licensing than the other ComponentOne components due to platform differences.

When a user decides to purchase a product, he receives an installation program and a Serial Number. During the installation process, the user is prompted for the serial number that is saved on the system. (Users can also enter the serial number by clicking the "License" button on the About Box of any ComponentOne product.)

When a licensed component is added to a form or web page, Visual Studio asks the newly created component for licensing information. The component looks for licensing information stored in the system and generates a key, which Visual Studio saves in two files:

1. a "<projectName>.licenses" resource file which contains the actual key and

2. a "licenses.licx" file that contains references to those resources.

These files are automatically added to the project.

Note that the licenses.licx file is usually not shown in the Solution Explorer; it appears if you press the "Show All Files" button in the Solution Explorer's toolbox, or select "Project | Show All Files" from Visual Studio's main menu.

Later, when the component is created at run time, it gets passed the key that was created at design time and can decide whether to simply accept the key, to throw an exception and fail altogether, or to display some information reminding the user that the software has not been licensed.

All ComponentOne products are designed to display licensing information if the product is not licensed. None will throw licensing exceptions and prevent applications from running.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Common Scenarios

Common Scenarios

Creating components at design time

Creating components at run time

Inheriting from licensed components

Using licensed components in console applications

Using licensed components in Visual C++ applications

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating components at design time

Creating components at design time

This is the most common scenario and also the simplest: the user adds one or more controls to the form, the licensing information is stored in the licenses.licx file, and the component works.

Note that the mechanism is exactly the same for Windows Forms and Web Forms (ASP.NET) projects.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating components at run time

Creating components at run time

This is also a fairly common scenario. You do not need an instance of the component on the form, but would like to create one or more instances at run time.

In this case, the project will not contain a licenses.licx file (or the file will not contain an appropriate key for the component) and therefore licensing will fail.

To fix this problem, add an instance of the component to a form in the project. This will create the licenses.licx file and things will then work as expected. (The component can be removed from the form after the licenses.licx file has been created).

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Inheriting from licensed components

Inheriting from licensed components

If a component that inherits from a licensed component is created, the licensing information to be stored in the form is still needed. This can be done in two ways:

· Add a LicenseProvider attribute to the component.

This will mark the component as licensed. When a component is added to a form, Visual Studio will create and manage the licenses.licx file, and the base class will handle the licensing process as usual. No additional work is needed. For example:

[LicenseProvider(typeof(LicenseProvider))]

class MyGrid: C1.Win.C1FlexGrid.C1FlexGrid

{

// ...

}

· Add an instance of the base component to the form.

This will embed the licensing information into the licenses.licx file as in the previous scenario, and the base component will find it and use it. As before, the extra instance can be deleted after the licenses.licx file has been created.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using licensed components in console applications

Using licensed components in console applications

When building console applications, there are no forms to add components to, and therefore Visual Studio won't create a licenses.licx file.

In these cases, create a temporary Windows Forms application and add all the desired licensed components to a form. Then close the Windows Forms application and copy the licenses.licx file into the console application project.

Make sure the licensex.licx file is configured as an embedded resource. To do this, right-click the licenses.licx file in the Solution Explorer window and select Properties. In the property window, set the "Build Action" property to "Embedded Resource".

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using licensed components in Visual C++ applications

Using licensed components in Visual C++ applications

It seems there is a bug in VC++ 2003. The licenses.licx is ignored during the build process, therefore the licensing information is not included in VC++ applications.

To fix this problem, extra steps must be taken to compile the licensing resources and link them to the project. Note the following:

1. Build the C++ project as usual. This should create an exe file and also a licenses.licx file with licensing information in it.

2. Copy the licenses.licx file from the app directory to the target folder (Debug or Release).

3. Copy the C1Lc.exe utility and the licensed dlls to the target folder. (Don't use the standard lc.exe, it has bugs.)

4. Use C1Lc.exe to compile the licenses.licx file. The command line should look like this:

c1lc /target:MyApp.exe /complist:licenses.licx /i:C1.Win.C1FlexGrid.dll

5. Link the licenses into the project. To do this, go back to Visual Studio, right-click the project, select properties, and go to the Linker/Command Line option. Enter the following:

/ASSEMBLYRESOURCE:Debug\MyApp.exe.licenses

6. Rebuild the executable to include the licensing information in the application.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Troubleshooting

Troubleshooting

We try very hard to make the licensing mechanism as unobtrusive as possible, but problems may occur for a number of reasons.

Below is a description of the most common problems and their solutions.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.

If this happens, there must be a problem with the licenses.licx file in the project. It either doesn't exist, contains wrong information, or is not configured correctly.

First, try a full rebuild ("Rebuild All" from the Visual Studio Build menu). This will usually rebuild the correct licensing resources.

If that fails, follow these steps:

1. Open the project and go to the Solution Explorer window.

2. Click the "Show All Files" button on the top of the window.

3. Find the licenses.licx file and delete it.

4. Close the project and reopen it.

5. Open the main form and add an instance of each licensed control.

6. Check the Solution Explorer window, there should be a licenses.licx file there.

7. Rebuild the project using the "Rebuild All" option (not just "Rebuild").

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

I have a licensed version of a ComponentOne product on my web server but the components still behave as unlicensed.

There is no need to install any licenses on machines used as servers and not used for development.

The components must be licensed on the development machine, therefore the licensing information will be saved into the executable (exe or dll) when the project is built. After that, the application can be deployed on any machine, including web servers.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

I downloaded a new build of a component that I have purchased, and now I'm getting the splash screen when I build my projects.

Make sure that the license key is still valid. If you licensed the component over a year ago, your subscription may have expired. In this case, you have two options:

Option 1 - Renew your subscription to get a new license key.

If you choose this option, you will receive a new key that you can use to license the new components (from the installation utility or directly from the About Box).

The new subscription will entitle you to a full year of upgrades and to download the latest maintenance builds directly from http://prerelease.componentone.com/.

Option 2 – Continue to use the components you have.

Subscriptions expire, products do not. You can continue to use the components you received or downloaded while your subscription was valid.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Technical Support

Technical Support

ComponentOne WebDataObjects for ASP.NET is developed and supported by ComponentOne LLC, a company formed by the merger of APEX Software Corporation and VideoSoft. You can obtain technical support using any of the following methods:

ComponentOne Web Site

ComponentOne HelpCentral

Internet E-mail

Peer-to-Peer Newsgroup

Documentation

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComponentOne Web Site

ComponentOne Web Site

The ComponentOne Web site at www.componentone.com provides a wealth of information and software downloads for Preview for .NET users, including:

· Descriptions of the various support options available through the ComponentOne Service Team.

· Answers to frequently asked questions (FAQ's) about our products, organized by functionality. Please consult the FAQ's before contacting us directly, as this can save you time and also introduce you to other useful information pertaining to our products.

· Free product updates, which provide you with bug fixes and new features.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


ComponentOne HelpCentral

ComponentOne HelpCentral

ComponentOne HelpCentral is the new online resource for Visual Studio developers and Help authors. Visit HelpCentral to get information on ComponentOne products, view online demos, get Tech Tips and answers to frequently asked questions (FAQ's), search the ComponentOne knowledgebase and more!

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Internet E-mail

Internet E-mail

For technical support through the Internet, e-mail us at:

support.c1data.net@componentone.com

To help us provide you with the best support, please include the following information when contacting ComponentOne:

· Your ComponentOne product serial number.

· The version and name of your operating system.

· Your development environment and its version.

For more information on technical support, go to:

www.componentone.com/support

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Peer-to-Peer Newsgroup

Peer-to-Peer Newsgroup

ComponentOne also sponsors peer-to-peer newsgroups for C1WebData users. ComponentOne does not offer formal technical support in this newsgroup, but instead sponsors it as a forum for users to post and answer each other's questions regarding C1WebData. However, ComponentOne may monitor the newsgroups to ensure accuracy of information and provide comments when necessary. You can access the newsgroup from the ComponentOne Web site at http://helpcentral.componentone.com/Newsgroups.aspx.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Documentation

Documentation

ComponentOne documentation is available with each of our products in HTML Help, Microsoft Help 2.0 (.NET, ASP.NET and Mobile Device products only), and PDF format. All of the PDFs are also available on HelpCentral. If you have suggestions on how we can improve our documentation, please email the Documentation team. Please note that e-mail sent to the Documentation team is for documentation feedback only. Technical Support and Sales issues should be sent directly to their respective departments.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Redistributable Files

Redistributable Files

ComponentOne WebDataObjects for ASP.NET is developed and published by ComponentOne LLC. You may use it to develop applications in conjunction with Microsoft Visual Studio or any other programming environment that enables the user to use and integrate the control(s). You may also distribute, free of royalties, the following Redistributable Files with any such application you develop to the extent that they are used separately on a single CPU on the client/workstation side of the network:

· c1.web.data.dll

· c1.web.data.express.dll

· c1.data.dll

· c1.data.express.dll

Site licenses are available for groups of multiple developers. Please contact Sales@ComponentOne.com for details.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Namespaces

Namespaces

Namespaces organize the objects defined in an assembly. Assemblies can contain multiple namespaces, which can in turn contain other namespaces. Namespaces prevent ambiguity and simplify references when using large groups of objects such as class libraries.

The general namespace for ComponentOne Web products is C1.Web. The namespaces for the C1WebData components are C1.Web.Data and C1.Web.Data.Express. The following code fragment shows how to declare a C1WebDataSet component using the fully qualified name for this class:

· Visual Basic

· C#

· Delphi

Namespaces address a problem sometimes known as namespace pollution, in which the developer of a class library is hampered by the use of similar names in another library. These conflicts with existing components are sometimes called name collisions.

For example, if you create a new class named GlobalCache, you can use it inside your project without qualification. However, the C1.Web.data.dll assembly also implements a class called GlobalCache. So, if you want to use C1WebData's GlobalCache class in the same project, you must use a fully qualified reference to make the reference unique. If the reference is not unique, Visual Studio .NET produces an error stating that the name is ambiguous. The following code snippet demonstrates how to declare these objects:

· Visual Basic

· C#

· Delphi

Fully qualified names are object references that are prefixed with the name of the namespace where the object is defined. You can use objects defined in other projects if you create a reference to the class (by choosing Add Reference from the Project menu) and then use the fully qualified name for the object in your code.

Fully qualified names prevent naming conflicts because the compiler can always determine which object is being used. However, the names themselves can get long and cumbersome. To get around this, you can use the Imports statement (using in C#) to define an alias — an abbreviated name you can use in place of a fully qualified name. For example, the following code snippet creates aliases for two fully qualified names, and uses these aliases to define two objects:

· Visual Basic

· C#

· Delphi

If you use the Imports statement without an alias, you can use all the names in that namespace without qualification provided they are unique to the project.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating an ASP.NET Project

Creating an ASP.NET Project

This topic demonstrates how to create a new ASP.NET project.

1. From the File menu in Microsoft Visual Studio .NET, select New and click Project. The New Project dialog box opens.

2. Under Project Types, choose either Visual Basic Projects or Visual C# Projects, and select ASP.NET Web Application from the list of Templates in the right pane.

3. Enter a URL for your application in the Location field and click OK.

Note: The Web server must have IIS version 5 or later and the .NET Framework installed on it. If you have IIS on your computer, you can specify http://localhost for the server.

A new Web Forms project is created at the root of the Web server you specified. In addition, a new Web Forms page called WebForm1.aspx is displayed in the Web Forms Designer in Design view.

4. Double-click a C1WebDataObjects component in the Toolbox to add it to WebForm1.aspx. For information on adding a component to the toolbox, see Adding the C1WebDataObjects Components to the Toolbox.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding the C1WebDataObjects Components to the Toolbox

Adding the C1WebDataObjects Components to the Toolbox

When you install C1WebDataObjects for ASP.NET the following components are added to Visual Studio’s toolbox customization dialog:

· C1WebDataSet

· C1WebExpressConnection

· C1WebExpressTable

After installing C1WebDataObjects on your computer, you need to add the C1.Web.Data or C1.Web.Data.Express components to the Visual Studio Toolbox:

Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary). Right-click the Toolbox to open the toolbox context menu.

If you want one or more of the C1WebDataObjects for ASP.NET components to appear on their own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, for example, “C1WebData”. Select the tab where you want the components to appear. Right-click that tab and select Customize Toolbox… from the context menu. The Customize Toolbox dialog box will open.

In the Customize Toolbox dialog box, go to the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check boxes for components available in the C1.Web.Data or C1.Web.Data.Express namespace.

If you do not have C1DataObjects components installed on the Toolbox, you also need to select components in the C1.Data or C1.Data.Express namespace.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using C1WebDataObjects Components

Using C1WebDataObjects Components

C1WebDataObjects component classes are derived from C1DataObjects classes. Although you can use C1DataObjects components in WebForms, you will not benefit from WebForm-specific functionality such as automatic caching unless you use C1WebDataObjects.

C1WebDataObjects contains separate components for use with Enterprise edition and Express edition of C1DataObjects. If you use Enterprise edition only, you need one assembly, C1.Web.Data.dll in addition to C1.Data.dll. If you use Express edition, you need two assemblies, C1.Web.Data.dll and C1.Web.Data.Express.dll in addition to C1.Data.dll and C1.Data.Express.dll.

Enterprise Edition Components

Express Edition Components

Global Cache

Session Cache

Cache Storage

Memory-Resident Table Views

Object Pooling

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Enterprise Edition Components

Enterprise Edition Components

There is only one web component for Enterprise edition: C1WebDataSet. It is derived from C1DataSet. Using C1WebDataSet instead of C1DataSet on a web page enables the web functionality enhancement such as automatic caching.

You can use C1WebDataSet both in direct client configuration and with a data library. See “Application Configurations” in C1DataObjects documentation for the description of data library and direct client configuration. In direct client configuration, you connect C1WebDataSet to a C1SchemaDef component representing a data schema residing on the same web page with your data set.

In a data library configuration, which is the standard way to use C1DataObjects, you build your data library regardless of whether it will be used in WinForms or in WebForms. The data library contains data description and business logic code. Both are used in WinForms and WebForms, usually without any change. The ability to specify business logic independently and then use it in WebForms and in WinForms, using the same data library assembly, is a powerful feature of C1WebDataObjects.

Since data library is the same for WinForms and WebForms, you use the standard C1SchemaDef component in your data library. However, the updated version of C1DataObjects coming with C1WebDataObjects includes special property settings in data schema, accessible in Schema Designer, for tuning caching behavior. These settings are only active when the data library is used with C1WebDataObjects. You can see the CacheProperties object with tuning properties on the Properties tab of a DataSet Editor in Schema Designer. These are the settings on data set level. There is also a Boolean property on table view level, TableView.MemoryResident that allows you to make individual read-only table views pre-fetched and resident in memory. Finally, there is a SessionCacheProperties object accessible as a property of C1SchemaDef, that you can use to set default argument values for session cache method calls.

In direct client configuration, you also use C1SchemaDef with the same cache settings in the schema and in the C1SchemaDef component. Use this configuration only if you don’t need to reuse the schema and logic and decide to put it on a web page together with C1WebDataSet. Consider creating a data library if there is a chance your business logic will be reused on more than one page or with different clients, such as WinForms.

To make caching work properly, you need to include some code, certain method calls, usually very simple, in your web page. Task based help, reference and samples will show you how to do it. These methods are static members of two classes, GlobalCache and SessionCache. These two classes have no instantiated objects, they are just collections of static methods (functions) that you use to control the cache.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Express Edition Components

Express Edition Components

As in regular C1DataObjects, Express edition components in C1WebDataObjects can be used in cases where you don’t need independent and reusable business logic and ease of use is more important to you than functional richness. Express components reside directly on your web forms (web pages) and cannot be reused across web pages.

Working with Express edition, you use C1WebExpressTable derived from C1ExpressTable, and C1WebExpressConnection derived from C1ExpressConnection. Put a C1WebExpressConnection and one or more C1WebExpressTable components on your web form and connect the C1WebExpressTable components to the C1WebExpressConnection. Unlike C1ExpressTable, C1WebExpressTable must always be connected to a C1WebExpressConnection.

You can also use the C1ExpressView component that belongs to the regular C1DataExpress. C1ExpressView does not have web-specific functionality, so there was no need to create a special counterpart for it in C1WebDataObjects, the regular C1ExpressView is enough.

C1WebExpressConnection has special object properties called CacheProperties and SessionCacheProperties containing settings for tuning caching behavior. These are the settings on data set level. You can tune CacheProperties if you use global cache and SessionCacheProperties if you use session cache. There is also a Boolean property on table level, MemoryResident that allows you to make individual read-only tables pre-fetched and resident in memory.

To make caching work properly, you need to include some code, certain method calls, usually very simple, in your web page. Task based help, reference and samples will show you how to do it. These methods are static members of two classes, GlobalCache and SessionCache. These two classes have no instantiated objects, they are just collections of static methods (functions) that you use to control the cache.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Global Cache

Global Cache

Global cache is the default caching mode, it is used by default for every C1WebObjects data set if you don’t change cache settings and don’t call SessionCache methods. To disable caching for a data set completely, set CacheProperties.CacheMode = NotCached.

Global cache is a common storage on the server for your web application serving all requests from all users while preserving the changes made by an individual user. When a data set is filled with data from database, the fetched data is stored in the cache for later use, together with information about user request, such as the filter condition used to fetch data. When another request for the same data set with the same filter condition arrives from the same or another user later on, cached data is used to fill the data set instead of fetching data from the database.

If the user modifies data, global cache stores user modifications and then applies them automatically to the cached or fetched data next time a request arrives from the same user, to preserve the consistency of this user’s view of modified data. The users’ responsibility is to call SaveChanges after they are done with modifying data, that enables global cache to save this user’s changes for future use.

Comparing with session cache, global cache has the advantage of scalability, because data is stored without duplication. Same data fetched by multiple users is stored only once. It can also improve performance, because when one user fetches some data and then the same request (with the same filter condition if one is specified) arrives from a different user, the second user’s request will likely be served by the cache, without database fetch. Global cache is particularly effective when you have relatively large data sets (so it is not practical to store them in session cache) with modifiable tables and filter conditions used in requests are likely to repeat themselves. Read-only (non-modifiable) tables are best represented as memory-resident, see Memory-resident Table Views, but you can make one or more table views memory-resident and store the rest in the global cache (or in the session cache). You can also store some data sets in global cache, some in session cache, and make others not cacheable.

On the other hand, global cache has a disadvantage (or rather a feature that can be detrimental in some cases, though neutral or even beneficial in others) with respect to session cache in that the data received by the same user can change between requests due to changes in the database made by other users. In session cache, each user’s data set is stored separately, so they don’t feel any changes made by others until the whole data set is re-fetched from the database. In global cache, a user is guaranteed to receive the same data for same requests until another user updates the database. At the time of database update, all global cache data pertaining to this data set is cleared, so it is fetched from the database next time it is requested by any user. However, it is important to understand that this only affects rows that have not been changed by the user. Global cache guarantees that users always see modified rows intact, cannot lose their modifications under any circumstances. The fact that unmodified rows can change between requests simply means that the user sees the most recent rows from the database, excluding rows modified by the same user, which appear locked, owned by the user until they are committed to the database.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Session Cache

Session Cache

Session cache stores every user’s data set separately on the server. The greatest advantage of session cache is when it is used in Memory storage mode. In this case the whole data set object is stored in memory in a ready filled state, so it is immediately reused on post-backs, does not need to be filled with data at all. Performance gain can be dramatic, since no data are copied, even in memory, on saving the data set, and there is virtually no delays for data retrieval. However, Memory storage mode consumes server memory. Also, the immediate, without copying data, storage and retrieval in Memory mode take effect only if you configure your application for in-process mode (use SessionStateMode = InProc). In other session state modes, SqlServer and StateServer, the data is first copied to a persistent object in memory, which is also fast, but depends on the data size. If you consider using session cache to improve performance, weigh it against the possibility of users’ data taking up too much server memory. To conserve server memory, you can use File storage mode with session cache. This mode is not as fast as Memory, but still about two times faster than global cache. If you want greater scalability, do not want to allocate server resources for individual users, consider using global cache or combine session or global cache with memory-resident table views.

Another possible reason for using session cache is when it is important that each user’s data are stored separately on the server so they are completely insulated from other users’ changes. If you make a decision to use session cache for that reason, make sure you really need complete isolation from other users’ changes, which in effect means creating a snapshot of data for every user. It is often not necessary and even undesirable to work with such snapshots. Using global cache might be a better option because it ensures that once you modified a row it won’t change, and unmodified rows changing in accordance with database changes is often acceptable and indeed desirable. Still, if you really need snapshots, use session cache.

Also, session cache can be recommended if a considerable part of the data in the data set, say 50%, is expected to be modified by the user. In this case, session cache is preferable because it stores modified data as efficiently as unmodified, whereas global cache stores data modifications separately for each user (thus consuming server resources for this purpose no less than session cache does) and furthermore, global cache performs special actions on each modified row restoring the data set on post-back. This is not a performance drain if modified rows are relatively few, but it becomes essential if they constitute a considerable part of the overall row count.

Unlike global cache, session cache is never used automatically. You call SaveData to store data in session cache and Fill to retrieve data from session cache.

As with global cache, you can make one or more table views memory-resident and store the rest in the session cache. You can also store some data sets in global cache, some in session cache, and make others not cacheable.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Cache Storage

Cache Storage

Cache storage mode can be specified in CacheProperties (for global cache) and in SessionCacheProperties (for session cache, default that can be overridden in session cache method calls). It is one of the two options in the CacheStorageModeEnum enumeration: Memory or File.

Cached data can be stored in memory (option: Memory). This option provides slightly better performance, but takes up server memory resources. It is less a concern with global cache, because global cache holds only limited number of cached data set instances (see the MaxCount property). With session cache, Memory is a less frequently used option because session cache instances remain alive as long as the user session is alive, so using session cache for large data sets (not counting memory-resident table views) with large number of users can use up server memory.

The default option for global cache is File. File storage is available for session cache as well. In this case data is stored in binary files on the server, a file per data set instance, in a directory that can be specified in cache tuning properties.

The default option for session cache is Memory. In this case the whole data set object is stored in memory in ready filled state, so it is immediately reused on post-backs, does not need to be filled with data at all. Performance gain can be dramatic, since there is virtually no delays for data retrieval. However, Memory storage mode consumes server memory. Also, the immediate, without copying data, storage and retrieval in Memory mode take effect only if you configure your application for in-process mode (use SessionStateMode = InProc). In other session state modes, SqlServer and StateServer, the data is first copied to a persistent object in memory, which is also fast, but depends on the data size.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Memory-Resident Table Views

Memory-Resident Table Views

In Enterprise edition, you can specify a table view as memory-resident setting TableView.MemoryResident = True. In Express edition you can make a C1WebExpressTable memory-resident setting MemoryResident = True. In any data set, you can make one or more table views memory-resident while storing the rest in the global cache or in the session cache. Memory-resident table views are automatically excluded from global and session cache operations.

A memory-resident table view is fetched from the database only once, when it is first requested, and then it will be just reused on every user request, for any user, at no performance cost.

This is, of course, a powerful technique to optimize performance, but it can only be used for read-only tables. A memory-resident table view must be read-only (TableView.ReadOnly = True) and it can be based only on read-only tables (Table.ReadOnly = True).

And another restriction applies to memory-resident table views: you can’t specify different filter conditions for them calling C1DataSet.Fill. Memory-resident table views are always in memory, they are skipped when data is fetched in C1DataSet.Fill, except when it is the first fetch of the application. Therefore, you can’t change their filter conditions, they need to be constant. The filter condition will take effect only once for the application, in the first Fill.

More precisely, a memory-resident table can be fetched more than once, due to concurrency issues. This occurs when a user requests the table view while it is being used by another user request. In this case, if the object pool is not full, a new worker object is created (see Object Pooling), added to the pool, and the memory-resident table view is fetched to that worker object. So, a memory-resident table views belongs to a worker object, and maximum number of times it is fetched is the maximum worker object count in the pool, which is specified by the CacheProperties.PoolSize property.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Object Pooling

Object Pooling

Another optimization technique used by C1WebDataObjects is object pooling. Object pooling is automatic, you don’t need to write code or set properties to benefit from it. There is, however, a few properties that you might want to set to fine-tune object pooling.

Object pooling eliminates the need for C1WebDataObjects to create a new internal object each time to service a new request. Creating an internal object (called worker object) has a performance cost, although not particularly high, usually a small fraction of a second, but perceptible nevertheless.

C1WebDataObjects maintains an internal pool of worker objects, which once created is never destroyed until the application process is shut down. The number of worker objects in the pool is limited by the CacheProperties.PoolSize property. The first worker object is created when the first user makes a request for data. Then new worker objects are created and added to the pool on a need-to-serve basis. When a new request arrives, C1WebDataObjects first looks for a free worker object in the pool to service the request. If all worker objects are busy and the CacheProperties.PoolSize limit has not yet been reached, a new worker object is created and added to the pool. If the pull is full, reached its maximum size, and all worker objects are busy, then the new request will wait until one of the busy worker objects finishes its job and becomes free to service the new request. This waiting time is limited by the CacheProperties.PoolTimeout property. After the timeout expires, C1WebDataObjects throws an exception saying that it is unable to service the request. By default, this timeout is 0, which means that no timeout limit is imposed, the request will wait indefinitely until one of the worker processes becomes free, and the exception is never thrown. Setting non-zero CacheProperties.PoolTimeout can make sense for cases where it is possible for a request (through user code) to hang indefinitely and you don’t want this to affect other requests by making them wait indefinitely while all pooled worker processes are hanging (rather a hypothetical situation, but theoretically possible).

Object pooling can be disabled by setting CacheProperties.PoolSize = 0. Then a new worker object is created for each new request and destroyed when it finishes serving the request.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WebDataObjects Enterprise Edition

WebDataObjects Enterprise Edition

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Global Cache in Enterprise Edition

Using Global Cache in Enterprise Edition

Using global cache is almost completely automatic. By default, every data set in the schema has CacheProperties.CacheMode = InWebForms, which means that it uses global cache.

To disable caching, set CacheProperties.CacheMode = NotCached.

You may need to specify cache properties for global cache tuning. This is done for each data set on the Properties tab of the data set editor in the schema designer. If you select CacheStorage = File (default), especially in production settings, you may want to increase the value of the MaxCount, 50 by default, limiting the number of data set instances in the cache.

With CacheStorage = File, you will usually set the CacheProperties.CacheStoragePath property to point to a directory where you will store cache files. If you use a multi-server configuration (web farm), you must include a server name in the path to ensure that all cache files are stored on the same server (usually called state server). If you fail to provide a server name, data will be cached on the server that is serving current user request. That can cause data inconsistency when requests are assigned to different servers. By default, if you leave CacheProperties.CacheStoragePath empty, the temporary directory of the current server is used.

If you use CacheProperties.CacheStoragePath = File, you will also usually set the ChangesCacheStoragePath property to specify a directory where you store files containing saved user data modifications. This is a part of global cache necessary if users are allowed to modify data. The same considerations regarding server name in the path apply to CacheProperties.ChangesCacheStoragePath as to CacheProperties.CacheStoragePath.

Other than tuning cache properties, which is optional, global cache works automatically. It is used every time you call C1WebDataSet.Fill. Filling the data set, C1WebDataObjects first looks for data in the cache and performs database fetch only if it is not found in the cache.

The only additional code you must include in your application to support global is one line in your Global.aspx file:

· Visual Basic

· C#

· Delphi

This is necessary to clean up the cache files when your application is shut down. It is necessary only if you use CacheProperties.CacheStorage = File, but it is a good idea to always call this method in Application_End event.

For additional information on using global cache and CacheProperties, see Using CacheProperties in the Task-Based Help.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Session Cache in Enterprise Edition

Using Session Cache in Enterprise Edition

You can use global cache for some data sets and session cache for others. You don’t need to change any settings in order to use session cache. Session cache is used by calling SessionCache methods.

The usual pattern is to replace C1DataSet.Fill calls with the following:

· Visual Basic

· C#

· Delphi

This code first tries to fill the data set with data from the session cache. If this is executed for the first time in the user session, then session cache does not yet contain data c1DataSet1, and the data is fetched from the database with C1WebDataSet1.Fill(). After fetch, we save the data in session cache for future use.

Also, make sure that C1WebDataSet1.FillOnRequest is set to False, to prevent C1WebDataObjects from filling the data set automatically when you bind controls to it.

If you modify data in a data set that uses session cache, you are responsible for saving the modified data set in session cache if you need (and you usually do) the modifications to be persistent, to be restored next time you restore the data set from session cache. Usually, you update the session cache after you are done modifying the data set by calling the SaveData method:

· Visual Basic

· C#

· Delphi

SessionCache.SaveData has a cacheStorage argument that is one of the two possible values: File or Memory. If the argument is omitted, the value specified in C1SchemaDef.SessionCacheProperties.DefaultStorage is used. The default is Memory.

If you use cacheStorage = File, you will usually need to set the SessionCacheProperties.StoragePath property of the C1SessionDef component to point to a directory where your session cache files are stored. If you use a multi-server configuration (web farm), you must include a server name in the path to ensure that all cache files are stored on the same server (usually called state server). If you fail to provide a server name, data will be cached on the server that is serving current user requests. That can cause data inconsistency when requests are assigned to different servers. By default, if you leave SessionCacheProperties.StoragePath empty, the temporary directory of the current server is used.

Finally, if you use cacheStorage = File, you must include a clean-up line in your application Global.aspx file:

· Visual Basic

· C#

· Delphi

This is necessary to clean up the cache files when a session is closed. It is necessary only if you use cacheStorage = File, but it is a good idea to always call this method in Session_End event.

For additional information on using session cache, see Using SessionCache in the Task-Based Help.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Memory-Resident Table Views in Enterprise Edition

Using Memory-Resident Table Views in Enterprise Edition

Making large table views memory-resident can dramatically improve performance. If you want to make a table view memory-resident, make sure

· it is read-only, and

· you always specify the same filter condition for this table view or no condition at all (filter condition will take effect only once for the application, in the first Fill).

In the Schema Designer, open the data set containing the table view, select the table view on the Diagram tab, select TableView.MemoryResident property in the property grid below, set MemoryResident = True. This is all that is needed to make a table view memory-resident.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


WebDataObjects Express Edition

WebDataObjects Express Edition

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Global Cache in Express Edition

Using Global Cache in Express Edition

Using global cache is almost completely automatic. By default, a C1WebExpressConnection component has CacheProperties.CacheMode = InWebForms, which means that it uses global cache.

To disable caching, set CacheProperties.CacheMode = NotCached.

You may need to specify cache properties for global cache tuning. This is done in the CacheProperties property. If you select CacheProperties.CacheStorage = File (default), especially in production settings, you may want to increase the value of the CacheProperties.MaxCount, 50 by default, limiting the number of data set instances in the cache.

With CacheProperties.CacheStorage = File, you will usually set the CacheProperties.CacheStoragePath property to point to a directory where you will store cache files. If you use a multi-server configuration (web farm), you must include a server name in the path to ensure that all cache files are stored on the same server (usually called state server). If you fail to provide a server name, data will be cached on the server that is serving current user request. That can cause data inconsistency when requests are assigned to different servers. By default, if you leave CacheProperties.CacheStoragePath empty, the temporary directory of the current server is used.

If you use CacheProperties.ChangesCacheStorage = File, you will also usually set the CacheProperties.ChangesCacheStoragePath property to specify a directory where you store files containing saved user data modifications. This is a part of global cache necessary if users are allowed to modify data. The same considerations regarding server name in the path apply to CacheProperties.ChangesCacheStoragePath as to CacheProperties.CacheStoragePath.

Other than tuning cache properties, which is optional, global cache works automatically. It is used every time you call C1WebExpressConnection.Fill. Filling the data set, C1WebDataObjects first looks for data in the cache and performs database fetch only if it is not found in the cache.

The only additional code you must include in your application to support global is one line in your Global.aspx file:

· Visual Basic

· C#

· Delphi

This is necessary to clean up the cache files when your application is shut down. It is necessary only if you use CacheProperties.CacheStorage = File, but it is a good idea to always call this method in Application_End event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Session Cache in Express Edition

Using Session Cache in Express Edition

You can use global cache for some C1WebExpressConnection component and session cache for others. You do not need to change any settings in order to use session cache. Session cache is used by calling SessionCache methods.

The usual pattern is to replace C1WebExpressConnection.Fill calls with the following:

· Visual Basic

· C#

· Delphi

This code first tries to fill the data set with data from the session cache. If this is executed for the first time in the user session, then session cache does not yet contain data c1WebExpressConnection1, and the data is fetched from the database with c1WebExpressConnection1.Fill(). After fetch, we save the data in session cache for future use.

Also, make sure that c1WebExpressConnection1.FillOnRequest is set to False, to prevent C1WebDataObjects from filling the data set automatically when you bind controls to it.

If you modify data in a data set that uses session cache, you are responsible to save the modified data set in session cache, if you need (and you usually do) the modifications to be persistent, to be restored next time you restore the data set from session cache. Usually, you update session cache after you are done with modifying data set, calling

· Visual Basic

· C#

· Delphi

SaveData has a cacheStorage argument that is one of the two possible values: File or Memory. If the argument is omitted, the value specified in SessionCacheProperties.DefaultStorage is used. The default is Memory.

If you use cacheStorage = File, you will usually need to set the SessionCacheProperties.StoragePath property of the c1WebExpressConnection1 component to point to a directory where your session cache files are stored. If you use a multi-server configuration (web farm), you must include a server name in the path to ensure that all cache files are stored on the same server (usually called state server). If you fail to provide a server name, data will be cached on the server that is serving current user request. That can cause data inconsistency when requests are assigned to different servers. By default, if you leave SessionCacheProperties.StoragePath empty, the temporary directory of the current server is used.

Finally, if you use cacheStorage = File, you must include a clean-up line in your application Global.aspx file:

· Visual Basic

· C#

· Delphi

This is necessary to clean up the cache files when a session is closed. It is necessary only if you use cacheStorage = File, but it is a good idea to always call this method in Session_End event.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using Memory-Resident Table in Express Edition

Using Memory-Resident Table in Express Edition

Making large tables memory-resident can dramatically improve performance. If you want to make a table memory-resident, make sure

· it is read-only (C1WebExpressTable.ReadOnly = True), and

· you don’t need to change FillFilter property for this table during user session (FillFilter condition will take effect only once for the application, in the first Fill).

To make a table memory-resident, set MemoryResident property to True.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataObjects Samples

C1WebDataObjects Samples

Please be advised that this ComponentOne software title is accompanied by various sample projects and/or demos, which may or not make use of other ComponentOne development tools. While the sample projects and/or demos included with the software are used to demonstrate and highlight the product’s features, and how the control may be integrated with the rest of the ComponentOne product line, some of the controls used in the demo/sample project may not be included with the purchase of certain individual products.

NOTE: In order to run some samples, the Microsoft SQL Server 2000 Desktop Engine software and the Microsoft .NET Framework SDK databases must be installed. For more information on the installation procedures, see http://msdn.microsoft.com/netframework/downloads/sdkmsde/default.aspx.

The ComponentOne Samples are also available at http://helpcentral.componentone.com/ProductResources.aspx.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Visual Basic, C#, and Borland Samples

Visual Basic, C#, and Borland Samples

DataOnTheWeb | Shows how to use C1WebData for building web applications allowing to show and update data from SQL server. This sample uses the C1WebDataSet control.
DataOnTheWebExpress | Shows how to use C1WebDataExpress for building web applications allowing to show and update data from SQL server. This sample uses the C1WebExpressTable and C1WebExpressConnection controls.
UsingMemoryResident | Shows how to use memory-resident table views. This sample uses the C1WebDataSet control.
UsingMemoryResidentExpress | Shows how to use memory-resident table views. This sample uses the C1WebExpressTable and C1WebExpressConnection controls.
UsingSessionCache | Demonstrates usage of session cache to achieve isolated data representation for each user. This sample uses the C1WebDataSet control.
UsingSessionCacheExpress | Demonstrates usage of session cache to achieve isolated data representation for each user. This sample uses the C1WebExpressTable and C1WebExpressConnection controls.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Task-Based Help

Task-Based Help

The task-based help assumes that you are familiar with programming in Visual Studio .NET, and know how to use bound controls in general. By following the steps outlined in the help, you will be able to create projects demonstrating a variety of C1WebData features and get a good sense of what C1WebData can do.

Each task-based help topic also assumes that you have created a new ASP.NET project. For additional information on this topic, see Creating an ASP.NET Project.

Creating a Data Library

Using C1WebDataSet with a Data Library

Using C1WebDataSet in Direct Client Configuration

Using SessionCache

Using CacheProperties

Adding References in the Web.Config file

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Creating a Data Library

Creating a Data Library

1. Select File, New, Project.

2. In the New Project dialog, select ComponentOne Data Library under Visual Basic Projects or Visual C# Projects.

3. Use the Import Wizard and Schema Designer to configure your schema.

4. Select Build Solution from the Build menu to produce the data library assembly.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using C1WebDataSet with a Data Library

1. Create and compile a new Data Library project containing at least one data set definition.

2. Create a new ASP.NET Project or add a new ASP.NET Web application to the Data Library solution.

3. Add a reference to the new Data Library:

· Right-click References and select Add Reference.

· Browse to the bin folder of the new Data Library project.

· Select the new library's .dll and click Open.

· Click OK in the Add Reference dialog. This adds a reference to the DataLibrary.dll to your project. The list of all data set definitions in the schema becomes available for selection in the DataSetDef property.

4. Double-click C1WebDataSet from the Toolbox to add a C1WebDataSet component to the form.

· Set the DataLibrary property of the C1WebDataSet to the new Data Library.

· Select a data set definition from the dropdown box next to the DataSetDef property.

5. Add a DataGrid component to the form.

· Set the DataSource property to C1WebDataSet.

· Set the DataMember property.

6. Add the following code to the Page_Load event:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using C1WebDataSet in Direct Client Configuration

Using C1WebDataSet in Direct Client Configuration

1. Create a new ASP.NET Project.

2. Double-click C1SchemaDef from the Toolbox to add a C1SchemaDef component to the form.

3. Use the Import Wizard and Schema Designer to configure your schema.

4. Double-click C1WebDataSet from the Toolbox to add a C1WebDataSet component to the form.

· Set the SchemaDef property to C1SchemaDef.

· Select a data set definition from the dropdown box next to the DataSetDef property.

5. Add a DataGrid component to the form.

· Set the DataSource property to C1WebDataSet.

· Set the DataMember property.

6. Add the following code to the Page_Load event:

· Visual Basic

· C#

· Delphi

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using SessionCache

Using SessionCache

For this example, a DataList was created and bound to a C1WebDataSet.

1. Add a DataList and C1WebDataSet to your project.

2. Add the following code to your Page_Load event to find data in the session cache, if it is there:

· Visual Basic

· C#

· Delphi

3. To save changes in session cache every time you change data in the data set, add the following code:

· Visual Basic

· C#

· Delphi

4. Clean up the cache files when a session is closed. Enter the following code in the Global.asax:

· Visual Basic

· C#

· Delphi

See the UsingSessionCache sample provided with C1WebDataObjects for additional information.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Using CacheProperties

Using CacheProperties

The CacheProperties class is used to specify global cache settings for a DataSetDef class using its DataSetDef.CacheProperties property.

Global cache is the default caching mode. It is used by default for every C1WebObjects data set if you do not change the cache settings and do not call SessionCache methods.

To disable caching for a data set completely, set CacheProperties.CacheProperties.CacheMode = NotCached.

The following code should be used with global cache:

Enter the following in the Page_Load event handler:

· Visual Basic

· C#

· Delphi

Save changes in the global cache every time you change data in the data set:

· Visual Basic

· C#

· Delphi

If you need to refresh data from the database, the global cache should be cleared:

· Visual Basic

· C#

· Delphi

Clean up the cache files when your application is shut down. Enter the following code in the Global.asax:

· Visual Basic

· C#

· Delphi

See the DataOnTheWeb sample provided with C1WebDataObjects for additional information.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Adding References in the Web.Config file

Adding References in the Web.Config file

This topic demonstrates how to add references to C1Data assemblies in a Web.config file.

If your assembly is in the GAC and not in the bin, ASP.NET will load your assembly at run time only if you include it in a Web.config file.

If you have a control, not just component, in your assembly, and you drop that component on a web form in your project at design time, Visual Studio generates a reference to the assembly in the .aspx file. For example, adding a C1WebGrid control to a web form generates the following reference:

<%@
Register TagPrefix="c1webgrid" Namespace="C1.Web.C1WebGrid"
Assembly="C1.Web.C1WebGrid, Version=1.1.20044.44, Culture=neutral,
PublicKeyToken=589f1fc067ff4031" %>

With such reference, ASP.NET will load your assembly from the GAC at run time without problems. Therefore, there is no need for additional references in Web.config if you use a control, not just a component. But if your assembly only has components, not controls, as is the case with C1WebData, or, if you do not have a control on the web form at design time, then you need to place those references in Web.config (only if your assembly is NOT in the bin on the development machine). Otherwise, it will not work at run time. It will fail to load the assembly and say that your Component class belongs to an assembly whose reference is not included in the project.

NOTE: If your assembly is in the GAC and in the bin, it can be loaded twice in Visual Studio at design time. This can cause problems for objects that have typeconverters. Because of this, ComponentOne requires C1Data assemblies to be present in the GAC and NOT present in the bin at design time.

Add the following code to Web.config of your WebDataObjects project:

<configuration>

<system.web>

<compilation

defaultLanguage="c#"

debug="true">

<assemblies>

<add assembly="C1.Data, Version=1.0.20022.0,

Culture=neutral, PublicKeyToken=900b028620cd3a1b"/>

<add assembly="C1.Data.Express, Version=1.0.20022.0,

Culture=neutral, PublicKeyToken=253763f1c3e4ceec"/>

<add assembly="C1.Web.Data, Version=1.0.20024.0,

Culture=neutral, PublicKeyToken=545227e12fe8ee01"/>

<add assembly="C1.Web.Data.Express, Version=1.0.20024.0,

Culture=neutral, PublicKeyToken=e887d47c090832ef"/>

</assemblies>

</compilation>

</system.web>

</configuration>

Remove any references to these assemblies from the application once they have been added to the Web.config file.

Note: You will only have to change this code if the assembly version of the .dll changes.

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data Assembly

C1.Web.Data Assembly

Namespaces

C1.Web.Data

See Also

C1.Web.Data.Express Assembly

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data.Express Assembly

C1.Web.Data.Express Assembly

Namespaces

C1.Web.Data.Express

See Also

C1.Web.Data Assembly

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data Namespace

C1.Web.Data Namespace

C1.Web.Data Hierarchy

Classes

Class | Description
C1WebDataSet | C1WebDataSet is a class derived from C1.Data.C1DataSet used on a web form for data access.
GlobalCache | This class contains methods for global cache manipulation.
SessionCache | This class contains methods for session cache manipulation.

Interfaces

Interface | Description
IC1CacheableObject | This interface represents an object whose data can be stored in global or session cache.

See Also

C1.Web.Data.Express Assembly

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Class

C1WebDataSet Class

C1WebDataSet is a class derived from C1.Data.C1DataSet used on a web form for data access.

For a list of all members of this type, see C1WebDataSet Members.

System.Object

System.ComponentModel.MarshalByValueComponent

C1.Data.BaseFormAwareMarshalByValueComponent

C1.Data.C1DataSet

C1.Web.Data.C1WebDataSet

[Visual Basic]

Public Class C1WebDataSet

Inherits C1DataSet

Implements IC1CacheableObject

[C#]

public class C1WebDataSet : C1DataSet , IC1CacheableObject

[Delphi]

type C1WebDataSet = class (C1DataSet, IC1CacheableObject);

Namespace: C1.Web.Data

Assembly: C1.Web.Data (in c1.web.data.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Members

C1WebDataSet Members

C1WebDataSet overview

Public Constructors

C1WebDataSet Constructor

Initializes a new instance of the C1WebDataSet class.

Public Properties

CaseSensitive (inherited from C1DataSet) | Determines whether string comparisons within the data set are case-sensitive.
ChangeInProgress (inherited from C1DataSet) | Gets or sets a value indicating whether firing AfterChanges event is deferred.
Credentials (inherited from C1DataSet) | Gets or sets username, password and domain used to communicate with the server.
DataLibrary (inherited from C1DataSet) | Gets or sets the name of the data library containing the schema.
DataLibraryUrl (inherited from C1DataSet) | In a 3-tier client application, this property gets or sets the URL of the data library located on the server.
DataSetDef (inherited from C1DataSet) | Gets or sets the name of the data set in the schema.
DynamicConnections (inherited from C1DataSet) | Gets a collection of Connection objects used at run time as substitutes for schema connections.
EnforceConstraints (inherited from C1DataSet) | Gets or sets a value indicating whether relation constraints must be satisfied while modifying the data set.
ExecutionMode (inherited from C1DataSet) | Gets or sets a value indicating whether actions in handling a business logic event are deferred or performed immediately.
ExtendedProperties (inherited from C1DataSet) | Gets a collection of custom user information associated with the data set.
Filled (inherited from C1DataSet) | Gets a value indicating whether the data set is filled with data.
FillOnRequest (inherited from C1DataSet) | Gets or sets a value indicating whether the data set will be automatically filled with data when a data bound control requests data from it.
HasErrors (inherited from C1DataSet) | Gets a value indicating whether there are errors in any of the rows in any of the tables of this data set.
Locale (inherited from C1DataSet) | Determines the locale information used in string comparisons within the data set.
Schema (inherited from C1DataSet) | Returns the Schema object representing the schema on which the data set is based.
SchemaDef (inherited from C1DataSet) | Returns or sets the C1SchemaDef component hosting the schema on which the data set is based.
SuppressNotifications (inherited from C1DataSet) | Gets or sets a value indicating whether data bound controls must be notified of changes in the data set.
Tables (inherited from C1DataSet) | Returns the collection of tables in the data set.
TableViews (inherited from C1DataSet) | Returns the collection of table views in the data set.

Public Methods

AcceptChanges (inherited from C1DataSet) | Commits all the changes made to the data set since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Clear (inherited from C1DataSet) | Removes all rows from all data set tables.
Fill (inherited from C1DataSet) | Overloaded. Fills the data set with data fetching it from the database.
GetChanges (inherited from C1DataSet) | Overloaded. Gets a copy of the data set containing all changes to simple tables made to it since it was last filled, or since AcceptChanges was called. Composite tables and table views are empty in the resulting data set.
GetExportDataSet (inherited from C1DataSet) | Overloaded. Creates and fills with data an ADO.NET data set consisting of this data set's table views.
HasChanges (inherited from C1DataSet) | Overloaded. Gets a value indicating whether the data set has changes, including new, deleted, or modified rows, optionally filtered by DataRowStateEnum.
Merge (inherited from C1DataSet) | Merges the parameter data set containing only simple table data into this (caller) data set.
PopExecutionMode (inherited from C1DataSet) | Restore the execution mode affecting actions invoked while handling another action.
PushExecutionMode (inherited from C1DataSet) | Sets the execution mode affecting actions invoked while handling another action.
ReadXml (inherited from C1DataSet) | Overloaded. Reads XML data into the data set.
RejectChanges (inherited from C1DataSet) | Rolls back all changes made to the data set since it was filled with data or the last time AcceptChanges or RejectChanges was called.
StopAsyncFetch (inherited from C1DataSet) | For DataAccessMode = VirtualAutomatic, stops background fetch, if it is in progress.
Update | Overloaded. Overriden. Updates (commits) changed rows to the database.
WriteXml (inherited from C1DataSet) | Overloaded. Writes XML data from the data set.

Public Events

AfterFill (inherited from C1DataSet) | Fired after the data set is filled with data.
BeforeFill (inherited from C1DataSet) | Fired before the data set fills with data.
Error (inherited from C1DataSet) | Fired when an error occurs.
UpdateError (inherited from C1DataSet) | Fired when an error occurs committing changes to the database.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Constructor

C1WebDataSet Constructor

Initializes a new instance of the C1WebDataSet class.

[Visual Basic]

Public Function New()

[C#]

public C1WebDataSet()

[Delphi]

public constructor Create(); overload;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Properties

C1WebDataSet Properties

The properties of the C1WebDataSet class are listed here. For a complete list of C1WebDataSet class members, see the C1WebDataSet Members topic.

Public Properties

CaseSensitive (inherited from C1DataSet) | Determines whether string comparisons within the data set are case-sensitive.
ChangeInProgress (inherited from C1DataSet) | Gets or sets a value indicating whether firing AfterChanges event is deferred.
Credentials (inherited from C1DataSet) | Gets or sets username, password and domain used to communicate with the server.
DataLibrary (inherited from C1DataSet) | Gets or sets the name of the data library containing the schema.
DataLibraryUrl (inherited from C1DataSet) | In a 3-tier client application, this property gets or sets the URL of the data library located on the server.
DataSetDef (inherited from C1DataSet) | Gets or sets the name of the data set in the schema.
DynamicConnections (inherited from C1DataSet) | Gets a collection of Connection objects used at run time as substitutes for schema connections.
EnforceConstraints (inherited from C1DataSet) | Gets or sets a value indicating whether relation constraints must be satisfied while modifying the data set.
ExecutionMode (inherited from C1DataSet) | Gets or sets a value indicating whether actions in handling a business logic event are deferred or performed immediately.
ExtendedProperties (inherited from C1DataSet) | Gets a collection of custom user information associated with the data set.
Filled (inherited from C1DataSet) | Gets a value indicating whether the data set is filled with data.
FillOnRequest (inherited from C1DataSet) | Gets or sets a value indicating whether the data set will be automatically filled with data when a data bound control requests data from it.
HasErrors (inherited from C1DataSet) | Gets a value indicating whether there are errors in any of the rows in any of the tables of this data set.
Locale (inherited from C1DataSet) | Determines the locale information used in string comparisons within the data set.
Schema (inherited from C1DataSet) | Returns the Schema object representing the schema on which the data set is based.
SchemaDef (inherited from C1DataSet) | Returns or sets the C1SchemaDef component hosting the schema on which the data set is based.
SuppressNotifications (inherited from C1DataSet) | Gets or sets a value indicating whether data bound controls must be notified of changes in the data set.
Tables (inherited from C1DataSet) | Returns the collection of tables in the data set.
TableViews (inherited from C1DataSet) | Returns the collection of table views in the data set.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Methods

C1WebDataSet Methods

The methods of the C1WebDataSet class are listed here. For a complete list of C1WebDataSet class members, see the C1WebDataSet Members topic.

Public Methods

AcceptChanges (inherited from C1DataSet) | Commits all the changes made to the data set since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Clear (inherited from C1DataSet) | Removes all rows from all data set tables.
Fill (inherited from C1DataSet) | Overloaded. Fills the data set with data fetching it from the database.
GetChanges (inherited from C1DataSet) | Overloaded. Gets a copy of the data set containing all changes to simple tables made to it since it was last filled, or since AcceptChanges was called. Composite tables and table views are empty in the resulting data set.
GetExportDataSet (inherited from C1DataSet) | Overloaded. Creates and fills with data an ADO.NET data set consisting of this data set's table views.
HasChanges (inherited from C1DataSet) | Overloaded. Gets a value indicating whether the data set has changes, including new, deleted, or modified rows, optionally filtered by DataRowStateEnum.
Merge (inherited from C1DataSet) | Merges the parameter data set containing only simple table data into this (caller) data set.
PopExecutionMode (inherited from C1DataSet) | Restore the execution mode affecting actions invoked while handling another action.
PushExecutionMode (inherited from C1DataSet) | Sets the execution mode affecting actions invoked while handling another action.
ReadXml (inherited from C1DataSet) | Overloaded. Reads XML data into the data set.
RejectChanges (inherited from C1DataSet) | Rolls back all changes made to the data set since it was filled with data or the last time AcceptChanges or RejectChanges was called.
StopAsyncFetch (inherited from C1DataSet) | For DataAccessMode = VirtualAutomatic, stops background fetch, if it is in progress.
Update | Overloaded. Overriden. Updates (commits) changed rows to the database.
WriteXml (inherited from C1DataSet) | Overloaded. Writes XML data from the data set.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet.Update Method

C1WebDataSet.Update Method

Overload List

Updates (commits) changed rows to the database.

[Visual Basic] Overloads Overrides Public Sub Update(String())

[C#] override public Update(string[]);

[Delphi] public procedure Update(array of String); overload; override;

Updates (commits) changed rows to the database.

[Visual Basic] Overloads Public Sub Update()

[C#] public Update();

[Delphi] public procedure Update(); overload;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet.Update Method (String[])

C1WebDataSet.Update Method (String[])

Updates (commits) changed rows to the database.

[Visual Basic]

Overloads Overrides Public Sub Update( _

ByVal tableNames As String() _

)

[C#]

override public void Update(

string[] tableNames

);

[Delphi]

public procedure Update(

tableNames: array of String

); overload; override;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebDataSet Events

C1WebDataSet Events

The events of the C1WebDataSet class are listed here. For a complete list of C1WebDataSet class members, see the C1WebDataSet Members topic.

Public Events

AfterFill (inherited from C1DataSet) | Fired after the data set is filled with data.
BeforeFill (inherited from C1DataSet) | Fired before the data set fills with data.
Error (inherited from C1DataSet) | Fired when an error occurs.
UpdateError (inherited from C1DataSet) | Fired when an error occurs committing changes to the database.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache Class

GlobalCache Class

This class contains methods for global cache manipulation.

For a list of all members of this type, see GlobalCache Members.

System.Object

C1.Web.Data.GlobalCache

[Visual Basic]

NonInheritable Public Class GlobalCache

[C#]

public sealed class GlobalCache

[Delphi]

type GlobalCache = class sealed;

Remarks

You do not need to instantiate objects of this class. This class only contains static methods (functions).

Namespace: C1.Web.Data

Assembly: C1.Web.Data (in c1.web.data.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache Members

GlobalCache Members

GlobalCache overview

Public Methods

Clear | Clears the whole global cache, destroys all cached data.
ClearChanges | Removes changes made by the current user from the cache.
ClearMemoryResident | Clears all memory-resident table views.
DeleteFiles | Cleans up unused files with cached data.
Remove | Removes all data pertaining to a certain data set from global cache.
SaveChanges | Saves changes made to a data set by the user so they can be restored when this data set is restored from cache for the same user.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache Methods

GlobalCache Methods

The methods of the GlobalCache class are listed here. For a complete list of GlobalCache class members, see the GlobalCache Members topic.

Public Methods

Clear | Clears the whole global cache, destroys all cached data.
ClearChanges | Removes changes made by the current user from the cache.
ClearMemoryResident | Clears all memory-resident table views.
DeleteFiles | Cleans up unused files with cached data.
Remove | Removes all data pertaining to a certain data set from global cache.
SaveChanges | Saves changes made to a data set by the user so they can be restored when this data set is restored from cache for the same user.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.Clear Method

GlobalCache.Clear Method

Clears the whole global cache, destroys all cached data.

[Visual Basic]

Public Shared Sub Clear()

[C#]

public static void Clear()

[Delphi]

public class procedure Clear();

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.ClearChanges Method

GlobalCache.ClearChanges Method

Removes changes made by the current user from the cache.

[Visual Basic]

Public Shared Sub ClearChanges()

[C#]

public static void ClearChanges()

[Delphi]

public class procedure ClearChanges();

Remarks

After this method is called, changes made by the current user are no longer stored in the cache. When the data set is restored from the cache after that, it will contain the data as they were fetched from the database. Any changes made by the user will be canceled.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.ClearMemoryResident Method

GlobalCache.ClearMemoryResident Method

Clears all memory-resident table views.

[Visual Basic]

Public Shared Sub ClearMemoryResident( _

ByVal cacheableObj As IC1CacheableObject _

)

[C#]

public static void ClearMemoryResident(

IC1CacheableObject cacheableObj

);

[Delphi]

public class procedure ClearMemoryResident(

cacheableObj: IC1CacheableObject

);

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection used to identify the schema whose table views are to be cleared.

Remarks

This method is used when it is necessary to refresh data in memory-resident table views to reflect changes that occurred in the database. Usually, there is no need to use this method, because memory-resident table views are read-only, users cannot change their data. However, when their data change in the database (for example, a new product may be added to a Products table), calling this method will clear the obsolete data from the cache and ensure that new data will be fetched from the database when requested, without stopping and re-starting the application. In C1DataObjects Enterprise, this method clears cached data in all memory-resident table views belonging to a schema (a C1.Data.C1SchemaDef component) . Usually, this means clearing memory-resident table views in the whole application, unless the application uses multiple schemas. In C1DataExpress, this method clears cached data in all memory-resident C1WebExpressTable components connected to a C1WebExpressConnection component.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.DeleteFiles Method

GlobalCache.DeleteFiles Method

Cleans up unused files with cached data.

[Visual Basic]

Public Shared Sub DeleteFiles( _

ByVal applicationInstance As HttpApplication _

)

[C#]

public static void DeleteFiles(

HttpApplication applicationInstance

);

[Delphi]

public class procedure DeleteFiles(

applicationInstance: HttpApplication

);

Parameters

applicationInstance

HttpApplication object representing current application.

Remarks

Call this method from the Session_End event in your Global.aspx file, see Using Global Cache In Enterprise Edition, Using Global Cache In Express Edition. The applicationInstance is set to the object of the HttpApplication class represented by Global.aspx (‘this’ in C#, Me in VB).

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.Remove Method

GlobalCache.Remove Method

Removes all data pertaining to a certain data set from global cache.

[Visual Basic]

Public Shared Sub Remove( _

ByVal cacheableObj As IC1CacheableObject _

)

[C#]

public static void Remove(

IC1CacheableObject cacheableObj

);

[Delphi]

public class procedure Remove(

cacheableObj: IC1CacheableObject

);

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are to be deleted from cache.

Remarks

This method removes all data stored in the global cache for the given data set definition ( C1.Data.SchemaObjects.DataSetDef), regardless of what filter conditions might be used when it was saved in the cache.

Call this method before calling C1WebDataSet.Fill or C1WebExpressConnection.Fill, if you want to ensure that data will be taken from the database and not from cache, that is, when you need to refresh the data set with the latest data from the database.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


GlobalCache.SaveChanges Method

GlobalCache.SaveChanges Method

Saves changes made to a data set by the user so they can be restored when this data set is restored from cache for the same user.

[Visual Basic]

Public Shared Sub SaveChanges( _

ByVal cacheableObj As IC1CacheableObject _

)

[C#]

public static void SaveChanges(

IC1CacheableObject cacheableObj

);

[Delphi]

public class procedure SaveChanges(

cacheableObj: IC1CacheableObject

);

Parameters

cacheableObj

The source of user changes, a C1WebDataSet or C1WebExpressConnection.

Remarks

This method must be called after modifying data, in order to enable the global cache to restore these changes when the data set is later restored from cache.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IC1CacheableObject Interface

IC1CacheableObject Interface

This interface represents an object whose data can be stored in global or session cache.

For a list of all members of this type, see IC1CacheableObject Members.

[Visual Basic]

Public Interface IC1CacheableObject

[C#]

public interface IC1CacheableObject

[Delphi]

type IC1CacheableObject = interface;

Remarks

It is either C1WebDataSet or C1WebExpressConnection.

Namespace: C1.Web.Data

Assembly: C1.Web.Data (in c1.web.data.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IC1CacheableObject Members

IC1CacheableObject Members

IC1CacheableObject overview

Public Methods

GetDataSet

Returns a dataset object.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IC1CacheableObject Methods

IC1CacheableObject Methods

The methods of the IC1CacheableObject interface are listed here. For a complete list of IC1CacheableObject interface members, see the IC1CacheableObject Members topic.

Public Methods

GetDataSet

Returns a dataset object.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


IC1CacheableObject.GetDataSet Method

IC1CacheableObject.GetDataSet Method

Returns a dataset object.

[Visual Basic]

Function GetDataSet() As C1WebDataSet

[C#]

C1WebDataSet GetDataSet()

[Delphi]

function GetDataSet(): C1WebDataSet;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache Class

SessionCache Class

This class contains methods for session cache manipulation.

For a list of all members of this type, see SessionCache Members.

System.Object

C1.Web.Data.SessionCache

[Visual Basic]

NonInheritable Public Class SessionCache

[C#]

public sealed class SessionCache

[Delphi]

type SessionCache = class sealed;

Remarks

You don’t need to instantiate objects of this class. This class only contains static methods (functions).

Namespace: C1.Web.Data

Assembly: C1.Web.Data (in c1.web.data.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache Members

SessionCache Members

SessionCache overview

Public Methods

Clear | Clears the session cache, destroys all cached data for the current session.
DeleteFiles | Cleans up unused files with cached data.
Fill | Fills a data set with data, if data exist in the session cache, otherwise returns False.
HasData | Overloaded. Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.
Remove | Removes data set data from session cache.
SaveData | Overloaded. Saves data set data in session cache.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache Methods

SessionCache Methods

The methods of the SessionCache class are listed here. For a complete list of SessionCache class members, see the SessionCache Members topic.

Public Methods

Clear | Clears the session cache, destroys all cached data for the current session.
DeleteFiles | Cleans up unused files with cached data.
Fill | Fills a data set with data, if data exist in the session cache, otherwise returns False.
HasData | Overloaded. Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.
Remove | Removes data set data from session cache.
SaveData | Overloaded. Saves data set data in session cache.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.Clear Method

SessionCache.Clear Method

Clears the session cache, destroys all cached data for the current session.

[Visual Basic]

Public Shared Sub Clear()

[C#]

public static void Clear()

[Delphi]

public class procedure Clear();

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.DeleteFiles Method

SessionCache.DeleteFiles Method

Cleans up unused files with cached data.

[Visual Basic]

Public Shared Sub DeleteFiles( _

ByVal applicationInstance As HttpApplication _

)

[C#]

public static void DeleteFiles(

HttpApplication applicationInstance

);

[Delphi]

public class procedure DeleteFiles(

applicationInstance: HttpApplication

);

Parameters

applicationInstance

HttpApplication object representing current application.

Remarks

Call this method from the Session_End event in your Global.aspx file, see Using Session Cache In Enterprise Edition, Using Session Cache In Express Edition. The applicationInstance is set to the object of the HttpApplication class represented by Global.aspx (‘this’ in C#, Me in VB).

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.Fill Method

SessionCache.Fill Method

Fills a data set with data, if data exist in the session cache, otherwise returns False.

[Visual Basic]

Public Shared Function Fill( _

ByVal cacheableObj As IC1CacheableObject _

) As Boolean

[C#]

public static bool Fill(

IC1CacheableObject cacheableObj

);

[Delphi]

public class function Fill(

cacheableObj: IC1CacheableObject

): Boolean;

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are looked up in the cache.

Remarks

This method looks for this data set data in the session cache. If it was previously saved with SaveData (IC1CacheableObject), this method restores the data to the data set and returns True. Otherwise, it returns False.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.HasData Method

SessionCache.HasData Method

Overload List

Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.

[Visual Basic] Overloads Public Shared Function HasData(IC1CacheableObject) As Boolean

[C#] public static bool HasData(IC1CacheableObject);

[Delphi] public class function HasData(IC1CacheableObject) : Boolean; overload;

Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.

[Visual Basic] Overloads Public Shared Function HasData(IC1CacheableObject, ByRef CacheStorageEnum) As Boolean

[C#] public static bool HasData(IC1CacheableObject, ref CacheStorageEnum);

[Delphi] public class function HasData(IC1CacheableObject; out CacheStorageEnum) : Boolean; overload;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.HasData Method (IC1CacheableObject)

SessionCache.HasData Method (IC1CacheableObject)

Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.

[Visual Basic]

Overloads Public Shared Function HasData( _

ByVal cacheableObj As IC1CacheableObject _

) As Boolean

[C#]

public static bool HasData(

IC1CacheableObject cacheableObj

);

[Delphi]

public class function HasData(

cacheableObj: IC1CacheableObject

): Boolean; overload;

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are looked up in the cache.

Return Value

Remarks

This method looks for this data set data in the session cache. If it was previously saved with SaveData (IC1CacheableObject), this method returns True and sets the cacheStorage argument to the storage type used to store data. Otherwise, it returns False.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.HasData Method (IC1CacheableObject, ref CacheStorageEnum)

SessionCache.HasData Method (IC1CacheableObject, ref CacheStorageEnum)

Returns True if data exist in the session cache for this data set, and also returns cache storage type. Otherwise, returns False.

[Visual Basic]

Overloads Public Shared Function HasData( _

ByVal cacheableObj As IC1CacheableObject, _

ByRef cacheStorage As CacheStorageEnum _

) As Boolean

[C#]

public static bool HasData(

IC1CacheableObject cacheableObj,

out CacheStorageEnum cacheStorage

);

[Delphi]

public class function HasData(

cacheableObj: IC1CacheableObject;

out cacheStorage: CacheStorageEnum

): Boolean; overload;

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are looked up in the cache.

cacheStorage

Before this method returns, if it has found data set data in the cache, it sets this argument to the storage type used to store this data set data.

Return Value

Remarks

This method looks for this data set data in the session cache. If it was previously saved with SaveData (IC1CacheableObject), this method returns True and sets the cacheStorage argument to the storage type used to store data. Otherwise, it returns False.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.Remove Method

SessionCache.Remove Method

Removes data set data from session cache.

[Visual Basic]

Public Shared Sub Remove( _

ByVal cacheableObj As IC1CacheableObject _

)

[C#]

public static void Remove(

IC1CacheableObject cacheableObj

);

[Delphi]

public class procedure Remove(

cacheableObj: IC1CacheableObject

);

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are to be removed from the cache.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.SaveData Method

SessionCache.SaveData Method

Overload List

Saves data set data in session cache.

[Visual Basic] Overloads Public Shared Sub SaveData(IC1CacheableObject)

[C#] public static SaveData(IC1CacheableObject);

[Delphi] public class procedure SaveData(IC1CacheableObject); overload;

Saves data set data in session cache.

[Visual Basic] Overloads Public Shared Sub SaveData(IC1CacheableObject, CacheStorageEnum)

[C#] public static SaveData(IC1CacheableObject, CacheStorageEnum);

[Delphi] public class procedure SaveData(IC1CacheableObject; CacheStorageEnum); overload;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.SaveData Method (IC1CacheableObject)

SessionCache.SaveData Method (IC1CacheableObject)

Saves data set data in session cache.

[Visual Basic]

Overloads Public Shared Sub SaveData( _

ByVal cacheableObj As IC1CacheableObject _

)

[C#]

public static void SaveData(

IC1CacheableObject cacheableObj

);

[Delphi]

public class procedure SaveData(

cacheableObj: IC1CacheableObject

); overload;

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are to be saved in the cache.

Remarks

This method must be called after changing data in the data set in any way, before the next Fill call, because Fill restores the data last saved with SaveData.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


SessionCache.SaveData Method (IC1CacheableObject, CacheStorageEnum)

SessionCache.SaveData Method (IC1CacheableObject, CacheStorageEnum)

Saves data set data in session cache.

[Visual Basic]

Overloads Public Shared Sub SaveData( _

ByVal cacheableObj As IC1CacheableObject, _

ByVal cacheStorage As CacheStorageEnum _

)

[C#]

public static void SaveData(

IC1CacheableObject cacheableObj,

CacheStorageEnum cacheStorage

);

[Delphi]

public class procedure SaveData(

cacheableObj: IC1CacheableObject;

cacheStorage: CacheStorageEnum

); overload;

Parameters

cacheableObj

C1WebDataSet or C1WebExpressConnection whose data are to be saved in the cache.

cacheStorage

Storage type to use for saving data.

Remarks

This method must be called after changing data in the data set in any way, before the next Fill call, because Fill restores the data last saved with SaveData.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data.Express Namespace

C1.Web.Data.Express Namespace

C1.Web.Data.Express Hierarchy

Classes

Class | Description
C1WebExpressConnection | C1WebExpressConnection is a class derived from C1.Data.Express.C1ExpressConnection used on a web form for data access.
C1WebExpressTable | C1WebExpressTable is a class derived from C1.Data.Express.C1ExpressTable used on a web form with C1WebExpressConnection.

See Also

C1.Web.Data.Express Assembly

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Class

C1WebExpressConnection Class

C1WebExpressConnection is a class derived from C1.Data.Express.C1ExpressConnection used on a web form for data access.

For a list of all members of this type, see C1WebExpressConnection Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

C1.Data.BaseComponent

C1.Data.BaseFormAwareComponent

C1.Data.Express.C1ExpressConnection

C1.Web.Data.Express.C1WebExpressConnection

[Visual Basic]

Public Class C1WebExpressConnection

Inherits C1ExpressConnection

Implements IC1CacheableObject

[C#]

public class C1WebExpressConnection : C1ExpressConnection , IC1CacheableObject

[Delphi]

type C1WebExpressConnection = class (C1ExpressConnection, IC1CacheableObject);

Namespace: C1.Web.Data.Express

Assembly: C1.Web.Data.Express (in c1.web.data.express.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Members

C1WebExpressConnection Members

C1WebExpressConnection overview

Public Constructors

C1WebExpressConnection Constructor

Initializes a new instance of the C1WebExpressConnection class.

Public Properties

AlwaysEscapeNames (inherited from C1ExpressConnection) | Gets or sets a value indicating whether every name in generated SQL statements must be quoted to avoid collision with database reserved keywords.
CacheProperties | Gets the CacheProperties object containing cache settings.
CaseSensitive (inherited from C1ExpressConnection) | Determines whether string comparisons are case-sensitive.
ChangeInProgress (inherited from C1ExpressConnection) | Gets or sets a value indicating whether firing AfterChanges event is deferred.
Connection (inherited from C1ExpressConnection) | Returns database connection object at run time.
ConnectionString (inherited from C1ExpressConnection) | Gets or sets the connection string used to connect to the database.
ConnectionTimeout (inherited from C1ExpressConnection) | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
ConnectionType (inherited from C1ExpressConnection) | Gets or sets a value determining the software (middleware or native) used to connect to the database.
Database (inherited from C1ExpressConnection) | Gets the name of the current database or the database to be used once a connection is open.
DataSet (inherited from C1ExpressConnection) | Gets the internal data set object.
DataSource (inherited from C1ExpressConnection) | Gets the location and file name of the data source.
DbTables (inherited from C1ExpressConnection) | Gets the collection of C1DataTable objects representing data in C1ExpressTable components attached to this C1ExpressConnection.
ExecutionMode (inherited from C1ExpressConnection) | Gets or sets a value indicating whether actions in handling a business logic event are deferred or performed immediately.
ExpressTables (inherited from C1ExpressConnection) | Gets the collection of C1DataTable objects attached to this C1ExpressConnection.
FieldDefaults (inherited from C1ExpressConnection) | Gets the FieldDefaults object containing default field settings.
FillOnRequest (inherited from C1ExpressConnection) | Gets or sets a value indicating whether all tables attached to the connection will be automatically filled with data when a data bound control requests data from it.
Locale (inherited from C1ExpressConnection) | Determines the locale information used in string comparisons.
Provider (inherited from C1ExpressConnection) | For an OLE DB connection, gets the name of the OLE DB provider.
Relations (inherited from C1ExpressConnection) | Gets the collection of C1ExpressConnection relations.
SessionCacheProperties | Gets the SessionCacheProperties object containing default session cache settings.

Public Methods

AcceptChanges (inherited from C1ExpressConnection) | Commits all the changes made within the connection since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Fill (inherited from C1ExpressConnection) | Fills the tables attached to the connection with data fetching it from the database.
GetExportDataSet (inherited from C1ExpressConnection) | Overloaded. Creates and fills with data an ADO.NET data set containing data for all tables in this C1ExpressConnection.
HasChanges (inherited from C1ExpressConnection) | Overloaded. Gets a value indicating whether the connection data tables have changes, including new, deleted, or modified rows, optionally filtered by DataRowStateEnum.
PopExecutionMode (inherited from C1ExpressConnection) | Restore the execution mode affecting actions invoked while handling another action.
PushExecutionMode (inherited from C1ExpressConnection) | Sets the execution mode affecting actions invoked while handling another action.
ReadXml (inherited from C1ExpressConnection) | Overloaded. Reads XML data into the C1ExpressConnection.
RejectChanges (inherited from C1ExpressConnection) | Rolls back all changes made withing the connection since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Update (inherited from C1ExpressConnection) | Updates (commits) all changed data rows to the database.
WriteXml (inherited from C1ExpressConnection) | Overloaded. Writes XML data from the C1ExpressConnection.

Public Events

AfterFill (inherited from C1ExpressConnection) | Fired after the table attached to the connection have been filled with data.
AfterUpdate (inherited from C1ExpressConnection) | Fired after all changes are updated to the database.
AfterUpdateRow (inherited from C1ExpressConnection) | Fired after modifications made to a row are commited to the database.
BeforeFill (inherited from C1ExpressConnection) | Fired before the table attached to the connection are filled with data.
BeforeUpdate (inherited from C1ExpressConnection) | Fired before all changes are updated to the database.
BeforeUpdateRow (inherited from C1ExpressConnection) | Fired before modifications made to a row are commited to the database.
Error (inherited from C1ExpressConnection) | Fired when an error occurs.
GetChildRows (inherited from C1ExpressConnection) | Used to programmatically specify the list of child rows for a relation.
UpdateError (inherited from C1ExpressConnection) | Fired when an error occurs commiting changes to the database.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Constructor

C1WebExpressConnection Constructor

Initializes a new instance of the C1WebExpressConnection class.

[Visual Basic]

Public Function New()

[C#]

public C1WebExpressConnection()

[Delphi]

public constructor Create();

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Properties

C1WebExpressConnection Properties

The properties of the C1WebExpressConnection class are listed here. For a complete list of C1WebExpressConnection class members, see the C1WebExpressConnection Members topic.

Public Properties

AlwaysEscapeNames (inherited from C1ExpressConnection) | Gets or sets a value indicating whether every name in generated SQL statements must be quoted to avoid collision with database reserved keywords.
CacheProperties | Gets the CacheProperties object containing cache settings.
CaseSensitive (inherited from C1ExpressConnection) | Determines whether string comparisons are case-sensitive.
ChangeInProgress (inherited from C1ExpressConnection) | Gets or sets a value indicating whether firing AfterChanges event is deferred.
Connection (inherited from C1ExpressConnection) | Returns database connection object at run time.
ConnectionString (inherited from C1ExpressConnection) | Gets or sets the connection string used to connect to the database.
ConnectionTimeout (inherited from C1ExpressConnection) | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
ConnectionType (inherited from C1ExpressConnection) | Gets or sets a value determining the software (middleware or native) used to connect to the database.
Database (inherited from C1ExpressConnection) | Gets the name of the current database or the database to be used once a connection is open.
DataSet (inherited from C1ExpressConnection) | Gets the internal data set object.
DataSource (inherited from C1ExpressConnection) | Gets the location and file name of the data source.
DbTables (inherited from C1ExpressConnection) | Gets the collection of C1DataTable objects representing data in C1ExpressTable components attached to this C1ExpressConnection.
ExecutionMode (inherited from C1ExpressConnection) | Gets or sets a value indicating whether actions in handling a business logic event are deferred or performed immediately.
ExpressTables (inherited from C1ExpressConnection) | Gets the collection of C1DataTable objects attached to this C1ExpressConnection.
FieldDefaults (inherited from C1ExpressConnection) | Gets the FieldDefaults object containing default field settings.
FillOnRequest (inherited from C1ExpressConnection) | Gets or sets a value indicating whether all tables attached to the connection will be automatically filled with data when a data bound control requests data from it.
Locale (inherited from C1ExpressConnection) | Determines the locale information used in string comparisons.
Provider (inherited from C1ExpressConnection) | For an OLE DB connection, gets the name of the OLE DB provider.
Relations (inherited from C1ExpressConnection) | Gets the collection of C1ExpressConnection relations.
SessionCacheProperties | Gets the SessionCacheProperties object containing default session cache settings.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection.CacheProperties Property

C1WebExpressConnection.CacheProperties Property

Gets the CacheProperties object containing cache settings.

[Visual Basic]

Public Property CacheProperties As CacheProperties

[C#]

public CacheProperties CacheProperties {get;set;}

[Delphi]

public property CacheProperties: CacheProperties read get_CacheProperties write set_CacheProperties;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection.SessionCacheProperties Property

C1WebExpressConnection.SessionCacheProperties Property

Gets the SessionCacheProperties object containing default session cache settings.

[Visual Basic]

Public Property SessionCacheProperties As SessionCacheProperties

[C#]

public SessionCacheProperties SessionCacheProperties {get;set;}

[Delphi]

public property SessionCacheProperties: SessionCacheProperties read get_SessionCacheProperties write set_SessionCacheProperties;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Methods

C1WebExpressConnection Methods

The methods of the C1WebExpressConnection class are listed here. For a complete list of C1WebExpressConnection class members, see the C1WebExpressConnection Members topic.

Public Methods

AcceptChanges (inherited from C1ExpressConnection) | Commits all the changes made within the connection since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Fill (inherited from C1ExpressConnection) | Fills the tables attached to the connection with data fetching it from the database.
GetExportDataSet (inherited from C1ExpressConnection) | Overloaded. Creates and fills with data an ADO.NET data set containing data for all tables in this C1ExpressConnection.
HasChanges (inherited from C1ExpressConnection) | Overloaded. Gets a value indicating whether the connection data tables have changes, including new, deleted, or modified rows, optionally filtered by DataRowStateEnum.
PopExecutionMode (inherited from C1ExpressConnection) | Restore the execution mode affecting actions invoked while handling another action.
PushExecutionMode (inherited from C1ExpressConnection) | Sets the execution mode affecting actions invoked while handling another action.
ReadXml (inherited from C1ExpressConnection) | Overloaded. Reads XML data into the C1ExpressConnection.
RejectChanges (inherited from C1ExpressConnection) | Rolls back all changes made withing the connection since it was filled with data or the last time AcceptChanges or RejectChanges was called.
Update (inherited from C1ExpressConnection) | Updates (commits) all changed data rows to the database.
WriteXml (inherited from C1ExpressConnection) | Overloaded. Writes XML data from the C1ExpressConnection.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressConnection Events

C1WebExpressConnection Events

The events of the C1WebExpressConnection class are listed here. For a complete list of C1WebExpressConnection class members, see the C1WebExpressConnection Members topic.

Public Events

AfterFill (inherited from C1ExpressConnection) | Fired after the table attached to the connection have been filled with data.
AfterUpdate (inherited from C1ExpressConnection) | Fired after all changes are updated to the database.
AfterUpdateRow (inherited from C1ExpressConnection) | Fired after modifications made to a row are commited to the database.
BeforeFill (inherited from C1ExpressConnection) | Fired before the table attached to the connection are filled with data.
BeforeUpdate (inherited from C1ExpressConnection) | Fired before all changes are updated to the database.
BeforeUpdateRow (inherited from C1ExpressConnection) | Fired before modifications made to a row are commited to the database.
Error (inherited from C1ExpressConnection) | Fired when an error occurs.
GetChildRows (inherited from C1ExpressConnection) | Used to programmatically specify the list of child rows for a relation.
UpdateError (inherited from C1ExpressConnection) | Fired when an error occurs commiting changes to the database.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Class

C1WebExpressTable Class

C1WebExpressTable is a class derived from C1.Data.Express.C1ExpressTable used on a web form with C1WebExpressConnection.

For a list of all members of this type, see C1WebExpressTable Members.

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

C1.Data.BaseComponent

C1.Data.BaseFormAwareComponent

C1.Data.BaseDataSourceComponent

C1.Data.BaseDataTableSource

C1.Data.Express.C1ExpressTable

C1.Web.Data.Express.C1WebExpressTable

[Visual Basic]

Public Class C1WebExpressTable

Inherits C1ExpressTable

[C#]

public class C1WebExpressTable : C1ExpressTable

[Delphi]

type C1WebExpressTable = class (C1ExpressTable);

Namespace: C1.Web.Data.Express

Assembly: C1.Web.Data.Express (in c1.web.data.express.dll)

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Members

C1WebExpressTable Members

C1WebExpressTable overview

Public Constructors

C1WebExpressTable Constructor

Initializes a new instance of the C1WebExpressTable class.

Public Properties

AllowAddNew (inherited from C1ExpressTable) | Gets or sets a value indicating whether adding new rows to this table is allowed.
AllowDelete (inherited from C1ExpressTable) | Gets or sets a value indicating whether deleting rows from this table is allowed.
ConnectionComponent (inherited from C1ExpressTable) | Gets or sets the C1ExpressionConnection component this table is attached to.
CurrentRow (inherited from BaseDataTableSource) | Gets the C1DataRow object representing the current row.
DataAdapter (inherited from C1ExpressTable) | Returns or sets the IDBDataAdapter component used to fill and update the table with non-empty SelectCommandText.
DataTable (inherited from BaseDataTableSource) | Gets the data table object containing the data rows.
DbTableName (inherited from C1ExpressTable) | Gets or sets the name of the database table.
ExpressConnection (inherited from C1ExpressTable) | Gets the C1ExpressionConnection component for this table.
Fields (inherited from C1ExpressTable) | The collection of C1ExpressTable fields.
FillFilter (inherited from C1ExpressTable) | Gets or sets the filter criteria for filling the table with data.
FillSort (inherited from C1ExpressTable) | Gets or sets the sort field or fields, and sort order for filling the table with data.
MemoryResident | Gets or sets a value indicating whether this table data must be kept in its entirety in memory at all times, to optimize performance (can only be used in read-only mode).
Position (inherited from BaseDataSourceComponent) | Gets or sets the current row position for controls bound to this component.
ReadOnly (inherited from C1ExpressTable) | Gets or sets a value indicating whether changes to the rows of this table are allowed.
SelectCommandText (inherited from C1ExpressTable) | Gets or sets the command text (SQL statement or stored procedure) for fetching data from the database.
SelectCommandType (inherited from C1ExpressTable) | How to interpret SelectCommandText.
TableName (inherited from C1ExpressTable) | Gets or sets the name of the table as it appears to data bound controls.
UserReadOnly (inherited from C1ExpressTable) | Gets or sets a value indicating whether changes to the rows of this table using bound controls are allowed.

Public Methods

MoveFirst (inherited from BaseDataTableSource) | Moves to the first row.
MoveLast (inherited from BaseDataTableSource) | Moves to the last row.
MoveNext (inherited from BaseDataTableSource) | Moves to the next row.
MovePrevious (inherited from BaseDataTableSource) | Moves to the previous row.
Seek (inherited from BaseDataTableSource) | Seeks a row by its primary key values.

Public Events

AfterAddNew (inherited from BaseDataTableSource) | Fired after a new (empty) row is added.
AfterBeginEdit (inherited from BaseDataTableSource) | Fired when the user starts editing a row, after the row enters edit mode.
AfterCancelEdit (inherited from BaseDataTableSource) | Fired when the user cancels editing a row, after reverting the changes made to the row.
AfterChanges (inherited from BaseDataTableSource) | Fired when all changes initiated by a field change are done and handled by the business logic code.
AfterDelete (inherited from BaseDataTableSource) | Fired after a row is deleted.
AfterEndAddNew (inherited from BaseDataTableSource) | Fired after a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (AllowDbNull = False) fields are specified.
AfterEndEdit (inherited from BaseDataTableSource) | Fired when the user finishes editing a row, after the row leaves edit mode.
AfterFieldChange (inherited from BaseDataTableSource) | Fired after a field value is set.
AfterFill (inherited from C1ExpressTable) | Fired after the table has been filled with data.
AfterFirstChange (inherited from BaseDataTableSource) | Fired after first change is made to a row (a field value changes) after the row last entered edit mode.
AfterGenerateSql (inherited from C1ExpressTable) | Fired after generating the SQL SELECT statement for fetching table data from the database.
AfterUpdateRow (inherited from C1ExpressTable) | Fired after modifications made to a row are commited to the database.
AsyncFetchComplete (inherited from BaseDataTableSource) | Fired in DataAccessMode = VirtualAutomatic, when all rows are fetched.
BeforeAddNew (inherited from BaseDataTableSource) | Fired before a new (empty) row is added.
BeforeBeginEdit (inherited from BaseDataTableSource) | Fired when the user starts editing a row, before the row enters edit mode.
BeforeCancelEdit (inherited from BaseDataTableSource) | Fired when the user cancels editing a row, before reverting the changes made to the row.
BeforeDelete (inherited from BaseDataTableSource) | Fired before a row is deleted.
BeforeEndAddNew (inherited from BaseDataTableSource) | Fired before a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (AllowDbNull=false) fields are specified.
BeforeEndEdit (inherited from BaseDataTableSource) | Fired when the user finishes editing a row, before the row leaves edit mode.
BeforeFieldChange (inherited from BaseDataTableSource) | Fired before a field value is set.
BeforeFill (inherited from C1ExpressTable) | Fired before the table is filled with data.
BeforeFirstChange (inherited from BaseDataTableSource) | Fired before first change is made to a row (a field value changes) after the row last entered edit mode.
BeforeGenerateSql (inherited from C1ExpressTable) | Fired before generating the SQL SELECT statement for fetching table data from the database.
BeforeUpdateRow (inherited from C1ExpressTable) | Fired before modifications made to a row are commited to the database.
UpdateError (inherited from C1ExpressTable) | Fired when errors occur in an attempt to update the database when the end user leaves a modifies row.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Constructor

C1WebExpressTable Constructor

Initializes a new instance of the C1WebExpressTable class.

[Visual Basic]

Public Function New()

[C#]

public C1WebExpressTable()

[Delphi]

public constructor Create();

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Properties

C1WebExpressTable Properties

The properties of the C1WebExpressTable class are listed here. For a complete list of C1WebExpressTable class members, see the C1WebExpressTable Members topic.

Public Properties

AllowAddNew (inherited from C1ExpressTable) | Gets or sets a value indicating whether adding new rows to this table is allowed.
AllowDelete (inherited from C1ExpressTable) | Gets or sets a value indicating whether deleting rows from this table is allowed.
ConnectionComponent (inherited from C1ExpressTable) | Gets or sets the C1ExpressionConnection component this table is attached to.
CurrentRow (inherited from BaseDataTableSource) | Gets the C1DataRow object representing the current row.
DataAdapter (inherited from C1ExpressTable) | Returns or sets the IDBDataAdapter component used to fill and update the table with non-empty SelectCommandText.
DataTable (inherited from BaseDataTableSource) | Gets the data table object containing the data rows.
DbTableName (inherited from C1ExpressTable) | Gets or sets the name of the database table.
ExpressConnection (inherited from C1ExpressTable) | Gets the C1ExpressionConnection component for this table.
Fields (inherited from C1ExpressTable) | The collection of C1ExpressTable fields.
FillFilter (inherited from C1ExpressTable) | Gets or sets the filter criteria for filling the table with data.
FillSort (inherited from C1ExpressTable) | Gets or sets the sort field or fields, and sort order for filling the table with data.
MemoryResident | Gets or sets a value indicating whether this table data must be kept in its entirety in memory at all times, to optimize performance (can only be used in read-only mode).
Position (inherited from BaseDataSourceComponent) | Gets or sets the current row position for controls bound to this component.
ReadOnly (inherited from C1ExpressTable) | Gets or sets a value indicating whether changes to the rows of this table are allowed.
SelectCommandText (inherited from C1ExpressTable) | Gets or sets the command text (SQL statement or stored procedure) for fetching data from the database.
SelectCommandType (inherited from C1ExpressTable) | How to interpret SelectCommandText.
TableName (inherited from C1ExpressTable) | Gets or sets the name of the table as it appears to data bound controls.
UserReadOnly (inherited from C1ExpressTable) | Gets or sets a value indicating whether changes to the rows of this table using bound controls are allowed.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable.MemoryResident Property

C1WebExpressTable.MemoryResident Property

Gets or sets a value indicating whether this table data must be kept in its entirety in memory at all times, to optimize performance (can only be used in read-only mode).

[Visual Basic]

Public Property MemoryResident As Boolean

[C#]

public bool MemoryResident {get;set;}

[Delphi]

public property MemoryResident: Boolean read get_MemoryResident write set_MemoryResident;

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Methods

C1WebExpressTable Methods

The methods of the C1WebExpressTable class are listed here. For a complete list of C1WebExpressTable class members, see the C1WebExpressTable Members topic.

Public Methods

MoveFirst (inherited from BaseDataTableSource) | Moves to the first row.
MoveLast (inherited from BaseDataTableSource) | Moves to the last row.
MoveNext (inherited from BaseDataTableSource) | Moves to the next row.
MovePrevious (inherited from BaseDataTableSource) | Moves to the previous row.
Seek (inherited from BaseDataTableSource) | Seeks a row by its primary key values.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1WebExpressTable Events

C1WebExpressTable Events

The events of the C1WebExpressTable class are listed here. For a complete list of C1WebExpressTable class members, see the C1WebExpressTable Members topic.

Public Events

AfterAddNew (inherited from BaseDataTableSource) | Fired after a new (empty) row is added.
AfterBeginEdit (inherited from BaseDataTableSource) | Fired when the user starts editing a row, after the row enters edit mode.
AfterCancelEdit (inherited from BaseDataTableSource) | Fired when the user cancels editing a row, after reverting the changes made to the row.
AfterChanges (inherited from BaseDataTableSource) | Fired when all changes initiated by a field change are done and handled by the business logic code.
AfterDelete (inherited from BaseDataTableSource) | Fired after a row is deleted.
AfterEndAddNew (inherited from BaseDataTableSource) | Fired after a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (AllowDbNull = False) fields are specified.
AfterEndEdit (inherited from BaseDataTableSource) | Fired when the user finishes editing a row, after the row leaves edit mode.
AfterFieldChange (inherited from BaseDataTableSource) | Fired after a field value is set.
AfterFill (inherited from C1ExpressTable) | Fired after the table has been filled with data.
AfterFirstChange (inherited from BaseDataTableSource) | Fired after first change is made to a row (a field value changes) after the row last entered edit mode.
AfterGenerateSql (inherited from C1ExpressTable) | Fired after generating the SQL SELECT statement for fetching table data from the database.
AfterUpdateRow (inherited from C1ExpressTable) | Fired after modifications made to a row are commited to the database.
AsyncFetchComplete (inherited from BaseDataTableSource) | Fired in DataAccessMode = VirtualAutomatic, when all rows are fetched.
BeforeAddNew (inherited from BaseDataTableSource) | Fired before a new (empty) row is added.
BeforeBeginEdit (inherited from BaseDataTableSource) | Fired when the user starts editing a row, before the row enters edit mode.
BeforeCancelEdit (inherited from BaseDataTableSource) | Fired when the user cancels editing a row, before reverting the changes made to the row.
BeforeDelete (inherited from BaseDataTableSource) | Fired before a row is deleted.
BeforeEndAddNew (inherited from BaseDataTableSource) | Fired before a newly added row becomes a regular row in the rowset, that is, when its primary key and other required (AllowDbNull=false) fields are specified.
BeforeEndEdit (inherited from BaseDataTableSource) | Fired when the user finishes editing a row, before the row leaves edit mode.
BeforeFieldChange (inherited from BaseDataTableSource) | Fired before a field value is set.
BeforeFill (inherited from C1ExpressTable) | Fired before the table is filled with data.
BeforeFirstChange (inherited from BaseDataTableSource) | Fired before first change is made to a row (a field value changes) after the row last entered edit mode.
BeforeGenerateSql (inherited from C1ExpressTable) | Fired before generating the SQL SELECT statement for fetching table data from the database.
BeforeUpdateRow (inherited from C1ExpressTable) | Fired before modifications made to a row are commited to the database.
UpdateError (inherited from C1ExpressTable) | Fired when errors occur in an attempt to update the database when the end user leaves a modifies row.

See Also

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data.Express Hierarchy

C1.Web.Data.Express Hierarchy

System.Object

System.MarshalByRefObject

System.ComponentModel.Component

C1.Data.BaseComponent

C1.Data.BaseFormAwareComponent

C1.Data.BaseDataSourceComponent

C1.Data.BaseDataTableSource

C1.Data.Express.C1ExpressTable

C1.Web.Data.Express.C1WebExpressTable

C1.Data.Express.C1ExpressConnection

C1.Web.Data.Express.C1WebExpressConnection ---- C1.Web.Data.IC1CacheableObject

See Also

C1.Web.Data.Express Namespace

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


C1.Web.Data Hierarchy

C1.Web.Data Hierarchy

System.Object

System.ComponentModel.MarshalByValueComponent

C1.Data.BaseFormAwareMarshalByValueComponent

C1.Data.C1DataSet

C1.Web.Data.C1WebDataSet ---- C1.Web.Data.IC1CacheableObject

C1.Web.Data.GlobalCache

C1.Web.Data.SessionCache

See Also

C1.Web.Data Namespace

Untitled Document
Send feedback to ComponentOne
Copyright © 1987-2005 ComponentOne LLC. All rights reserved.


Namespaces C#

C#

C1.Web.C1WebDataSet.C1WebDataSet webdataset ;


Namespaces C#2

C#

// Define a new object based on your GlobalCache class.

GlobalCache MyGlobalCache ;

// Define a new C1.Web.Data.GlobalCache object.

C1.Web.Data.GlobalCache newGlobalCache;


Namespaces C#3

C#

using GlobalCache = C1.Web.Data.GlobalCache ;

using MyGlobalCache = MyProject.Objects.GlobalCache;

GlobalCache g1 ;

MyGlobalCache g2 ;


Namespaces Delphi

Delphi

webdataset: C1.Web.C1WebDataSet.C1WebDataSet;


Namespaces Delphi2

Delphi

var

NewGlobalCache: C1.Web.Data.GlobalCache;

MyGlobalCache: GlobalCache;


Namespaces Delphi3

Delphi

uses C1.Web.Data.GlobalCache;

var

g1: GlobalCache;

g2: MyGlobalCache;


Namespaces - Visual Basic

Visual Basic

Dim webdataset As C1.Web.C1WebDataSet.C1WebDataSet


Namespaces - Visual Basic2

Visual Basic

' Define a new object based on your GlobalCache class.

Dim MyGlobalCache as GlobalCache

' Define a new C1.Web.Data.GlobalCache object.

Dim NewGlobalCache as C1.Web.Data.GlobalCache


Namespaces - Visual Basic3

Visual Basic

Imports GlobalCache = C1.Web.Data.GlobalCache

Imports MyGlobalCache = MyProject.Objects.GlobalCache

Dim g1 As GlobalCache

Dim g2 As MyGlobalCache


Using C1WebDataSet in Direct Client Configuration - C#

C#

private void Page_Load(object sender, System.EventArgs e)

{

// Put user code to initialize the page here

if (!IsPostBack)

DataGrid1.DataBind();

}


Using C1WebDataSet in Direct Client Configuration - Delphi

Delphi

procedure TWebForm1.Page_Load(sender: System.Object; e: System.EventArgs);

begin

// Put user code to initialize the page here

if (not IsPostBack) then

DataGrid1.DataBind;

end;


Using C1WebDataSet in Direct Client Configuration - Visual Basic

Visual Basic

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If Not Page.IsPostBack Then

DataGrid1.DataBind()

End If

End Sub


Using C1WebDataSet with a Data Library - C#

C#

private void Page_Load(object sender, System.EventArgs e)

{

// Put user code to initialize the page here

if (!IsPostBack)

DataGrid1.DataBind();

}


Using C1WebDataSet with a Data Library - Delphi

Delphi

procedure TWebForm1.Page_Load(sender: System.Object; e: System.EventArgs);

begin

// Put user code to initialize the page here

if (not IsPostBack) then

DataGrid1.DataBind;

end;


Using C1WebDataSet with a Data Library - Visual Basic

Visual Basic

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If Not Page.IsPostBack Then

DataGrid1.DataBind()

End If

End Sub


Using CacheProperties - C#

C#

private void Page_Load(object sender, System.EventArgs e)

{

// c1WebProductsDataSet (ProductsDataSet) uses global cache

// See in Schema Designer: SessionProperties.CacheMode = InWebForms.

c1WebProductsDataSet.Fill();

// global cache works automatically when you call C1WebDataSet.Fill

}


Using CacheProperties - C#2

C#

public void DataGrid1_Update(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)

{

GlobalCache.SaveChanges(c1WebProductsDataSet); // save changes in global cache every time you change data in the data set

}


Using CacheProperties - C#3

C#

private void btnRefresh_Click(object sender, System.EventArgs e)

{

// We need to clear global cache first to ensure the data is fetched from the database, not from cache.

GlobalCache.Remove(c1WebProductsDataSet);

// fetch data from the database

c1WebProductsDataSet.Fill();

ViewState.Remove("SortExpression");

BindGrid();

}


Using CacheProperties - C#4

C#

protected void Application_End(Object sender, EventArgs e)

{

GlobalCache.DeleteFiles(this);

}


Using CacheProperties - Delphi

Delphi

procedure TWebForm1.Page_Load(sender: System.Object; e: System.EventArgs)

begin

// c1WebProductsDataSet (ProductsDataSet) uses global cache

// See in Schema Designer: SessionProperties.CacheMode = InWebForms.

c1WebProductsDataSet.Fill;

// global cache works automatically when you call C1WebDataSet.Fill;

end;


Using CacheProperties - Delphi2

Delphi

procedure TWebForm1.DataGrid1Update(source: System.Object; e: System.Web.UI.WebControls.DataGridCommandEventArgs)

begin

GlobalCache.SaveChanges(c1WebProductsDataSet);

// save changes in global cache every time you change data in the data set

End;


Using CacheProperties - Delphi3

Delphi

procedure TWebForm1.btnRefreshClick(sender: System.Object; e: System.EventArgs)

begin first to ensure the data is fetched from the database, not from cache.

// We need to clear global cache

GlobalCache.Remove(c1WebProductsDataSet);

// fetch data from the database

c1WebProductsDataSet.Fill;

ViewState.Remove(‘SortExpression’);

BindGrid;

end;


Using CacheProperties - Delphi4

Delphi

procedure Application_End(sender: System.Object; e: EventArgs)

begin

GlobalCache.DeleteFiles(Self);

end;


Using CacheProperties - Visual Basic

Visual Basic

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

…

' c1WebProductsDataSet (ProductsDataSet) uses global cache

' See in Schema Designer: SessionProperties.CacheMode = InWebForms.

c1WebProductsDataSet.Fill() 'global cache works automatically when you call C1WebDataSet.Fill

…

End Sub


Using CacheProperties - Visual Basic2

Visual Basic

Public Sub DataGrid1_Update(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs)

GlobalCache.SaveChanges(c1WebProductsDataSet)

' save changes in global cache every time you change data in the data set

End Sub


Using CacheProperties - Visual Basic3

Visual Basic

Private Sub btnRefresh_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRefresh.Click

' We need to clear global cache first to ensure the data is fetched from the database, not from cache.

GlobalCache.Remove(c1WebProductsDataSet)

' fetch data from the database

c1WebProductsDataSet.Fill()

ViewState.Remove("SortExpression")

BindGrid()

End Sub


Using CacheProperties - Visual Basic4

Visual Basic

Public Class Global

Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)

GlobalCache.DeleteFiles(Me)

End Sub

End Class


Using Global Cache in Enterprise Edition C#

C#

protected void Application_End(Object sender, EventArgs e)

{

GlobalCache.DeleteFiles(this);

}


Using Global Cache in Enterprise Edition Delphi

Delphi

procedure TGlobal.Application_End(sender: System.Object; e: System.EventArgs)

begin

GlobalCache.DeleteFiles(Self);

end;


Using Global Cache in Enterprise Edition Visual Basic

Visual Basic

Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)

GlobalCache.DeleteFiles(Me)

End Sub


Using SessionCache - C#

C#

private void Page_Load(object sender, System.EventArgs e)

{

// try to find data in session cache first

if (!SessionCache.Fill(c1WebEmployeesDataSet))

{

// not found in session cache, fetch from the database

c1WebEmployeesDataSet.Fill();

// save changes in session cache every time you change data in the data set

SessionCache.SaveData(c1WebEmployeesDataSet);

}


Using SessionCache - C#2

C#

public void DataList1_Update(Object sender, DataListCommandEventArgs e)

{

// save changes in session cache every time you change data in the data set

SessionCache.SaveData(c1WebEmployeesDataSet);

DataList1.EditItemIndex = -1;

BindList();


Using SessionCache - C#3

C#

protected void Session_End(Object sender, EventArgs e)

{

SessionCache.DeleteFiles(this);

}


Using SessionCache - Delphi

Delphi

procedure TWebForm1.Page_Load(sender: System.Object; e: System.EventArgs);

begin

// tryto find data in session cache first

if (not SessionCache.Fill(C1WebEmployeesDataSet.IsPostBack) then
begin

C1WebEmployeeDataSet.Fill;
// save changes in session cache every time you change data in the data set

SessionCache.SaveData(C1WebDataEmployeesDataSet);

end;


Using SessionCache - Delphi2

Delphi

procedure TWebForm1.DataList1Update(sender: System.Object; e: DataListCommandEventArgs);

begin

// save changes in session cache every time you change data in the data set

SessionCache.SaveData(c1WebEmployeesDataSet);

DataList1.EditItemIndex := -1;

BindList;

end;


Using SessionCache - Delphi3

Delphi

procedure Session_End(sender: System.Object; e: System.EventArgs)

begin

SessionCache.DeleteFiles(Self);

end;


Using Session Cache in Enterprise Edition ex. 1 C#

C#

if (!SessionCache.Fill(c1DataSet1))

{

c1DataSet1.Fill();

SessionCache.SaveData(c1DataSet1);

}


Using Session Cache in Enterprise Edition ex. 1 Delphi

Delphi

if (not SessionCache.Fill(c1DataSet1)) then

begin

// re-fetch the data set from the database

c1DataSet1.Fill;

// save changes in session cache every time you change data in the data set

SessionCache.SaveData(c1DataSet1);

end;


Using Session Cache in Enterprise Edition ex. 1 Visual Basic

Visual Basic

If Not SessionCache.Fill(c1DataSet1) Then

c1DataSet1.Fill()

SessionCache.SaveData(c1DataSet1)

End If


Using Session Cache in Enterprise Edition ex. 2 C#

C#

SessionCache.SaveData(c1DataSet1);


Using Session Cache in Enterprise Edition ex. 2 Delphi

Delphi

SessionCache.SaveData(c1DataSet1);


Using Session Cache in Enterprise Edition ex. 2 Visual Basic

Visual Basic

SessionCache.SaveData(c1DataSet1)


Using Session Cache in Enterprise Edition ex. 3 C#

C#

protected void Session_End(Object sender, EventArgs e)

{

SessionCache.DeleteFiles(this);

}


Using Session Cache in Enterprise Edition ex. 3 Delphi

Delphi

procedure TGlobal.Session_End(sender: System.Object; e: System.EventArgs)
begin
SessionCache.DeleteFiles(Self);
end;


Using Session Cache in Enterprise Edition ex. 3 Visual Basic

Visual Basic

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)

SessionCache.DeleteFiles(Me)

End Sub


Using Session Cache in Express Edition Ex. 1 C#

C#

if (!SessionCache.Fill(c1WebExpressConnection1))

{

c1WebExpressConnection1.Fill();

SessionCache.SaveData(c1WebExpressConnection1);

}


Using Session Cache in Express Edition Ex. 1 Delphi

Delphi

if (not SessionCache.Fill(c1WebExpressConnection1)) then

begin

// re-fetch the data set from the database

c1WebExpressConnection1.Fill;

// save changes in session cache every time you change data in the data set

SessionCache.SaveData(c1WebExpressConnection1);

end;


Using Session Cache in Express Edition Ex. 1 Visual Basic

Visual Basic

If Not SessionCache.Fill(c1WebExpressConnection1) Then

c1WebExpressConnection1.Fill()

SessionCache.SaveData(c1WebExpressConnection1)

End If


Using Session Cache in Express Edition Ex. 2 C#

C#

SessionCache.SaveData(c1WebExpressConnection1);


Using Session Cache in Express Edition Ex. 2 Delphi

Delphi

SessionCache.SaveData(c1WebExpressConnection1);


Using Session Cache in Express Edition Ex. 2 Visual Basic

Visual Basic

SessionCache.SaveData(c1WebExpressConnection1)


Using Session Cache in Express Edition Ex. 3 C#

C#

protected void Session_End(Object sender, EventArgs e)

{

SessionCache.DeleteFiles(this);

}


Using Session Cache in Express Edition Ex. 3 Delphi

Delphi

procedure Class1.Session_End(sender: System.Object; e: System.EventArgs);
begin
SessionCache.DeleteFiles(Self);
end;


Using Session Cache in Express Edition Ex. 3 Visual Basic

Visual Basic

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)

SessionCache.DeleteFiles(Me)

End Sub


Using SessionCache - Visual Basic

Visual Basic

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' try to find data in session cache first

If Not SessionCache.Fill(C1WebDataSet1) Then

' not found in session cache, fetch from the database

C1WebDataSet1.Fill()

' save changes in session cache every time you change data in the data set

SessionCache.SaveData(C1WebDataSet1)

End If

End Sub


Using SessionCache - Visual Basic2

Visual Basic

Public Sub DataList1_Update(ByVal sender As Object, ByVal e As DataListCommandEventArgs)

' save changes in session cache every time you change data in the data set

SessionCache.SaveData(C1WebDataSet1)

End Sub


Using SessionCache - Visual Basic3

Visual Basic

Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)

SessionCache.DeleteFiles(Me)

End Sub


Web Data Objects Express Edition C#

C#

protected void Application_End(Object sender, EventArgs e)

{

GlobalCache.DeleteFiles(this);

}


Web Data Objects Express Edition Delphi

Delphi

procedure TGlobal.Application_End(sender: System.Object; e: System.EventArgs);

begin

GlobalCache.DeleteFiles(Self);

end;


Web Data Objects Express Edition Visual Basic

Visual Basic

Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)

GlobalCache.DeleteFiles(Me)

End Sub


Untitled Document


Untitled Document

 E-mail sent to documentation@componentone.com is for documentation feedback only. We welcome any suggestions to help improve our documentation.