Home
Patent Search
IMT Blog
REGISTER
|
SIGN IN
United States Patent Application
20030167277
Kind Code
A1
Hejlsberg, Anders ; et al.
September 4, 2003
Application program interface for network software platform
Abstract
An application program interface (API) provides a set of functions for application developers who build Web applications on Microsoft Corporation's .NET.TM. platform.
Inventors:
Hejlsberg; Anders
(Seattle, WA)
, Dockter; Blaine J.
(Bellevue, WA
)
, Hawkins; Dax H.
(Seattle, WA
)
, Della-Libera; Giovanni M.
(Seattle, WA
)
, Fang; Jun
(Sammamish, WA
)
, Bolognese; Luca
(Redmond, WA
)
, Ashton; Mark P.
(Kent, WA
)
, Boulter; Mark A.
(Redmond, WA
)
, Gazitt; Omri
(Redmond, WA
)
Correspondence Name and Address:
421 W RIVERSIDE AVENUE SUITE 500
LEE & HAYES PLLC
SPOKANE
WA
99201
Series Code:
902560
Filed:
July 10, 2001
U.S. Current Class:
707/102
U.S. Class at Publication:
707/102
Intern'l Class:
G06F 007/00
Claims
1. An application program interface embodied on one or more computer readable media, comprising: a first namespace related to data shared by a plurality of data providers; a second namespace related to data used in an object-oriented database; a third namespace related to data used by an SQL client; and a fourth namespace related to native data types within an SQL server.
2. An application program interface as recited in claim 1, wherein the SQL server is a Microsoft SQL Server.
3. An application program interface as recited in claim 1, wherein the first namespace includes a data adapter class to exchange data between a data source and a data set.
4. An application program interface as recited in claim 1, wherein the first namespace includes a data column mapping class to map column names from a data source to column names in a data table.
5. An application program interface as recited in claim 1, wherein the first namespace includes a data table mapping class to map data returned from a query of a data source and a data table.
6. An application program interface as recited in claim 1, wherein the first namespace includes a row update class to indicate when an update to a row is started.
7. An application program interface as recited in claim 1, wherein the first namespace includes a row update class to indicate when an update to a row is completed.
8. An application program interface as recited in claim 1, wherein the second namespace includes a commnand builder class to automatically generate SQL statements for data table updates.
9. An application program interface as recited in claim 1, wherein the second namespace includes a connection class to enable a connection to a data source.
10. An application program interface as recited in claim 1, wherein the tbird namespace includes a command builder class to automatically generate SQL statements for data table updates.
11. An application program interface as recited in claim 1, wherein the third namespace includes a connection class to represent a unique session to an SQL server data source.
12. An application program interface as recited in claim 1, wherein the third namespace includes a data adapter class to exchange data between a data set and an SQL server for retrieving and saving data.
13. A network software architecture comprising the application program interface as recited in claim 1.
14. An application program interface embodied on one or more computer readable media, comprising: a first group of services related to sharing data among a plurality of data providers; a second group of services related to using data in an object-oriented database; a third group of services related to data used by a database client; and a fourth group of services related to data types used by a database server.
15. An application program interface as recited in claim 14, further comprising a constraint class to maintain the integrity of data in a data table.
16. An application program interface as recited in claim 14, further comprising a data column class to create a data table.
17. An application program interface as recited in claim 14, further comprising a data column collection class to identify the type of data each data column in a data table can contain.
18. An application program interface as recited in claim 14, further comprising a data relation class to relate two data table objects to each other.
19. An application program interface as recited in claim 14, further comprising a data row collection class to identify data stored in a data table.
20. An application program interface as recited in claim 14, further comprising a property collection class to add custom properties to a data table.
21. A network software architecture comprising the application program interface as recited in claim 14.
22. A method comprising: creating a common namespace related to data shared by a plurality of data providers; creating an object-oriented namespace related to data used in object-oriented databases; creating an SQL client namespace related to data used by SQL clients; and creating an SQL types namespace related to native data types in an SQL server.
23. A method as recited in claim 22, wherein the common namespace includes: a data adapter class to exchange data between a data source and a data set; a data column mapping class to map column names from a data source to column names in a data table; a data table mapping class to map data returned from a query of a data source and a data table; and a row update class to indicate when an update to a row in a data table is completed.
24. A method as recited in claim 22, wherein the object-oriented namespace includes: a command builder class to generate SQL statements for data table updates; and a connection class to enable a connection to a data source.
25. A method as recited in claim 22, wherein the SQL client namespace includes: a command builder class to generate SQL statements for data table updates; a connection class to represent a unique session to an SQL server data source; and a data adapter class to exchange data between a data set and an SQL server for retrieving and saving data.
26. A computer system including one or more microprocessors and one or more software programs, the one or more software programs utilizing an application program interface to request services from an operating system, the application program interface including separate commands to request services consisting of the following groups of services: a first group of services related to sharing data among a plurality of data providers; a second group of services related to utilizing data stored in an object-oriented database; a third group of services related to data used by a database client; and a fourth group of services related to data types used by a database server.
27. A method comprising: managing network and computing resources for a distributed computing system; and exposing a set of functions that enable developers to access the network and computing resources of the distributed computing system, the set of functions comprising first functions to facilitate data sharing, second functions to facilitate accessing object-oriented databases, third functions to facilitate SQL client operations, and fourth functions to facilitate SQL server operations.
28. A method comprising: calling one or more first functions to facilitate sharing of data among multiple data providers; calling one or more second functions to facilitate accessing object-oriented databases; calling one or more third functions to facilitate SQL client operations; and calling one or more fourth functions to facilitate SQL server operations.
29. A method as recited in claim 28, wherein the first functions comprise functions for exchanging data between a data source and a data set, mapping column names from a data source to column names in a data table, and indicating when an update to a row is completed.
30. A method as recited in claim 28, wherein the second functions comprise functions for generating SQL statements for data table updates and enabling a connection to a data source.
31. A method as recited in claim 28, wherein the third features comprise functions for generating SQL statements for data table updates and representing a unique session to an SQL server data source.
Description
TECHNICAL FIELD
[0001] This invention relates to network software, such as Web applications, and to computer software development of such network software. More particularly, this invention relates to an application program interface (API) that facilitates use of a network software platform by application programs and computer hardware.
BACKGROUND
[0002] Very early on, computer software came to be categorized as "operating system" software or "application" software. Broadly speaking, an application is software meant to perform a specific task for the computer user such as solving a mathematical equation or supporting word processing. The operating system is the software that manages and controls the computer hardware. The goal of the operating system is to make the computer resources available to the application programmer while at the same time, hiding the complexity necessary to actually control the hardware.
[0003] The operating system makes the resources available via functions that are collectively known as the Application Program Interface or API. The term API is also used in reference to a single one of these functions. The functions are often grouped in terms of what resource or service they provide to the application programmer. Application software requests resources by calling individual API functions. API functions also serve as the means by which messages and information provided by the operating system are relayed back to the application software.
[0004] In addition to changes in hardware, another factor driving the evolution of operating system software has been the desire to simplify and speed application software development. Application software development can be a daunting task, sometimes requiring years of developer time to create a sophisticated program with millions of lines of code. For a popular operating system such as Microsoft Windows.RTM., application software developers write thousands of different applications each year that utilize the operating system. A coherent and usable operating system base is required to support so many diverse application developers.
[0005] Often, development of application software can be made simpler by making the operating system more complex. That is, if a function may be useful to several different application programs, it may be better to write it once for inclusion in the operating system, than requiring dozens of software developers to write it dozens of times for inclusion in dozens of different applications. In this manner, if the operating system supports a wide range of common functionality required by a number of applications, significant savings in applications software development costs and time can be achieved.
[0006] Regardless of where the line between operating system and application software is drawn, it is clear that for a useful operating system, the API between the operating system and the computer hardware and application software is as important as efficient internal operation of the operating system itself Over the past few years, the universal adoption of the Internet, and networking technology in general, has changed the landscape for computer software developers. Traditionally, software developers focused on single-site software applications for standalone desktop_computers, or LAN-based computers that were connected to a limited number of other computers via a local area network (LAN). Such software applications were typically referred to as "shrink wrapped" products because the software was marketed and sold in a shrink-wrapped package. The applications utilized well-defined APIs to access the underlying operating system of the computer.
[0007] As the Internet evolved and gained widespread acceptance, the industry began to recognize the power of hosting applications at various sites on the World Wide Web (or simply the "Web"). In the networked world, clients from anywhere could submit requests to server-based applications hosted at diverse locations and receive responses back in fractions of a second. These Web applications, however, were typically developed using the same operating system platform that was originally developed for standalone computing machines or locally networked computers. Unfortunately, in some instances, these applications do not adequately transfer to the distributed computing regime. The underlying platform was simply not constructed with the idea of supporting limitless numbers of interconnected computers.
[0008] To accommodate the shift to the distributed computing environment being ushered in by the Internet, Microsoft Corporation is developing a network software platform known as the ".NET" platform (read as "Dot Net"). The platform allows developers to create Web services that will execute over the Internet. Such a dynamic shift requires a new ground-up design of an entirely new API.
[0009] In response to this challenge, the inventors developed a unique set of API functions for Microsoft's .NET.TM. platform.
SUMMARY
[0010] An application program interface (API) provides a set of functions for application developers who build Web applications on a network platform, such as Microsoft Corporation's .NET.TM. platform.
BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The same numbers are used throughout the drawings to reference like features.
[0012] FIG. 1 illustrates a network architecture in which clients access Web services over the Internet using conventional protocols.
[0013] FIG. 2 is a block diagram of a software architecture for Microsoft's .NET.TM. platform, which includes an application program interface (API).
[0014] FIG. 3 is a block diagram of unique namespaces supported by the API, as well as function classes of the various API functions.
[0015] FIG. 4 is a block diagram of an exemplary computer that may execute all or part of the software architecture.
BRIEF DESCRIPTION OF ACCOMPANYING COMPACT DISC
[0016] Accompanying this specification is a compact disc that stores a compiled HTML help file identifying the API (application program interface) for Microsoft's .NET.TM. network platform. The file is named "cpref chm" and was created on June 8, 2001. It is 30.81 Mbytes in size. The file can be executed on a Windows.RTM.-based computing device (e.g., IBM-PC, or equivalent) that executes a Windows.RTM.-brand operating system (e.g., Windows.RTM. NT, Windows.RTM. 98, Windows.RTM. 2000, etc.). The compiled HTML help file stored on the compact disk is hereby incorporated by reference.
[0017] Additionally, the APIs contained in the compiled HTML help file are also provided in approximately 100 separate text files named "NamespaceName.txt". The text files comply with the ASCII format.
[0018] The compact disc itself is a CD-ROM, and conforms to the ISO 9660
standard.
DETAILED DESCRIPTION
[0019] This disclosure addresses an application program interface (API) for a network platform upon which developers can build Web applications and services. More particularly, an exemplary API is described for the .NET platform created by Microsoft Corporation. The .NET.TM. platform is a software platform for Web services and Web applications implemented in the distributed computing environment. It represents the next generation of Internet computing, using open communication standards to communicate among loosely coupled Web services that are collaborating to perform a particular task.
[0020] In the described implementation, the .NET.TM. platform utilizes XML (extensible markup language), an open standard for describing data. XML is managed by the World Wide Web Consortium (W3C). XML is used for defining data elements on a Web page and business-to-business documents. XML uses a similar tag structure as HTML; however, whereas HTML defines how elements are displayed, XML defines what those elements contain. HTML uses predefined tags, but XML allows tags to be defined by the developer of the page. Thus, virtually any data items can be identified, allowing Web pages to function like database records. Through the use of XML and other open protocols, such as Simple Object Access Protocol (SOAP), the .NET.TM. platform allows integration of a wide range of services that can be tailored to the needs of the user. Although the embodiments described herein are described in conjunction with XML and other open standards, such are not required for the operation of the claimed invention. Other equally viable technologies will suffice to implement the inventions described herein.
[0021] As used herein, the phrase application program interface or API includes traditional interfaces that employ method or function calls, as well as remote calls (e.g., a proxy, stub relationship) and SOAP/XML invocations.
[0022] Exemplary Network Environment
[0023] FIG. 1 shows a network environment 100 in which a network platform, such as the .NET.TM. platform, may be implemented. The network environment 100 includes representative Web services 102(1), . . . , 102(N), which provide services that can be accessed over a network 104
(e.g., Internet). The Web services, referenced generally as number 102, are programmable application components that are reusable and interact programmatically over the network 104, typically through industry standard Web protocols, such as XML, SOAP, WAP (wireless application protocol), HTTP (hypertext transport protocol), and SMTP (simple mail transfer protocol) although other means of interacting with the Web services over the network may also be used, such as Remote Procedure Call (RPC) or object broker type technology. A Web service can be self-describing and is often defined in terms of formats and ordering of messages.
[0024] Web services 102 are accessible directly by other services (as represented by communication link 106) or a software application, such as Web application 110 (as represented by communication links 112 and 114). Each Web service 102 is illustrated as including one or more servers that execute software to handle requests for particular services. Such services often maintain databases that store information to be served back to requesters. Web services may be configured to perform any one of a variety of different services. Examples of Web services include login verification, notification, database storage, stock quoting, location directories, mapping, music, electronic wallet, calendar/scheduler, telephone listings, news and information, games, ticketing, and so on. The Web services can be combined with each other and with other applications to build intelligent interactive experiences. The network environment 100 also includes representative client devices 120(1), 120(2), 120(3), 120(4), . . . , 120(M) that utilize the Web services 102
(as represented by communication link 122) and/or the Web application 110
(as represented by communication links 124, 126, and 128). The clients may communicate with one another using standard protocols as well, as represented by an exemplary XML link 130 between clients 120(3) and 120(4). The client devices, referenced generally as number 120, can be implemented many different ways. Examples of possible client implementations include, without limitation, portable computers, stationary computers, tablet PCs, televisions/set-top boxes, wireless communication devices, personal digital assistants, gaming consoles, printers, photocopiers, and other smart devices. The Web application 110
is an application designed to run on the network platform and may utilize the Web services 102 when handling and servicing requests from clients 120. The Web application 110 is composed of one or more software applications 130 that run a top a programming framework 1-32, which are executing on one or more servers 134 or other computer systems. Note that a portion of Web application 110 may actually reside on one or more of clients 120. Alternatively, Web application 110 may coordinate with other software on clients 120 to actually accomplish its tasks.
[0025] The programming framework 132 is the structure that supports the applications and services developed by application developers. It permits multi-language development and seamless integration by supporting multiple languages. It supports open protocols, such as SOAP, and encapsulates the underlying operating system and object model services. The framework provides a robust and secure execution environment for the multiple programming languages and offers secure, integrated class libraries.
[0026] The framework 132 is a multi-tiered architecture that includes an application program interface (API) layer 142, a common language runtime (CLR) layer 144, and an operating system/services layer 146. This layered architecture allows updates and modifications to various layers without impacting other portions of the framework. A common language specification (CLS) 140 allows designers of various languages to write code that is able to access underlying library functionality. The specification 140 functions as a contract between language designers and library designers that can be used to promote language interoperability. By adhering to the CLS, libraries written in one language can be directly accessible to code modules written in other languages to achieve seamless integration between code modules written in one language and code modules written in another language. One exemplary detailed implementation of a CLS is described in an ECMA standard created by participants in ECMA TC39/TG3. The reader is directed to the ECMA web site at www.ecma.ch.
[0027] The API layer 142 presents groups of functions that the applications 130 can call to access the resources and services provided by layer 146. By exposing the API functions for a network platform, application developers can create Web applications for distributed computing systems that make full use of the network resources and other Web services, without needing to understand the complex interworkings of how those network resources actually operate or are made available. Moreover, the Web applications can be written in any number of programming languages, and translated into an intermediate language supported by the common language runtime 144 and included as part of the common language specification 140. . In this way, the API layer 142 can provide methods for a wide and diverse variety of applications.
[0028] Additionally, the framework 132 can be configured to support API calls placed by remote applications executing remotely from the servers 134 that host the framework. Representative applications 148(1) and 148(2) residing on clients 120(3) and 120(M), respectively, can use the API functions by making calls directly, or indirectly, to the API layer 142 over the network 104.
[0029] The framework may also be implemented at the clients. Client 120(3) represents the situation where a framework 150 is implemented at the client. This framework may be identical to server-based framework 132, or modified for client purposes. Alternatively, the client-based framework may be condensed in the event that the client is a limited or dedicated function device, such as a cellular phone, personal digital assistant, handheld computer, or other communication/computing device.
[0030] Developers' Programming Framework
[0031] FIG. 2 shows the programming framework 132 in more detail. The common language specification (CLS) layer 140 supports applications written in a variety of languages 130(1), 130(2), 130(3), 130(4), . . . 130(K). Such application languages include Visual Basic, C++, C#, COBOL, Jscript, Perl, Eiffel, Python, and so on. The common language specification 140 specifies a subset of features or rules about features that, if followed, allow the various languages to communicate. For example, some languages do not support a given type (e.g., an "int*" type) that might otherwise be supported by the common language runtime 144. In this case, the common language specification 140 does not include the type. On the other hand, types that are supported by all or most languages (e.g., the "int[ ]" type) is included in common language specification 140 so library developers are free to use it and are assured that the languages can handle it. This ability to communicate results in seamless integration between code modules written in one language and code modules written in another language. Since different languages are particularly well suited to particular tasks, the seamless integration between languages allows a developer to select a particular language for a particular code module with the ability to use that code module with modules written in different languages. The common language runtime 144 allow seamless multi-language development, with cross language inheritance, and provide a robust and secure execution environment for the multiple programming languages. For more information on the common language specification 140 and the common language runtime 144, the reader is directed to co-pending applications entitled "Method and System for Compiling Multiple Languages", filed June 21, 2000 (serial No. 09/598,105) and "Unified Data Type System and Method" filed 7/10/2000
(Ser. No. 09/613,289), which are incorporated by reference.
[0032] The framework 132 encapsulates the operating system 146(1) (e.g., Windows.RTM.-brand operating systems) and object model services 146(2) (e.g., Component Object Model (COM) or Distributed COM). The operating system 146(1) provides conventional functions, such as file management, notification, event handling, user interfaces (e.g., windowing, menus, dialogs, etc.), security, authentication, verification, processes and threads, memory management, and so on. The object model services 146(2) provide interfacing with other objects to perform various tasks. Calls made to the API layer 142 are handed to the common language runtime layer 144 for local execution by the operating system 146(1) and/or object model services 146(2).
[0033] The API 142 groups API functions into multiple namespaces. Namespaces essentially define a collection of classes, interfaces, delegates, enumerations, and structures, which are collectively called "types", that provide a specific set of related functionality. A class represents managed heap allocated data that has reference assignment semantics. A delegate is an object oriented function pointer. An enumeration is a special kind of value type that represents named constants. A structure represents static allocated data that has value assignment semantics. An interface defines a contract that other types can implement.
[0034] By using namespaces, a designer can organize a set of types into a hierarchical namespace. The designer is able to create multiple groups from the set of types, with each group containing at least one type that exposes logically related functionality. In the exemplary implementation, the API 142 is organized into four root namespaces: a first namespace 200
for Web applications, a second namespace 202 for client applications, a third namespace 204 for data and XML, and a fourth namespace 206 for base class libraries (BCLs). Each group can then be assigned a name. For instance, types in the Web applications namespace 200 are assigned the name "Web", and types in the data and XML namespace 204 can be assigned names "Data" and "XML" respectively. The named groups can be organized under a single "global root" namespace for system level APIs, such as an overall System namespace. By selecting and prefixing a top_level identifier, the types in each group can be easily referenced by a hierarchical name that includes the selected top_level identifier prefixed to the name of the group containing the type. For instance, types in the Web applications namespace 200 can be referenced using the hierarchical name "System.Web". In this way, the individual namespaces 200, 202, 204, and 206 become major branches off of the System namespace and can carry a designation where the individual namespaces are prefixed with a designator, such as a "System." prefix.
[0035] The Web applications namespace 200 pertains to Web based functionality, such as dynamically generated Web pages (e.g., Microsoft's Active Server Pages (ASP). It supplies types that enable browser/server communication. The client applications namespace 202 pertains to drawing and client side UI functionality. It supplies types that enable drawing of two-dimensional (2D), imaging, and printing, as well as the ability to construct window forms, menus, boxes, and so on.
[0036] The data and XML namespace 204 relates to connectivity to data sources and XML functionality. It supplies classes, interfaces, delegates, and enumerations that enable security, specify data types, and serialize objects into XML format documents or streams. The base class libraries (BCL) namespace 206 pertains to basic system and runtime functionality. It contains the fundamental types and base classes that define commonly-used value and reference data types, events and event handlers, interfaces, attributes, and processing exceptions.
[0037] In addition to the framework 132, programming tools 210 are provided to assist the developer in building Web services and/or applications. One example of the programming tools 200 is Visual Studio.TM., a multi-language suite of programming tools offered by Microsoft Corporation.
[0038] Root API Namespaces
[0039] FIG. 3 shows the API 142 and its four root namespaces in more detail. In one embodiment, the namespaces are identified according to a hierarchical naming convention in which strings of names are concatenated with periods. For instance, the Web applications namespace 200 is identified by the root name "System.Web". Within the "Sytem.Web" namespace is another namespace for Web services, identified as "System.Web.Services", which further identifies another namespace for a description known as "System.Web.Services.Description". With this naming convention in mind, the following provides a general overview of selected namespaces of the API 142, although other naming conventions could be used with equal effect.
[0040] The Web applications namespace 200 ("System.Web") defines additional namespaces, including:
[0041] A services namespace 300 ("System.Web.Services") containing classes that enable a developer to build and use Web services. The services namespace 300 defines additional namespaces, including a description namespace 302 ("System.Web.Services.Description") containing classes that enable a developer to publicly describe a Web service via a service description language (such as WSDL, a specification available from the W3C), a discovery namespace 304 ("System.Web.Services.Discovery") containing classes that allow Web service consumers to locate available Web Services on a Web server, and a protocols namespace 306
("System.Web.Services.Protocols") containing classes that define the protocols used to transmit data across a network during communication between Web service clients and the Web service itself.
[0042] A caching namespace 308 ("System.Web.Caching") containing classes that enable developers to decrease Web application response time through temporarily caching frequently used resources on the server. This includes ASP.NET pages, web services, and user controls. (ASP.NET is the updated version of Microsoft's ASP technology.) Additionally, a cache dictionary is available for developers to store frequently used resources, such as hash tables and other data structures.
[0043] A configuration namespace 310 ("System.Web.Configuration") containing classes that are used to read configuration data in for an application.
[0044] A UI namespace 312 ("System.Web.UI") containing types that allow developers to create controls and pages that will appear in Web applications as user interfaces on a Web page. This namespace includes the control class, which provides all web based controls, whether those encapsulating HTML elements, higher level Web controls, or even custom User controls, with a common set of functionality. Also provided are classes which provide the web forms server controls data binding functionality, the ability to save the view state of a given control or page, as well as parsing functionality for both programmable and literal controls. Within the UI namespace 312 are two additional namespaces: an HTML controls namespace 314 ("System.Web.UI.HtmlControls") containing classes that permit developers to interact with types that encapsulates html 3.2 elements create HTML controls, and a Web controls namespace 316
("System.Web.UI.WeblControls") Hcontaining classes that allow developers to create higher level Web controls.
[0045] A security namespace 318 ("System.Web.Security") containing classes used to implement security in web server applications, such as basic authentication, challenge response authentication, and role based authentication.
[0046] A session state namespace 320 ("System.Web.SessionState") containing classes used to access session state values (i.e., data that lives across requests for the lifetime of the session) as well as session-level settings and lifetime management methods.
[0047] The client applications namespace 202 is composed of two namespaces:
[0048] A windows forms namespace 322 ("System.Windows.Forms") containing classes for creating Windows.RTM.-based client applications that take full advantage of the rich user interface features available in the Microsoft Windows.RTM. operating system, such as the ability to drag and drop-screen elements. Such classes may include wrapped APIs available in the Microsoft Windows.RTM. operating system that are used in a windowing UI environment. Within this namespace are a design namespace 324
("System.Windows.Forms.Design") that contains classes to extend design-time support for Windows forms and a component model namespace 326
("System.Windows.Forms.ComponentModel") that contains the windows form implementation of the general component model defined in System.ComponentModel. This namespace contains designer tools, such as Visual Studio, which offer a rich experience for developers at design time.
[0049] A drawing namespace 328 ("System.Drawing") containing classes for graphics functionality. The drawing namespace 328 includes a 2D drawing namespace 330 ("System.Drawing.Drawing2D") that contains classes and enumerations to provide advanced 2-dimmensional and vector graphics functionality, an imaging namespace 332 ("System.Drawing.Imaging") that contains classes for advanced imaging functionality, a printing namespace 334 ("System.Drawing.Printing") that contains classes to permit developers to customize printing, and a text namespace 336
("System.Drawing.Text") that contains classes for advanced typography functionality.
[0050] The data and XML namespace 204 is composed of two namespaces:
[0051] A data namespace 340 ("System.Data") containing classes that enable developers to build components that efficiently manage data from multiple data sources. It implements an architecture that, in a disconnected scenario (such as the Internet), provides tools to request, update, and reconcile data in multiple tier systems. The data namespace 340 includes a common namespace 342 that contains types shared by data providers. A data provider describes a collection of types used to access a data source, such as a database, in the managed space. The data namespace 340
also includes an OLE DB namespace 344 that contains types pertaining to data used in object-oriented databases (e.g., Microsoft's SQL Server), and a SQL client namespace 346 that contains types pertaining to data used by SQL clients. The data namespace also includes a SQL types namespace 348 ("System.Data.SqlTypes") that contains classes for native data types within Microsoft's SQL Server. The classes provide a safer, faster alternative to other data types. Using the objects within this namespace helps prevent type conversion errors caused in situations where loss of precision could occur. Because other data types are converted to and from SQL types behind the scenes, explicitly creating and using objects within this namespace results in faster code as well.
[0052] An XML namespace 350 ("System.XML") containing classes that provide standards-based support for processing XML. The supported standards include XML (e.g., version 1.0), XML Namespaces (both stream level and DOM), XML Schemas, XPath expressions, XSL/T transformations, DOM Level 2
Core, and SOAP (e.g., version 1.1). The XML namespace 350 includes an XSLT namespace 352 ("System.XML.Xsl") that contains classes and enumerations to support XSLT (Extensible Stylesheet Language Transformations), an Xpath namespace 354 ("System.XML.Xpath") that contains an XPath parser and evaluation engine, and a serialization namespace 356 ("System.XML.Serialization") that contains classes used to serialize objects into XML format documents or streams.
[0053] The base class library namespace 206 ("System") includes the following namespaces:
[0054] A collections namespace 360 ("System.Collections") containing interfaces and classes that define various collections of objects, such as lists, queues, arrays, hash tables and dictionaries.
[0055] A configuration namespace 362 ("System.Configuration") containing classes and interfaces that allow developers to programmatically access configuration settings and handle errors in configuration files.
[0056] A diagnostics namespace 364 ("System.Diagnostics") containing classes that are used to debug applications and to trace code execution. The namespace allows developers to start system processes, read and write to event logs, and monitor system performance using performance counters.
[0057] A globalization namespace 366 ("System.Globalization") containing classes that define culture-related information, including the language, the country/region, the calendars in use, the format patterns for dates, currency and numbers, and the sort order for strings.
[0058] An I/O namespace 368 ("System.IO") containing the infrastructure pieces to operate with the input/output of data streams, files, and directories. This namespace includes a model for working with streams of bytes, higher level readers and writers which consume those bytes, various constructions or implementations of the streams (e.g., FileStream and MemoryStream) and, a set of utility classes for working with files and directories.
[0059] A net namespace 370 ("System.Net") providing an extensive set of classes for building network-enabled application, referred to as the Net Class Libraries (NCL). One element to the design of the Net Class Libraries is an extensible, layered approach to exposing networking functionality. The NCL stack contains three basic layers. A base layer (System.Net.Socket) provides access to an interface to TCP/IP, the communications protocol of UNIX networks and the Internet. One example of such an interface is the "WinSock API" from Microsoft Corporation. The next layer is the Transport Protocol classes, which support such transport protocols as TCP and UDP. Developers may write their own protocol classes to provide support for protocols such as IGMP and ICMP. The third layer is the Web request, which provides an abstract factory pattern for the creation of other protocol classes. The NCL provides implementations for Hyper Text Transport Protocol (HTTTP).
[0060] A reflection namespace ("System.Reflection") 372 containing types that provide a managed view of loaded types, methods, and fields, with the ability to dynamically create and invoke types.
[0061] A resources namespace 374 ("System.Resources") containing classes and interfaces that allow developers to create, store and manage various culture-specific resources used in an application.
[0062] A security namespace 376 ("System.Security") supporting the underlying structure of the security system, including interfaces, attributes, exceptions, and base classes for permissions.
[0063] A service process namespace 378 ("System.ServiceProcess") containing classes that allow developers to install and run services. Services are long-running executables that run without a user interface. They can be installed to run under a system account that enables them to be started at computer reboot. Services whose implementation is derived from processing in one class can define specific behavior for start, stop, pause, and continue commands, as well as behavior to take when the system shuts down.
[0064] A text namespace 380 ("System.Text") containing classes representing various types of encodings (e.g., ASCII, Unicode, UTF-7, and UTF-8), abstract base classes for converting blocks of characters to and from blocks of bytes, and a helper class that manipulates and formats string objects without creating intermediate instances.
[0065] A threading namespace 382 ("System.Threading") containing classes and interfaces that enable multi-threaded programming. The threading namespace includes a ThreadPool class that manages groups of threads, a Timer class that enables a delegate to be called after a specified amount of time, and a Mutex class for synchronizing mutually-exclusive threads. This namespace also provides classes for thread scheduling, wait notification, and deadlock resolution.
[0066] A runtime namespace 384 ("System.Runtime") containing multiple namespaces concerning runtime features, including an interoperation services namespace 386 ("System.Runtime.InteropServices") that contains a collection of classes useful for accessing COM objects. The types in the InteropServices namespace fall into the following areas of functionality : attributes, exceptions, managed definitions of COM types, wrappers, type converters, and the Marshal class. The runtime namespace 384 further includes a remoting namespace 388 ("System.Runtime.Remoting") that contains classes and interfaces allowing developers to create and configure distributed applications. Another namespace within the runtime namespace 384 is a serialization namespace 390 ("System.Runtime.Serializa- tion") that contains classes used for serializing and deserializing objects. Serialization is the process of converting an object or a graph of objects into a linear sequence of bytes for either storage or transmission to another location.
[0067] The data namespace ("System.Data") contains classes that allow developers to build components to manage data from various data sources. The data namespace provides tools to request, update, and reconcile data in multiple tier systems. As discussed above, the data namespace 340
includes a common namespace 342 ("System.Data.Common"), an OLE DB namespace 344 ("System.Data.OleDb"), an SQL client namespace 346
("System.Data.SqlClient"), and an SQL Types namespace 348
("System.Data.SqlTypes").
[0068] The data namespace 340 contains various classes, including a constraint class that contains rules to maintain the integrity of data in a data table. A data column class provides the fundamental components for creating the schema of a data table. This schema is built by adding together one or more data column objects. A data column collection class defines the schema of a data table and determines the type of data each data column can contain. A data relation class is used to relate two data table objects to one another through data column objects.
[0069] The data namespace 340 also includes a data row class that provides a primary component of the data table. A data row collection contains the actual data for the data table. A data row change event and a data column change event occur when a change is made to a data row's value or a data column's value, respectively.
[0070] The common namespace 342 contains types shared by multiple data providers. The common namespace 342 also includes various classes, such as a data adapter class that allows for the exchange of data between a data source and a data set. A data column mapping class maps column names from a data source to corresponding column names in a data table. A data table mapping class maps data returned from a query of a data source to a data table.
[0071] The OLE DB namespace 344 includes a command builder class that automatically generates SQL statements for data table updates and a connection class that provides connections to a data source, such as a network server.
[0072] The SQL client namespace 346 also includes a command builder class. Additionally, the SQL client namespace includes a connection class that represents a unique session to an SQL server data source and a data adapter class that exchanges data between a data set and an SQL server for retrieving and saving data.
[0073] The SQL Types namespace contains classes for native data types within Microsoft's SQL Server.
[0074] Using these classes helps prevent type conversion errors caused in situations where loss of precision could occur. Other data types are converted to and from SQL types (behind the scenes), such that explicitly creating and using objects in the data namespace results in faster code. Specific details regarding the System.Data namespace are provided below.
[0075] System.Data
[0076] Description
[0077] The System.Data namespace consists mostly of the classes that constitute the ADO.NET architecture. The ADO.NET architecture enables you to build components that efficiently manage data from multiple data sources. In a disconnected scenario (such as the Internet), ADO.NET provides the tools to request, update, and reconcile data in multiple tier systems. The ADO NET architecture is also implemented in client applications, such as Windows Forms, or HTML pages created by ASP.NET.
[0078] AcceptRejectRule enumeration (System.Data)
[0079] Description
[0080] Determines the action that occurs when the System.Data.DataSet.Acce- ptChanges or System.Data.DataTable.RejectChanges method is invoked on a System.Data.DataTable with a System.Data.ForeignKeyConstraint.
[0081] Changes to a System.Data.DataTable are not final until you call the System.Data.DataTable.AcceptChanges method. At that time, constraint-related errors can occur because any System.Data.ForeignKeyCon- straint objects associated with a System.Data.DataTable are activated to allow deletions and edits to occur freely. Prior to that time, System.Data.ForeignKeyConstraint objects are inactive. When the System.Data.ForeignKeyConstraint becomes activated, and errors occur, System.Data.AcceptRejectRule is called to determine the next course of action.
[0082] [C#] public const AcceptRejectRule Cascade;
[0083] [C++] public: const AcceptRejectRule Cascade;
[0084] [VB] Public Const Cascade As AcceptRejectRule
[0085] [JScript] public var Cascade: AcceptRejectRule;
[0086] Description
[0087] Changes are cascaded across the relationship.
[0088] [C#] public const AcceptRejectRule None;
[0089] [C++] public: const AcceptRejectRule None;
[0090] [VB] Public Const None As AcceptRejectRule
[0091] [JScript] public var None: AcceptRejectRule;
[0092] Description
[0093] No action occurs.
[0094] Methods:
[0095] Commandehavior enumeration (System.Data)
[0096] ToString
[0097] Description
[0098] Specifies a description of the results and the affect on the database of the query command.
[0099] The System.Data.CommandBehavior values are used by the System.Data.IDbCommand.ExecuteReader method of System.Data.IDbCommand and any classes derived from it.
[0100] ToString
[0101] [C#] public const CommandBehavior CloseConnection;
[0102] [C++] public: const CommandBehavior CloseConnection;
[0103] [VB] Public Const CloseConnection As CommandBehavior
[0104] [JScript] public var CloseConnection: CommandBehavior;
[0105] Description
[0106] When the command is executed, the associated Connection object is closed when the associated DataReader object is closed.
[0107] ToString
[0108] [C#] public const CommandBehavior Default;
[0109] [C++] public: const CommandBehavior Default;
[0110] [VB] Public Const Default As CommandBehavior
[0111] [JScript] public var Default: CommandBehavior;
[0112] ToString
[0113] [C#] public const CommandBehavior KeyInfo;
[0114] [C++] public: const CommandBehavior KeyInfo;
[0115] [VB] Public Const KeyInfo As CommandBehavior
[0116] [JScript] public var KeyInfo: CommandBehavior;
[0117] Description
[0118] The query returns column and primary key information. The query is executed without any locking on the selected rows. When using System.Data.CommandBehavior.KeyInfo, the SQL Server NET Data Provider appends a FOR BROWSE clause to the statement being executed. The user should be aware of potential side effects, such as interference with the use of SET FMTONLY ON statements. See SQL Server Books Online for more information.
[0119] ToString
[0120] [C#] public const CommandBehavior SchemaOnly;
[0121] [C++] public: const CommandBehavior SchemaOnly;
[0122] [VB] Public Const SchemaOnly As CommandBehavior
[0123] [JScript] public var SchemaOnly : CommandBehavior;
[0124] Description
[0125] The query returns column information only and does not affect the database state.
[0126] ToString
[0127] [C#] public const CommandBehavior SequentialAccess;
[0128] [C++] public: const CommandBehavior SequentialAccess;
[0129] [VB] Public Const SequentialAccess As CommandBehavior
[0130] [JScript] public var SequentialAccess: CommandBehavior;
[0131] Description
[0132] The results of the query are read sequentially to the column level. This allows an application to read large binary values using the GetChars or GetBytes methods of a .NET data provider. Execution of the query may affect the database state.
[0133] ToString
[0134] [C#] public const CommandBehavior SingleResult;
[0135] [C++] public: const CommandBehavior SingleResult;
[0136] [VB] Public Const SingleResult As CommandBehavior
[0137] [JScript] public var SingleResult: CommandBehavior;
[0138] Description
[0139] The query returns a single result. Execution of the query may affect the database state.
[0140] ToString
[0141] [C#] public const CommandBehavior SingleRow;
[0142] [C++] public: const CommandBehavior SingleRow;
[0143] [VB] Public Const SingleRow As CommandBehavior
[0144] [JScript] public var SingleRow : CommandBehavior;
[0145] Description
[0146] The query is expected to return a single row. Execution of the query may affect the database state. Some NET data providers may, but are not required to, use this information to optimize the performance of the command. When you specify System.Data.CommandBehavior.SingleRow with the System.Data.OleDb.OleDbCommand.ExecuteReader method of the System.Data.OleDb.OleDbCommand object, the OLE DB .NET Data Provider performs binding using the OLE DB IRow interface if it is available. Otherwise, it uses the IRowset interface. If your SQL statement is expected to return only a single row, specifying System.Data.CommandBehav- ior.SingleRow can also improve application performance.
[0147] CommandType enumeration (System.Data)
[0148] ToString
[0149] Description
[0150] Specifies how a command string is interpreted.
[0151] When the System.Data.lDbCommand.CommandType property is set to StoredProcedure, set the System.Data.IDbCommand.CommandText property to the name of the stored procedure. The command executes this stored procedure when you call System.Data.lDbCommand.ExecuteReader.
[0152] ToString
[0153] [C#] public const CommandType StoredProcedure;
[0154] [C++] public: const CommandType StoredProcedure;
[0155] [VB] Public Const StoredProcedure As CommandType
[0156] [JScript] public var StoredProcedure: CommandType;
[0157] Description
[0158] The name of a stored procedure.
[0159] ToString
[0160] [C#] public const CommandType TableDirect;
[0161] [C++] public: const CommandType TableDirect;
[0162] [VB] Public Const TableDirect As CommandType
[0163] [JScript] public var TableDirect: CommandType;
[0164] Description
[0165] A table name whose columns are all returned (OLE DB .NET Data Provider only).
[0166] ToString
[0167] [C#] public const CommandType Text;
[0168] [C++] public: const CommandType Text;
[0169] [VB] Public Const Text As CommandType
[0170] [JScript] public var Text: CommandType;
[0171] Description
[0172] A SQL text command.
[0173] ConnectionState enumeration (System.Data)
[0174] ToString
[0175] Description
[0176] Returns the current state of the connection to a data source.
[0177] The System.Data.ConnectionState values are used by the System.Data.OleDb.OleDbConnection.State property of the System.Data.OleDb.OleDbConnection and System.Data.SqlClient.SqlConnection objects.
[0178] ToString
[0179] [C#] public const ConnectionState Broken;
[0180] [C++] public: const ConnectionState Broken;
[0181] [VB] Public Const Broken As ConnectionState
[0182] [JScript] public var Broken: ConnectionState;
[0183] Description
[0184] The object is broken. This can occur only after the connection has been opened. A connection in this state may be closed and then re-opened.
[0185] ToString
[0186] [C#] public const ConnectionState Closed;
[0187] [C++] public: const ConnectionState Closed;
[0188] [VB] Public Const Closed As ConnectionState
[0189] [JScript] public var Closed: ConnectionState;
[0190] Description
[0191] The object is closed.
[0192] ToString
[0193] [C#] public const ConnectionState Connecting;
[0194] [C++] public: const ConnectionState Connecting;
[0195] [VB] Public Const Connecting As ConnectionState
[0196] [JScript] public var Connecting: ConnectionState;
[0197] Description
[0198] The object is connecting.
[0199] ToString
[0200] [C#] public const ConnectionState Executing;
[0201] [C++] public: const ConnectionState Executing;
[0202] [VB] Public Const Executing As ConnectionState
[0203] [JScript] public var Executing: ConnectionState;
[0204] Description
[0205] The object is executing a command.
[0206] ToString
[0207] [C#] public const ConnectionState Fetching;
[0208] [C++] public: const ConnectionState Fetching;
[0209] [VB] Public Const Fetching As ConnectionState
[0210] [JScript] public var Fetching: ConnectionState;
[0211] Description
[0212] Data is being retrieved.
[0213] ToString
[0214] [C#] public const ConnectionState Open;
[0215] [C++] public: const ConnectionState Open;
[0216] [VB] Public Const Open As ConnectionState
[0217] [JScript] public var Open: ConnectionState;
[0218] Description
[0219] The object is open.
[0220] Constraint class (System.Data)
[0221] ToString
[0222] Description
[0223] Represents a constraint that can be enforced on one or more System.Data.DataColumn objects.
[0224] A constraint is a rule used to maintain the integrity of the data in the System.Data.DataTable. For example, when you delete a value that is used in one or more related tables, a System.Data.ForeignKeyConstraint determines whether the values in the related tables are also deleted, set to null values, set to default values, or whether no action occurs. A System.Data.UniqueConstraint, on the other hand, simply ensures that all values within a particular table are unique. For more information, see.
[0225] Constructors:
[0226] Constraint
[0227] Example Syntax:
[0228] ToString
[0229] [C#] protected Constraint( );
[0230] [C++] protected: Constraint( );
[0231] [VB] Protected Sub New( )
[0232] [JScript] protected function Constraint( );
[0233] Properties:
[0234] _DataSet
[0235] ToString
[0236] [C#] protected internal virtual DataSet_DataSet {get;}
[0237] [C++] internal: _roperty virtual DataSet_get_DataSet( );
[0238] [VB] Overridable Protected Friend ReadOnly Property_PataSet As DataSet
[0239] [JScript] package function get _DataSet( ) : DataSet;
[0240] Description
[0241] Gets the System.Data.DataSet to which this constraint belongs.
[0242] ConstraintName
[0243] ToString
[0244] [C#] public virtual string ConstraintName {get; set;}
[0245] [C++] public: _property virtual String* get_ConstraintName( );public: _property virtual void set_ConstraintName(String*);
[0246] [VB] Overridable Public Property ConstraintName As String
[0247] [JScript] public function get ConstraintNameo: String; public function set ConstraintName(String);
[0248] Description
[0249] The name of a constraint in the System.Data.ConstraintCollection
[0250] The System.Data.ConstraintCollection is returned by the System.Data.DataTable.Constraints property of the System.Data.DataTable class.
[0251] ExtendedProperties
[0252] ToString
[0253] [C#] public PropertyCollection ExtendedProperties {get;}
[0254] [C++] public: _property PropertyCollection* get_ExtendedProperties( );
[0255] [VB] Public ReadOnly Property ExtendedProperties As PropertyCollection
[0256] [JScript] public function get ExtendedProperties( ) : PropertyCollection;
[0257] Description
[0258] Gets the collection of customized user information.
[0259] Use the System.Data.DataTable.ExtendedProperties to add custom information to a System.Data.DataTable. Add information with the Add method. Retrieve information with the Item method.
[0260] Table
[0261] ToString
[0262] [C#] public abstract DataTable Table {get;}
[0263] [C++] public: _property virtual DataTable=0;
[0264] [VB] MustOverride Public ReadOnly Property Table As DataTable
[0265] [JScript] public abstract function get Table( ) : DataTable;
[0266] Description
[0267] Gets the System.Data.DataTable to which the constraint applies. CheckStateForProperty
[0268] [C#] protected void CheckStateForProperty( );
[0269] [C++] protected: void CheckStateForProperty( );
[0270] [VB] Protected Sub CheckStateForProperty( )
[0271] [JScript] protected function CheckStateForProperty( );
[0272] Description
[0273] SetDataSet
[0274] [C+] protected internal void SetDataSet(DataSet dataSet);
[0275] [C++] protected public: void SetDataSet(DataSet* dataSet);
[0276] [VB] Protected Friend Dim Sub SetDataSet(ByVal dataSet As DataSet)
[0277] [JScript] package function SetDataSet(dataSet: DataSet);
[0278] Description
[0279] Sets the constraint's System.Data.DataSet. The System.Data.DataSet to which this constraint will belong.
[0280] ToString
[0281] [C#] public override string ToString( );
[0282] [C++] public: String* ToString( );
[0283] [VB] Overrides Public Function ToString( ) As String
[0284] [JScript] public override function ToString( ) : String;
[0285] Description
[0286] Gets the System.Data.Constraint.ConstraintName, if there its one, as a string.
[0287] Return Value: The string value of the System.Data.Constraint.Constr- aintName
[0288] ConstraintCollection class (System.Data)
[0289] ToString
[0290] Description
[0291] Represents a collection of constraints for a System.Data.DataTable.
[0292] The System.Data.ConstraintCollection is accessed through the System.Data.DataTable.Constraints property.
[0293] Count
[0294] IsReadOnly
[0295] IsSynchronized
[0296] Item
[0297] ToString
[0298] Description
[0299] Gets the System.Data.Constraint from the collection with the specified name.
[0300] The System.Data.ConstraintCollection.Contains(System.Stiring) method can be used to test for the existence of a specific constraint. The System.Data.Constraint.ConstraintName of the constraint to return.
[0301] Item
[0302] ToString
[0303] [C#] public virtual Constraint this[int index] {get;}
[0304] [C++] public: property virtual Constraint* get_Item(int index);
[0305] [VB] Overridable Public Default ReadOnly Property Item(ByVal index As Integer) As Constraint
[0306] [JScript] returnValue=ConstraintCollectionObject.Item(index); Gets the specified System.Data.Constraint
[0307] Description
[0308] Gets the System.Data.Constraint from the collection at the specified index.
[0309] The System.Data.ConstraintCollection.Contains(System.String) method can be used to test for the existence of a specific constraint. The index of the constraint to return. a List
[0310] ToString
[0311] [C#] protected override ArrayList List {get;}
[0312] [C++] protected: property virtual ArrayList* get List( );
[0313] [VB] Overrides Protected ReadOnly Property List As ArrayList
[0314] [JScript] protected function get List( ) : ArrayList;
[0315] Description
[0316] Gets the list of objects contained by the collection.
[0317] SyncRoot
[0318] ToString
[0319] Description
[0320] Occurs when the System.Data.ConstraintCollection is changed through additions or removals.
[0321] For more information about handling events, see.
[0322] Add
[0323] [C#] public void Add(Constraint constraint);
[0324] [C++] public: void Add(Constraint* constraint);
[0325] [VB] Public Sub Add(ByVal constraint As Constraint)
[0326] [JScript] public function Add(constraint: Constraint); Adds a constraint to the System.Data.ConstraintCollection.
[0327] Description
[0328] Adds the specified constraint to the collection.
[0329] If the collection is successfully changed by adding or removing constraints, the System.Data.ConstraintCollection.CollectionChanged event occurs. The System.Data.Constraint to add.
[0330] Add
[0331] [C#] public virtual Constraint Add(string name, DataColumn column, bool primaryKey);
[0332] [C++] public: virtual Constraint* Add(String* name, DataColumn* column, bool primaryKey);
[0333] [VB] Overridable Public Function Add(ByVal name As String, ByVal column As DataColumn, ByVal primaryKey As Boolean) As Constraint
[0334] [JScript] public function Add(name : String, column : DataColumn, primaryKey: Boolean) : Constraint;
[0335] Description
[0336] Constructs a new System.Data.UniqueConstraint, using the specified System.Data.DataColumn, and adds it to the collection.
[0337] The System.Data.ConstraintCollection.CollectionChanged event occurs if the constraint is added successfully. The name of the System.Data.UniqueConstraint. The System.Data.DataColumn affected by the constraint. Indicates whether the column is a primary key column.
[0338] Add
[0339] [C#] public virtual Constraint Add(string name, DataColumn primaryKeyColumn, DataColumn foreignKeyColumn);
[0340] [C++] public: virtual Constraint* Add(String* name, DataColumn* primaryKeyColumn, DataColumn* foreignKeyColumn);
[0341] [VB] Overridable Public Function Add(ByVal name As String, ByVal primaryKeyColumn As DataColumn, ByVal foreignKeyColumn As DataColumn) As Constraint
[0342] [JScript] public function Add(name : String, primaryKeyColumn : DataColumn, foreignKeyColumn : DataColumn) : Constraint;
[0343] Description
[0344] Constructs a new System.Data.ForeignKeyConstraint, with the specified parent and child columns, and adds the constraint to the collection.
[0345] A System.Data.ForeignKeyConstraint and System.Data.UniqueConstraint are both created and added automatically when a System.Data.DataRelation is added to a System.Data.DataSet object's System.Data.DataRelationCollec- tion. The System.Data.ForeignKeyConstraint (which gets the same name as the System.Data.DataRelation ) is added to the child table's System.Data.ConstraintCollection, and the System.Data.UniqueConstraint is added to the parent table's System.Data.ConstraintCollection. The name of the System.Data.UniqueConstraint. The primary key System.Data.DataColumn. The foreign key System.Data.DataColumn.
[0346] Add
[0347] [C#] public virtual Constraint Add(string name, DataColumn[ ] columns, bool primaryKey);
[0348] [C++] public: virtual Constraint* Add(String* name, DataColumn* columns[ ], bool primaryKey);
[0349] [VB] Overridable Public Function Add(ByVal name As String, ByVal columns( ) As DataColumn, ByVal primaryKey As Boolean) As Constraint
[0350] [JScript] public function Add(name : String, columns : DataColumn[ ], primaryKey : Boolean) : Constraint;
[0351] Description
[0352] Constructs a new System.Data.UniqueConstraint using the specified array of System.Data.DataColumn objects, and adds it to the collection.
[0353] The System.Data.ConstraintCollection.CollectionChanged event occurs if the constraint is added succesfully. The name of the System.Data.UniqueConstraint. An array of System.Data.DataColumn objects that are affected by the constraint. Indicates whether the columns are primary key columns.
[0354] Add
[0355] [C#] public virtual Constraint Add(string name, DataColumn[ ]primaryKeyColumns, DataColumn[ ] foreignKeyColumns);
[0356] [C++] public: virtual Constraint* Add(String* name, DataColumn* primaryKeyColumns[ ], DataColumn* foreignKeyColumns[ ]);
[0357] [VB] Overridable Public Function Add(ByVal name As String, ByVal primaryKeyColumns( ) As DataColumn, ByVal foreignKeyColumns( ) As DataColumn) As Constraint
[0358] [JScript] public function Add(name : String, primaryKeyColumns : DataColumn[ ], foreignKeyColumns : DataColumn[ ]) : Constraint;
[0359] Description
[0360] Constructs a new System.Data.ForeignKeyConstraint, with the specified parent columns and child columns, and adds the constraint to the collection.
[0361] A System.Data.ForeignKeyConstraint and a System.Data.UniqueConstrai- nt are created automatically when you add a System.Data.DataRelation to a System.Data.DataSet. In that case, adding a second System.Data.ForeignKeyConstraint on the same columns will result in an exception. To avoid this, use the System.Data.ForeignKeyConstraint constructor to create the System.Data.ForeignKeyConstraint and test it against existing collection members with the System.Data.ForeignKeyConstr- aint.Equals(System.Object) method. The name of the System.Data.UniqueConst- raint. An array of System.Data.DataColumn objects that are the primary key columns. An array of System.Data.DataColumn objects that are the foreign key columns.
[0362] AddRange
[0363] [C<] public void AddRange(Constraint[ ] constraints);
[0364] [C++] public: void AddRange(Constrainlt* constraints[ ]);
[0365] [VB] Public Sub AddRange(ByVal constraints( ) As Constraint)
[0366] [JScript] public function AddRange(constraints: Constraint[ ]);
[0367] Description
[0368] Copies the elements of the specified System.Data.ConstraintlCollect- ion array to the end of the collection. An array of System.Data.ConstraintCollection objects to add to the collection.
[0369] CanRemove
[0370] [C#] public bool CanRemove(Constraint constraint);
[0371] [C++] public: bool CanRemove(Constraint* constraint);
[0372] [VB] Public Function CanRemove(ByVal constraint As Constraint) As Boolean
[0373] [JScript] public function CanRemove(constraint: Constraint) : Boolean;
[0374] Description
[0375] Indicates if a System.Data.Constraint can be removed.
[0376] Return Value: Generates an exception if the System.Data.Constraint can't be removed from collection. Otherwise, true if the System.Data.Constraint can be removed.
[0377] When a System.Data.DataRelation is added to a System.Data.DataSet, a System.Data.ForeignKeyConstraint and System.Data.UniqueConstraint are added automatically to the parent table and the child table. The System.Data.UniqueConstraint is applied to the parent table's primary key column, and the System.Data.ForeignKeyConstraint is applied to the child table's foreign key column. In that case, attempting to remove the System.Data.UniqueConstraint will cause an exception to be thrown because the System.Data.ForeignKeyConstraint must be removed first. To avoid this, use the System.Data.ConstraintCollection.CanRemove(System.Data.Cons- traint) to determine if a System.Data.UniqueConstraint can be removed. The System.Data.Constraint to be tested for removal from the collection.
[0378] Clear
[0379] [C#] public void Clear( );
[0380] [C++] public: void Clear( );
[0381] [VB] Public Sub Clear( )
[0382] [JScript] public function Clear( );
[0383] Description
[0384] Clears the collection of any System.Data.Constraint objects.
[0385] The System.Data.ConstraintCollection.CollectionChanged occurs if this action is succesful.
[0386] Contains
[0387] [C#] public bool Contains(string name);
[0388] [C++] public: bool Contains(String* name);
[0389] [VB] Public Function Contains(ByVal name As String) As Boolean
[0390] [JScript] public function Contains(name : String) : Boolean;
[0391] Description
[0392] Indicates whether the System.Data.Constraint, specified by name, exists in the collection.
[0393] Return Value: true if the collection contains the specified constraint; otherwise, false.
[0394] Use the System.Data.ConstraintCollection.Contains(System.String) method to determine if the specified System.Data.Constraint exists before attempting to remove it from the collection. You can also use the System.Data.ConstraintCollection.CanRemove(System.Data.Constraint) method to determine if a System.Data.Constraint can be removed. The System.Data.Constraint.ConstraintName of the constraint. Indexf
[0395] [C#] public int IndexOf(Constraint constraint);
[0396] [C++] public: int IndexOf(Constraint* constraint);
[0397] [VB] Public Function IndexOf(ByVal constraint As Constraint) As Integer
[0398] [JScript] public function IndexOf(constraint: Constraint) : int;
[0399] Description
[0400] Gets the index of the specified System.Data.Constraint.
[0401] Return Value: The index of the System.Data.Constraint if it is in the collection; otherwise, -1.
[0402] Use the System.Data.ConstraintCollection.IndexOf(System.Data.Constr- aint) method to return an index to be used with either the System.Data.ConstraintCollection.Contains(System.String) or System.Data.ConstraintCollection.Remove(System.Data.Constraint) method. The System.Data.Constraint to search for.
[0403] IndexOf
[0404] [C#] public virtual int IndexOf(string constraintName);
[0405] [C++] public: virtual int IndexOf(String* constraintName);
[0406] [VB] Overridable Public Function IndexOf(ByVal constraintName As String) As Integer
[0407] [JScript] public function IndexOf(constraintName : String) : int; Gets the index of the specified System.Data.Constraint.
[0408] Description
[0409] Gets the index of the System.Data.Constraint, specified by name.
[0410] Return Value: The index of the System.Data.Constraint if it is in the collection; otherwise, -1.
[0411] Use the System.Data.ConstraintCollection.IndexOf(System.Data.Constr- aint) method to return an index to be used with either the System.Data.ConstraintCollection.Contains(System.String) or System.Data.ConstraintCollection.Remove(System.Data.Constraint) method. The name of the System.Data.Constraint.
[0412] OnCollectionChanged
[0413] [C#] protected virtual void OnCollectionChanged(CollectionChangeEve- ntArgs ccevent);
[0414] [C++] protected: virtual void OnCollectionChanged(CollectionChangeE- ventArgs* ccevent);
[0415] [VB] Overridable Protected Sub OnCollectionChanged(ByVal ccevent As CollectionChangeEventArgs)
[0416] [JScript] protected function OnCollectionChanged(ccevent: CollectionChangeEventArgs);
[0417] Description
[0418] Raises the System.Data.ConstraintCollection.CollectionChanged event.
[0419] Raising an event invokes the event handler through a delegate. For more information, see. A System.ComponentModel.CollectionChangeEventArgs that contains the event data.
[0420] Remove
[0421] [C#] public void Remove(Constraint constraint);
[0422] [C++] public: void Remove(Constraint* constraint);
[0423] [VB] Public Sub Remove(ByVal constraint As Constraint)
[0424] [JScript] public function Remove(constraint: Constraint); Removes a System.Data.Constraint from the System.Data.ConstraintCollection.
[0425] Description
[0426] Removes the specified System.Data.Constraint from the collection.
[0427] Use the System.Data.ConstraintCollection.Contains(System.String) method to determine if the collection contains the target System.Data.Constraint. The System.Data.Constraint to remove.
[0428] Remove
[0429] [C#] public void Remove(string name);
[0430] [C++] public: void Remove(String* name);
[0431] [VB] Public Sub Remove(ByVal name As String)
[0432] [JScript] public function Remove(name : String);
[0433] Description
[0434] Removes the constraint, specified by name, from the collection. Use the System.Data.ConstraintCollection.Contains(System.String) method to determine if the collection contains the target System.Data.Constraint. The name of the System.Data.Constraint to remove.
[0435] RemoveAt
[0436] [C#] public void RemoveAt(int index);
[0437] [C++] public: void RemoveAt(int index);
[0438] [VB] Public Sub RemoveAt(ByVal index As Integer)
[0439] [JScript] public function RemoveAt(index : int);
[0440] Description
[0441] Removes the constraint at the specified index from the collection.
[0442] The System.Data.ConstraintCollection.IndexOf(System.Data.Constraint- ) method returns the index of a given System.Data.Constraint. The index of the System.Data.Constraint to remove.
[0443] ConstraintException class (System.Data)
[0444] ToString
[0445] Description
[0446] Represents the exception that is thrown when attempting an action that violates a constraint.
[0447] ConstraintException
[0448] Example Syntax:
[0449] ToString
[0450] [C#] public ConstraintException( );
[0451] [C++] public: ConstraintException( );
[0452] [VB] Public Sub New( )
[0453] [JScript] public function ConstraintException( ); Initializes a new instance of the System.Data.ConstraintException class.
[0454] Description
[0455] Initializes a new instance of the System.Data.ConstraintException class.
[0456] ConstraintException
[0457] Example Syntax:
[0458] ToString
[0459] [C#] public ConstraintException(string s);
[0460] [C++] public: ConstraintException(String* s);
[0461] [VB] Public Sub New(ByVal s As String)
[0462] [JScript] public function ConstraintException(s : String);
[0463] Description
[0464] Initializes a new instance of the System.Data.ConstraintException class with the specified string. The string to display when the exception is thrown. ConstraintException
[0465] Example Syntax:
[0466] ToString
[0467] [CH] public ConstraintException(SerializationInfo info, StreamingContext context);
[0468] [C++] public: ConstraintException(SerializationInfo* info, StreamingContext context);
[0469] [VB] Public Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
[0470] [JScript] public function ConstraintException(info : SerializationInfo, context: StreamingContext); Initializes a new instance of the System.Data.ConstraintException class.
[0471] Description
[0472] Initializes a new instance of the System.Data.ConstraintException class. The data necessary to serialize or deserialize an object. Description of the source and destination of the specified serialized stream.
[0473] HelpLink
[0474] HResult
[0475] InnerException Message
[0476] Source
[0477] StackTrace
[0478] TargetSite
[0479] DataColumn class (System.Data)
[0480] ToString
[0481] Description
[0482] Represents the schema of a column in a System.Data.DataTable.
[0483] The System.Data.DataColumn is the fundamental building block for creating the schema of a System.Data.DataTable. You build the schema by adding one or more System.Data.DataColumn objects to the System.Data.DataColumnCollection. For more information, see.
[0484] DataColumn
[0485] Example Syntax:
[0486] ToString
[0487] [C#] public DataColumn( );
[0488] [C++] public: DataColumn( );
[0489] [VB] Public Sub New( )
[0490] [JScript] public function DataColumn( ); Initializes a new instance of the System.Data.DataColumn class.
[0491] Description
[0492] Initializes a new instance of a System.Data.DataColumn class.
[0493] When created, a new System.Data.DataColumn object has no default System.Data.DataColumn.ColumnName or System.Data.DataColumn.Caption. When added to a System.Data.DataColumnCollection, however, a default name ("Column1", "Column2", etc.) is given to the column.
[0494] DataColumn
[0495] Example Syntax:
[0496] ToString
[0497] [C#] public DataColumn(string columnName);
[0498] [C++] public: DataColumn(String* columnName);
[0499] [VB] Public Sub New(ByVal columnName As String)
[0500] [JScript] public function DataColumn(columnName : String);
[0501] Description
[0502] Inititalizes a new instance of the System.Data.DataColumn class using the specified column name.
[0503] By default, the name given to a column becomes the System.Data.DataColumn.Caption property value. A string that represents the name of the column to be created. If set to null or an empty string (" "), a default name will be given when added to the columns collection.
[0504] DataColumn
[0505] Example Syntax:
[0506] ToString
[0507] [C#] public DataColumn(string columnName, Type dataType);
[0508] [C++] public: DataColumn(String* columnName, Type* dataType);
[0509] [VB] Public Sub New(ByVal columnName As String, ByVal dataType As Type)
[0510] [JScript] public function DataColumn(columnName : String, dataType: Type);
[0511] Description
[0512] Inititalizes a new instance of the System.Data.DataColumn class using the specified column name and data type. A string that represents the name of the column to be created. If set to null or an empty string (" "), a default name will be given when added to the columns collection. A supported System.Data.DataColumn.DataType.
[0513] DataColumn
[0514] Example Syntax:
[0515] ToString
[0516] [C#] public DataColumn(string columnName, Type dataType, string cxpr);
[0517] [C++] public: DataColumn(String* columnName, Type* dataType, String* expr);
[0518] [VB] Public Sub New(ByVal columnName As String, ByVal dataType As Type, ByVal expr As String)
[0519] [JScript] public function DataColumn(columnName : String, dataTypei: Type, expr: String);
[0520] Description
[0521] Initializes a new instance of the System.Data.DataColumn class using the specified name, data type, and expression. A string that represents the name of the column to be created. If set to null or an empty string (" "), a default name will be given when added to the columns collection. A supported System.Data.DataColumn.DataType. The expression used to create this column. For more details, see the System.Data.DataColumn.Expression property.
[0522] DataColumn
[0523] Example Syntax:
[0524] ToString
[0525] [C#] public DataColumn(string columnName, Type dataType, string expr, MappingType type);
[0526] [C++] public: DataColumn(String* columnName, Type* dataType, String* expr, MappingType type);
[0527] [VB] Public Sub New(ByVal columnName As String, ByVal dataType As Type, ByVal expr As String, ByVal type As MappingType)
[0528] [JScript] public function DataColumn(columnName : String, dataType : Type, expr: String, type: MappingType);
[0529] Description
[0530] Initializes a new instance of the System.Data.DataColumn class using the specified name, data type, expression, and value that determines whether the column is an attribute.
[0531] The type argument sets the System.Data.DataColumn.ColumnMapping property. The property specifies how a System.Data.DataColumn is mapped when a System.Data.DataSet is transformed into an XML document. For example, if the the column is named "fName," and the value it contains is "Bob," and type is set to MappingType.Attribute, the XML element would be: For more details on how columns are mapped to elements or attributes, see the System.Data.DataColumn.ColumnMapping property. A string that represents the name of the column to be created. If set to null or an empty string (" "), a default name will be given when added to the columns collection. A supported System.Data.DataColumn.DataType. The expression used to create this column. For more details, see the System.Data.DataColumn.Expression property. One of the System.Data.MappingType values.
[0532] AllowDBNull
[0533] ToString
[0534] [C#] public bool AllowDBNull {get; set;}
[0535] [C++] public: _property bool get_AllowDBNull( );public:_property void set_AllowDBNull(bool);
[0536] [VB] Public Property AllowDBNull As Boolean
[0537] [JScript] public function get AllowDBNull( ) : Boolean; public function set AllowDBNull(Boolean);
[0538] Description
[0539] Gets or sets a value indicating whether null values are allowed in this column for rows belonging to the table.
[0540] AutoIncrement
[0541] ToString
[0542] [C#] public bool AutoIncrement {get; set;}
[0543] [C++] public: Property bool get_AutoIncrement( );public: _property void set_AutoIncrement(bool);
[0544] [VB] Public Property AutoIncrement As Boolean
[0545] [JScript] public function get AutoIncrement( ) : Boolean; public function set AutoIncrement(Boolean);
[0546] Description
[0547] Gets or sets a value indicating whether the column automatically increments the value of the column for new rows added to the table.
[0548] If the type of this column is not Int16, Int32, or Int64 when this property is set, the System.Data.DataColumn.DataType property is coerced to Int32. An exception is generated if this is a computed column (that is, the System.Data.DataColumn.Expression property is set.) The incremented value is used only if the row's value for this column, when added to the columns collection, is equal to the default value.
[0549] AutoIncrementSeed
[0550] ToString
[0551] [C#] public long AutoIncrementSeed {get; set;}
[0552] [C++] public: _property int64 get_AutoIncrementSeed( );public: _property void set_AutoIncrementSeed(_int64);
[0553] [VB] Public Property AutoIncrementSeed As Long
[0554] [JScript] public function get AutoIncrementSeed( ) : long; public function set AutoIncrementSeed(long);
[0555] Description
[0556] Gets or sets the starting value for a column that has its System.Data.DataColumn.AutoIncrement property set to true.
[0557] AutoIncrementStep
[0558] ToString
[0559] [C#] public long AutoIncrementStep {get; set;}
[0560] [C++] public: property _int64 get_AutoIncrementStep( );public: _property void set_AutoIncrementStep_int64);
[0561] [VB] Public Property AutoIncrementStep As Long
[0562] [JScript] public function get AutoIncrementStep( ) : long; public function set AutoIncrementStep(long);
[0563] Description
[0564] Gets or sets the increment used by a column with its System.Data.DataColumn.AutoIncrement property set to true.
[0565] Caption
[0566] ToString
[0567] [C#] public string Caption {get; set;}
[0568] [C++] public: property String* get_Caption( );public: _property void set_Caption(String*);
[0569] [VB] Public Property Caption As String
[0570] [JScript] public function get Caption( ) : String; public function set Caption(String);
[0571] Description
[0572] Gets or sets the caption for the column.
[0573] The System.Data.DataColumn.Caption value becomes visible in controls that support its display. For example, the System.Windows.Forms.Dat-aGrid control is capable of displaying captions for each column.
[0574] ColumnMapping
[0575] ToString
[0576] [C#] public virtual MappingType ColumnMapping {get; set;}
[0577] [C++] public: _property virtual MappingType get ColumnMapping( );public: _property virtual void set_ColumnMapping(MappingType);
[0578] [VB] Overridable Public Property ColumnMapping As MappingType
[0579] [JScript] public function get ColumnMapping( ) : MappingType; public function set ColumnMapping(MappingType);
[0580] Description
[0581] Gets or sets the System.Data.MappingType of the column.
[0582] The System.Data.DataColumn.ColumnMapping property determines how a System.Data.DataColumn is mapped when a System.Data.DataSet is saved as an XML document using the System.Data.DataSet.WriteXml(System.IO.Stream) method.
[0583] ColumnName
[0584] ToString
[0585] [C#] public string ColumnName {get; set;}
[0586] [C++] public: _property String* get ColumnName( );public: _property void set_ColumnName(String*);
[0587] [VB] Public Property ColumnName As String
[0588] [JScript] public function get ColumnName( ) : String; public function set ColumnName(String);
[0589] Description
[0590] Gets or sets the name of the column in the System.Data.DataColumnCo- llection.
[0591] When a System.Data.DataColumn is created, it has no System.Data.DataColumn.ColumnName value. When the System.Data.DataColumn is added to a System.Data.DataTable object's System.Data.DataColumnCollec- tion, however, it is given a default name ("Column1", "Column2", etc.).
[0592] Container
[0593] DataType
[0594] ToString
[0595] Description
[0596] Gets or sets the type of data stored in the column.
[0597] Setting the System.Data.DataColumn.DataType value is critical to ensuring the correct creation and updating of data in a DBMS.
[0598] DefaultValue
[0599] ToString
[0600] [C#] public object DefaultValue {get; set;}
[0601] [C++] public: _property Object* get_DefaultValue( );public: _property void set_DefaultValue(Object*);
[0602] [VB] Public Property DefaultValue As Object
[0603] [JScript] public function get DefaultValue( ) : Object; public function set DefaultValue(Object);
[0604] Description
[0605] Gets or sets the default value for the column when creating new rows. A default value is the value that is automatically assigned to the column when a System.Data.DataRow is created. By setting a default value, you can give the user an idea of what information to input. On the other hand, you can use the System.Data.DataColumn.DefaultValue property to automatically insert a value that shouldn't be touched by the user; for example, the current date and time of the row's creation.
[0606] DesignMode
[0607] Events
[0608] Expression
[0609] ToString
[0610] Description
[0611] Gets or sets the expresssion used to filter rows, calculate the values in a column, or create an aggregate column.
[0612] One use of the System.Data.DataColumn.Expression property is to create calculated columns. For example, to calculate a tax value, the unit price is multiplied by a tax rate of a given region. Since tax rates vary from region to region, it would be impossible to put a single tax rate in a column; instead, the value is calculated using the System.Data.DataColumn.Expression property, as shown in the Visual Basic code below: DataSet1.Tables("Products").Columns("tax").Expression="UnitPr- ice*0.086" A second use is to create an aggregate column. Similar to a calculated value, an aggregate performs an operation based on the entire set of rows in the System.Data.DataTable. A simple example is to count the number of rows returned in the set, which is the method you would use to count the number of transactions completed by a particular salesperson, as shown in this Visual Basic code: DataSet1.Tables("Orders"- ).Columns("OrderCount").Expression="Count(OrderID)" EXPRESSION SYNTAX When creating an expression, use the System.Data.DataColumn.ColumnName property to refer to columns. For example, if the System.Data.DataColumn.- ColumnName for one column is "UnitPrice", and another "Quantity", the expression would be: "UnitPlice * Quantity" When creating an expression for a filter, enclose strings with single quotes: "LastName=`Jones`" The following characters are special characters and must be escaped, as explained below, if they are to be used in a column name : .backslash.n (newline).backslash.t (tab).backslash.r (carriage return).about.( ) # .backslash. / = > <+ - * % & {circumflex over ( )} ' " [ ] If a column name contains one of the above characters, the name must be wrapped in brackets. For example to use a column named "Column#" in an expression, you would write "[Column#]": Total*[Column#] Because brackets are special characters, you must use a slash (".backslash.") to escape the bracket, if it is part of a column name. For example, a column named "Column[ ]" would be written: Total * [Column[.backslash.]] (Only the second bracket must be escaped.) USER-DEFINED VALUES User-defined values may be used within expressions to be compared against column values. String values should be enclosed within single quotes. Date values should be enclosed within pound signs (#). Decimals and scientific notation are permissible for numeric values. For example: "FirstName=`John`" "Price <=50.00" "Birthdate <#1/31/82#" For columns that contain enumeration values, cast the value to an integer data type. For example: "EnumColumn=5" OPERATORS Concatenation is allowed using Boolean AND, OR, and NOT operators. You can use parentheses to group clauses and force precedence. The AND operator has precedence over other operators. For example: (LastName=`Smith` OR LastName=`Jones`) AND FirstName=`John` When creating comparison expressions, the following operators are allowed: < ><=>=< >=IN LIKE The following arithmetic operators are also supported in expressions: + (addition) - (subtraction) * (multiplication) / (division) % (modulus) STRING OPERATORS To concatenate a string, use the + character. Whether string comparisons are casesensitive or not is determined by the value of the System.Data.DataSet class's System.Data.DataSet.CaseSensitive property. However, you can override that value with the System.Data.DataTable class's System.Data.DataTable.CaseSensitive property.
[0613] ExtendedProperties
[0614] ToString
[0615] [C#] public PropertyCollection ExtendedProperties {get;}
[0616] [C++] public: _property PropertyCollection* get_ExtendedProperties( );
[0617] [VB] Public ReadOnly Property ExtendedProperties As PropertyCollcction
[0618] [JScript] public function get ExtendedProperties( ) : PropertyCollection;
[0619] Description
[0620] Gets the collection of custom user information.
[0621] The System.Data.DataColumn.ExtendedProperties property allows you to store custom information with the object. For example, you may store a time when the data should be refreshed.
[0622] MaxLength
[0623] ToString
[0624] [C#] public int MaxLength {get; set;}
[0625] [C++] public: property int get_MaxLength( );public: _property void set_MaxLength(int);
[0626] [VB] Public Property MaxLength As Integer
[0627] [JScript] public function get MaxLength( ) : int; public function set MaxLength(int);
[0628] Description
[0629] Gets or sets the maximum length of a text column.
[0630] The System.Data.DataColumn.MaxLength property is ignored for nontext columns. Namespace
[0631] ToString
[0632] [C#] public string Namespace {get; set;}
[0633] [C++] public: _property String* get Namespace( );public: property void set_Namespace(String*);
[0634] [VB] Public Property Namespace As String
[0635] [JScript] public function get Namespace( ) : String; public function set Namespace(String);
[0636] Description
[0637] Gets or sets the namespace of the System.Data.DataColumn.
[0638] The System.Data.DataColumn.Namespace property is used when reading and writing an XML document into a System.Data.DataTable in the System.Data.DataSet using the System.Data.DataSet.ReadXml(System.Xml.XmlR- eader), System.Data.DataSet.WriteXml(System.IO.Stream), System.Data.DataSet.ReadXmlSchema(System.Xml.XmlReader), or System.Data.DataSet.WriteXmlSchema(System.IO.Stream) methods.
[0639] Ordinal
[0640] ToString
[0641] [C#] public int Ordinal {get;}
[0642] [C++] public: property int get Ordinal( );
[0643] [VB] Public ReadOnly Property Ordinal As Integer
[0644] [JScript] public function get Ordinal( ) : int;
[0645] Description
[0646] Gets the position of the column in the System.Data.DataColumnCollec- tion collection.
[0647] Prefix
[0648] ToString
[0649] [C#] public string Prefix {get; set;}
[0650] [C++] public: _property String* get_Prefix( );public: _property void set_Prefix(String*);
[0651] [VB] Public Property Prefix As String
[0652] [JScript] public function get Prefix( ) : String; public function set Prefix(String);
[0653] Description
[0654] Gets or sets an XML prefix that aliases the namespace of the System.Data.DataTable.
[0655] The System.Data.DataTable.Prefix is used throughout an XML document to identify elements which belong to the System.Data.DataSet object's namespace (as set by the System.Data.DataSet.Namespace property).
[0656] ReadOnly
[0657] ToString
[0658] [C#] public bool ReadOnly {get; set;}
[0659] [C++] public: property bool get ReadOnly( );public: _Troperty void set_ReadOnly(bool);
[0660] [VB] Public Property ReadOnly As Boolean
[0661] [JScript] public function get ReadOnly( ) : Boolean; public function set ReadOnly(Boolean);
[0662] Description
[0663] Gets or sets a value indicating whether the column allows changes once a row has been added to the table.
[0664] Site
[0665] Table
[0666] ToString
[0667] Description
[0668] Gets the System.Data.DataTable to which the column belongs to.
[0669] Unique
[0670] ToString
[0671] [C#] public bool Unique {get; set;}
[0672] [C++] public: property bool get_Unique( );public: _property void set_Unique(bool);
[0673] [VB] Public Property Unique As Boolean
[0674] [JScript] public function get Unique( ) : Boolean; public function set Unique(Boolean);
[0675] Description
[0676] Gets or sets a value indicating whether the values in each row of the column must be unique.
[0677] You can also add a System.Data.UniqueConstraint to the System.Data.DataTable to which this column belongs to ensure the values are unique.
[0678] CheckNotAllowNull
[0679] [C#] protected internal void CheckNotAllowNull( );
[0680] [C++] protected public: void CheckNotAllowNull( );
[0681] [VB] Protected Friend Dim Sub CheckNotAllowNull( )
[0682] [JScript] package function CheckNotAllowNull( );
[0683] Description
[0684] CheckUnique
[0685] [C#] protected void CheckUnique( );
[0686] [C++] protected: void CheckUnique( );
[0687] [VB] Protected Sub CheckUnique( )
[0688] [JScript] protected function CheckUnique( );
[0689] Description
[0690] Throws an exception and the name of any column if its Unique property set to True and non-unique values are found in the column.
[0691] OnPropertyChanging
[0692] [C#] protected internal virtual void
[0693] OnPropertyChanging(PropertyChangedEventArgs pcevent);
[0694] [C++] protected public: virtual void OnPropertyChanging(PropertyCha- ngedEventArgs* pcevent);
[0695] [VB] Overridable Protected Friend Dim Sub OnPropertyChanging(ByVal pcevent As PropertyChangedEventArgs)
[0696] [JScript] package function OnPropertyChanging(pcevent: PropertyChangedEventArgs);
[0697] Description
[0698] Raises the System.Data.DataColumn.OnPropertyChanging(System.Compone- ntModel.P ropertyChangedEventArgs) event.
[0699] Raising an event invokes the event handler through a delegate. For an overview, see. A System.ComponentModel.PropertyChangedEveiutArgs that contains the event data.
[0700] RaisePropertyChanging
[0701] [C#] protected internal void RaisePropertyChanging(string name);
[0702] [C++] protected public: void RaisePropertyChanging(String* name);
[0703] [VB] Protected Friend Dim Sub RaisePropertyChanging(ByVal name As String)
[0704] [JScript] package function RaisePropertyChanging(name : String);
[0705] Description Sends notification that the specified System.Data.DataColumn property is about to change. The name of the property that is about to change.
[0706] ToString
[0707] [C#] public override string ToString( );
[0708] [C++] public: String* ToString( );
[0709] [VB] Overrides Public Function ToString( ) As String
[0710] [JScript] public override function ToString( ) : String;
[0711] Description
[0712] Gets the System.Data.DataColumn.Expression of the column, if one exists.
[0713] Return Value: The System.Data.DataColumn.Expression value, if the property is set; otherwise, the System.Data.DataColumn.ColumnName property.
[0714] DataColumnChangeEventArgs class (System.Data)
[0715] ToString
[0716] Description
[0717] Provides data for the System.Data.DataTable.ColumnChanging event.
[0718] The System.Data.DataTable.ColumnChanging event occurs when a change is made to a column's value in the System.Data.DataTable.
[0719] DataColumnChangeEventArgs
[0720] Example Syntax:
[0721] ToString
[0722] [CH] public DataColumnChangeEventArgs(DataRow row, DataColumn column, object value);
[0723] [C++] public: DataColumnChangeEventArgs(DataRow* row, DataColumn* column, Object* value);
[0724] [VB] Public Sub New(ByVal row As DataRow, ByVal column As DataColumn, ByVal value As Object)
[0725] [JScript] public function DataColumnChangeEventArgs(row : DataRow, column : DataColumn, value : Object);
[0726] Description
[0727] Initializes a new instance of the System.Data.DataColumnChangeEvent- Args class. The System.Data.DataRow with the changing value. The System.Data.DataColumn with the changing value. The new value.
[0728] Column
[0729] ToString
[0730] [C#] public DataColumn Column {get;}
[0731] [C++] public: property DataColumn* get_Column( );
[0732] [VB] Public ReadOnly Property Column As DataColumn
[0733] [JScript] public function get Column( ) : DataColumn;
[0734] Description
[0735] Gets the System.Data.DataColumn with a changing value.
[0736] ProposedValue
[0737] ToString
[0738] [C#] public object ProposedValue {get; set;}
[0739] [C++] public: _property Object* get_ProposedValue( );public: _property void set_ProposedValue(Object*);
[0740] [VB] Public Property ProposedValue As Object
[0741] [JScript] public function get ProposedValue( ) : Object; public function set ProposedValue(Object);
[0742] Description
[0743] Gets or sets the proposed value.
[0744] Row
[0745] ToString
[0746] [C#] public DataRow Row {get;}
[0747] [C++] public: _roperty DataRow* get_Row( );
[0748] [VB] Public ReadOnly Property Row As DataRow
[0749] [JScript] public function get Row( ) : DataRow;
[0750] Description
[0751] Gets the System.Data.DataRow with a changing value.
[0752] DataColumnChangeEventHandler delegate (System.Data)
[0753] ToString
[0754] Description
[0755] Represents the method that will handle the the System.Data.DataTable.ColumnChanging event. The source of the event. A System.Data.DataColumnChangeEventArgs that contains the event data.
[0756] When you create a System.Data.DataColumnChangeEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, until you remove the delegate. For more information about delegates, see Represents the method that will handle the the System.Data.DataTable.ColumnChanging event.
[0757] DataColumnCollection class (System.Data)
[0758] ToString
[0759] Description
[0760] Represents a collection of System.Data.DataColumn objects for a System.Data.DataTable.
[0761] The System.Data.DataColumnCollection defines the schema of a System.Data.DataTable, and determines what kind of data each System.Data.DataColumn can contain. You can access the System.Data.DataColumnCollection through the System.Data.DataTable.Column- s property of the System.Data.DataTable object.
[0762] Count
[0763] IsReadOnly
[0764] IsSynchronized
[0765] Item
[0766] ToString
[0767] System.Data.DataColumn
[0768] Description
[0769] Gets the System.Data.DataColumn from the collection at the specified index.
[0770] The System.Data.DataColumnCollection.Contains(System.String) method can be used to test for the existence of a column, which is useful before attempting to use System.Data.DataColumnCollection.Item(System.Int32). The zero-based index of the column to return.
[0771] Item
[0772] ToString
[0773] [C#] public virtual DataColumn this[string name] {get;}
[0774] [C++] public: _yroperty virtual DataColumn* get_Item(String* name);
[0775] [VB] Overridable Public Default ReadOnly Property Item(ByVal name As String) As DataColumn
[0776] [JScript] returnValue=DataColumnCollectionObject.Item(name);
[0777] Description
[0778] Gets the System.Data.DataColumn from the collection with the specified name.
[0779] System.Data.DataColumnCollection.Item(System.Int32) is not case-sensitive when searching for column names. The System.Data.DataColumn.ColumnName of the column to return.
[0780] List
[0781] ToString
[0782] [C#] protected override ArrayList List {get;}
[0783] [C++] protected: property virtual ArrayList* get_List( );
[0784] [VB] Overrides Protected ReadOnly Property List As ArrayList
[0785] [JScript] protected function get List( ) : ArrayList;
[0786] Description
[0787] Gets the list of the collection items.
[0788] SyncRoot
[0789] ToString
[0790] Description Occurs when the columns collection changes, either by adding or removing a column.
[0791] The System.Data.DataColumnCollection.Contains(System.String) and System.Data.DataColumnCollection.CanRemove(System.Data.DataColumn) methods can be used to determine if a column exists and can be removed.
[0792] Add
[0793] [C#] public virtual DataColumn Add( );
[0794] [C++] public: virtual DataColumn* Add( );
[0795] [VB] Overridable Public Function Add( ) As DataColumn
[0796] [JScript] public function Add( ) : DataColumn;
[0797] Description
[0798] Creates and adds a System.Data.DataColumn to a System.Data.DataColumnCollection.
[0799] Return Value: The newly created System.Data.DataColumnn.
[0800] A default name ("Column1", "Column2", etc.) is given to the column.
[0801] Add
[0802] [C#] public void Add(DataColumn column);
[0803] [C++] public: void Add(DataColumn* column);
[0804] [VB] Public Sub Add(ByVal column As DataColumn)
[0805] [JScript] public function Add(column : DataColumn); Adds a System.Data.DataColumn to the System.Data.DataColumnCollectiion.
[0806] Description
[0807] Adds the specified System.Data.DataColumn to the System.Data.DataColumnCollection.
[0808] If the collection is successfuilly changed by adding or removing columns, the System.Data.DataColumnCollection.CollectionChanged event occurs. The System.Data.DataColumn to add.
[0809] Add
[0810] [C#] public virtual DataColumn Add(string columnName);
[0811] [C++] public: virtual DataColumn* Add(String* columnName);
[0812] [VB] Overridable Public Function Add(ByVal columnName As String) As DataColumn
[0813] [JScript] public function Add(columnName : String) : DataColumn;
[0814] Description
[0815] Creates and adds a System.Data.DataColumn with the specified name to the System.Data.DataColumnCollection.
[0816] Return Value: The newly created System.Data.DataColumn.
[0817] By default, the column's System.Data.DataColumn.DataTyple is string. The name of the column.
[0818] Add
[0819] [C#] public virtual DataColumn Add(string columnName, Type type);
[0820] [C++] public: virtual DataColumn* Add(String* columnName, Type* type);
[0821] [VB] Overridable Public Function Add(ByVal columnName As String, ByVal type As Type) As DataColumn
[0822] [JScript] public function Add(columnName : String, type : Type) : DataColumn;
[0823] Description
[0824] Creates and adds a System.Data.DataColumn with the specified name and type to the System.Data.DataColumnCollection.
[0825] Return Value: The newly created System.Data.DataColumn.
[0826] If null or an empty string (" ") is passed in for the name, a default name ("Column1", "Column2", etc.) is given to the column. The System.Data.DataColumn.ColumnName to create the column with. The column's System.Data.DataColumn.DataType.
[0827] Add
[0828] [C#] public virtual DataColumn Add(string columnName, Type type, string expression);
[0829] [C++] public: virtual DataColumn* Add(String* columnName, Type* type, String* expression);
[0830] [VB] Overridable Public Function Add(ByVal columnName As String, ByVal type As Type, ByVal expression As String) As DataColumn
[0831] [JScript] public function Add(columnName : String, type : Type, expression: String) : DataColumn;
[0832] Description
[0833] Creates and adds a System.Data.DataColumn with the specified name, type, and compute expression to the System.Data.DataColumnCollection.
[0834] Return Value: The newly created System.Data.DataColumn.
[0835] If null or an empty string (" ") is passed in for the name, a default name ("Column1", "Column2", etc.) is given to the column. The column name. The System.Data.DataColumn.DataType of the column. The expression to assign to the System.Data.DataColumn.Expression property.
[0836] AddRange
[0837] [C#] public void AddRange(DataColumn[ ] columns);
[0838] [C++] public: void AddRange(DataColumn* columns[ ]);
[0839] [VB] Public Sub AddRange(ByVal colurnns( ) As DataColumn)
[0840] [JScript] public function AddRange(columns : DataColumn[ ]);
[0841] Description
[0842] Copies the elements of the specified System.Data.DataColurmn array to the end of the collection. The array of System.Data.DataColumn objects to add to the collection.
[0843] CanRemove
[0844] [C#] public bool CanRemove(DataColumn column);
[0845] [C++] public: bool CanRemove(DataColurm* column);
[0846] [VB] Public Function CanRemove(ByVal column As DataColumn) As Boolean
[0847] [JScript] public function CanRemove(column : DataColumn) : Boolean;
[0848] Description
[0849] Checks whether a given column can be removed from the collection.
[0850] Return Value: true if the column can be removed; otherwise, false.
[0851] The System.Data.DataColumnCollection.CanRemove(System.Data.DataColu- mn) method performs several checks before returning a true or false including the following: whether the column exists, belongs to the table, or is involved in a constraint or relation. A System.Data.DataColumn in the collection.
[0852] Clear
[0853] [C#] public void Clear( );
[0854] [C++] public: void Clear( );
[0855] [VB] Public Sub Clear( )
[0856] [JScript] public function Clear( );
[0857] Description
[0858] Clears the collection of any columns.
[0859] If the collection is succesfully changed by adding or removing columns, the System.Data.DataColumnCollection.OnCollectionChanged(Systemr- .Compone ntModel.CollectionChangeEventArgs) event occurs.
[0860] Contains
[0861] [C#] public bool Contains(string name);
[0862] [C++] public: bool Co-ntains(String* name);
[0863] [VB] Public Function Contains(ByVal name As String) As Boolean
[0864] [JScript] public function Contains(name : String) : Boolean;
[0865] Description
[0866] Checks whether the collection contains a column with the specified name.
[0867] Return Value: true if a column exists with this name; otherwise, false.
[0868] The System.Data.DataColumnCollection.Contains(System.String) method can confirm the existence of a column before performing further operations on the column. The System.Data.DataColumn.ColumnName of the column.
[0869] IndexOf
[0870] [C#] public virtual int IndexOf(DataColumn column);
[0871] [C++] public: virtual int IndexOf(DataColumn* column);
[0872] [VB] Overridable Public Function IndexOf(ByVal column As DataColumn) As Integer
[0873] [JScript] public function IndexOf(column : DataColumn) : int;
[0874] Description
[0875] Gets the index of a column specified by name.
[0876] Return Value: The index of the column specified by columnName if it is found; otherwise, -1.
[0877] The System.Data.DataColumnCollection.IndexOf(System.Data.DataColumn- ) method is not case-sensitive. IndexOf
[0878] [C#] public int IndexOf(string columnName);
[0879] [C++] public: int Indexof(String* columnName);
[0880] [VB] Public Function IndexOf(ByVal columnName As String) As Integer
[0881] [JScript] public function IndexOf(columnName : String) : int; Returns the index of a column specified by name. OnCollectionChanged
[0882] [C#] protected virtual void OnCollectionChanged(CollectionChangeEve- ntArgs ccevent);
[0883] [C++] protected: virtual void OnCollectionChanged(CollectionChangeE- ventArgs* ccevent);
[0884] [VB] Overridable Protected Sub OnCollectionChanged(ByVal ccevent As CollectionChangeEventArgs)
[0885] [JScript] protected function