What's New

dotConnect for PostgreSQL 7.6 new features:

  • Microsoft SQL Server Data Tools Business Intelligence (SSDT-BI) project templates for Analysis Services, Reporting Services, and Integration Services (mapping wizards) in Visual Studio 2015 are supported
  • Microsoft SQL Server 2016 is supported in SSIS DataFlow components

Entity Framework

  • The config.DatabaseScript.Table.Tablespace configuration option is added to specify the tablespace for tables created via the Code-First approach

dotConnect for PostgreSQL 7.5 new features:

  • The Run Once Command connection string parameter, which specifies a command to execute when the connection is opened the first time and not executed when the connection is taken from the pool, is added
  • The new LoadTable overloads for loading data from a IDataReader, array of rows, or only rows with a specific RowState from a DataTable are added to the PgSqlLoader class
  • Truncate member that represents the TRUNCATE TABLE statement is added to the SqlStatementType enum
  • The new RestoreProgress event is added to the PgSqlDump class

Entity Developer

  • Entity Framework Core support is added
  • The DbProviderFactory provider registration in application's *.config is supported by the Entity Developer version integrated into Visual Studio

Entity Framework

  • Entity Framework Core RC2 is supported
  • Entity Framework-related assemblies are renamed
  • The config.QueryOptions.OrderByNullBehavior option is added to specify whether to add NULLS FIRST or NULLS LAST to the ORDER BY clause
  • Upgrade Wizard is improved for upgrading projects with the Entity Framework functionality

dotConnect for PostgreSQL 7.4 new features:

  • Visual Studio 2015 is supported
  • PostgreSQL 9.5 is supported

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The possibility to use .IsRowVersion() method for properties with non-binary data types when using the fluent mapping approach is added
  • The Parent property is added to the IInheritanceConfiguration interface

Entity Developer

  • The Use ObservableCollection property of the DbContext template is implemented (Entity Framework models)
  • The behaviour is changed: now the 1:1 and 1:0..1 associations are displayed differently on the diagram (LinqConnect models)

Entity Framework

  • The runtime support for calling Table-Valued Functions (IQueryable methods which return collection of records) is added
  • The config.QueryOptions.CaseInsensitiveComparison option is implemented to manage the compare behaviour when using Linq to Entities comparison expression such as "a == b" (by default, false)

dotConnect for PostgreSQL 7.3 new features:

  • Visual Studio 2015 Release Candidate is supported
  • The ADO.NET implementation of ASP.NET Identity support is added
    • The ICloneable interface is implemented in the IdentityUser and IdentityRole classes
    • The User_Id column in the AspNetUserClaims table is renamed to UserId
  • The ADO.NET implementation of ASP.NET Identity 2.0 support is added
    • The new \Web\ASP.NET Identity 2\Devart.Data.PostgreSql.Web.Identity.dll assembly (its revision number is 2) is added to the provider installation folder
    • The new \Web\ASP.NET Identity 2\Install_identity_tables.sql and \Web\ASP.NET Identity 2\Uninstall_identity_tables.sql files are added to the provider installation folder
    • The new \Web\ASP.NET Identity 2\Upgrade_identity_tables_from_v1_to_v2.sql file is added to the provider installation folder
    • The new IUserEmailStore<TIdentityUser, TKey>, IUserPhoneNumberStore<TIdentityUser, TKey>, IUserTwoFactorStore<TIdentityUser, TKey>, IUserLockoutStore<TIdentityUser, TKey> interfaces are implemented in the UserStore class
    • The new IUserStore<T>, IUserClaimStore<T>, IUserLoginStore<T>, IUserPasswordStore<T>, IUserRoleStore<T>, IUserEmailStore<T>, IUserPhoneNumberStore<T> interfaces are implemented in the PgSqlUserStore and PgSqlUserStore<TIdentityUser, TIdentityRole> classes
    • The new IRoleStore<T> interface is supported in the PgSqlRoleStore and PgSqlRoleStore<TIdentityUser, TIdentityRole> classes
    • The new IQueryableUserStore interface is implemented in the UserStore class
    • The new IQueryableRoleStore interface is implemented in the RoleStore class
  • PgSqlUtils class is added
  • The PgSqlScript.Cancel() method is added to stop query execution
  • The 'Keep Alive' parameter, that enables sending TCP keep-alive packets and specifies the interval at which they are sent, is added to the connection string
  • The functions with return type TABLE are added to the list of the functions in the DataSet wizard as a data source
  • The message of the exception, when an attempt to rollback a closed transaction is made, is improved
  • The Enterprise Library 6 support is added; all previous versions of Enterprise Library are no longer maintained
  • The new \Web\ASP.NET 45\Devart.Data.PostgreSql.Web.dll assembly (its revision number is 5) is added to the provider installation folder to support SimpleMembership in MVC5
  • The enableExpiredSessionAutoDeletion and expiredSessionAutoDeletionInterval options for deleting expired sessions are added to the session-state store provider definition in the web.config file
  • Microsoft SQL Server Data Tools Business Intelligence (SSDT-BI) project templates for Analysis Services and Integration Services in Visual Studio 2013 are supported
  • SSIS DataFlow Source and Destination components are supported in SSDT-BI for Visual Studio 2013
  • The 'IgnoreUnnamedParameters' connection string parameter that disables unnamed parameters in queries, executed via the connection, is added
  • SSL renegotiation is supported
  • The PgSqlStatementExecute event is added to the PgSqlScript class
  • The Transaction Error Behavior connection string parameter is implemented to determine whether to rollback a transaction automatically if an error occurs in a transaction block
  • The behaviour is changed: now "DROP IF EXISTS" statements will be added to backup script for PostgreSQL server 8.2 and higher when PgSqlDump.IncludeDrop is used
  • The behaviour is changed: now the "SET AUTOCOMMIT = TRUE" command is not executed any more when a connection to a PostgreSQL server 7.4 or higher is opened
  • The behaviour is changed: now the statement for deleting defaults for columns before dropping a table with these columns is removed
  • The behaviour is changed: if PgSqlTransaction has been already assigned to the PgSqlConnection object, all subsequent calls of the BeginTransaction method on the same PgSqlConnection object will return an existing PgSqlTransaction instance
  • The behaviour is changed: the instance_id field of the wf_activity_info table in Workflow Tracking implementation is of varchar(100) type now
  • The behaviour is changed: the PgSqlMonitor now hides information about the password connection string parameter
  • The behaviour is changed: UTC_TIMESTAMP() is used now in WF Services scripts for the DATETIME columns

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The CommandTimeout property is added to the DataProvider class
  • The OpenConnection() method is added to the DataContext class
  • The JSON data type is supported
  • The JSONB data type is supported
  • The dependency on the System.Windows.Forms.dll assembly is removed

Entity Developer

  • The information message about availability of NuGet Package Manager on the workstation is added in the Entity Developer version integrated into Visual Studio (Entity Framework models)
  • The override modifier for DbSet class properties generated by DbContext templates is added (Entity Framework models)
  • The View Generation option of the model with Entity Framework version = Entity Framework 6 is supported for the DbContext (only with XML mapping), EntityObject, POCO, and Self-Tracking Entities templates (Entity Framework models)
  • The possibility to use relative paths to assemblies in code generation templates is implemented
  • The Implement Equals property is added to the DbContext, ObjectContext, and POCO Entity templates (Entity Framework models)
  • The Remove Invalid Characters option (by default, True) is added to the Model Naming rules; if it is set to False, all invalid characters will be replaced with underscores
  • The Enable WinForms Data Binding property of the DbContext template is implemented (Entity Framework models)
  • The Property Change Partial Methods property of the DbContext template is implemented for generating partial methods On%PropertyName%Changing and On%PropertyName%Changed for each primitive property of entity classes (Entity Framework models)
  • The support of ID generators for primary keys in the Fluent Mapping template is added (LinqConnect models)
  • The possibility of setting default values for enum properties is implemented (LinqConnect models)
  • The behaviour is changed: now partial configuration classes are generated when DbContext template is used with Fluent Mapping=True and Mapping Generation Strategy=UseConfigurationClasses options (Entity Framework models)
  • The behaviour is changed: now paths to assemblies with attributes (Model Settings -> Model -> Attributes) are saved and used as relative paths
  • The behaviour is changed: now a property in the generated code is initialized basing on the default value in CSDL only (instead of default values in any of SSDL and CSDL; Entity Framework models)
  • The behaviour is changed: now the default value for the 'File Per Class' option of the DbContext template is True (Entity Framework models)
  • The behaviour is changed: Generate Database Script From Model saves the output in ASCII format if there are no unicode symbols in the script; UTF-8 is used otherwise
  • The behaviour is changed: now the default values are not set for string properties, that correspond to fields with the default values like expressions (Entity Framework models)
  • The behaviour is changed: Create Model Wizard / Update From Database Wizard import the timestamp columns with precision
  • The behaviour is changed: now Update To Database / Generate Database Script take into account precision of the timestamp columns

Entity Framework

  • SharpMap 1.1 is supported
  • NTS Topology Suite 1.13.2 is supported
  • Entity Framework 6.1.0 RTM is supported
  • Entity Framework 6.1.0 Tools for Visual Studio 2012 & 2013 are supported
  • The use of the JSON data type in string canonical functions and comparison operators (equality and inequality) is supported
  • The UpdateDatabaseOperation operation in Code-First Migrations for Entity Framework 6.x is supported
  • The RenameIndexOperation operation in Code-First Migrations for Entity Framework 6.1 is supported
  • Multiple EntityContainers in the Code-First CreateDatabase()/CreateDatabaseScript()/DeleteDatabase() functionality are supported
  • The Database.Delete(DbConnection) functionality is supported: all objects in the current schema (specified in Schema or set with Initialization Command connection string parameter) are removed if DatabaseScript.Schema.DeleteDatabaseBehaviour = AllSchemaObjects
  • The Database.Exists(DbConnection) functionality is supported: the method returns true if DatabaseScript.Schema.DeleteDatabaseBehaviour = AllSchemaObjects and at least one table exists in the current schema (specified in Schema or set with Initialization Command connection string parameter)
  • Determining correct datatypes of data retrieved by EntitySQL queries with UNION ALL and similar constructions is improved
  • The generation of LEFT JOIN LATERAL and CROSS JOIN LATERAL is supported for PostgreSQL 9.3
  • The JSONB data type is supported
  • The compatibility with Hibernating Rhinos EntityFramework Profiler is improved
  • The database server version is added to the generated Code-First Migrations script
  • The releasing of memory, which was allocated for commands and readers of ObjectContext / DbContext, is improved
  • The config.SpatialOptions.PrecisionModel configuration option is added to specify the NetTopologySuite precision model scale factors
  • The performance of generating SQL for Enumerable.Contains in LINQ queries is improved by supporting a new expression type, DbInExpression, in Entity Framework 6
  • The behaviour is changed: now a semicolon (;) after the very last statement is generated in the Code-First CreateDatabaseScript() functionality
  • The behaviour is changed: the constraint name is ignored if a table primary key is deleted when running Code-First Migrations, that allows successful removing of automatically named primary key in PostgreSQL 9 or higher
  • The behaviuor is changed: the SQL generation is changed from "CAST(ColumnName AS varchar)" to "CAST(ColumnName AS text)" when comparing values of the columns with the JSON data types
  • The behaviour is changed: the DEFAULT value is generated now for the columns in the database which correspond to System.Guid identity properties in the Code-First/Code-First Migrations functionality
  • The behaviour is changed: now Entity Data Model Wizard/Designer imports the timestamp columns with precision
  • The behaviour is changed: now the Code-First CreateDatabase() functionality generates the timestamp columns with precision
  • The behaviour is changed: now Entity Data Model Wizard/Designer takes into account precision of the timestamp columns in Model First approach

dotConnect for PostgreSQL 7.2 new features:

  • Workflow Foundation is supported
  • The behaviour is changed: IndexOutOfRangeException is generated now instead of InvalidOperationException when PgSqlDataReader.GetOrdinal(String name) finds nothing in the result set

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The behaviour is changed: now the script is generated with "ON DELETE NO ACTION" when using the CreateDatabase() method and the "Delete Rule" for the association is set to "NO ACTION"
  • The behaviour is changed: now the CreateDatabase() method uses the same algorithm for naming foreign keys as in Entity Developer
  • The behaviour is changed: now the cascade deletion of tables in DeleteDatabase() method is performed via the "DROP TABLE CASCADE" statement

Entity Developer

  • The "WCF DataMember Attribute on Navigation Properties" property is added to the Data Transfer Object template for pointing the end (-s) where the attribute should be generated (Entity Framework models)
  • The predefined templates (POCO Entity and LinqConnect) are improved: new template setting, "Generate Dummy Comments", is added (LinqConnect models)
  • More information messages, when validating EF6 models basing on the EntityFramework.dll functionality, are added (Entity Framework models)
  • The behaviour is changed: the validation of EF6 models depends on the EntityFramework.dll functionality only (.NET Framework 4.5 is not required any more) (Entity Framework models)

Entity Framework

  • The JSON data type is supported
  • The behaviour is changed: the schema, specified in the Schema connection string parameter, is created in the database when config.DatabaseScript.Schema.DeleteDatabaseBehaviour is equal to DeleteDatabaseBehaviour.Schema or DeleteDatabaseBehaviour.Database
  • The behaviour is changed: Code-First Migrations generates DEFAULT values for new NOT NULL columns of Boolean, Guid, DateTime, TimeSpan types when adding them in the existing table
  • The behaviour is changed: Code-First Migrations does not generate the unicode attribute if it is not specified in the mapping explicitly

dotConnect for PostgreSQL 7.1 new features:

  • Visual Studio 2013 is supported
  • The behaviour is changed: installation with the /VERYSILENT install parameter will uninstall the other version of the provider without any dialog box if it is installed
  • The behaviour is changed: now a transaction rollbacks on Connection.Close() if Transaction.Commit() was not called before closing the connection

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The possibility to inherit from the data provider classes is added

Entity Developer

  • Entity Framework 6 is supported
  • The new "Provider Manifest Token" model property is implemented to identify the target server (Entity Framework models)
  • The behaviour is changed: the values of "Target Server" and "Server Version" can be reset via the Model Settings > Synchronization > Mapping dialog despite the fact whether connection is specified in Database Explorer or not

Entity Framework

  • The 6.0.0 and 6.0.1 versions of Entity Framework are supported
  • The Entity SQL canonical function NewGuid is supported
  • The config.QueryOptions.NewGuidGenerationMethod configuration option (by default SQL expression is used) is added to provide the possibility to set a way to generate new Guid
  • The compatibility of Entity Framework provider for EF v1, v4, v5 with medium trust level environment is improved
  • The behaviour is changed: Entity Data Model Wizard shows a more detailed error message in case of connecting to unsupported database or using incorrect provider manifest tokens

dotConnect for PostgreSQL 7.0 new features:

  • Microsoft Sync Framework support is implemented
  • The support of asynchronous backing up and restoring for PgSqlDump is implemented
  • The following methods are added to PgSqlDump class for asynchronous backup and restore operations: BeginBackup, BeginBackupQuery, BeginRestore, EndBackup, EndBackupQuery, EndRestore
  • The UseMultirowSyntax property, specifying whether to use the multirow VALUES syntax when generating INSERT statements, is added to the PgSqlDump class
  • The CommitBatchSize property, specifying the max size in bytes of a single INSERT statement with multiple values in the script when using the multirow VALUES syntax, is added to the PgSqlDump class
  • PgSqlTime type, representing the TIME server data type, is added
  • PgSqlTimeTZ type, representing the TIME WITH TIMEZONE server data type, is added

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The Collate method of the SqlMethods class is implemented

Entity Developer

  • The predefined templates are improved: new template setting, "Use Compiled Query Cache", is added (LinqConnect models)

Entity Framework

  • The behaviour is changed: Code-First Migrations generates DEFAULT 0 for new NOT NULL columns of numeric types when adding them in the existing table
  • The behaviour is changed: Code-First Migrations generates DEFAULT '' for new NOT NULL columns of string types when adding them in the existing table

dotConnect for PostgreSQL 6.8 new features:

  • Visual Studio 2013 Release Candidate is supported
  • SSIS DataFlow Source and Destination components for PostgreSQL are implemented
  • The overload for the PgSqlLargeObject.Open() method with the PgSqlLargeObjectOpenMode parameter is added

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The possibility to use the extension method AsQueryable() in LINQ queries is added
  • The support for correct retrieving of the TimeSpan and DateTimeOffset values while materializing is added
  • The support for the operators of equality(==) and inequality(!=) for the "inet" data type in LINQ queries is added

Entity Developer

  • The "Close the window when the generation completes successfully" option in the Generation Process window is implemented in the standalone Entity Developer
  • The "Rewrite connection string during regeneration" option (default value is True) of model settings is added to provide the possibility to turn off modifying connection string in *.config after model is saved first time (Entity Framework models)
  • The design time support for model-defined functions is added (Entity Framework models)
  • The behaviour is changed: now connection string is configured with the name of the assembly, where the model is located, in case when the context class is located in another assembly (Entity Framework models)

Entity Framework

  • Entity Framework 6 Release Candidate 1 is supported
  • SharpMap 1.0 RTM is supported
  • NetTopologySuite 1.13.1 is supported
  • Devart.Data.PostgreSql.Entity.Spatials.dll assembly is added
  • The behaviour is changed: the parameter, which participates in the IS NULL comparison, is cast to a particular type in the generated SQL query
  • The behavior is changed: the strict FetchAll = True for created SQL commands is removed; now the behavior is determined by the connection string parameter "Default FetchAll"

dotConnect for PostgreSQL 6.7 new features:

  • SQL Server 2012 Reporting Services is supported
  • The "Default FetchAll" connection string parameter for defining default value of the FetchAll property of PgSqlCommand objects created on the connection is implemented
  • The possibility of specifying negative large object OIDs via interface of the PgSqlLargeObject class is implemented
  • The support of asynchronous backing up and restoring for PgSqlDump is implemented

Entity Developer

  • Support for spatial data types in Entity Framework 5 and 6 is added
  • The "Model Name As Files Prefix" property is implemented for the templates which generate classes for model entities
  • The possibility of adding custom attributes to enum members is implemented
  • The behaviour is changed: a default value for the "Detect Table Per Type inheritances" option in Model settings is set to False
  • The behaviour is changed: the possibility to exclude the generation of keys (primary, foreign) in "Update Database From Model" and "Generate Database Script From Model " wizards is added
  • The behaviour is changed: the possibility to add one-to-one associations with nullable foreign key properties is added (LinqConnect models)
  • The behaviour is changed: now by default MVC Controller template generates files in the model folder, MVC View Advanced template creates files in the Views model subfolder
  • The behaviour is changed: the PostgreSQL limitation in 63 character for identifier names is taken into account when the SQL script is generated by Update Database From Model / Generate Database Script wizards

Entity Framework

  • Support for spatial data types in Entity Framework 5 and 6 is added
  • NetTopologySuite GIS library support in Entity Framework 5 and 6 is added
  • PostGIS 'geometry' and 'geography' data type support in Entity Framework 5 and 6 is added
  • Devart.Data.PostgreSql.Entity.dll assembly built with the 4.5 version of .NET Framework is added
  • Devart.Data.PostgreSql.Entity.Migrations.dll assembly built with the 5.0 version of EntityFramework.dll is added
  • The PgSqlSpatialFunctions class for working with PostGIS spatial functions in LINQ to Entities is added
  • The "Unprepared Execute" connection string parameter is supported by Entity Framework runtime
  • The config.Workarounds.UseInvariantProviderManifestToken configuration option (default value is False) is added to provide the possibility of returning the invariant string literal as the provider manifest token
  • The config.SqlFormatting.Identation option is renamed to config.SqlFormatting.Indenting

dotConnect for PostgreSQL 6.6 new features:

  • The "AllowDateTimeOffset" connection string parameter for returning the TimeStampTZ database value like System.DateTimeOffset by PgSqlDataReader is implemented
  • The CommitTimeout property of the PgSqlConnection object is implemented to determine timeout period for the Commit method
  • The behaviour is changed: provider's build action is installed on the target workstation, on which .NET Framework is available, without Visual Studio integration

LinqConnect (formerly known as LINQ to PostgreSQL)

  • LINQPad integration is supported
  • The possibility to disable query cache via the DataContext's 'EntityCachingMode' property is added
  • Support for SERIAL and BIGSERIAL database types when using CreatedDatabase() method is added
  • The performance when working with the TPT-inheritance and retrieving descendants via OfType<> is improved

Entity Developer

  • A new MVC Controller template, generating a ASP.NET MVC controller with data access code, is added
  • A new MVC View Advanced template, generating an ASP.NET MVC view based in Twitter Bootstrap, is added
  • A new Data Transfer Object template for DTO classes generation is implemented
  • A new Data Annotation Metadata template, generating Data Annotation metadata classes and decorating classes and properties with data annotation attributes for validation, presentation and defining metadata, is added
  • A new WCF RIA Domain Service template, generating a WCF RIA Services domain service class for a Devart Entity Framework model is added
  • A new WCF RIA Domain Service template, generating a WCF RIA Services domain service class for a Devart LinqConnect model is added
  • Add Template dialog box is improved
  • The Namespace property of class, complex type, enum is implemented
  • The Entity Container Namespace properties of the model is implemented (Entity Framework models)
  • The support for enums declared in external assemblies is implemented
  • The capability for setting special rules for generating default names of database objects when using the Model First approach is implemented (a new Advanced page is added to the Synchronization->Database Naming section of the Model Settings dialog box)
  • The capability to customize properties that are automatically added when creating a new entity, and options that are automatically set when creating a new property is added (a new Initialization page is added to the Model->General section of the Model Settings dialog box)
  • The Refresh option in the Attributes tab of the Model Settings window is implemented; it updates the list of available attributes types in the referenced assemblies
  • The capability to modify custom attributes for several selected entities or properties at the same time is implemented
  • Automatic adding of references to Entity Framework specific assemblies when adding a new Devart Entity model to a project is implemented
  • The capability to cancel metadata reading in wizards and Database Explorer is added
  • The "Recreate Database Tables" check box, which allows to drop and recreate database tables, is added to the "Update To Database" wizard
  • New setting "Detect Table Per Type inheritances", which enables automatic detection of TPT inheritances, is added for Create Model Wizard and model
  • The "Include Drop" check box for including DROP commands for database objects to the generated script is added to Generate Database Script Wizard
  • A new shortcut menu command "Include Related", which allows making a copy of the related objects in the specified diagram, is added
  • A new shortcut menu command "Add To Model with Related", which allows adding tables, related to the selected one, to the model, is added to the shortcut menu of tables in Database Explorer
  • A new shortcut menu command "Add On Diagram With Related", which allows creating an object and all the objects related to it on a diagram, is added to the shortcut menu of classes, complex types, and enums in Model Explorer
  • New "Simple" diagram skin is added for displaying a diagram in metro style
  • The "Default Width" diagram property for specifying the default width for newly created diagram shapes (entities, complex types and enums) is added
  • The Save and Refresh buttons for persisting and reloading changes to / from a database is added to the Retrieve Data grid
  • The "WCF DataMember Attribute on Navigation Properties" property is added to the DbContext and POCO templates for pointing the end (-s) where the attribute should be generated
  • Devart.Data.Linq.Binary type is added to the "Type Mapping Rule Editor" (LinqConnect models)
  • The "Rewrite connection string during regeneration" check box of Model Settings is implemented to determine whether to overwrite the connection string in the project config file with the one, currently set in Entity Developer for the model, each time when regenerating code for the model (LinqConnect models)
  • The "Regenerate Storage and Mapping" option for regenerating model parts, specific to the database server, is added to the diagram shortcut menu
  • DbContext template is improved: a "WCF Data Contract Attributes" setting for generation of DataContract, KnownType, and DataMember attributes for classes and properties is added (Entity Framework models)
  • DbContext template is improved: "Implement INotifyPropertyChanging" and "Implement INotifyPropertyChanged" template settings are added (Entity Framework models)
  • DbContext template is improved: a new "Mapping Generation Strategy" property that determines the method of mapping generation is implemented (Entity Framework models)
  • POCO template is improved: a new "WCF Data Contract Attributes" setting for generating DataContract, KnownType, and DataMember attributes for classes and properties is added (Entity Framework models)
  • POCO template is improved: "Proxy Creation Enabled" setting is implemented (Entity Framework models)
  • POCO template is improved: new template settings, "Implement INotifyPropertyChanging" and "Implement INotifyPropertyChanged", are added (Entity Framework models)
  • POCO Entity template is improved: new template setting, "Property Change Notifiers", is added (LinqConnect models)
  • Create Model Wizard is improved: it is now able to download and install the required 'EnityFramework' Nuget package for Entity Framework 6 models, and for models for Entity Framework 4 and 5 in case they use the DbContext template
  • The Storage Column Editor dialog box is improved: the possibility to specify different settings that were previously available only in the Properties docking window are implemented (Entity Framework models)
  • Class Editor is improved: the capability to edit extended property settings, such as validation, presentation, and facets, is added
  • Type Editor is improved: the capability to edit extended property settings, such as validation, presentation, and facets, is added
  • Storage Entity Editor is improved: the capability to edit extended columns settings, such as facets, is added (Entity Framework models)
  • The behaviour is changed: "Save connection string in App.Config as" check box in Model Settings dialog box is renamed to "Use connection string from App.Config as" (LinqConnect models)
  • The behaviour is changed: now, when creating a new TPH discriminator column in Inheritance Editor, it has the string type by default
  • The behaviour is changed: the error is generated if the Abstract inheritance modifier is set for the class which is involved in the Table Per Type inheritance
  • The behaviour is changed: empty value is used in property editors instead of -1 for marking facets of class property without assigned value
  • The behaviour is changed: System.DateTime .NET structure is mapped to TIMESTAMP database type when using Model First approach (LinqConnect models)
  • The behaviour is changed: a string default value for the property can be set without quotes in the Properties window
  • The behaviour is changed: the validation error is not generated when an abstract class is used in Table Per Type inheritance (Entity Framework models)
  • The behaviour is changed: auto-implemented properties are generated when DbContext template is used with ImplementINotifyPropertyChanged=False and ImplementINotifyPropertyChanging=False (Entity Framework models)
  • The behaviour is changed: DatabaseGeneratedOption is always generated for EntityKey properties when using fluent mapping (Entity Framework models)

Entity Framework

  • Entity Framework 6 Beta 1 is supported
  • The Database value is added to the DeleteDatabaseBehaviour enumeration for creating/removing database in Code-First
  • The datetimeoffset pseudo type of SSDL, which corresponds to System.DateTimeOffset, is implemented
  • The config.DatabaseScript.ForeignKey.Enabled option (default value is True) is added to turn on/off generation of foreign key constraints
  • The error messages about long identifiers when using CreateDatabase/DropDatabase are improved
  • The behaviour is changed: CreateDatabase()/Code-First with DeleteDatabaseBehaviour.Schema does not try to create a schema if it exists

dotConnect for PostgreSQL 6.5 new features:

  • ExtendedMembership (SimpleMembership) provider support is added

Entity Developer

  • The possibility of setting enum values via predefined dropdown list in the Retrieve Data window is implemented
  • The behaviour is changed: the Guid property is mapped to the UUID type in the database when using the Model First approach (LinqConnect models)

Entity Framework

  • Entity Framework 6 Alpha 3 is supported

dotConnect for PostgreSQL 6.4 new features:

Entity Developer

  • The behaviour is changed: the serializing property and corresponding methods are not generated when using 'Fluent Mapping'/'POCO Entity' templates and Unidirectional mode (LinqConnect models)
  • The behaviour is changed: warnings about tables/views without primary keys are written to Error List window when generating a model (Entity Framework models)
  • The behaviour is changed: the EntityKey attribute is not assigned to each property of the class if there is no primary key in the corresponding table/view (Entity Framework models)
  • The behaviour is changed: empty value is used in property editors instead of -1 for marking facets of Storage Column without assigned value (Entity Framework models)

Entity Framework

  • Entity Framework 6 Alpha 2 is supported
  • Devart.Data.PostgreSql.Entity.dll assembly compiled with EntityFramework.dll 6.0 and NET Framework 4.0 is added

dotConnect for PostgreSQL 6.3 new features:

Entity Developer

  • Model Refactoring feature is implemented; it speeds up creating complex types and Table Per Type and Table Per Concrete Type inheritances from several model entities
  • Create Storage and Mapping command, that allows automatically creating of the corresponding storage part object and defining mapping, is added to the shortcut menu of classes, properties, and associations (Entity Framework models)
  • Select Storage Object command, that allows quick navigation to the corresponding storage part object, is added to the shortcut menu of classes, properties, associations, and methods (Entity Framework models)
  • The possibility to delete the corresponding storage part objects automatically when deleting conceptual model objects is added (Entity Framework models)
  • The functionality of ignoring columns in the database in the "Update To/From Database" wizards if they were omitted once before is implemented
  • The Property Editor dialog is improved: fast access to the editor of the corresponding storage object and the possibility to specify different settings that were previously available only in the Properties docking window are implemented (Entity Framework models)
  • The Inheritance Editor dialog is improved: specifying Discriminator column for Table Per Hierarchy inheritance in the editor is implemented (Entity Framework models)
  • The Class Editor dialog is improved: fast access to the editor of the corresponding storage object is implemented (Entity Framework models)
  • The Method Editor dialog is improved: fast access to the editor of the corresponding storage object is implemented (Entity Framework models)
  • Warnings about objects that are not mapped are added
  • The naming algorithm for the newly-created columns, which correspond to complex type's properties, when using the Model First approach is improved (Entity Framework models)
  • A SHIFT+DELETE keyboard shortcut for deleting entity, complex type, or enum from diagram only is added
  • An INSERT keyboard shortcut for creating a new entity, adding property to the selected entity/complex type or new member to enum is added
  • The possibility to view notes, added through the "Documentation" property, for all the diagram objects via hints is implemented
  • Hints for diagram objects are improved
  • The behaviour is changed: Configure Behaviour dialog is renamed to Stored Procedure Mapping; options for hiding innapropriate and mapped stored procedures are added (Entity Framework models)
  • The behaviour is changed: Table Editor dialog is renamed to Storage Entity Editor (Entity Framework models)
  • The behaviour is changed: Stored Procedure Editor dialog is renamed to Storage Procedure Editor (Entity Framework models)
  • The behaviour is changed: Configure Behaviour dialog is renamed to Stored Procedure Mapping (LinqConnect models)

dotConnect for PostgreSQL 6.2 new features:

  • Visual Studio 2012 is supported
  • The support of Range Types for PostgreSQL 9.2 is added
  • PgSqlIntRange class for representing the int4range type is added
  • PgSqlBigIntRange class for representing the int8range type is added
  • PgSqlNumericRange class for representing the numrange type is added
  • PgSqlTimeStampRange class for representing the tsrange type is added
  • PgSqlTimeStampTZRange class for representing the tstzrange type is added
  • PgSqlDataRange class for representing the datarange type is added
  • The TimeZone property of the PgSqlLocalization class is implemented to adjust timezone of the corresponding .NET data types when converting them to/from the server data types

LinqConnect (formerly known as LINQ to PostgreSQL)

  • The fluent mapping is improved: support of the ID generators for primary keys is added

Entity Developer

  • Support for ADO.NET Entity Framework 5 is added
  • Predefined template for generating Repositories and Unit of Work classes is added
  • Integration with Visual Studio refactoring for renaming model objects is implemented
  • The possibility to set different namespaces for the context and its entities when using the DbContext template is implemented (Entity Framework models)
  • The "Use Database Comments" option of Model Settings is implemented to determine whether comments for database objects, if supported by DBMS, will be used for model objects Documentation initialization and taken into account when executing model or database update operations
  • The "Implement IClonable" option for the generated classes based on the model entities is added to all templates
  • The 'Entity Base' class property, which allows specifying the ancestor class/interface for a particular entity type, is implemented (LinqConnect models)
  • The behaviour is changed: the "Save connection string in App.Config as" option is available for LinqConnect models in the standalone version Entity Developer (the entry in App.Config must be added manually afterwards)
  • The behaviour is changed: only particular (not all) property characteristics are regenerated when using Update Model From Database wizard after the metadata of the corresponding column have been changed (LinqConnect models)

Entity Framework

  • The support of the PostgreSQL full-text search functionality is implemented
  • The config.CodeFirstOptions.TruncateLongDefaultNames configuration option (default value is False) is added to provide the possibility of truncating long default names of indexes, primary keys, and foreign keys generated by Code-First Migrations
  • The validation of identifier name length in Code-First Migrations is implemented
  • The behaviour is changed: Devart.Data.PostgreSql.Entity.Migrations.dll is built with the 4.4 version of EntityFramework.dll now

dotConnect for PostgreSQL 6.1 new features:

  • The behaviour is changed: when a connection is terminated, PgSqlAlerter waiting process is terminated too and an exception is thrown

Entity Developer

  • The possibility to unload assemblies from the main application domain by using separate application domain is implemented
  • The possibility to disable such Database First Settings as type mapping rules is implemented
  • The design time copy/cut/paste functionality for enum members is added
  • The behaviour is changed: the warning, related to the missing property setter, is disabled (LinqConnect models)
  • The behaviour is changed: for the association, in which the many-side entity hasn't the primary key, the code and the mapping are not generated (LinqConnect models)
  • The behaviour is changed: the properties, that correspond autoincrement fields, are generated with a ReadOnly keyword in VB.NET (LinqConnect models)

Entity Framework

  • The support of the PostgreSQL full-text search functionality is implemented
  • The PgSqlTextFunctions class for working with full-text search functions in LINQ to Entities is added
  • The support of the TSVECTOR and TSQUERY data types is implemented
  • The PgSqlCreateIndexConfiguration class for creating full-text indexes in CreateIndex operation in Code-First Migrations is added
  • Creating indexes for FK columns in Code-First CreateDatabase functionality is implemented
  • The config.DatabaseScript.ForeignKey.IndexCreation configuration option is added (default value is True)
  • The config.QueryOptions.UseCSharpNullComparisonBehavior configuration option for checking for NULL when comparing a nullable property (column) or an expression with a variable (parameter) in LINQ to Entities is implemented (by default, false)
  • The SimilarTo overloaded methods are added to the PgSqlFunctions class to provide support of the SQL SIMILAR TO statement
  • The possibility of setting configuration options via the application config file is implemented
  • The Devart.Data.PostgreSql.Entity.xsd file is added to the installation in order to simplify setting and validating the application config file settings when using the XML Editor
  • Code-First Migrations now supports specifying which schema (database) a table belongs to
  • CASE generation is improved
  • The config.Workarounds.IgnoreDboSchemaName configuration option is added. The option is automatically set to True, if Code-First (Migrations) EF v4.x/5.x is used
  • The behaviour is changed: in case of using Code-First (Migrations) EF v4.x/5.x the schema name 'dbo' will be ignored by default

dotConnect for PostgreSQL 6.0 new features:

  • Visual Studio 2012 Release Candidate is supported
  • The Initialization Command connection string parameter is implemented
  • The MemCryptStorage class for storing SSL certificates in the application memory is implemented
  • The behaviour is changed: the 'sender' parameter in MonitorEventHandler is a connection and the MonitorEventArgs.ExtraInfo property is filled with the connection string
  • The behaviour is changed: the access modifier of the connectionString field of web provider classes is changed from private to protected

LinqConnect (formerly known as LINQ to PostgreSQL)

  • References to System.Data.Linq are removed; now LinqConnect uses only its own classes
  • Upgrade wizard for upgrading projects to the new version of LinqConnect automatically is added
  • The possibility to choose cache mode (classic mode for cases when DataContext is used as a unit of work, and self-cleaning mode for cases when DataContext is a long-lived object) is added
  • The possibility to map stored procedure out parameters of the CURSOR type to IEnumerable parameters of the corresponding methods is added
  • Tracking of complex object graphs with chains of parent-child objects is optimized
  • Number of database calls required for managing objects with a many-to-many association is reduced
  • Delete rule performance is improved
  • Compilation performance is improved
  • Materialization performance is improved
  • Compiled query cache is improved

Entity Developer

  • The sticker notes for adding comments to diagrams are implemented
  • The possibility to add a stamp, specifying diagram author, company, version, copyrights, project name, and date, to a diagram is implemented
  • New Collapse All and Expand All menu commands for collapsing and expanding diagram shapes are added
  • The "Pluralize collection navigation properties" option for the possibility to turn off the pluralization of the many-end names of associations is implemented
  • The "sealed override" inheritance modifier for methods based on stored procedures and functions is added (LinqConnect models)
  • The behaviour is changed: context menu commands for working with diagram are grouped to the Diagram submenu of the context menu
  • The behaviour is changedr: the possibility to change diagram shape color via the corresponding Shape -> Color context menu command is added
  • The behaviour is changed: when pasting a copied entity to a new diagram, a new entity is not created, the existing entity is added to this diagram
  • The behaviour is changed: when cutting an entity from the diagram, the entity is not cut from the model, only from the diagram
  • The behaviour is changed: "Update Model From Database" wizard places newly added properties to the base abstract class now instead of putting them into child classes where the mapping is (Entity Framework models)
  • The behaviour is changed: the Money data type is mapped to System.Decimal by default now when using Database First approach (Entity Framework models)

Entity Framework

  • The config.CodeFirstOptions.RemoveSchemaFromDefaultConstraintName option for removing schema name from the default constraint name is implemented in Code-First Migrations (by default, true)
  • The config.CodeFirstOptions.AddTableNameInDefaultIndexName option for adding a table name to the default index name is implemented in Code-First Migrations (by default, true)
  • The config.CodeFirstOptions.DisableIndexQuoting option is implemented for a backward compatibility with migrations which use indexes, generated and applied in the 5.xx versions
  • The behaviour is changed: the Money data type is mapped to System.Decimal by default now when using Entity Data Model Wizard/Generate Database Wizard and Code-First CreateDatabase functionality

dotConnect for PostgreSQL 5.80 new features:

  • Visual Studio 11 Beta is supported
  • The IPv6 protocol is supported
  • The PgSqlConnection.ClearAllPools(bool force) method is added
  • The behaviour is changed: the Money PostgreSQL data type is mapped to System.Decimal now
  • The behaviour is changed: the PgSqlDataReader.GetDateTime method returns DateTime with DateTimeKind.Local now
  • The behaviour is changed: the exception message when connecting to a non-existing database is "database ... does not exist" now
  • The handling of empty options in the connection string is improved
  • The PgSqlParameter(String, String) constructor is removed to avoid ambiguity with the PgSqlParameter(String, object) overload

Entity Developer

  • The copy/cut/paste functionality is added for objects of the conceptual part of a model
  • The possibility to drag&drop properties between classes in Model Explorer is implemented
  • The "HeaderTimestampVersionControlTag" generation template option is added for improving integration with version-control systems
  • The multiline popup editor for the Documentation.Summary property is implemented
  • The behaviour is changed: the Migrate option is added to the context menu of property in Model Explorer
  • The behaviour is changed: entities and enums on the designer surface are more resizable now

Entity Framework

  • Entity Framework 5.0 Beta 2 is supported
  • SQL generation for .Any method in LINQ to Entities is improved
  • The behaviour is changed: Devart.Data.PostgreSql.Entity.Migrations.dll is built with the 4.3.1 version of EntityFramework.dll now

dotConnect for PostgreSQL 5.70 new features:

Entity Developer

  • The validation of method parameters in LinqConnect models is added
  • The context menu options for unchecking changed/added/dropped tables are implemented for the root nodes in the "Update To/From Database" wizards
  • The possibility to rename the storage part of the model in Model Explorer is implemented (Entity Framework models)
  • The diagram design is changed: an arrow (instead of a triangle) is used on the tip of an association now
  • The documentation generation for navigation properties is implemented
  • The "Recreate Model" option, allowing to rebuild the model from a scratch, is added to the "Update Model From Database" wizard
  • The "GeneratePartialClass" template property to generate a partial class, which will not be overwritten by the designer, for each class in the model is added
  • The stored procedures support in DbContext template in case of XML mapping is implemented (Entity Framework models)
  • The behaviour is changed: database column comments are transfered to the Summary attribute of the Documentation property now

Entity Framework

  • Entity Framework 4.3 (Code First Migrations) is supported
  • The validation of identifier name length in Code-First Migrations is implemented
  • The conversion of .StartsWith, .Contains, .EndsWith to LIKE clause in the generated SQL for the case of expression-based condition is supported
  • The Code-First Migrations behaviour is changed: if the nullable value of the property in migration is not set explicitly, the corresponding column will be created nullable

dotConnect for PostgreSQL 5.60 new features:

Entity Developer

  • Capability for customizing the default Type Mapping Rules is implemented
  • Capability for setting diagram options either globally for all diagram documents or separately for a particular one is implemented: the Diagram Appearance and Printing options can now be set through the Options dialog box
  • Capability for setting such options as Environment, Diagram and Servers' to adjust the Entity Developer behavior, Model diagram behavior and Type Mapping Rules to your needs is implemented
  • Capability for setting and defining the class property validation rules based on different engines (Data Annotation, Enterprise Library, NHibernate Validator) is added
  • The HasStream attribute of entity types, used retrieve binary data as a stream via Open Data Protocol, is supported (Entity Framework models)
  • The documentation generation for Enum members is implemented
  • The "Detect function-based column default value" option for automatic setting StoreGeneratedPattern to Identity for corresponding columns is implemented for Entity Framework models (by default, false)
  • The algorithm for forming the Navigation Properties names, when there are several FOREIGN KEY constraints between the same tables, is changed
  • The behaviour is changed: the Navigation Property will not be displayed on the diagram and in Model Explorer if "Generate" is set to false for the appropriate association end
  • The behaviour is changed: the Validate Max Length attribute is synchronized with the Max Length attribute of Property by default now
  • The behaviour is changed: the Validate Required attribute is synchronized with the Nullable attribute of Property by default now
  • The behaviour is changed: when selecting a property in the Model Explorer, the corresponding entity on the diagram does not expand if it is collapsed

Entity Framework

  • The behavior of the Database.Delete code-first method is changed: the constraints are now disabled when database objects are deleted
  • The config.QueryOptions.NoEscapeLike and CaseInsensitiveLike options are implemented to manage LIKE behaviour when using Linq to Entities extention methods .Contains() .EndsWith() .StartsWith()
  • The generation of SQL-literals for byte array when using PostgreSQL server 9.x is supported
  • The generation of SQL-literals for DateTime with fractional part of seconds is improved

dotConnect for PostgreSQL 5.50 new features:

  • GSS authentication is supported
  • Changed behaviour: the type of 'userid' and 'roleid' columns in database schema of ASP.NET Provider Model Support is UUID now
  • The possibility of using payload string for PostgreSQL version 9.0 and higher is implemented

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Fluent Mapping support is added

Entity Developer

  • Fluent Mapping template for LinqConnect models is added
  • Support for enumerated types ("enums") in LinqConnect and Entity Framework June 2011 CTP models is implemented
  • Import for selected stored procedures into the context model for Entity Framework models is implemented
  • New skins to improve the apllication appearance are implemented
  • Selection driven highlighting is implemented
  • Capability for changing the shape color for entities, complex types and enums is implemented
  • Capability for selecting the diagram skin type is implemented
  • Disabling facets that are not applicable to the current field type is implemented (LinqConnect models)
  • The possibility of specifying the name of the connection string to be saved in the application configuration file is implemented
  • Default behaviour changed: now the Update To Database Wizard does not drop foreign keys of a table if the 'master' one is not represented in the LinqConnect model
  • The default attribute mapping source for LinqConnect models is made static
  • Behaviour is changed: table is not marked as "Changed" in Update Wizard if DefaultValue is set for its expression column

Entity Framework

  • The possibility to turn off generation of fake updates for parent entities is implemented

dotConnect for PostgreSQL 5.30 new features:

  • DbTransactionBase class is added
  • TransactionStateChanging and TransactionStateChanged events are added to the DbConnectionBase class
  • Policy file for the Devart.Data.PostgreSql.Entity assembly is added
  • SSPI authentication is supported
  • The License Information Wizard is improved: it now generates licenses for projects that have Entity Framework models or refer to Devart.Data.PostgreSql.Web, but have no direct references to Devart.Data.PostgreSql.dll
  • The support of events which occur when connections are taken and returned to pool for processing PgSqlMonitor.TraceEvent is added
  • The PgSqlDump.BlockSize property is implemented to control the size of data block when making dump of large object
  • The "Use schema name" and "Use catalog name" check boxes are added to DataSet Wizard

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Eager loading is implemented in case the related entities collection is referenced in the select clause of the query
  • Fetch mode customization for eager loading of related entities is implemented
  • The 'IsReference' mode of entity serialization is supported

Entity Developer

  • New Templates are added:
    • LinqConnect: POCO template with XML mapping generation
    • Entity Framework: POCO template, Self-Tracking template, DbContext template with fluent mapping generation
  • Templates usability is improved
  • Template Editor is significantly improved
  • Ability to declare additional properties for model objects is added
  • Ability to specify .NET attributes for model objects is added
  • The possibility to export the diagram into an image file was added
  • The possibility to restrict adding the connection string information to the application configuration file is added
  • The CITEXT data type is supported
  • The changes in the Entity name are now preserved by Update From Database Wizard (Entity Framework models)
  • The pluralization algorithm is improved when Naming rules are defined
  • Runtime support for literals specified in the 'Default Value' entity field property for LinqConnect models is implemented
  • The "Preserve schema name in storage" option is added

Entity Framework

  • Entity Framework 4.2 June 2011 CTP is supported
  • Batch Updates support is added
  • Adjustable SQL Formatting for DML commands is added
  • Ability to configure the NULL values inserting behaviour is added
  • IgnoreSchemaName workaround (mainly for Code First) is added
  • DisableQuoting workaround is added
  • PgSqlFunctions.Like support (including LINQ to Entities) is added
  • The PgSqlFunctions.ILike support is added
  • Configurable database deletion and creation support is added
  • The processing of LINQ expressions which work with literals is improved
  • Processing of Edm.StartsWith, Edm.Contains, and Edm.EndsWith is improved

dotConnect for PostgreSQL 5.10 new features:

  • Supported Visual Studio 2010 Service Pack 1
  • Added DDEX support in Express Edition
  • Supported SQL Server Reporting Services x64
  • Implemented possibility to include tablespace names to the table definition script when backing up schema via PgSqlDump
  • Supported SSL connection to PostgreSQL server v 9.0
  • Added BeginTransaction value to the MonitorEventType enum
  • Implemented the DbMonitor.EventQueueLimit property which allows to set the maximal allowed number of messages waiting for being processed by the dbMonitor application
  • Significantly improved performance of prepared commands execution on protocol 3.0

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Implemented the Attach(object entity, object original) method of the Devart.Data.Linq.ITable interface
  • Implemented implicit sorting by the entity key in queries with defined LoadWith rules

Entity Developer

  • Added possibility to split model into several diagrams for better handling of large models
  • Implemented possibility to disable automatic recognition of many-to-many associations
  • Added ConstraintSet property for Constraints in the Store part of the Entity Framework model
  • Added mapping for Function Import result types (Entity Framework v4 only)
  • Changed behaviour: when adding two related entities with the corresponding properties having different types, an invalid association is created now

Entity Framework

  • Entity Framework 4.1 RTW supported

dotConnect for PostgreSQL 5.00 new features:

  • Supported Visual Studio 2010 Service Pack 1 Beta
  • Implemented the LocalFailover property and ConnectionLost event of the PgSqlConnection class for processing connection problems
  • Added "Transaction Scope Local" connection string option that enables the support for non-distributed transactions in the TransactionScope implementation
  • Added overloads for methods of DbDataReaderBase class with column name parameter
  • Improved interface in DbLoader class - added string and integer indexers
  • Added the 'Validate Connection' connection string parameter to validate connection on its retrieving from pool
  • Changed behaviour: setting the DbDataTable.Connection property sets the InsertCommand.Connection, UpdateCommand.Connection, and DeleteCommand.Connection properties
  • Changed behaviour: when clearing the pool, the number of connections specified in 'Min Pool Size' is never removed

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Ability to execute DML statements in batches on SubmitChanges added
  • Table Per Type inheritance supported
  • Supported ASP.NET Dynamic Data with ASP.NET Dynamic Data project templates
  • PLINQ support added (connection manager redesigned for thread safety)
  • Supported Visual Studio Debugger Visualizer with SQL syntax highlighting for the DataQuery objects
  • Implemented support for custom type arguments in LinqConnect compiled queries
  • Changed behaviour: retrieving master entity from details one now generates left outer join instead of inner join

Entity Developer

  • Update To Database with Storage Synchronization functionality added
  • Added possibility for changing the UpdateCheck property for several fields at once
  • Added Update Model From Database functionality
  • Added multiselect support for properties
  • Improved large models handling

Entity Framework

  • Entity Data Model Wizard and Update Model from Database Wizard in Visual Studio 2010 Service Pack 1 Beta supported
  • Improved SQL generation for IN (Entity SQL) and Contains (LINQ to Entities) clauses

dotConnect for PostgreSQL 4.95 new features:

  • Supported password salt in ASP.NET membership provider
  • Implemented capability of extending base functionality of ASP.NET providers
  • Added support for Enterprise Library 5
  • Added Unprepared Execute connection string parameter
  • Changed the primary key of the aspnet_sessions table for ASP.NET Web providers (the ApplicationName column added)
  • Implemented integration with Visual Web Developer 2008 and 2010 Express editions
  • Implemented the BackupQuery method of PgSqlDump for dumping result sets
  • Changed behaviour: PgSqlCursor.GetDataReader() returns a reader depending on the FetchAll and FetchSize properties of the command that returned PgSqlCursor
  • Changed behaviour: removed the Database element from the PgSqlDumpObjects enumerator
  • Implemented support for PgSqlLargeObject in PgSqlDump
  • Implemented trimming leading spaces in fixed-length char fields when backing up data with PgSqlDump
  • Added the Constraints element into the PgSqlDumpObjects enumeration
  • Changed the mode of PgSqlScript execution: PgSqlScript is always executed in unprepared mode now
  • Implemented host option for current process in dbMonitor
  • Added possibility for tracing the distributed transactions in DBMonitor
  • Added functionality for creating and using empty PgSqlArrays (CreateEmptyArray and IsEmpty methods)
  • Improved Upgrade wizard
  • Removed redundant queries on PgSqlDataTable.Open()

LinqConnect (formerly known as LINQ to PostgreSQL)

  • LINQ to PostgreSQL support is renamed to LinqConnect
  • Added support for Complex type
  • Added support for different configurable algorithms for primary key generation
  • Automatic configurable compiled query caching supported
  • Performance improved
  • Improved transaction behaviour in case when exception is thrown
  • DataContext class is now CLS-Compilant
  • Added implementation of the ITable interface for the Table class
  • Changed DataContext.Log output format for Microsoft compatibility reasons

Entity Developer

  • Added possibility of renaming associations in the model
  • Added default bindings to entity fields in Insert(Update/Delete) MethodMappings
  • Added validation error in case of non-supported association between Unique keys

Entity Framework

  • Model First support improved
    • Added more settings in Devart SSDLToPostgreSql.tt file
    • DROP statements generation added
    • Schema name is not generated before each object
  • Added implementation for the DatabaseExists method

dotConnect for PostgreSQL 4.90 new features:

  • Supported Visual Studio 2010
  • Install Wizard improved (ability to automatically uninstall previous version added)
  • ADO.NET Data Services v1.5 CTP2 supported
  • Added possibility to avoid connecting to dbMonitor.exe when using DbMonitor ancestors
  • Changed queries for retrieving metadata to match the escape symbols rules for PostgreSQL 8.4

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Added support for XML type
  • Added support for specific dynamic expressions

Entity Developer

  • Support for ADO.NET Entity Framework 4 added
  • Added possibility of renaming associations in the model
  • Added validation error in case of non-supported association between Unique keys
  • Support for multi-result set methods added
  • Improved dialogs for editing model objects
  • Full integration with Visual Studio implemented
  • Added full support for ModificationFunctionMapping
  • Improved Find in Model functionality
  • Strongly typed reference cursors supported
  • Improved One-To-One associations handling

Entity Framework

  • Supported ADO.NET Entity Framework 4
    • Support for new Canonical aggregate and scalar functions added
    • Ability to use standard DBMS functions in LINQ queries added
    • Support for Model First (templates for DB generation) added
    • Full support for Entity Data Model Wizard/Update Wizard added
  • Added support for methods creating and deleting the database (EF v1 and EF v4)

dotConnect for PostgreSQL 4.65 new features:

  • Integration with improved dbMonitor added
  • Implemented Ping method in PgSqlConnection class
  • Added orderid column for Site Map provider for custom map node ordering
  • Added some DataSet Wizard design-time improvements
  • Changed default behaviour of DataSet generation: if index is set as an expression, this index will be ignored
LinqConnect (formerly known as LINQ to PostgreSQL)
  • Devart DbLinqDataSource component added
  • Linq performance improved
  • Supported navigation using properties (not only keys)
Entity Developer
  • New T4 like template engine with powerful editor added
  • Updated code generation
    • Ability to generate separate files for classes added
    • Entity Framework Pregenerated Views support added
    • Improved null handling code generation
  • Ability to execute LINQ and Entity SQL queries with data and native sql preview added
  • Ability to preview and edit data displayed in Database Explorer added
  • Table splitting added (emulation of deferred loading for "large" datatypes in EF)
  • OnDelete support for associations added

dotConnect for PostgreSQL 4.55 new features:

  • Visual Studio 2010 Beta supported
  • The behavior of ConnectionTimeout corrected
  • Additional SSL paremeters: SslCACert and SslKey added
  • ASP.NET Web Providers: Added requiresUniqueEmail functionality
LinqConnect (formerly known as LINQ to PostgreSQL)
  • Added support of the String.IsNullOrEmpty() method
Entity Developer
  • Advanced mapping with Entity Framework QueryView supported
  • Added dialogs for suitable storage model editing
  • Displaying of Navigation properties on diagram and project explorer implemented
  • Ability to change properties order added
  • Ability to edit Referential constraints added
  • Ability to set OnDelete action added
  • Ability to set Rows Affected parameter added
  • Added advanced search on the model
  • Added support for storing connections in the configuration files
  • Added Entity Set Pluralization Naming Rule

dotConnect for PostgreSQL 4.50 new features:

  • Added PgSqlAlerter class to handle LISTEN/NOTIFY commands
  • Supported binary mode in PgSqlLoader
  • New database object types supported in PgSqlDump
  • Added PgSqlArray class to support PostgreSQL ARRAY data type
  • Added support for SSL connections
  • Added PgSqlLargeObject class to support PostgreSQL large objects
LinqConnect (formerly known as LINQ to PostgreSQL)
  • Supported extended errors processing
  • Supported DataLoadOptions class and Include method for tuning data loading
  • Supported DeferredLoadingEnable functionality
  • Supported function import
  • Supported stored procedures as insert/update/delete behavior
  • Supported user-defined functions in selection part of a query
  • Supported CreateDatabase() and DeleteDatabase() methods
  • Supported SqlMethods class
  • Supported returning new Dictionary from query
Entity Developer 2.00
  • Supported Entity Framework
  • Supported stored procedures and functions for LINQ to SQL
  • Added naming rules for database objects
  • Added Visual Studio integration
  • Stability and performance improvements
  • Validation schema improved
  • Entity Framework Complex Type supported
  • Entity Framework Storage Model editing supported
  • Many-to-Many associations retrieving added
  • Usability improvements

dotConnect for PostgreSQL 4.00 new features:

  • PostgreSQLDirect .NET renamed to dotConnect for PostgreSQL
  • Supported LINQ to PostgreSQL
  • Added Schema Modeler for LINQ to PostgreSQL
  • Added free Express Edition with basic connectivity features
  • Supported UUID type
  • Supported REF Cursors
  • Support for .NET Framework 1.x is discontinued
  • Renamed assemblies, namespaces, and classes (for information on upgrading your projects please refer to FAQ, section Subscriptions and Upgrades)

dotConnect for PostgreSQL 3.75 new features:

  • Supported .NET Framework 3.5 Service Pack 1
  • Supported Visual Studio 2008 Service Pack 1
Entity Framework support
  • Supported inserting, updating, and deleting entities with stored procedures
  • Supported user-defined PL/pgSQL functions that return REFCURSOR
  • Supported user-defined PL/pgSQL functions that return unspecified row type
  • Supported user-defined SQL queries as functions in SSDL
  • Supported Create Function Import dialog
  • PostgreSQL type UUID is now mapped to System.Guid
  • PostgreSQL type ENUM is now mapped to System.String
  • PostgreSQL types TIME, TIME WITH TIME ZONE, and INTERVAL are now mapped to System.TimeSpan

dotConnect for PostgreSQL 3.70 new features:

  • Supported .NET Framework 3.5 Service Pack 1 Beta
  • Supported Visual Studio 2008 Service Pack 1 Beta
  • Improved support for ADO.NET Entity Framework

dotConnect for PostgreSQL 3.50 new features:

  • Added DB server-based data paging for web applications
  • PgSqlDataSource design time improvements
  • ASP.NET demo pack added
  • PgSqlSelectStatement.TryParse method added
  • DataLink.DataSource property can refer to another DataLink component

dotConnect for PostgreSQL 3.30 new features:

  • Visual Studio 2008 supported
  • Entity Framework Beta 3 supported
  • Added Licensing Information dialog

dotConnect for PostgreSQL 3.25 new features:

  • .NET Entity Framework Beta 2 supported
  • Visual Studio 2008 Beta 2 supported

dotConnect for PostgreSQL 3.20 new features:

  • Supported Visual Studio codename Orcas Beta 1
  • Supported .NET Entity Framework
  • Added support for x64 architecture
  • Enhanced command builder with generation of row refresh statements
  • Added DbCommand.GetRecordCount() method to determine rows count of a request
  • Added INullable interface for provider specific types
  • Added capability to store connection strings in application settings
  • Extended drag'n'drop capabilities in DataSet Manager
  • Add-in menu moved to Visual Studio package
  • Demo projects reorganized
  • Added CRM (Customer Relationship Management) demo project
  • Added Ping demo project for Mobile Edition

dotConnect for PostgreSQL 3.00 new features:

Application development enhancement
  • Added DataSet Manager to control dataset instances in the project
  • Added DataSet Editor for convenient datasets manipulation
  • New PgSqlDataSet class to use with PgSqlDataTable
  • New component DataLink added for flexible data binding
  • New capabilities added to PgSqlDataTable class
  • Added capability for cross-form components cooperation
  • Design time visualization extended
  • Supported addin and DataSet Wizard integration with Borland Developer Studio
.NET 2 features
  • Added PgSqlDependency class to support Database Change Notification
  • Added PgSqlDataSourceEnumerator class to support Server Enumeration feature
  • Added support for Batch Update in PgSqlDataAdapter
  • Added support for returning provider-specific types in PgSqlDataReader and PgSqlDataAdapter
Other features
  • SQL Server 2005 Business Intelligence Solutions supported
  • Added PgSqlTimeStamp class for precise date and time operations
  • Added PgSqlSelectStatement class for building SELECT statements
  • Added list of hosts in connection form and connection properties
  • Added PgSqlLoader.LoadTable method
  • Added DbLoader class that serves to load external data into database
  • Added dotConnect for PostgreSQL information to Visual Studio 2005 splash screen and About box
  • Base level classes moved to the new assembly Devart.Data.dll
  • New demo projects added

dotConnect for PostgreSQL 2.55 new features:

  • Windows Vista support added

dotConnect for PostgreSQL 2.50 new features:

  • Added Professional edition to dotConnect for PostgreSQL
  • Implemented advanced integration with Visual Studio 2005, including Server Explorer, Data Source wizard, TableAdapter configuration, Query Builder and configuring web component SqlDataSource
  • Mono support added
  • Borland Delphi 2006 support added
  • EnterpriseDB Postgre SQL Server supported
  • Provider invariant name changed
  • Added streaming support for PgSqlScript
  • Added list of Frequently Asked Questions
  • Capability to call dotConnect for PostgreSQL runtime assemblies by partially trusted code added
Professional Edition new features:
  • Enterprise Library Data Access Application Block support added
  • ASP.NET 2.0 providers added: Membership Provider, Role provider, Session State Provider, Profile provider
  • DataSet Wizard added

dotConnect for PostgreSQL 2.40 new features:

  • Supported .NET Framework 2.0 release version
  • Supported Visual Studio 2005 release version
  • Supported PostgreSQL server 8.1 release version
  • Supported Pervasive Postgres SQL server
  • Compact .NET Framework 2.0 supported
  • Added support for InputOutput parameters
  • Precision of PgSqlInterval class increased due to bigger maximal days number
  • .NET Component Licensing added

dotConnect for PostgreSQL 2.20 new features:

  • Composite types supported
  • Tested with Mono Framework

dotConnect for PostgreSQL 2.11 new features:

  • PgSqlCommandBuilder.UpdatingFields property added
  • PgSqlLoader now inherits from DbLoader

dotConnect for PostgreSQL 2.10 new features:

  • Support for Microsoft Visual Studio 2005 Beta 2 added
  • Publisher policy file added for versions compatibility
  • Performance increased
  • Output parameters support added
  • "DefaultValue" column in GetSchemaTable() result added
  • Composite types (row types) result set in stored procedures support

dotConnect for PostgreSQL 2.00 new features:

  • Support for .NET Framework 2.0 added
  • Support for Microsoft Visual Studio 2005 Beta 1
  • Support for Borland Delphi 2005
  • Support for ADO.NET 2 features added
  • Support for metadata schemas added
  • The Base-Class-Based provider model used
  • Connection pooling enhancements functionality added, that allows you to programmatically "drain" the connection pool
  • New PgSqlConnectionStringBuilder component to build connection strings to represent data sources
  • PostgreSQL 8.0 support added
  • Support for transferring data in binary format added
  • PgSqlInterval type added
  • Performance increased due to using binary format of transferring data for protocol 3.0 and optimizing data conversion for protocol 2.0

dotConnect for PostgreSQL 1.85 new features:

  • Support for multiple ExecuteReader added
  • New component PgSqlDataTable added
  • New methods for asynchronous working added
  • Support for paginal access to query result added
  • Support for command timeout added
  • Bug with connection timeout fixed

dotConnect for PostgreSQL 1.80 new features:

  • Support for Compact Framework added
  • PgSqlDataReader.HasRows property added
  • Support for connection timeout added

dotConnect for PostgreSQL 1.70 new features:

  • PostgreSQL 7.4 protocol supported
  • Full PostgreSQL 7.4 error information
  • Native PostgreSQL 7.4 parameters and unnamed parameters added
  • Unicode property added to PgSqlConnection class
  • Charset property added to PgSqlConnection class
  • AutoCommit property added to PgSqlConnection class
  • FetchAll property added to PgSqlCommand class
  • New component PgSqlScript added
  • New component PgSqlLoader added
  • New component PgSqlDump added
  • Connection pooling improved
  • C++ sample added

dotConnect for PostgreSQL 1.51 new features:

  • Support for Borland Delphi 8 added

dotConnect for PostgreSQL 1.50 new features:

  • PostgreSQL 7.4 support
  • Support for connection pooling added
  • MD5 and Crypt user authentication methods available
  • GetSchemaTable with full KeyInfo added
  • Batch execution of multiply SELECT statements enabled
  • New structures and classes for geometric and LOB types were added
  • New component PgSqlMonitor added. Allows you to monitor dynamic SQL execution in applications that use dotConnect for PostgreSQL. Extended monitoring capabilities are provided with DBMonitor application.
  • Enhanced connection editor enabled
  • Documentation integrated into Visual Studio .NET
  • XML documentation for code completion added
  • New sample applications added
  • Support for Borland C#Builder added

dotConnect for PostgreSQL 1.10 new features:

  • Performance greatly improved
  • Visual Studio .NET 2003 support added
  • Property editors for PgSqlCommandBuilder.KeyFields and PgSqlCommandBuilder.UpdatingTable added

© 2003 - 2016 Devart. All rights reserved.


Getting Started

This section introduces dotConnect for PostgreSQL. It contains the information on how to install dotConnect for PostgreSQL, quick walkthroughs to get started developing applications with it, information on technical dotConnect licensing and deployment, and brief description of its documentation and samples.

  • Installation
  • Logging onto the Server
  • Creating Database Objects
  • Inserting Data into Tables
  • Retrieving and Modifying Data
  • Licensing
  • Deployment
  • Documentation
  • Samples


Installation

dotConnect for PostgreSQL is provided as a single setup package that contains all required files and documentation. By default all files are installed in "Program Files\Devart\dotConnect\PostgreSQL" folder. The setup program also adds the necessary assemblies to the Global Assembly Cache. To install only *.dll files needed to run applications that use dotConnect for PostgreSQL, you can choose "Minimal" option in the setup program.

Some files are shared by Devart data providers. These assemblies are copied to the "\Program Files\Common Files\Devart\dotConnect\5.00\Net2\" folder. If you have several Devart data providers, make sure they use same version of the Devart.Data.dll assembly.

There are some limitations in Express Editions of Visual Studio. Particularly, the automatic toolbox components registration and Server Explorer integration are not available. You can, however, install components into toolbox manually as described below. As an exclusion, Visual Web Developer supports Server Explorer integration features.

Command Line Installation Keys

dotConnect for PostgreSQL installation package is created with Inno Setup. Its standard setup command line parameters article is available at http://www.jrsoftware.org/ishelp/topic_setupcmdline.htm.

Also there are additional installation keys:

  • /nomachineconfig - no provider factory registration in DbProviderFactories section of machine.config.
  • /verysilent and /silent - besides standard Inno Setup functionality, no FAQ page is shown after installation is finished.
  • /nofeedback - no Feedback page is opened after uninstall.
  • /nomergepackage - not install menu item and toolbox components into Visual Studio.
  • /mergehelp - merge Devart documentation to MS Help collection.

Example:

  • the minimal type installation (only run-time assemblies and registration in machine.config)
     dcpostgresql.exe /TYPE=COMPACT /VERYSILENT /NOICONS
  • uninstall
    \Program Files\Devart\dotConnect\PostgreSQL\Uninstall\unins000.exe /VERYSILENT /NOFEEDBACK
The following table contains the list of components, that can be used with the /COMPONENTS key.
Component name | Parameter
Visual Studio integration * | VsIntegration
Support for ADO.NET Entity Framework | Entity
LINQ | LinqRuntime
Entity Developer | ModelerTool
ASP.NET Web Providers | WebProviders
SQL Server Business Intelligence Solutions | SSIS
Enterprise Library Data Access Block | EntLib
Samples | Samples
Help files | HelpFiles

* The VsIntegration parameter integrates the provider to all the installed Visual Studio versions, which are supported by dotConnect for PostgreSQL. To install it only to Visual Studio 2010, for example, use "VsIntegration\VS2010" parameter.

Microsoft Visual Studio

dotConnect for PostgreSQL components are automatically registered in Toolbox when you start the Visual Studio first time after successful installation of dotConnect for PostgreSQL. If automatic registration fails, do the following steps to install the components manually:

  • In Visual Studio open the Toolbox window;
  • Add a 'PostgreSQL Data' tab by right-clicking the Toolbox window and then clicking Add Tab;
  • Right-click the added tab and then click Choose Items...;
  • In the opened Choose Toolbox Items dialog box switch to the .NET Framework Components tab;;
  • Select the components the Namespace column of which starts with "Devart";
  • Click OK.

Since now dotConnect for PostgreSQL components are available from toolbox.

CodeGear Delphi 2007

Because of the IDE restrictions design time is not available.


Logging Onto The Server Tutorial

Language

Visual Basic

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Logging Onto The Server

This tutorial describes how to connect to PostgreSQL server.

In this tutorial:

  • Requirements
  • General Information
  • Creating PgSqlConnection
  • Opening Connection
  • Closing Connection
  • Modifying Connection
  • Additional Information

Requirements

In order to connect to PostgreSQL server you need the server itself running, dotConnect for PostgreSQL installed and IDE running. You have to know host name or IP address of the host where the PostgreSQL server is located, port, login and password.

Note that if you do not use design-time (specifically, if you do not place the PgSqlConnection component from the toolbox on a form designer), you have to embed licensing information manually. This is described in the Licensing topic.

General Information

To establish a connection to server you have to provide some connection parameters to dotConnect for PostgreSQL. This information is used by the PgSqlConnection component to find the server and login with credentials of your account. The parameters are represented as connection string. You can compose the connection string manually or have dotConnect for PostgreSQL construct it for you.

Creating PgSqlConnection

Design-time creation

The following assumes that you have IDE running, and you are currently focused on a form designer.

  1. Open Toolbox and find PgSqlConnection component in dotConnect for PostgreSQL Data tab.

  2. Double-click the component. Note that new object appears on the designer underneath the form. If this is first time you create PgSqlConnection in this application, it is named pgSqlConnection1.

  3. Click on the pgSqlConnection1 object and press F4 to focus on object's properties.

  4. In the Host property provide host name or IP address of the host where the PostgreSQL server is located.

  5. In the Port property specify the port that the server listens to (usually this is 5432).

  6. In the UserId property specify your login. For example, postgres.

  7. In the Password property specify your password. For example, postgres.

  8. Note that as you assign values to these properties the ConnectionString property is automatically updated to reflect your settings. Now it contains something like User Id=postgres;Password=postgres;Host=db;.

Run-time creation

Same operations performed in runtime look as follows (note that you have to add references to Devart.Data.PostgreSql.dll and Devart.Data.dll assemblies):

[C#]

using Devart.Data.PostgreSql;
...
PgSqlConnection pgSqlConnection1 = new PgSqlConnection();
pgSqlConnection1.Host = "db";
pgSqlConnection1.Port = 5432;
pgSqlConnection1.UserId = "postgres";
pgSqlConnection1.Password = "postgres";

[Visual Basic]

Imports Devart.Data.PostgreSql
...
Dim pgSqlConnection1 As PgSqlConnection = New PgSqlConnection()
pgSqlConnection1.Host = "db"
pgSqlConnection1.Port = 5432
pgSqlConnection1.UserId = "postgres"
pgSqlConnection1.Password = "postgres"

You can do this all in single assignment. It actually does not matter whether connection string is assigned directly or composed with particular properties. After you assign a value to ConnectionString property all other properties are populated with parsed values. So you can choose what is more convenient for you.

[C#]

pgSqlConnection1.ConnectionString = "User Id=postgres;Password=postgres;Host=db;";

[Visual Basic]

pgSqlConnection1.ConnectionString = "User Id=postgres;Password=postgres;Host=db;"

Using connection string builder

If you decide to setup a connection by assigning values to several properties, consider using the PgSqlConnectionStringBuilder class. It has all of the possible connection settings exposed as properties, thus allowing you to customize the connection at full extent. The following example demonstrates how to compose a more complex connection string:

[C#]

PgSqlConnectionStringBuilder pgCSB = new PgSqlConnectionStringBuilder();
pgCSB.Host = "192.168.0.1";
pgCSB.Port = 5432;
pgCSB.UserId = "postgres";
pgCSB.Password = "postgres";
pgCSB.MaxPoolSize = 150;
pgCSB.ConnectionTimeout = 30;
PgSqlConnection myConnection = new PgSqlConnection(pgCSB.ConnectionString);

[Visual Basic]

Dim pgCSB As PgSqlConnectionStringBuilder = New PgSqlConnectionStringBuilder
pgCSB.Host = "192.168.0.1"
pgCSB.Port = 5432
pgCSB.UserId = "postgres"
pgCSB.Password = "postgres"
pgCSB.MaxPoolSize = 150
pgCSB.ConnectionTimeout = 30
Dim myConnection As PgSqlConnection = New PgSqlConnection(pgCSB.ConnectionString)

Note that in this example we used PgSqlConnection constructor that accepts connection string as argument.

For the information on arguments allowed in the connection string, refer to the description of the PgSqlConnection.ConnectionString property.

Opening Connection

Opening a connection is as simple as that:

[C#]

pgSqlConnection1.Open();

[Visual Basic]

pgSqlConnection1.Open()

Of course, pgSqlConnection1 must have a valid connection string assigned earlier. When you call Open, dotConnect for PostgreSQL tries to find the host and connect to server. If any problem occurs it raises an exception with brief explanation on what is wrong. If no problem is encountered dotConnect for PostgreSQL tries to establish the connection during ConnectionTimeout interval. Finally, when connection is established, the Open method returns and State property is changed to Open.

In design-time you can connect to server in few steps:

  1. Right-click on pgSqlConnection1 object in designer.

  2. Select Connect from the popup menu.

  3. In the dialog window provide necessary logon information.

  4. Click the Connect button to establish connection.

Or you can simply change the State property to Open in the Properties window to establish connection using the current connection string.

Closing Connection

To close a connection call its Close method, or set its State property to Closed.

The following example summarizes aforementioned information and shows how to create, setup, open, use and then close the connection.

[C#]

PgSqlConnection myConn = new PgSqlConnection();
myConn.ConnectionString = "User Id=postgres;Password=postgres;Host=db;Port=5432;";
myConn.Open();
MessageBox.Show(myConn.ServerVersion);
myConn.Close();

[Visual Basic]

Dim myConn As PgSqlConnection = New PgSqlConnection()
myConn.ConnectionString = "User Id=postgres;Password=postgres;Host=db;Port=5432;"
myConn.Open()
MessageBox.Show(myConn.ServerVersion)
myConn.Close()

The sample code connects to a server, shows its version and then closes the connection. This actually is rare usage, because in real applications connections are used by other objects like PgSqlCommand, PgSqlDataTable and others. For more information on this, please see the corresponding tutorials or the reference information.

Modifying Connection

You can modify connection by changing properties of PgSqlConnection object. Keep in mind that while some of the properties can be altered freely, most of them close connection when new value is assigned. For example, if you change Host property, it gets closed immediately, and you have to reopen it manually.

Additional Information

dotConnect for PostgreSQL has wide set of features you can take advantage of. The following list enumerates some of them so you can explore the advanced techniques to achieve better performance, balance network load or enable additional capabilities.

  • Asynchronous connection opening
  • Connection pooling (refer to MSDN documentation for information about connection pooling)

See Also

Getting Started | PgSqlConnection Class


Creating Database Objects Tutorial

dotConnect for PostgreSQL support@devart.com

Creating Database Objects

This tutorial describes how to create tables, stored procedures and other objects at PostgreSQL server.

In this tutorial:

  • Requirements
  • General Information
  • Using psql
  • Additional Information

Requirements

In order to create database objects you have to connect to server. This process is described in details in the tutorial Logging onto the server.

General Information

Database objects are created using Data Definition Language (DDL), which is a part of SQL. The DDL statements can be executed on server by account that has necessary privileges.

There are two ways to manipulate a database. You can build DDL statements manually and run them within the psql terminal or component like PgSqlCommand. Another way is to use pgAdmin III - visual shells that provide graphical user interface to manage database. We will discuss the first way. As for pgAdmin III documentation, please refer to http://www.pgadmin.org/docs/.

Using psql

  1. Launch the psql terminal and authorize yourself.

  2. Type:

    CREATE TABLE dept (
  deptno INT PRIMARY KEY,
  dname VARCHAR(14),
  loc VARCHAR(13)
);

    Press ENTER. This will create first of the tables we'll use for tutorial purposes.

  3. Run the following query:

    CREATE TABLE emp (
  empno INT PRIMARY KEY,
  ename VARCHAR(10),
  job VARCHAR(9),
  mgr INT,
  hiredate DATE,
  sal FLOAT,
  comm FLOAT,
  deptno INT REFERENCES dept
);

    This is another table we'll use.

  4. These two tables are enough to demonstrate basic functionality. Now you can type \q to exit the psql terminal.

Additional Information

Actually there are lots of ways to create tables on server. Any tool or component that is capable of running a SQL query, can be used to manage database objects. For example, PgSqlCommand suits fine for creating objects one by one, while PgSqlScript is designed for executing series of DDL/DML statements. For information on DDL statements syntax refer to PostgreSQL documentation.

See Also

Getting Started | PgSqlCommand Class | PgSqlScript Class


Inserting Data Into Tables Tutorial

Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Inserting Data Into Tables

This tutorial describes how to use PgSqlCommand component to insert data into tables by means of executing SQL queries.

In this tutorial:

  • Requirements
  • General Information
  • Inserting Data in Run-time
  • Inserting Data in Design-time
  • Additional Information

Requirements

This walkthrough supposes that you know how to connect to server (tutorial Logging onto the server) and that necessary objects are already created on the server (tutorial Creating database objects).

Note that if you do not use design-time (specifically, if you do not place on a form designer PgSqlConnection component from toolbox), you have to embed licensing information manually. This is described in the Licensing topic.

Inserting data in run-time

Data on server can be modified (inserted, changed or deleted) using Data Manipulation Language (DML), which is a part of SQL. The DML statements can be executed on server by account that has necessary privileges.

There are two ways to manipulate a database. You can build DML statements manually and run them within some component like PgSqlCommand. Another way is to use design-time features that provide graphical user interface to manage database. We will discuss both ways.

The goal of this tutorial is to insert the following data into tables dept and emp:

Table dept

DeptNo | DName | Loc
10 | Accounting | New York
20 | Sales | Dallas
30 | Sales2 | Chicago

Table emp

EmpNo | EName | Job | Mgr | HireDate | Sal | Comm | DeptNo
7839 | King | President | Null | 1981-11-17 | 5000 | Null | 10
7698 | Blake | Manager | 7839 | 1981-05-01 | 2850 | Null | 30
7566 | Jones | Manager | 7839 | 1981-04-02 | 2975 | Null | 20
7499 | Allen | Salesman | 7698 | 1981-02-20 | 1600 | 300 | 30
7369 | Smith | Clerk | 7566 | 1980-12-17 | 800 | Null | 20
7521 | Ward | Salesman | 7698 | 1981-02-22 | 1250 | 500 | 30
7654 | Martin | Salesman | 7698 | 1981-09-28 | 1250 | 1400 | 30

Inserting Data in Run-time

To insert the first row into table dept you can use the following statement:

INSERT INTO public.dept(deptno,dname,loc) VALUES (10,'Accounting','New York')

The following code fragment executes the query:

[C#]

PgSqlConnection conn = new PgSqlConnection("User Id=postgres;Password=postgres;host=localhost;database=postgres;");
PgSqlCommand cmd = new PgSqlCommand();
cmd.CommandText = "INSERT INTO public.dept (deptno, dname, loc) VALUES (10,'Accounting','New York')";
cmd.Connection = conn;
conn.Open();
try {
  int aff = cmd.ExecuteNonQuery();
  MessageBox.Show(aff + " rows were affected.");
}
catch {
  MessageBox.Show("Error encountered during INSERT operation.");
}
finally {
  conn.Close();
}

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection("User Id=postgres;Password=postgres;host=localhost;database=postgres;")
Dim cmd As PgSqlCommand = New PgSqlCommand()
cmd.CommandText = "INSERT INTO public.dept (deptno, dname, loc) VALUES (10,'Accounting','New York')"
cmd.Connection = conn
conn.Open()
Try
  Dim aff As Integer = cmd.ExecuteNonQuery()
  MessageBox.Show(aff & " rows were affected.")
Catch
  MessageBox.Show("Error encountered during INSERT operation.")
Finally
  conn.Close()
End Try

The sample first creates a connection with hardcoded connection string. Then it creates PgSqlCommand object, assigns the query text and connection to the PgSqlCommand instance. Connection is opened then. The ExecuteNonQuery() method of PgSqlCommand runs SQL statement in the CommandText property and returns number of rows affected by the query. This method is not intended to run SELECT statements. We will discuss retrieving data in other tutorials.

If the query is executed successfully you are notified about number of affected rows. If some error occurs you get the error message. The connection is closed anyway. It is recommended that you use try ... finally clauses to make sure the connections are closed properly.

Inserting Data in Design-time

Same operations in design time include following steps:

  1. Place PgSqlConnection component on a form designer.

  2. Setup its properties and open connection by changing the State property to Open
    - or -
    right-click on the component, choose Connect from the popup menu and use the dialog to connect to server.

    While setting the connection properties, set its Protocol property to Ver20 to use PgSqlCommand for executing more than one statement at once. Otherwise, you may need to execute each statement separately.

  3. Place PgSqlCommand component on the designer.

  4. Select name of the PgSqlConnection instance in its Connection property.

  5. Select true in its UnpreparedExecute property (that allows you to execute several statements at once with one PgSqlCommand).

  6. In the CommandText property type in the following query:

    INSERT INTO public.dept(deptno,dname,loc) VALUES (20,'Sales','Dallas');
INSERT INTO public.dept(deptno,dname,loc) VALUES (30,'Sales2','Chicago');

  7. Right-click on the PgSqlCommand and choose Execute from popup menu.

Note that the last two steps might be easier to do in the PgSqlCommand editor. To invoke it right-click the component and choose CommandText from the PgSqlCommand popup menu.

Additional Information

Actually there are lots of ways to insert data into tables. Any tool or component that is capable of running a SQL query, can be used to manage data. Some components are best for performing certain tasks. For example, PgSqlLoader is the fastest way to insert data, PgSqlScript is designed for executing series of statements. For more information on these components refer to dotConnect for PostgreSQL reference.

See Also

Getting Started | PgSqlCommand Class | PgSqlScript Class | PgSqlLoader Class


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Retrieving and Modifying Data

  • Introduction
  • Requirements
  • General Information
  • Retrieving and Updating Data using Connected Model
  • Retrieving and Updating Data using Disconnected Model
  • Additional Information

Introduction

This tutorial describes how to use PgSqlCommand, PgSqlDataReader, and PgSqlDataTable components.

Requirements

This walkthrough supposes that you know how to connect to server, how to create the necessary objects on the server, and how to insert the data to the created tables.

Note that if you do not use design-time (specifically, if you do not place on a designer PgSqlConnection component from toolbox), you have to embed license information manually. This is described in the Licensing topic.

General Information

As we know, an original function of any database application is establishing a connection to a data source and working with data contained in it. The .NET Framework data providers of ADO.NET serve as a bridge between an application and a data source, and allow you to execute commands as well as to retrieve data by using a DataReader or a DataAdapter. Updating data involves using the Command and DataAdapter objects; and it may also involve using transactions.

Let's make some classification to get better understanding of ADO.NET model. There are two approaches to work with data: connected and disconnected models. You can use classes of the connected model for establishing connection and setting transactions, for fetching data and updating datasources. These classes interoperate with database directly: PgSqlProviderFactory, PgSqlConnection, PgSqlTransaction, PgSqlDataAdapter, PgSqlCommand, PgSqlParameter, and PgSqlDataReader.

The objects, which represent the disconnected model of ADO.NET, don't interoperate with datasource immediately. These classes provide the ability to work off-line against your data storage: DataSet, DataTable, DataColumn, DataRow, Constraints, DataRelation, DataView, and DataRowView.

We will use in our samples the classes from both models.

The goal of this tutorial is to retrieve and update the data from the table dept (the appropriate DDL/DML script is located at \Program Files\Devart\dotConnect\PostgreSQL\Samples\tables.sql - the default path of dotConnect for PostgreSQL installation).

Retrieving and Updating Data using the Connected Model

In this sample we are using PgSqlCommand and PgSqlDataReader to retrieve and manipulate data. For more information, refer to the description of these classes in our documentation.

[C#]

using Devart.Data.PostgreSql;
...
class Program
{
    void PrintDept(PgSqlConnection connection)
    {
        PgSqlCommand command = connection.CreateCommand();
        command.CommandText = "select * from dept";

        // Call the Close method when you are finished using the PgSqlDataReader
        // to use the associated PgSqlConnection for any other purpose.
        // Or put the reader in the using block to call Close implicitly.
        using (PgSqlDataReader reader = command.ExecuteReader())
        {
            // printing the column names
            for (int i = 0; i < reader.FieldCount; i++)
                Console.Write(reader.GetName(i).ToString() + "\t");
            Console.Write(Environment.NewLine);
            // Always call Read before accesing data
            while (reader.Read())
            {
                // printing the table content
                for (int i = 0; i < reader.FieldCount; i++)
                    Console.Write(reader.GetValue(i).ToString() + "\t");
                Console.Write(Environment.NewLine);
            }
        }
    }

    void ModifyDept(PgSqlConnection connection)
    {
        PgSqlCommand command = connection.CreateCommand();
        command.CommandText = "UPDATE DEPT SET LOC='VEGAS' WHERE DEPTNO > 20";

        // return value of ExecuteNonQuery (i) is the number of rows affected by the command
        int i = command.ExecuteNonQuery();
        Console.WriteLine(Environment.NewLine + "Rows in DEPT updated: {0}", i + Environment.NewLine);
    }

    static void Main(string[] args)
    {
        using (PgSqlConnection conn
            = new PgSqlConnection("host=server;database=test;user id=postgres;"))
        {
            try
            {
                conn.Open();
                Program program = new Program();

                // printing out the Dept table to console
                program.PrintDept(conn);

                // updating records in Dept
                program.ModifyDept(conn);

                // printing out the Dept table to console
                program.PrintDept(conn);
            }
            catch (PgSqlException ex)
            {
                Console.WriteLine("Exception occurs: {0}", ex.Message);
            }
            finally
            {
                Console.ReadLine();
            }
        }
    }
}

[Visual Basic]

Imports Devart.Data.PostgreSql
...
Module Module1
    Sub PrintDept(ByVal connection As PgSqlConnection)
        Dim command As PgSqlCommand = connection.CreateCommand()
        command.CommandText = "select * from dept"

        ' Call the Close method when you are finished using the PgSqlDataReader
        ' to use the associated PgSqlConnection for any other purpose.
        ' Or put the reader in the using block to call Close implicitly.
        Using reader As PgSqlDataReader = command.ExecuteReader()
            ' printing the column names
            For i As Integer = 0 To reader.FieldCount - 1
                Console.Write(reader.GetName(i).ToString() & VbCrlf)
            Next i
            Console.Write(Environment.NewLine)

            ' Always call Read before accesing data
            While reader.Read()
                ' printing the table content
                For i As Integer = 0 To reader.FieldCount - 1
                    Console.Write(reader.GetValue(i).ToString() & VbCrlf)
                Next
                Console.Write(Environment.NewLine)
            End While
        End Using
    End Sub

    Sub ModifyDept(ByVal connection As PgSqlConnection)
        Dim command As PgSqlCommand = connection.CreateCommand()
        command.CommandText = "UPDATE DEPT SET LOC='VEGAS' WHERE DEPTNO > 20"

        ' return value of ExecuteNonQuery (i) is the number of rows affected by the command
        Dim i As Integer = command.ExecuteNonQuery()
        Console.WriteLine(Environment.NewLine & "Rows in DEPT updated: {0}", i & Environment.NewLine)
    End Sub

    Sub Main()
        Using conn _
            As New PgSqlConnection("host=server;database=test;user id=postgres;")
            Try
                conn.Open()

                ' printing out the Dept table to console
                Module1.PrintDept(conn)

                ' updating records in Dept
                Module1.ModifyDept(conn)

                ' printing out the Dept table to console
                Module1.PrintDept(conn)
            Catch ex As PgSqlException
                Console.WriteLine("Exception occurs: {0}", ex.Message)
            Finally
                Console.ReadLine()
            End Try
        End Using
    End Sub
End Module

Retrieving and Updating Data using the Disconnected Model

A traditional way for working with DataTable and DataSet assumes consecutive creating and initializing Connection, Command, DataAdapter, and CommandBuilder objects. Devart PgSqlDataTable and PgSqlDataSet have advanced features that make work with data easier. Even more, with our components you can retrieve and manipulate data in design time. For more information, refer to the descriptions of these classes.

Here is a small sample that demonstrates usage of PgSqlDataTable.

[C#]

public void UseDataTable()
{
   PgSqlDataTable myDataTable
    = new PgSqlDataTable("SELECT * FROM Dept", "host=server;database=test;user id=postgres;");
   try
   {
       // FetchAll=true means to retrieve data from server entirely when DataTable is opened.
       //  By default, FetchAll is set to false - only minimal quantity of rows is requested at once,
       //  which leads to better initial response time and less network traffic.
       myDataTable.FetchAll = true;

       // populating DataTable with data from data source
       myDataTable.Active = true;

       // modifying the third record
       myDataTable.Rows[3]["DName"] = "Researches";

       // Update method executes the appropriate commands (delete, insert, or update) in the data source.
       Console.WriteLine(myDataTable.Update() + " rows updated.");

       // printing the DataTable content
       foreach (DataRow myRow in myDataTable.Rows)
       {
          foreach (DataColumn myCol in myDataTable.Columns)
          {
              Console.Write(myRow[myCol] + "\t");
          }
          Console.WriteLine();
       }
     }
     finally
     {
        //Active=false does not clear the data, but frees the resources allocated on the server, if any.
        myDataTable.Active = false;
     }
}

[Visual Basic]

Public Sub UseDataTable()
    Dim myDataTable As PgSqlDataTable _
        As New PgSqlDataTable("SELECT * FROM Dept", "host=server;database=test;user id=postgres;")
    Try
        ' FetchAll=true means to retrieve data from server entirely when DataTable is opened.
        '  By default, FetchAll is set to false - only minimal quantity of rows is requested at once,
        '  which leads to better initial response time and less network traffic.
        myDataTable.FetchAll = True

        ' populating DataTable with data from data source
        myDataTable.Active = True

        ' modifying the third record
        myDataTable.Rows(3)("DName") = "Researches"

        ' Update method executes the appropriate commands (delete, insert, or update) in the data source.
        Console.WriteLine(myDataTable.Update() & " rows updated.")
        Dim myRow As DataRow
        Dim myCol As DataColumn

        ' printing the DataTable content
        For Each myRow In myDataTable.Rows
            For Each myCol In myDataTable.Columns
                Console.Write(myRow(myCol) & VbCrlf)
            Next myCol
            Console.WriteLine()
        Next myRow
    Finally
        ' Active=false does not clear the data, but frees the resources allocated on the server, if any.
        myDataTable.Active = False
    End Try
End Sub

PgSqlDataSet can be easily created with Devart DataSet Wizard and visually managed with Devart DataSet Manager. Please refer to our Using DataSet Wizard and Using DataSet Manager articles.

Additional Information

This tutorial describes only basic ways of working with data. Besides, you can take advantage of using stored procedures, typed datasets and ORM solutions. dotConnect for PostgreSQL supports the LinqConnect and Entity Framework ORM technologies which are intended for converting data between incompatible type systems in relational databases and object-oriented programming languages. These technologies allow you to decrease the amount of code and maintenance required for data-oriented applications. For more information, please refer to Entity Framework and LinqConnect sections.

See Also

Using DataSet Wizard | Using DataSet Manager | PgSqlDataTable Advanced Features | ORM Solutions


Licensing

This topic provides technical details on embedding license information into your applications. This is a special resource that must be present in every application that uses dotConnect for PostgreSQL.

Note License information discussed in this topic is not same thing as license for using dotConnect for PostgreSQL. License purchased on our site allows you, your team, or your company to use dotConnect for PostgreSQL. For information on how to purchase license for using dotConnect for PostgreSQL please refer to topic Ordering.

The article consists of following sections:

  • General Information
  • Adding License Automatically
  • Adding License Manually
  • Class Libraries Support
  • Licensing ASP.NET Applications
  • Licensing Compact Framework Projects
  • DbProviderFactory Notes
  • Compiling License Manually
  • Licensing Mono Projects
  • Troubleshooting

General Information

dotConnect for PostgreSQL uses .NET component licensing. To build an application dotConnect for PostgreSQL requires valid license. If no license is available, dotConnect for PostgreSQL does not work.

License information is a specially formed embedded resource. Usually you do not have to care about embedding license in your application. When you install dotConnect for PostgreSQL, the system is configured so that licensing is done transparently. End-users of your software do not require any additional license.

dotConnect for PostgreSQL includes License Wizard that helps you configure license information. The wizard analyzes the current project, informs you about problems found, and performs some actions needed to fix the problems.

License Information dialog box

To invoke the wizard choose PostgreSQL | License Information from the Visual Studio Tools menu. Then click the Fix buttons in the dialog and follow the wizard's instructions. In most cases this is enough to configure .NET component licensing.

The following table helps get started quickly with dotConnect for PostgreSQL licensing. Find your type of application and follow links to corresponding sections of the article.

Diagram | Explanation
licensing scheme - direct | This is general case of licensed .NET Framework application. Whatever the type of application you develop, read carefully sections Adding License Automatically and Adding License Manually.
licensing scheme - class libraries | These two diagrams show how you can use dotConnect for PostgreSQL through a class library. In addition to Adding License Automatically and Adding License Manually please read section Class Libraries Support.
licensing scheme - class libraries with license
licensing scheme - ASP.NET direct | These are two modes of accessing dotConnect for PostgreSQL within ASP.NET application. In addition to Adding License Automatically and Adding License Manually please read section Licensing ASP.NET Applications.
licensing scheme - ASP.NET with separate file
licensing scheme - provider installed | Some applications that have no licensing information embedded, and use DbProviderFactory to operate dotConnect for PostgreSQL, require the product installed on the computer. Refer to section DbProviderFactory Notes for more information.

Adding License Automatically

License is automatically added to project when you drop a PgSqlConnection component from Toolbox onto a form designer.

Under .NET Compact Framework, in the moment of compilation license information is automatically added if the dotConnect for PostgreSQL addin for Visual Studio is running.

Adding License Manually

In some cases you have to manually add license. It is necessary for console applications, class libraries, and existing projects initially built with dotConnect for PostgreSQL version that did not use component licensing, that is, 2.40 and older. In this case perform the following steps:

  • Create a file named licenses.licx, if this file does not exist yet.
  • Open the file with a text editor and place this line inside:
    Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql
  • Save the file and add it to your project.
  • Make sure it is embedded as a resource.

If IDE fails to compile the license automatically, you can do it yourself as described in section Compiling License Manually.

Class Libraries Support

In case where it is impossible to put the license information straight to executable file, dotConnect for PostgreSQL allows you to create class libraries that can be used with certain executable files. To do this perform the following steps:

  1. Create and setup file named licenses.licx as described above.
  2. Create a text file named licenses.config and place it next to licenses.licx.
  3. In this file enumerate names of executable files that will work with the library, every file name on separate line, for example:

    MyApplication.exe
    MyAnotherApp.exe
    ExtraTool.exe

You do not have to add the file licenses.config to project.

Licensing a library without specifying the executables that will use it is possible by agreement with Devart. For details on this, please mail to support@devart.com or sales@devart.com.

Licensing Web Projects

There are two types of web projects depending on the type of licensing.

  1. First, Web Application Project (Web Forms, MVC, Web API, etc.) are compiled entirely, so that web server does not perform any compilation on demand. In this case licensing web applications is same as licensing common Class Library applications.
  2. Second, there are Web Site Projects, when source files are uploaded to server, where they are compiled on user request. In this case you should deploy a special assembly App_Licenses.dll to the Bin directory of your site for the Web Site projects. To create this assembly, right-click the licenses.licx file in the Solution Explorer view and then click Build Runtime Licenses. The required assembly will be created automatically. Note that the corresponding shortcut menu command is available when the licenses.licx file is located in the root folder of the site.

Licensing Compact Framework Projects

For .NET Compact Framework the Visual Studio add-in automatically embeds all required information into every assembly that uses Devart.Data.PostgreSql.dll library. Class libraries are supported automatically.

If the license fails to be added to a project, you can add and compile it manually. Note that there is no license compiler from Microsoft for .NET Compact Framework. You can request the compiler from Devart support team.

There is a known problem with the .NET Compact Framework. A "License not found" exception can be thrown by PgSqlDataAdapter.Fill method in case when PgSqlConnection had never been opened. To avoid the problem just open (or open and close) any connection before calling the PgSqlDataAdapter.Fill method.

DbProviderFactory Notes

Applications that call dotConnect for PostgreSQL through DbProviderFactory require registration in DbProviderFactory. This registration can be performed either by launching installer of dotConnect for PostgreSQL with the Minimal install type (the licenses.licx file is not required in this case), or manually as it is described in the Deployment topic. DbProviderFactory support allows using dotConnect for PostgreSQL in SQL Server 2008/2012 Business Intelligence Solutions.

Compiling License Manually

The license resource cannot be compiled automatically when your project does not have reference to Devart.Data.PostgreSql.dll or dotConnect for PostgreSQL is not installed on your build server. This section describes how to compile the required resource manually.

Generate licensing resource file using following command line:
"%Compiler Path%\lc.exe" /target:MyApplication.exe /complist:licenses.licx /i:"%Assembly Path%\Devart.Data.PostgreSql.dll"
Where

  • %Compiler Path% is a path to appropriate lc.exe file (for example, C:\Program Files\Microsoft.NET\SDK\v2.0\Bin);
  • MyApplication.exe is name of your target executable file;
  • licenses.licx is a text file described earlier in this topic;
  • %Assembly Path% is location of Devart.Data.PostgreSql.dll assembly
Substitute these arguments with actual values. If the license compiler fails with an error, try adding full assembly specification to licenses.licx file, for example:
Devart.Data.PostgreSql.PgSqlConnection, Devart.Data.PostgreSql, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701

License compiler will generate 'MyApplication.exe.licenses' resource file. You should add this file to your project as an embedded resource. Note that you should not add licenses.licx to the project because the *.licenses file already includes all the necessary license information.

If the default namespace of your project is not an empty string, it must be the same as the target assembly name (in this case - 'MyApplication'). IDE adds the default namespace to the resource name when building application, so you have to rename 'MyApplication.exe.licenses' to 'exe.licenses' before adding it to project. If the default namespace of your project is not set (is an empty string) you do not have to rename the resource file before adding it to project.

You can also generate the license resource manually for the class library assembly (*.dll) in the same way. Just place licenses.config in the folder with your licenses.licx (and change /target:MyApplication.exe to /target:YourClassLibraryName.dll).

Licensing Mono Projects

Since automatic license generation and embedding is not possible with Mono you have to add and compile license manually as described above.

Troubleshooting

When something's wrong with license information you get one of the following exceptions on connecting to server:

Exception text Possible reasons and what to do

License not found...

This generally indicates that license information could not be found, or you try to apply it in some way that does not suit the kind of application. For example:

  • File licenses.licx, required for dotConnect for PostgreSQL to function properly, could not be found.
  • File licenses.licx is not added as embedded resource.
  • File App_Licenses.dll not found in ASP.NET 2.0 applications.

To fix the problem determine type of your application and read corresponding section in this topic.

This exception can be thrown by PgSqlDataAdapter.Fill method, in case when PgSqlConnection had never been opened. To avoid the problem just open (or open and close) any connection before calling the PgSqlDataAdapter.Fill method.

License not valid...

This means that license information was found but it is incorrect. It usually happens in the following cases:

  1. The project was earlier compiled with old or trial version of dotConnect for PostgreSQL.
  2. File licenses.config used by a class library does not refer to launched executable.
  3. The App_Licenses.dll belongs to other application or needs to be recompiled.
  4. Something's wrong with the operating system or installation of dotConnect for PostgreSQL.
  5. You are building your project on a computer with no dotConnect for PostgreSQL installed (for example, it is not installed on your build server), and the compiled license resource is not added to the project.

If you encounter one of these problems, do the following (the numbers of actions correspond to the numbers of the problems in the above list):

  1. Delete all files from the bin and obj folders and rebuild the project.
  2. Specify the executable in the licenses.config file.
  3. Rebuild App_Licenses.dll for the current application.
  4. Perform the following steps:
    1. uninstall dotConnect for PostgreSQL;
    2. remove all Devart.* and policy.*.Devart.* files from the GAC;
    3. clear the Program Files\Devart\dotConnect and Program Files\Common Files\Devart\dotConnect folders;
    4. re-install dotConnect for PostgreSQL.
  5. There are two ways to solve the problem:
    1. Install dotConnect for PostgreSQL on the computer where you build your project.
    2. Compile the license resource (*.licx file) on a computer, where dotConnect for PostgreSQL is installed, and then add the result file (*.licenses) to your project as an embedded resource. After this you can build your project on a computer with no dotConnect for PostgreSQL installed.

If this does not help, send a small compiled binary with sources to our support address, so we can investigate the problem in more details.

Sorry, your trial period has expired...

This exception indicates that you used trial version of dotConnect for PostgreSQL, and the 30 days trial period is expired. To continue using dotConnect for PostgreSQL register it or uninstall from your machine.

You can also see this message if the application was compiled with registered version of dotConnect for PostgreSQL, but deployed with trial assembly Devart.Data.PostgreSql.dll. If this is the case, replace old files with latest assemblies.


Deployment

To deploy applications written with dotConnect for PostgreSQL you should register run-time assemblies Devart.Data.PostgreSql.dll and Devart.Data.dll at Global Assembly Cache (GAC) for appropriate framework or place them in the folder of your application (Bin folder for web projects). These two assemblies should be available in all applications written with dotConnect for PostgreSQL. Make sure that your project contains the license resource as it is described in Licensing.

Another way to install the needed *.dll is to launch the dotConnect for PostgreSQL setup program and choose "Minimal installation". Note that according to End-User License Agreement this is the only install you can do on target machine. You must not distribute any other part of dotConnect for PostgreSQL.

Applications written with dotConnect for PostgreSQL may not contain the license resource when they are deployed on the target machine where dotConnect for PostgreSQL is installed with "Minimal" option.

ASP.NET Applications

When deploying ASP.NET applications , the following additional assemblies may be needed:

  • Devart.Data.PostgreSql.Web.dll - in case if the PgSqlDataSource component or ASP.NET providers are used;
  • App_Licenses.dll - if the application is a non-precompiled web site.

When your code uses dotConnect for PostgreSQL via a factory-based class, you should register configuration information in the DbProviderFactories section of the *.config file to inform your environment about the existence of the provider factory. The provider factory is described either in machine.config (globally), in app.config or in web.config (just for your application), but not in both files. This is done as follows:

<system.data>
  <DbProviderFactories>
    <remove invariant="Devart.Data.PostgreSql" />
    <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql" description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>

Replace 7.1.26.0 here with your actual version.

When deploying ASP.NET applications using dotConnect for PostgreSQL SimpleMembership providers, you need to deploy the Devart.Data.PostgreSql.Web.dll assembly for .NET Framework 4, not the one for .NET Framework 2.0. It is located in the Web\ASP.NET 4 subdirectory of the dotConnect for PostgreSQL installation directory (by default, from Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET 4) and has the revision number 4 in its version.

When deploying ASP.NET applications using ADO.NET implementation of ASP.NET Identity via dotConnect for PostgreSQL, you need to deploy the Devart.Data.PostgreSql.Web.Identity.dll assembly.

When deploying ASP.NET applications using Entity Framework implementation of ASP.NET Identity via dotConnect for PostgreSQL, you need to deploy the Devart.Data.PostgreSql.Entity.EF6.dll assembly. It is located in the Entity\EF6 subfolder of the dotConnect for PostgreSQL installation folder.

Required Permissions

When dotConnect for PostgreSQL application is used in partially trusted code (this is actual for web projects), it requires medium trust plus SocketPermission.

Since dotConnect for PostgreSQL uses standard Microsoft .NET licensing licensing, it additionally requires RegistryPermission. And though SecurityPermission is granted by default when using medium trust level, the set of flags for the SecurityPermission must be extended. You need to add the following flags: Assertion, SkipVerification, UnmanagedCode, and SerializationFormatter.

For the information on how to do this see Configuring Trust Level for Web Applications.

Entity Framework and LightSwitch Projects

When deploying Entity Framework (or LightSwitch) projects, it is necessary to:

  1. First, you need to check if the Devart.Data.PostgreSql.Entity.EF<Version>.dll assembly is available for your application. The <Version> here is the version of Entity Framework used in your application. For Entity Framework v1 the assembly is called Devart.Data.PostgreSql.Entity.EF1.dll, for Entity Framework v4 it is Devart.Data.PostgreSql.Entity.EF4.dll, for Entity Framework v5 or v6 it is Devart.Data.PostgreSql.Entity.EF5.dll or Devart.Data.PostgreSql.Entity.EF6.dll respectively. For Entity Framework Core it is Devart.Data.PostgreSql.Entity.EFCore.dll. The assembly should reside in the application's folder or in GAC.

  2. If you use Code-First Migrations feature of Entity Framework v4 or Entity Framework v5, you also need to check if the Devart.Data.PostgreSql.Entity.Migrations.EF<Version>.dll assembly is available for your application. For Entity Framework v6 this assembly is not needed.
  3. If you use Entity Framework Spatials and NetTopologySuite, you also need to check if the Devart.Data.PostgreSql.Entity.Spatials.EF<Version>.dll assembly is available for your application.
  4. Inform your environment about the provider factory existence (add the entry to the DbProviderFactories section as it is described above).

You can find these assemblies in the Entity folder in the provider installation folder, in the subforder, corresponding to the Entity Framework version necessary.

If you are registering the provider in the machine.config file, please take into account the Entity Framework version. Entity Framework v1 - specific applications require an entry in the .NET Framework 2.0 configuration file, and Entity Framework v4 and later - specific applications should be registered in the .NET Framework 4.0 configuration file. For Entity Framework Core there is no need to register the provider in the machine.config file.

You can also read Microsoft's Deployment Considerations on ADO.NET Entity Framework.

Deploying LightSwitch applications is described here.

LinqConnect Projects

To deploy applications written with LinqConnect support in dotConnect for PostgreSQL, besides deploying the general assemblies you should register run-time LinqConnect assemblies Devart.Data.PostgreSql.Linq.dll and Devart.Data.Linq.dll at Global Assembly Cache (GAC) or place them in the folder of your application (the Bin folder for web projects).

Workflow Foundation Projects

To deploy applications using PostgreSQL Workflow Instance Store or PostgreSQL Workflow Tracking, in addition to the general assemblies, you also need to deploy the Devart.Data.PostgreSql.WorkflowFoundation.dll assembly.

Sync Framework Projects

To deploy applications using Sync Framework, in addition to the general assemblies, you also need to deploy the Devart.Data.Synchronization.dll and Devart.Data.PostgreSql.Synchronization.dll assemblies. Such application also require the Sync Framework itself installed.


Documentation

The dotConnect for PostgreSQL reference documentation contains detailed provider-specific information. Many of the dotConnect for PostgreSQL classes inherit or implement members from other .NET Framework classes or interfaces. The provider documentation includes a summary of all members within each of these classes. For more detailed information about a specific inherited member, see the appropriate topic in the Microsoft .NET Framework SDK. For information about using .NET data providers or an ADO.NET DataSet, see "Accessing Data with ADO.NET" in the .NET Framework SDK documentation.

dotConnect for PostgreSQL documentation is fully integrated into Visual Studio environment and available from Tools | PostgreSQL menu or as dynamic help.

dotConnect for PostgreSQL help system provides information for IntelliSense and supports class members description of Properties window.

You can also download documentation in CHM format from our site on dotConnect for PostgreSQL download page.


Samples

This section describes dotConnect for PostgreSQL samples.

  • Samples Overview

    Contains overview of dotConnect for PostgreSQL sample projects.

  • CRM_Demo Description

    Contains description of the dotConnect for PostgreSQL sample database.


Samples Overview - dotConnect for PostgreSQL

dotConnect for PostgreSQL | support@devart.com
Samples Overview |

dotConnect for PostgreSQL samples are divided into 6 categories: General demos, Entity Framework samples, LinqConnect samples, Web demos, Web Service sample, and CRM demo project. You can open all of them from the Start menu group. The General samples demonstrate how to work with components, classes, technologies, and also the usage of individual data access features, Web samples show how to use dotConnect for PostgreSQL in ASP.NET environment, and the CRM demo shows some good design and implementation practices that you can employ with dotConnect for PostgreSQL.

Note: in the Standard, Mobile, and Express editions of dotConnect for PostgreSQL some samples are not available.

General Samples

General samples are demos that demonstrate working with dotConnect for PostgreSQL classes, components, and technologies.

Use the Start menu group to open General samples in the language you prefer. You can also run the compiled binary, which incorporates all General samples and provides quick access to C# source, necessary SQL scripts, and run-time state.

Sample | Description
Crystal | This sample project demonstrates using dotConnect for PostgreSQL for generating reports with Crystal Reports. Be aware that this project requires Crystal Reports, which is no longer included with Visual Studio 2010 and higher. You have to download and install Crystal Reports separately: http://scn.sap.com/docs/DOC-7824 . Then update references to the CrystalDecisions.* assemblies and rebuild the solution.
DataReader | This sample project demonstrates using PgSqlDataReader class to obtain data from a query. The sample executes SQL statement at the PgSqlCommand and gets PgSqlDataReader to retrieve data.
DataSet | This sample project demonstrates using untyped dataset with dotConnect for PostgreSQL to review and update data. The sample uses a PgSqlDataAdapter component to fill a dataset and post updated data to a PostgresSQL database. The PgSqlDataAdapter component uses the PgSqlCommandBuilder class to automatically generate SQL for INSERT/UPDATE/DELETE operations.
DbDataTable | This sample project demonstrates data mapping from PostgresSQL tables and paginal access. The sample uses a PgSqlDataTable component to access data from a table and display this data in a DataGrid control. Note: this sample is available only for Professional Edition.
Dependency | The Dependency demo project illustrates how to use the data dependency technique. The sample watches for some tables in the database. As you modify their data, the name of the table being edited is shown in a list. Note: this sample is available for Professional and Standard Edition.
Dump | This sample project demonstrates how to backup data from database to file and then restore it. It uses the PgSqlDump component to accomplish the task. Note: this sample is available only for Professional Edition.
Loader | This sample project demonstrates working with PgSqlLoader component. PgSqlLoader work is based on generation of INSERT statements that insert data by several rows at once. Note: this sample is available only for Professional Edition.
MasterDetail | This sample project demonstrates setting master-detail relation at an untyped dataset. The sample fills two tables at the dataset using the PgSqlDataAdapter component and sets master-detail relation between them.
MetaData | This sample project shows how to retrieve information about databases, tables, columns, users, and so on. The only method used for these tasks is GetSchema.
Pictures | This sample project demonstrates using dotConnect for PostgreSQL for working with BLOB objects as graphics. The sample shows how to retrieve binary data from a PostgresSQL database and display it at the monitor, load and save pictures into the file and the database.
RefCursor | This sample project demonstrates using REF CURSOR type in dotConnect for PostgreSQL.
RowDataReader | This sample project demonstrates using PgSqlDataReader class to obtain composite type values. The sample executes SQL statement at the PgSqlCommand and gets PgSqlDataReader to retrieve data.
RowDataSet | This sample project demonstrates using dataset with dotConnect for PostgreSQL to review and update composite type values. The sample uses PgSqlDataAdapter to fill a dataset and post updated data to PostrgeSQL database. PgSqlDataAdapter uses PgSqlCommandBuilder class to automatically generate SQL for INSERT/UPDATE/DELETE operations.
RowStoredProc | This sample project demonstrates execution of a stored procedure that uses a composite type value.
RowTable | This sample project demonstrates data mapping from PostgreSQL tables. The sample uses PgSqlDataTable component to access composite type data from the table and displays this data in the DataGrid control. Note: this sample is available only for Professional Edition.
StoredProc | This sample project demonstrates how to execute a stored procedure and view modified data.
Table | This sample project demonstrates data mapping from PostgresSQL tables. The sample sets CommandType property of PgSqlCommand to TableDirect to access data from the table.
Transactions | This sample project demonstrates working with PostgresSQL transactions in dotConnect for PostgreSQL. The sample demonstrates how to get a PgSqlTransaction object from a PgSqlConnection object, how to commit or rollback a transaction.

Note: before running sample projects from an IDE you need to execute commands from Program Files\Devart\dotConnect\PostgreSQL\Samples\tables.sql to create test data. If C++ projects fail to open, it is possible that you do not have the assemblies Devart.Data.PostgreSql.dll and Devart.Data.dll in GAC or project's folder.

Web Samples

Run InstallWebTables.sql script by default located in the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET 2\InstallWebTables.sql. Use the Start menu group to open Web samples in the language you prefer.

Sample | Description
AjaxDemo | This sample demonstrates data binding and editing in an asynchronous way. The sample uses PostgreSqlDataSource component in conjuction with ASP.NET AJAX Update Panel. Note: this sample is available only in Professional Edition.
CRM | This sample demonstrates how PostgreSqlDatasource can be used in the complex software product such as CRM (Customer Relationship Management). The sample illustrates how to perform data retrieving and editing in the complex scenario using PostgreSqlDataSource. This sample is based on the CRM_DEMO database. Note: this sample is available only in Professional Edition.
DataSource | This sample shows how to use the PostgreSqlDataSource component of dotConnect for PostgreSQL. The sample illustrates using of manual paging, auto paging and master-detail techniques with PostgreSqlDataSource component. Note: this sample is available only in Professional Edition.
DataSource_devExpress | This sample demonstrates using PostgreSqlDataSource with DevExpress ASPxGridView component. The ASPxGridView component uses PostgreSqlDataSource to perform asynchronous data retrieving and paging. Note: this sample is available only in Professional Edition.
LoadOnDemand | This sample demonstrates the load-data-on-demand technique with the dotConnect for PostgreSQL components. The sample shows how to use PostgreSqlDataSource and ObjectDataSource to retrieve data from DB asynchronously and only on user demand. Note: this sample is available only in Professional Edition.
LoadOnDemand_Telerik | This sample demonstrates load-data-on-demand technique with PostgreSqlDataSource component in conjuction with Telerik RadGrid control. Note: this sample is available only in Professional Edition.
Web | A sample on simple usage of dotConnect for PostgreSQL in an ASP.NET application.
WebProviders | This sample shows how to use dotConnect for PostgreSQL with ASP.NET Providers Model. The first part of the WebProviders sample illustrates usage of WebParts, SiteMap, WebEvent, and SessionState Providers, and the second - of Membership, Roles, and Profile Providers. Note: this sample is available only in Professional Edition.

Entity Framework Samples

Use the Start menu group to open Entity framework samples in the language you prefer. To run the samples you should have VisualStudio 2008 Service Pack 1 or later and .NET Framework 3.5 Service Pack 1 or later installed.

Besides, to get more experience you can download the separate Entity Framework Query Samples package from our site.

Note: these samples are available only for Professional Edition.

Sample | Description
LinqQueries | This sample shows the ways of executing LINQ to Entities queries.
MasterDetail | This sample shows how to setup master/detail relationship with the possibility of editing and saving bound entities.
SaveChanges | This sample shows data binding, the possibility of editing table entities collection in DataGridView, and saving the changes to database.

Note: before running sample projects from an IDE you need to execute commands from crm_demo.sql to create test data. PostgreSql server 8.0 or higher should be installed on the server.

LinqConnect Samples

LinqConnect samples are an easy way to get started with LinqConnect applications. They demonstrate usage of Entity classes, Language-Integrated Queries, database operations within LinqConnect. These samples are based on the CRM_DEMO database.

Use the Start menu group to open samples in the language you prefer.

Note: these samples are available only in Professional Edition. You can get more detailed information on the LinqConnect samples in the ReadMe file by the following path - Program Files\Devart\dotConnect\Linq\Samples\Readme.html

Web Service

Sample | Description
Server | This sample illustrates creating a web service with dotConnect for PostgreSQL. In the provided web method dotConnect for PostgreSQL classes are used to fill DataSet and return it to a client.
WebClient | This sample demonstrates using of the web service by the web client. The data recieved from web service is shown in GridView control.
WinClient | This sample demonstrates using of the web service by the WinForms client. The data recieved from web service is shown in the DataGridView control.

CRM Demo

CRM (Customer Relationship Management) is a widespread class of projects in which you can encounter many typical tasks of database applications development. This sample shows how these tasks can be resolved in the scope of approaches that are offered by dotConnect for PostgreSQL data access solution for designing and building WinForms applications. By examining the source code of CRM demo you can see how the advanced features of dotConnect for PostgreSQL help you build a centralized data access and storage solution. Particularly, it solves common problems like implementing flexible data binding, passing instances of data access components, controlling database connections, and so on. For more information on the best practices in the area of data access please refer to the General Concepts in Database Application Development section of dotConnect for PostgreSQL documentation.

To see how it works launch the compiled binary from the Start menu. This sample is based on the CRM_Demo database.

Note: this demo is available only in Professional Edition. Also there is similar demo for ASP.NET; more detailed information on it is provided in the Web samples section.


CRM_Demo Description

The CRM_Demo database is used in the substantial part of the dotConnect samples. This topic describes its structure. DDL and DML scripts for this database are available here – \Program Files\Devart\dotConnect\PostgreSQL\Samples\crm_demo.sql.

CRM_Demo is a simple database for managing activities of a book store. Such database should contain information about the products available, the book store customers (which mainly are companies, but may be individuals as well), personal contacts, and orders being processed. This information is stored in six tables:

  • Product Categories
  • Products
  • Company
  • Person Contact
  • Order
  • Order Details

The figure below displays a table structure and scheme of CRM_Demo database:

Product Categories

Products (which are books) are classified by several categories (genres and styles). The categories may contain sub-categories and be embedded into major categories. The Product Categories table contains a field for category name and a field for the reference to the parent category (thus the table is self-referential).

Products

The Products table stores book title, reference to its category, price and quantity of a product in the stock. As it was said, our products are books, or rather literature works. Each work may consist of either one or several volumes. This option is determined by the UnitName field which may be set to either 'unit' (for single volumes) or 'parcel' (for multiple volumes) values, and the UnitScale field which specifies the exact number of volumes in a particular work. The last thing about the products is that they can be discontinued, and the price of discontinued products usually is lower. To handle this case the table includes Discontinued and DiscontinuedPrice fields.

Company

The Company table stores an information about customers and shipping contractors of our book store. Companies related to the book store can be either customers or shipping contractors or both. The Company table contains fields for company name, web site, legal or physical addresses, phones and the PrimaryContact field referencing the person who is preferable company contact.

Person Contact

This table stores an information about representatives of the companies that cooperating with the bookstore. Also, this table contains an information about employees of the shipping companies and individuals that purchase books in the bookstore. The table hence should include general contact information, like names, personal and business phones, full address (which can be either home or business), and, if applicable, the reference to the employer company.

Orders

The general information about orders is stored in the Orders table. Those are: references to customer company and person (when the first is null, the customer is an individual, when it is not, the person is a company contact related to this order), order date, ship date, reference to a shipping company, freight cost, and discount. The information about the products ordered is stored in the Order Details table as each order may consist of several books of different titles.

Order Details

Order Details table contains detailed information on what a single order consists of, each record of this table references to the Product table and contains an information about price and quantity products that are ordered. If an order includes several titles, a single row should be created for each title.

The CRM_Demo database is used in the following samples:

  • The CRM_Demo sample which illustrates how to work with typed DataSets
  • Entity Framework Samples
  • LinqConnect samples

See Also

Getting Started | Samples


General Information

This section contains general information about dotConnect for PostgreSQL.

  • Overview
  • Features
  • Requirements
  • Compatibility
  • Components
  • Editions
  • Ordering
  • Getting Support


Overview

dotConnect for PostgreSQL, formerly known as PostgreSQLDirect .NET, is an enhanced data provider for PostgreSQL that builds on ADO.NET technology to present a complete solution for developing PostgreSQL-based database applications. As part of the Devart database application development framework, dotConnect for PostgreSQL offers both high performance native connectivity to the PostgreSQL database and a number of innovative development tools and technologies. dotConnect for PostgreSQL introduces new approaches for designing application architecture, boosts productivity, and leverages database application implementation.

dotConnect for PostgreSQL is a scalable data access solution developed with wide adaptability in mind. It can be successfully used in WinForms, ASP.NET, two-tier, multi-tier applications; within the ASP.NET Provider Model; in conjunction with the Enterprise Library; under .NET Compact Framework, Mono Framework and so on. Depending on the edition you choose, dotConnect for PostgreSQL can be used as a powerful ADO.NET data provider, or an effective application development framework.

dotConnect for PostgreSQL is actively developed and supported by the Devart. If you have questions about dotConnect for PostgreSQL, email the developers at support@devart.com or visit dotConnect for PostgreSQL online at http://www.devart.com/dotconnect/postgresql/.

Advantages of dotConnect for PostgreSQL

Wide Coverage of PostgreSQL Features

By providing access to the most advanced database functionality, dotConnect for PostgreSQL allows developers to harness the full capabilities of the PostgreSQL server and optimize their database applications. dotConnect for PostgreSQL stands out as the set of components with the widest support of PostgreSQL functionality. Get a full list of supported PostgreSQL features in the Features topic.

Optimized Code

The goal of dotConnect for PostgreSQL is to enable developers to write efficient and flexible database applications. The dotConnect for PostgreSQL assemblies are implemented using optimized code and advanced data access algorithms. Components undergo comprehensive performance tests and are designed to help you write thin and efficient product data access layers.

Comprehensive Support for ADO.NET Technology Features

dotConnect for PostgreSQL supports new ADO.NET features and technologies as soon as they are released. This includes base-class-based provider model, provider factories, connection string builder, metadata schemas, asynchronous commands, pooling enhancements, batch update support, provider-specific types, server enumeration, database change notification support and so on. dotConnect for PostgreSQL will continue supporting the newest standards and innovations of the .NET Framework.

Database Application Development Extensions

dotConnect for PostgreSQL has rich set of design time tools that leverage the development process greatly. Particularly, there are convenient design time component editors, wizards and managers for typed PostgreSQL-specific components, toolset for live data binding and much more. dotConnect for PostgreSQL integrates tightly with Visual Studio 2008 - 2015, Delphi, and SQL Server 2008 - 2016 Business Intelligence Solutions.

Provider-Specific Technologies

dotConnect for PostgreSQL has extra components designed to simplify some tasks and support PostgreSQL-specific technologies. Particularly, PgSqlScript serves to execute series of SQL statements, PgSqlLoader serves to load external data into PostgreSQL databases, and PgSqlDump serves to backup or restore a whole database or its parts.

ADO.NET Entity Framework Support

ADO.NET Entity Framework is a conceptual approach to database application development with focus on objects instead of relational data. The flexible architecture of Entity Framework is made up of well-thought layers and modules. Entity Framework optimizes the development process with object-relational mapping, SQL-based entity query language, and LINQ.

dotConnect for PostgreSQL fully supports the Entity Framework capabilities, which allows you to base your object-oriented applications on PostgreSQL. dotConnect for PostgreSQL includes a wizard that helps you setup model relations, and a set of demos to use as a starting point. All standard Entity Framework samples can be easily ported to dotConnect for PostgreSQL.

LinqConnect Support

Much like Entity Framework, LinqConnect is an entity-oriented data access technology with focus on objects instead of relational data. LinqConnect is easier to start with, it supports more of server features, and adds less complications to your code. LinqConnect is backed up by Entity Developer to visually design the application entity model and database objects.

Both Connected and Disconnected Models

dotConnect for PostgreSQL combines connected and disconnected data access models in single PgSqlDataTable component, which allows you to design more flexible application architecture and use full power of data binding.

Development and Support

dotConnect for PostgreSQL is a PostgreSQL connectivity solution that has been actively developed and supported since 2003. dotConnect for PostgreSQL comes with full documentation, demo projects, and fast (usually within one business day) technical support by the dotConnect for PostgreSQL development team. Find out more about how to get help or submit feedback and suggestions in the Getting Support topic.

A description of the dotConnect for PostgreSQL components is provided in the Class and Component List.

Key features

  • Direct access to PostgreSQL server
  • 100% managed code
  • High performance
  • Easy to deploy
  • Supports the latest versions of PostgreSQL server
  • All PostgreSQL data types support
  • .NET Compact Framework support
  • LinqConnect support
  • Entity Framework support
  • Operates in both connected and disconnected models
  • Powerful PgSqlDataTable component as all-in-one table data access solution
  • Auxiliary components for SQL scripts and bulk data transfer
  • Extra data binding capabilities
  • Cross-form components cooperation
  • Ability of monitoring query execution
  • Licensed royalty-free per developer, per team, or per site

For the detailed list of dotConnect for PostgreSQL features refer to the Features topic.


dotConnect for PostgreSQL Features

General usability

  • Direct access to server data
  • Real RAD for database applications
  • Fully compliant with ADO.NET
  • 100% managed code
  • Highly usable design time support
  • Easy to deploy

Network and connectivity

  • Doesn't require PostgreSQL client library and uses PostgreSQL protocol directly
  • Both connected and disconnected data access models
  • Unicode connections
  • SSL connection to PostgreSQL server

Compatibility

  • Full support of the latest versions of PostgreSQL
  • Full support for x64 architecture
  • .NET Compact Framework support
  • Mono Framework support
  • Microsoft Visual Studio 2008, 2010, 2012, 2013, and 2015 support
  • CodeGear Delphi 2007 support
  • Embarcadero Delphi Prism support
  • SQL Server 2008 Business Intelligence Solutions support

PostgreSQL technology support

  • All PostgreSQL data types support, including Composite types
  • Stored procedures support
  • Returning result sets from stored procedures
  • PgSqlDump component to store a database or its parts as a script and then restore it
  • PgSqlLoader component for fast loading data
  • PgSqlAlerter component to manage PostgreSQL notifications with LISTEN and NOTIFY commands
  • Fill DataSet with multiple query
  • Large objects support
  • PostgreSQL ARRAY data type support with the PgSqlArray class
  • Support for PostgreSQL TimeStamp types with the PgSqlTimeStamp class

Performance

  • High overall performance
  • Intelligent fetch block size control
  • Advanced connection pooling
  • High performance batch processing

ADO.NET technology support

  • Full support for ADO.NET Entity Framework v1 - v6
  • Server enumeration
  • Batch update support
  • Extended metadata information retrieval
  • Advanced CommandBuilder component with automatic refresh SQL
  • Enhanced pooling control through connection string
  • Connection string builder
  • Provider factory for generating key data access classes
  • Asynchronous command execution
  • Provider-specific types support
  • Password change API
  • Database Change Notification Support
  • Possibility to retrieve OID values

ADO.NET Entity Framework

  • Full support for ADO.NET Entity Framework v1 - v6
  • Entity Framework Core support
  • Conceptual approach to enterprise development
  • High performance
  • Wide support for LINQ to Entities capabilities
  • Wide support for EntitySQL
  • Full CRUD (Create, Retrieve, Update, Delete) support
  • Wide support for server data types
  • Change tracking support
  • Object data caching
  • Inheritance mapping support (TPH, TPT, and TPCT models)
  • Capability to use stored procedures when manipulating data
  • Stored procedure import support
  • Ability to build database-independent applications
  • Visual Studio EDM Wizard support
  • Reverse engineering of database objects to entity model
  • Visual model creation and code generation with Entity Developer
  • Illustrated tutorial to get started with Entity Framework in 5 minutes

LinqConnect (formerly known as LINQ to PostgreSQL)

  • Easy to use
  • High performance
  • Interchangeable with Microsoft LINQ to SQL
  • Plain CLR classes used (no need to use a common base class)
  • Full CRUD (Create, Retrieve, Update, Delete) support
  • Complex type support [New]
  • Support for different configurable algorithms for primary key generation [New]
  • Automatic configurable compiled query caching [New]
  • Change tracking support
  • Object data caching
  • Data binding support
  • Wide support for LINQ capabilities
  • Wide support for server data types
  • Load on demand (lazy load)
  • Database transactions support
  • Inheritance mapping support (table per hierarchy model)
  • Server-independent interface
  • Visual model creation and code generation with Entity Developer
  • Illustrated tutorial to get started with LinqConnect in 5 minutes

Workflow Foundation Support

  • PostgreSQL Workflow Instance Store support [New]
  • PgSqlTrackingParticipant class to store tracking records in a PostgreSQL database [New]

Extended data access technologies and functionality

  • Powerful PgSqlDataTable component for manipulating individual tables or query result
  • NonBlocking mode allows fetching data asynchronously in the background
  • On-demand data fetch for data-bound controls
  • Paginal access to query result
  • Server side master-detail relation based on queries
  • Ability to refresh individual records in PgSqlDataTable component
  • Support for Enterprise Library Data Access Application Block (DAAB)
  • Object-oriented building of SELECT statements
  • Extended warning and error information retrieval
  • Extended interface for processing execution exceptions
  • PgSqlDataAdapter.Fill method with sequential fetch support
  • Ability to defer fetching of some columns in a resultset
  • Named parameters support

WinForms-specific features

  • Flexible data binding with DataLink component
  • InterForm technology for cross-form components cooperation
  • Global position synchronization within a data source

ASP.NET-specific features

  • ASP.NET data providers: Membership, Role, Session State, Profile, Personalization, Site Map, Web Event
  • PgSqlDataSource web component
  • PgSqlCacheDependency component to control Cache item dependencies in ASP.NET applications

Script execution

  • Advanced script execution features with PgSqlScript component
  • Support for executing individual statements in scripts
  • Support for executing huge scripts stored in files with dynamic loading

SQL execution monitoring

  • Extended SQL tracing capabilities with PgSqlMonitor component
  • Support for dbMonitor utility for advanced tracing analysis and control
  • Per-component SQL tracing
  • Optional log output to IDE toolwindows

Design-time enhancements

  • Automatic component registration in toolbox
  • Advanced integration with Visual Studio 2008, 2010, 2012, 2013, and 2015, including Server Explorer, Data Source wizard, TableAdapter configuration, Query Builder and configuring web component PgSqlDataSource
  • DataSet Wizard to create and edit typed PostgreSQL-oriented datasets
  • DataSet Manager to list and bind datasets in the project
  • DataSet Editor to edit dataset contents
  • Advanced design-time component and property editors
  • IntelliSense descriptions for dotConnect for PostgreSQL classes
  • Easy migration from ODBC and OLE DB .NET Data Providers with Migration Wizard
  • Syntax highlighting in design-time editors
  • TableMappings editor
  • Convenient instant data preview and management in design time

Product clarity

  • Complete documentation sets integrated into Visual Studio and CodeGear Delphi
  • Integration with Visual Studio and MSDN help collections
  • Documentation available as a standalone chm file
  • A large amount of helpful demos in C# and VB

Licensing and support

  • Included annual dotConnect for PostgreSQL Subscription with Priority Support
  • Licensed royalty-free per developer, per team, or per site


Requirements

Prior to running Setup to install the dotConnect for PostgreSQL, you must already have the .NET Framework 2.0, 3.0, 3.5, 4.0, 4.5 or 4.6 installed on the computer. If the .NET Framework is not installed, the Setup program for the provider will fail.

dotConnect for PostgreSQL doesn't require any PostgreSQL client software.


Compatibility

PostgreSQL server

dotConnect for PostgreSQL supports PostgreSQL server since 7.1 version to 9.5, EnterpriseDB, Pervasive Postgres SQL servers, Heroku Postgres.

Framework Compatibility

The provider works with .NET Frameworks 2.0, 3.0, 3.5, 4.0, 4.5, 4.6, and .NET Compact Framework. dotConnect for PostgreSQL supports Mono version 2.0 and above. The product is compatible with ADO.NET Entity Framework v1 - v6 and Entity Framework Core. (PostgreSQL server 8.0 or higher is required for Entity Framework).

IDE Compatibility

dotConnect for PostgreSQL can be used with following integrated development environments:

  • Visual Studio 2015
  • Visual Studio 2013
  • Visual Studio 2012
  • Visual Studio 2010
  • Visual Studio 2008
  • Embarcadero Delphi Prism
  • CodeGear RAD Studio 2007

There are some limitations in Express Editions of Visual Studio. The following features are not available: provider add-in, automatic toolbox components registration and Server Explorer integration. As an exclusion, Visual Web Developer 2008 and 2010 supports Server Explorer features.

RAD Studio 2007 is supported in run time only as these environments have no WinForms designers.

Devart Data Providers Compatibility

Since Devart data providers use a common assembly (Devart.Data.dll), it is necessary to make sure that all installed data providers are compatible.


Class and Component List

This topic presents a brief description of the classes and components included in dotConnect for PostgreSQL. Click on the name of each component for more information.

Core ADO.NET Classes

Class | Description
PgSqlConnection | Establishes a connection to PostgreSQL database and manages transactions.
PgSqlCommand | Executes SQL statements and stored procedures at PostgreSQL database.
PgSqlDataReader | Exposes and reads a forward-only stream of data from PostgreSQL database.
PgSqlDataAdapter | Populates a DataSet and resolves updates with PostgreSQL database.
PgSqlTransaction | Starts, commits, or rolls back server transactions.
PgSqlParameter | Represents input, output, and return value parameters for commands.
PgSqlException | Represents an error encountered at PostgreSQL database. For an error encountered at the client, dotConnect for PostgreSQL throws a .NET Framework exception.

Complementary ADO.NET Classes

Class | Description
PgSqlCommandBuilder | A helper object that automatically generates command properties of PgSqlDataAdapter and populates the PgSqlParameter collection of PgSqlCommand object.
PgSqlConnectionStringBuilder | Constructs a connection string by assigning values to appropriate properties.
PgSqlDataSourceEnumerator | Retrieves list of available servers in the network.
PgSqlDataSource | Enables flexible data binding for ASP.NET applications.

dotConnect for PostgreSQL Advanced Classes

Class | Description
PgSqlDataTable | Provides all of the functionality needed to retrieve and manipulate data from a PostgreSQL server data source. Combines connected and disconnected data access models.
PgSqlDataSet | Represents typed and untyped PostgreSQL-specific datasets. Bases on PgSqlDataTable objects to build the schema.
DataLink | Serves to establish flexible cross-form data binding.

dotConnect for PostgreSQL Auxiliary Classes

Class | Description
PgSqlScript | Serves to execute series of SQL statements.
PgSqlLoader | Serves to load external data into the PostgreSQL database.
PgSqlAlerter | Manages PostgreSQL notifications with LISTEN and NOTIFY commands.
PgSqlDump | Serves to store a database or its parts as a script and also to restore database from the received script.
PgSqlMonitor | Serves to monitor dynamic SQL execution in applications that use dotConnect for PostgreSQL.


Editions

dotConnect for PostgreSQL is available in four editions: Professional, Standard, Mobile, and Express.

  • The Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes.
  • The Professional Edition adds more classes, tools, technologies, and integration capabilities.
  • The Mobile Edition is equivalent to the Standard Edition for .NET Compact Framework.
  • The Express Edition is a free data provider with basic connectivity features.

Also Professional and Mobile editions are offered for evaluation. These versions are fully working during 30 days period.

Feature | Professional | Standard | Mobile | Express
.NET Framework support | + | + |  | +
.NET Compact Framework support |  |  | + |
ADO.NET core classes | + | + | + | +
Native data types classes and structures | + | + | + | +
SSL support | + | + | + | +
PgSqlScript class | + | + | + |
PgSqlMonitor class | + | + | + |
PgSqlDataTable class | + |  |  |
PgSqlDataSet class | + |  |  |
PgSqlLoader class | + |  |  |
PgSqlDump class | + |  |  |
PgSqlAlerter class | + |  |  |
PgSqlDependency class | + | + |  |
DataLink class | + |  |  |
PgSqlDataSource component for web applications | + |  |  |
Design-time features, including component editors and property editors | + | + | + |
Entity Framework support | + |  |  |
LinqConnect support | + |  |  |
Windows Workflow Foundation support | + |  |  |
Advanced Visual Studio 2008 - 2015 integration | + | + |  |
ASP.NET providers support | + |  |  |
SQL Server Business Intelligence Solutions support | + |  |  |
Sync Framework support | + |  |  |
Enterprise Library support | + |  |  |
InterForm technology | + | + |  |
DataSet Manager and Editor | + |  |  |
DataSet Wizard | + |  |  |
Migration Wizard | + | + |  |
DBMonitor support | + |  |  |


Ordering

dotConnect for PostgreSQL is licensed, not sold. Please read carefully our end-user license agreement (EULA) before using the product. You can find the EULA in the installation folder, which is by default
\Program Files\Devart\dotConnect\PostgreSQL\License.rtf,
or in the Start menu (Start\Programs\Devart dotConnect for PostgreSQL\License).

Licensing

There are three types of full licenses for dotConnect for PostgreSQL: Single Licenses, Team Licenses, and Site Licenses.

Single Licenses must be purchased for each developer working on a project that uses dotConnect for PostgreSQL.

Purchasing a Team License automatically gives four developers a Single License.

Purchasing a Site License automatically gives all developers in a company a Single License.

For evaluation purposes only, you may also use dotConnect for PostgreSQL Trial Edition under a temporary Evaluation License, which allows you to use dotConnect for PostgreSQL Trial Edition for a period of 30 days, after which you must either remove all files associated with dotConnect for PostgreSQL or purchase a full license.

To purchase a license for dotConnect for PostgreSQL, please visit www.devart.com/dotconnect/postgresql/ordering.html.

Editions

Full licenses can be purchased for the following editions of dotConnect for PostgreSQL: Standard Edition, Professional Edition, , Mobile Edition (for .NET Compact Framework).

The Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes. The Professional Edition adds more classes, tools, technologies, and integration capabilities. The Mobile Edition is equivalent to the Standard Edition for .NET Compact Framework. The Trial Edition corresponds to Professional with trial limitation. A comparison chart can be found here.

Subscriptions

The dotConnect for PostgreSQL Subscription program is an annual maintenance and support service for dotConnect for PostgreSQL users.

Users with a valid dotConnect for PostgreSQL Subscription get the following benefits:

  • Access to new versions of dotConnect for PostgreSQL when they are released
  • Access to all dotConnect for PostgreSQL updates and bug fixes
  • Product support through the dotConnect for PostgreSQL Priority Support program
  • Notification of new product versions

If you have any questions regarding licensing or subscriptions, please see the FAQ or contact sales@devart.com.

Trial Limitations

The dotConnect for PostgreSQL Evaluation License lets you try dotConnect for PostgreSQL Trial Edition for a period of 30 days. There are no functionality limitations in dotConnect for PostgreSQL Trial Edition during the trial period.


Getting Support

dotConnect for PostgreSQL | support@devart.com
Getting Support |

This page lists several ways you can find help with using dotConnect for PostgreSQL and describes the dotConnect for PostgreSQL Priority Support program.

Support Options

There are a number of resources for finding help on installing and using dotConnect for PostgreSQL.

  • You can find out more about dotConnect for PostgreSQL installation or ordering by consulting the Ordering and FAQ sections.
  • You can get community assistance and technical support on the dotConnect for PostgreSQL Community Forum.
  • You can get advanced technical assistance by dotConnect for PostgreSQL developers through the dotConnect for PostgreSQL Priority Support program (see below).

If you have a question about ordering dotConnect for PostgreSQL or any other Devart product, please contact sales@devart.com.

dotConnect for PostgreSQL Priority Support

dotConnect for PostgreSQL Priority Support is an advanced product support service for getting expedited individual assistance with dotConnect for PostgreSQL-related questions from the dotConnect for PostgreSQL developers themselves. Priority Support is carried out over email and has a two business day response policy. Priority Support is available for users with an active dotConnect for PostgreSQL Subscription.

To get help through the dotConnect for PostgreSQL Priority Support program, please send an email to support@devart.com describing the problem you are having. Make sure to include the following information in your message:

  • Your dotConnect for PostgreSQL Registration number.
  • Version of Visual Studio or another IDE you are using.
  • Version of dotConnect for PostgreSQL. To get it, in Visual Studio on the Tools menu point to PostgreSQL and then click About.
  • Version of your PostgreSQL server.
  • Version of your operating system.
  • A detailed problem description.
  • If possible, a small test project that reproduces the problem. Please include definitions of database objects and avoid using third-party components.


Development Tools and Features

This section of the documentation contains topics that help you design powerful, flexible applications with use of dotConnect for PostgreSQL advanced features. The section describes how to employ best the components and technologies that constitute dotConnect for PostgreSQL.

  • General Concepts in Database Application Development

    There are many database application development approaches, each with its own advantages and drawbacks. This topic describes some of database application design patterns applicable with dotConnect for PostgreSQL and lists their tradeoffs to help you decide which one best suits your development needs.

  • PgSqlDataTable Advanced Features

    The PgSqlDataTable component is one of the most effective tools in the dotConnect for PostgreSQL arsenal. It combines connection to server, command object and data storage in single component with really comprehensive capabilities. In addition, it can accomplish data access tasks in both connected and disconnected models. This topic describes how you can use some of the PgSqlDataTable features.

  • Using Parameters

    dotConnect for PostgreSQL enhances SQL handling capabilities with usage of parameters in SQL queries. You can make execution of a query or stored procedure very flexible using several simple techniques. This article describes some basics you must be acquainted with when working with parameters in dotConnect for PostgreSQL, as well as parameters synchronization and some nuances related to usage of stored procedures.

  • PostgreSQL Specific Features

    dotConnect for PostgreSQL has extra components designed to simplify some tasks and support PostgreSQL specific technologies.

  • Working with DataSets

    dotConnect for PostgreSQL leverages managing DataSets in your applications with such tools as DataSet Wizard and DataSet Manager. The DataSet Wizard allows you to create and manage typed provider-specific datasets. The DataSet Manager displays the data sources in your project represented by PgSqlDataSet and PgSqlDataTable classes and allows you to create a user interface with data-bound controls by dragging items from the window onto forms in the project.

  • WinForms-Specific Features

    Describes dotConnect for PostgreSQL features, specific for WinForms applications.

  • ASP.NET-Specific Features

    Describes dotConnect for PostgreSQL features, specific for ASP.NET applications.

  • Working with Command Editor

    This topic describes how to use command editor for setting SQL commands to the different data access components, like PgSqlDataTable, PgSqlDataAdapter, or PgSqlDataSource.

  • Retrieving Metadata

    dotConnect for PostgreSQL has useful feature - GetSchema method. It allows you to read server schema information without writing queries and parsing the output. All information you may want to obtain is brought to you by single function in easy-to-process format.

  • Asynchronous Query Execution

    dotConnect for PostgreSQL supports asynchronous execution of methods that take most of time in database applications. These are opening a connection, transferring large blocks of data, and other operations alike.

  • Enterprise Library Data Access Block

    dotConnect for PostgreSQL can be used in conjunction with Microsoft Enterprise Library Data Access Application Block. This topic describes what is Enterprise Library, what part of it can be substituted with dotConnect for PostgreSQL, and how to use the bundle in your applications.

  • SQL Server Integration Services

    This section describes SQL Server Integration Services support in dotConnect for PostgreSQL.

  • Sync Framework Tutorial

    This tutorial describes how to use dotConnect for PostgreSQL to synchronize PostgreSQL databases with Microsoft Sync Framework.

  • Windows Workflow Foundation Support

    This section describes dotConnect for PostgreSQL integration with Windows Workflow Foundation.


General Concepts in Database Application Development

There are many database application development approaches, each with its own advantages and drawbacks. This topic describes some of database application design patterns applicable with dotConnect for PostgreSQL and lists their tradeoffs to help you decide which one best suits your development needs.

  • Introduction
  • The Standard Way
  • Typed PgSqlDataSets
  • Untyped PgSqlDataSets
  • Individual PgSqlDataTables
  • Design Time Emphasis
  • Summary

Introduction

One of the key questions in database application development is which set of components to base on. To answer this question it is necessary to clarify the following aspects:

  • How to plan data access architecture and how to create client representation of the schema?
  • How to edit existing database schema?
  • How to implement data binding?
  • How to design forms with data-bound controls?
  • How to pass instances of data access components?
  • How to control database connection used by the components?

Let's see how these questions are handled in standard ADO.NET approach and some advanced ways offered by dotConnect for PostgreSQL.

The Standard Way

The classic ADO.NET solution is to use typed datasets. This way you build your schema with standard DataSet, DataAdapter, and TableAdapter objects. The schema is created and edited with DataSource Wizard, DataSet Designer, and stored in a separate project item. The schema can be also edited with Devart DataSet Wizard in compatibility mode.

To bind the data access components to GUI controls use the standard BindingSource component. Forms with data-bound controls are designed with DataSources Window. In run time instances of connections and datasets should be managed manually (almost no automation). The typed dataset creates individual connection for every DataTable object basing on the connection string stored in the schema or in a configuration file.

To sum it up, the standard way requires much of manual coding, and offers very few design time features. To overcome this problem dotConnect for PostgreSQL provides alternative solutions, which have greater capabilities in design time application development and reduce volumes of necessary coding.

Typed PgSqlDataSets

The most comprehensive solution is to use typed PgSqlDataSets. The PgSqlDataSet components use PgSqlDataTable components to build a schema with support for PostgreSQL-specific features. The entire schema is stored in separate project item as well. It is created with DataSet Wizard, and edited with DataSet Wizard or standard DataSet Designer.

To bind the data access components to GUI controls use the advanced DataLink component. The multiform data binding is managed with Devart DataSet Manager. In run time all components related to data access can inherit references from design time. Due to the InterForm technology, the components can reference connections and data sources even on other forms. The PgSqlDataSet can have either individual connections for every PgSqlDataTable, or single PgSqlConnection that is used by all tables. The connection can be controlled by the schema or by the PgSqlConnection component itself.

In general, typed PgSqlDataSets represent centralized data access and storage solution that provides rich set of design-time tools for working with the schema. However, typed PgSqlDataSets, as any other typed solution, is not much customizable in run time. Thus if you prefer to control the schema within run time, the untyped PgSqlDataSets solution might suit you better.

To migrate from a standard typed DataSet, change its Custom Tool property to dcPgSqlDataSetGenerator, then restart the tool or recompile the project.

Untyped PgSqlDataSets

Untyped PgSqlDataSets represent a more flexible alternative to typed PgSqlDataSets. The schema is built again with the PgSqlDataTable components encapsulated in a PgSqlDataSet component. The entire schema is stored in a PgSqlDataSet component that resides on a project form. It is created simply by dropping the PgSqlDataSet component from the toolbox, and edited with design-time PgSqlDataSet Editor or PgSqlDataTable editor. The solution uses standalone PgSqlConnection to connect to database.

In other aspects, such as data binding and reference management, the untyped PgSqlDataSets retain benefits of typed PgSqlDataSets.

The main difference between typed and untyped PgSqlDataSets is schema representation. With untyped PgSqlDataSets it is less convenient to customize the schema in design time, but the run-time schema management is much more powerful.

Individual PgSqlDataTables

The individual PgSqlDataTable component can represent just one table or stored procedure, so it is not a direct replacement for typed or untyped PgSqlDataSets. However, it is a pretty simple and effective solution when you need to manage only small amount of tables.

The PgSqlDataTable component is created simply by dropping it on a form designer from the toolbox. You can edit it with design-time PgSqlDataTable editor. It uses standalone PgSqlConnection to connect to database. In data binding and reference management the PgSqlDataTable component has same advantages as typed or untyped PgSqlDataSets.

The advantages and disadvantages of individual PgSqlDataTable components are immediate consequences of its purposes. This is very simple and yet potential solution for very small schemas.

Design Time Emphasis

The Devart data access approaches allow you to move the development process from run time to design time, which is way more comfortable. The design time development is additionaly supported by the Live Data features.

dotConnect for PostgreSQL supports connected data access model, so when you open a PgSqlDataTable object in design time, you have the actual data immediately. With the data displayed you can customize grid columns, cells format, and the overall appearance of your application without even launching it.

Summary

dotConnect for PostgreSQL offers solutions that are much more comfortable than the standard way of designing database applications. The solutions allow better control over connection setup, data retrieval and management. With Devart approaches you can employ all the advanced features of PgSqlDataTable component.

See Also

PgSqlDataTable Advanced Features | InterForm Technology | DataLink Component Architecture | Developing Database Applications with dotConnect for PostgreSQL | PgSqlDataSet Reference | PgSqlDataTable Reference


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

PgSqlDataTable Advanced Features

The PgSqlDataTable component is one of the most effective tools in the dotConnect for PostgreSQL arsenal. It combines connection to server, command object and data storage in single component with really comprehensive capabilities. In addition, it can accomplish data access tasks in both connected and disconnected models. This topic describes how you can use some of the PgSqlDataTable features.

  • Introduction
  • Data Fetch Control Overview
  • Traditional Fetch Mode
  • Sequential Fetch Mode
  • Paginal Fetch Mode
  • Pure Asynchronous Fetch
  • Query-based Master-detail Relationship
  • Deferred Column Data Read
  • Flexible Data Binding

Introduction

The PgSqlDataTable component can be used both as a standalone data processing unit and in conjunction with GUI controls like grids. The behavior of the PgSqlDataTable component can be described in a declaratively way with properties, which means that it is very convenient to build and test the application in design time.

The PgSqlDataTable component supports server-specific data types. It is used by PgSqlDataSet components to build the schema with server-specific features. However, this does not break compatibility with common data access techniques.

Data Fetch Control Overview

The PgSqlDataTable component provides rich set of data fetch mechanisms. Besides the traditional mode where selected data is retrieved at once, it supports sequential, paginal, and asynchronous fetch modes. The following PgSqlDataTable members are involved into the fetch control:

  • Open and Close methods for simply opening and closing whole datasets or its parts
  • Active property to control the dataset state in design time
  • StartRecord, MaxRecords properties to retrive limited resultset
  • FetchAll property to control whether PgSqlDataTable requests all records at once or just the amount requested by a visual component
  • NonBlocking property, which determines whether data fetch process blocks current thread
  • Fill method to open whole dataset
  • FillPage method to open a part of a dataset
  • BeginFill, EndFill, SuspendFill, CancelFill methods to perform fetch operations asynchronously

This list demonstrates that PgSqlDataTable has all flavors of data access mechanisms. The component members mentioned in the list can be used in different combinations. The following sections of the topic describe some combinations, their effect and problems that can be solved best with chosen fetch mode.

Traditional Fetch Mode

The usual approach to requesting data is to transfer the whole resultset to client side in single operation. The advantages of this approach are obvious: the entire resultset is available once fetched, the application does not depend on network stability, there are no delays during navigation through large datasets. On the other hand, the disadvantages of this approach are obvious as well: long initial timeout, possibly excessive memory consumption, higher requirements to network connection speed.

To perform traditional fetch with the PgSqlDataTable component, just invoke the Open method (or set Active property to true). Make sure that the component is configured as follows:

  • FetchAll property is set to true
  • MaxRecords property is set to 0, which indicates that all records should be requested

With these conditions, the Open method will return only when the whole dataset is transferred to client side. However, you can set the NonBlocking property to true, which will make the method return immediately. To capture the end moment of the operation in a non-blocking fetch, watch for the SyncRoot property or handle the FetchFinished event.

Another way is to call the Fill method, which ignores all of the mentioned properties and just fetches the whole resultset.

[C#]

static void UseDataTable(PgSqlDataTable myDataTable, PgSqlCommand myCommand)
{
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  myDataTable.FetchAll = true;
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As PgSqlDataTable, ByVal myCommand As PgSqlCommand)
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  myDataTable.FetchAll = True
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

Sequential Fetch Mode

A more sophisticated approach is to transfer to client only rows that are necessary for rendering or updating. When client needs to fetch more records (for example, user scrolls a grid), another request to server is performed. In contrast to the traditional fetch mode, this way the initial timeout is much shorter, there is no redundant memory consumption, and possibly slow connection would not freeze the application too much. However, sequential mode assumes that you have stable network, so that client does not have to wait every time a new portion of the resultset is requested.

To perform sequential fetch, set the FetchAll property to false, MaxRecords property to 0, and call Open. Note that the NonBlocking property does not affect the sequential fetch, and that the Fill method ignores the FetchAll property as well.

To improve behavior of sequential mode, the PgSqlDataTable component provides two additional properties, QueryRecordCount and RecordCount. The QueryRecordCount property determines whether to perform additional roundtrip to server to find out how many rows are there in the resultset. If the QueryRecordCount property is set to true, the RecordCount property contains the number of rows, otherwise it contains number of rows currently fetched to the client.

Paginal Fetch Mode

When you know for sure which subset of rows the application actually needs, you can switch to paginal mode that allows selecting rows range explicitly. In this mode it is up to you to determine which and how many rows should be retrieved. The PgSqlDataTable component has two ways to limit the range:

  • By providing arguments to the FillPage method
  • By setting the StartRecord and MaxRecords properties and calling the Open method

While the first way is self-sufficient and is not affected by any property, the second way still can be modified by the FetchAll and NonBlocking properties (see above for explanation). For example, the following assignments will cause the Open method return before a subrange of rows is entirely fetched:

  • Set MaxRecords to a positive integer
  • Set FetchAll to false
  • Set NonBlocking to true

[C#]

static void UseDataTable(PgSqlDataTable myDataTable, PgSqlConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept";
  myDataTable.FetchAll = false;
  myDataTable.NonBlocking = true;
  myDataTable.StartRecord = 10;
  myDataTable.MaxRecords = 5;

  myDataTable.RowFetched += new EventHandler(myDataTable_RowFetched);
  myDataTable.FetchFinished += new EventHandler(myDataTable_FetchFinished);
  myDataTable.Open();
}

static void myDataTable_RowFetched(object sender, EventArgs e) {

  Console.Write(string.Format("{0} rows are fetched", ((PgSqlDataTable)sender).RecordCount));
}

static void myDataTable_FetchFinished(object sender, EventArgs e) {

  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As PgSqlDataTable, ByVal myConnection As PgSqlConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept"
  myDataTable.FetchAll = False
  myDataTable.NonBlocking = True
  myDataTable.StartRecord = 10
  myDataTable.MaxRecords = 5
  AddHandler myDataTable.RowFetched, New EventHandler(AddressOf myDataTable_RowFetched)
  AddHandler myDataTable.FetchFinished, New EventHandler(AddressOf myDataTable_FetchFinished)
  myDataTable.Open()
End Sub

Private Shared Sub myDataTable_RowFetched(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write(String.Format("{0} rows are fetched", DirectCast(sender, PgSqlDataTable).RecordCount))
End Sub

Private Shared Sub myDataTable_FetchFinished(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write("All records are fetched")
End Sub

Pure Asynchronous Fetch

The traditional and paginal fetch modes provide capability of transparent asynchronous fill operations with the NonBlocking property set to true. You can control the asynchronous fetch entirely using the following set of methods:

  • BeginFill initiates data fetch in a background thread. Returns immediately after the server starts to send first pieces of data.
  • EndFill finishes the previously started data fetch. The EndFill method reads out the resultset if it is not fetched entirely yet.
  • SuspendFill pauses the previously started data fetch. You can resume it later with the BeginFill or EndFill methods.
  • CancelFill terminates the previously started data fetch.

For more information about the asynchronous operations in PgSqlDataTable please refer to topic Asynchronous Execution. The topic describes some useful techniques and provides more examples on the subject.

[C#]

void UseDataTable(PgSqlDataTable myDataTable, PgSqlConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept";

  IAsyncResult aRes = myDataTable.BeginFill(null, null);

  Console.Write("Fetch in process");

  Thread.Sleep(100);
  myDataTable.SuspendFill(true);
  Console.Write("Fetch is stopped");

  myDataTable.EndFill(aRes);
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Sub UseDataTable(ByVal myDataTable As PgSqlDataTable, ByVal myConnection As PgSqlConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept"
  Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
  Console.Write("Fetch in process")
  Thread.Sleep(100)
  myDataTable.SuspendFill(True)
  Console.Write("Fetch is stopped")
  myDataTable.EndFill(result1)
  Console.Write("All records are fetched")
End Sub

Query-based Master-detail Relationship

In addition to classic master-detail relationship, the PgSqlDataTable component is capable of establishing a relationship where details data is not cached on the client. Every time the current position in the master table is changed, the client PgSqlDataTable requests an appropriate portion of data from the server. This goal is achieved using the ParentDataRelation class. The query-based master-detail relationship is designed to improve performance of the application and leverage network load.

[C#]

PgSqlConnection connection = new PgSqlConnection("User Id=postgres;Password=postgres;Host=db;Port=5435;" +
"Database=test;Persist Security Info=True;");
connection.Open();
PgSqlDataTable deptTable = new PgSqlDataTable("SELECT * FROM dept", connection);
PgSqlDataTable empTable = new PgSqlDataTable("SELECT * FROM emp", connection);
empTable.ParentRelation.ParentTable = deptTable;
empTable.ParentRelation.ParentColumnNames = new string[] { "deptno" };
empTable.ParentRelation.ChildColumnNames = new string[] { "deptno" };
deptTable.Owner = this;
empTable.Owner = this;
deptTable.Open();
empTable.Open();
deptDataGrid.DataSource = deptTable;
empDataGrid.DataSource = empTable;

[Visual Basic]

Dim connection As New PgSqlConnection("User Id=postgres;Password=postgres;Host=db;Port=5435;"& _
"Database=test;Persist Security Info=True;")
connection.Open()
Dim deptTable As New PgSqlDataTable("SELECT * FROM dept", connection)
Dim empTable As New PgSqlDataTable("SELECT * FROM emp", connection)
empTable.ParentRelation.ParentTable = deptTable
empTable.ParentRelation.ParentColumnNames = New String() {"deptno"}
empTable.ParentRelation.ChildColumnNames = New String() {"deptno"}
deptTable.Owner = Me
empTable.Owner = Me
deptTable.Open()
empTable.Open()
deptDataGrid.DataSource = deptTable
empDataGrid.DataSource = empTable

Deferred Column Data Read

The PgSqlDataTable component is designed to avoid redundant data transfer. One of the tools you can use for this purpose is partial column read. The main point of the technique is having a full dataset schema on client side, but requesting only a subrange of columns. When you decide that a row really needs the rest of the columns, you invoke the ReadComplete method for the chosen row. This can be illustrated with a photo database, where initially you fetch only a short description of a photo, and the image itself is transferred only if the user requests it.

[C#]

static void UseDataTable(PgSqlDataTable myDataTable, PgSqlConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT DEPTNO FROM Dept";

  System.Data.DataColumn column_DEPTNO = new System.Data.DataColumn();
  System.Data.DataColumn column_DNAME = new System.Data.DataColumn();
  System.Data.DataColumn column_LOC = new System.Data.DataColumn();
  column_DEPTNO.ColumnName = "DEPTNO";
  column_DEPTNO.DataType = typeof(int);
  column_LOC.ColumnName = "LOC";
  column_LOC.DataType = typeof(string);
  column_DNAME.ColumnName = "DNAME";
  column_DNAME.DataType = typeof(string);
  myDataTable.Columns.AddRange(new System.Data.DataColumn[] {column_DEPTNO, column_DNAME, column_LOC});

  myDataTable.FetchAll = true;
  myDataTable.Open();
  Console.Write("DEPTNO column is loaded");
  myDataTable.ReadComplete(myDataTable.Rows[0]);
  Console.Write("DEPTNO and LOC columns are loaded");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As PgSqlDataTable, ByVal myConnection As PgSqlConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT DEPTNO FROM Dept"
  Dim column_DEPTNO As New DataColumn
  Dim column_DNAME As New DataColumn
  Dim column_LOC As New DataColumn
  column_DEPTNO.ColumnName = "DEPTNO"
  column_DEPTNO.DataType = GetType(Integer)
  column_DNAME.ColumnName = "DNAME"
  column_DNAME.DataType = GetType(String)
  column_LOC.ColumnName = "LOC"
  column_LOC.DataType = GetType(String)
  myDataTable.Columns.AddRange(New DataColumn() {column_DEPTNO, column_DNAME, column_LOC})

  myDataTable.FetchAll = True
  myDataTable.Open()
  Console.Write("DEPTNO column is loaded")
  myDataTable.ReadComplete(myDataTable.Rows.Item(0))
  Console.Write("DEPTNO and LOC columns are loaded")
End Sub

Flexible Data Binding

The PgSqlDataTable component is designed to provide comprehensive data binding capabilities. It supports the InterForm technology, which means that you can bind controls on another form to the PgSqlDataTable. The component even allows updating underlying datasets in design time with data binding (when the CachedUpdates property is set to false). In addition, the QueryRecordCount property enables informing GUI controls about real quantity of rows in a resultset. These features make PgSqlDataTable component the best choice for both design time and run time data processing.

See Also

General Concepts in Database Application Development | Developing Database Applications with dotConnect for PostgreSQL | Asynchronous Execution | InterForm Technology | PgSqlDataTable Reference | ParentDataRelation Reference


Using Parameters in dotConnect for PostgreSQL

Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using Parameters

dotConnect for PostgreSQL enhances SQL handling capabilities with usage of parameters in SQL queries. You can make execution of a query or stored procedure very flexible using several simple techniques. This article describes some basics you must be acquainted with when working with parameters in dotConnect for PostgreSQL, as well as parameters synchronization and some nuances related to usage of stored procedures.
The article consists of following sections:

  • Parameters Basics
  • Using Automatic Parameters Synchronization
  • Using Parameters with Stored Procedures
  • Stored Procedure Overloads
  • Performance Issues
  • Examples

Parameters Basics

In general, parameter is a placeholder for a variable that contains some value of some type when executing a general-purpose query, or arguments and return values when a function is executed. Parameter is represented by PostgreSql.PgSqlParameter class. All parameters that take part in query execution constitute a collection that can be accessed through PgSqlCommand.Parameters property.

There are two kinds of parameters: named and unnamed.

Unnamed parameters can be specified as '?' symbol (the simplest form), of '$' symbol followed by ordinal of the parameter in the whole collection, for example, '$2' denotes second parameter in the collection. The following query

    INSERT INTO dept (deptno, dname, loc) VALUES (?, ?, ?)
declares that three parameters are required to run the query properly. To set parameters for this query you can use the next code:

[C#]

PgSqlCommand pgSqlCommand1;
...
pgSqlCommand1.CommandText = "INSERT INTO dept (deptno, dname, loc) VALUES (?, ?, ?)";
pgSqlCommand1.Parameters.Add("param1", 30);
pgSqlCommand1.Parameters.Add("param2", "SALES");
pgSqlCommand1.Parameters.Add("param3", "CHICAGO");

[Visual Basic]

Dim pgSqlCommand1 as PgSqlCommand
...
pgSqlCommand1.CommandText = "INSERT INTO dept (deptno, dname, loc) VALUES (?, ?, ?)"
pgSqlCommand1.Parameters.Add("param1", 30)
pgSqlCommand1.Parameters.Add("param2", "SALES")
pgSqlCommand1.Parameters.Add("param3", "CHICAGO")

Named parameters must correspond to the names of the PgSqlParameter instances in the collection. Named parameters are declared using ':' or '@' prefix followed by name of the parameter in SQL code. Note that the name of the PgSqlParameter object in the collection of the command should contain the '@' prefix if parameter in CommandText is used with the '@' prefix. If the parameter in CommandText contains the ':' prefix, the name of the PgSqlParameter object in the command's collection should be used without any prefix You can use these prefixes at any combinations to specify parameters. There are two main advantages of named parameters. First, you do not have to care about the order in which parameters are created. Second, named parameter can appear more than once in query text, but you have to create only one instance of it in Parameters collection.

For example, a simple Update statement that requires named parameters might look like the following:

    UPDATE dept SET dname = :dname, loc = :loc WHERE deptno = @deptno

To set parameters for this query you can use the next code:

[C#]

PgSqlCommand pgSqlCommand1;
...
pgSqlCommand1.CommandText = "UPDATE dept SET dname = :dname, loc = :loc WHERE deptno = @deptno";
pgSqlCommand1.Parameters.Add("@deptno", 20);
pgSqlCommand1.Parameters.Add("dname", "SALES");
pgSqlCommand1.Parameters.Add("loc", "NEW YORK");

[Visual Basic]

Dim pgSqlCommand1 as PgSqlCommand
...
pgSqlCommand1.CommandText = "UPDATE dept SET dname = :dname, loc = :loc WHERE deptno = @deptno"
pgSqlCommand1.Parameters.Add("@deptno", 20)
pgSqlCommand1.Parameters.Add("dname", "SALES")
pgSqlCommand1.Parameters.Add("loc", "NEW YORK")

Using Automatic Parameters Synchronization

The behavior described above assumes that PgSqlCommand.ParameterCheck is false (by default). By turning it on you enable automatic synchronization of query text and PgSqlCommand.Parameters collection. In this mode all input parameters are checked for validity, new ones are added if necessary, and redundant parameters are deleted. Thus you do not have to take care about quantity of items in PgSqlCommand.Parameters collection, you can specify only the ones you really need. The synchronization is done as follows:

  • If quantity of input parameters in the query text is more than quantity of input parameters in PgSqlCommand.Parameters collection, new parameters are created and added to it, with PgSqlParameter.Value assigned to DBNull. PgSqlParameter.PgSqlType is set to PgSqlDbType.VarChar. This property is updated to a correct type when a value is assigned to the parameter.
  • If quantity of parameters in the query text is less than in PgSqlCommand.Parameters collection, redundant parameters are deleted from it.
  • If named parameters are involved in the query, newly created parameters in the collection are named so that they correspond to ones in the text.
  • Values of parameters are not altered, except for the ones created during the synchronization process. But if PgSqlCommand.CommandText is altered, the parameter collection will be regenerated entirely.

The synchronization takes place when:

  • PgSqlCommand.ParameterCheck is set to true
  • PgSqlCommand.CommandType is set to "Text"
  • PgSqlCommand.CommandText is altered
  • Query is prepared
  • Query is executed

When PgSqlCommand.ParameterCheck is true, every change of PgSqlCommand.CommandText or PgSqlCommand.CommandType leads to deletion of all ReturnValue parameters. You have to add them manually each time you change one of these properties.

Using Parameters with Stored Procedures

If parameters are added to the command collection in the order that is different from the function parameters order in database, it is necessary to describe the command by setting PgSqlCommand.ParameterCheck to true to reoder parameters in a proper way.

When PgSqlCommand.ParameterCheck is true, first call to PgSqlCommand.Prepare or PgSqlCommand.Execute methods leads to recreation of all argument parameters. If type, position, and direction of a parameter is suitable for the new description of stored procedure, parameter's value is preserved in the collection, otherwise it is lost. If PgSqlCommand.CommandText and PgSqlParameter.Direction properties are unchanged, all subsequent invocations of Prepare or Execute methods will not result in recreation of parameters. For example, consider you had a stored procedure that accepts two Int values and then changed PgSqlCommand.CommandText to reference another stored procedure that accepts a Time and Int arguments. In this case you will have first argument of type Time with DbNull value, and second Int argument unchanged with its original value.

The return value parameters with Direction = ReturnValue commonly behave as described above. If the function returns a single value (including ROW and PL/SQL records), the parameter's name must be 'return_value', and type must be Row. This is what happens when ParameterCheck is true.

When ParameterCheck is false, you can also split the returning value into fields. To make this happen, the names of the parameters must match names of the corresponding columns in the result set, so that values of the first resultset row can be inserted into appropriate columns. The whole resultset that the command returns is accessible in common ways (just like a common SELECT statement).

Stored Procedure Overloads

Quantity of input parameters defines which stored procedure overload will be called when PgSqlCommand.Execute is called. If no proper overload can be found, an exception is raised in Execute or Prepare methods. You can obtain information on quantity of arguments for certain procedure by calling PgSqlCommandBuilder.DeriveParameters method which populates PgSqlCommand.Parameters collection with data obtained from server.

You can also use the following syntax for executing or describing specific overloaded procedure: "StoredProcName:1" or "StoredProcName:5". The first example executes the first overloaded stored procedure, while the second example executes the fifth overloaded procedure. This notation is only available when ParameterCheck is true.

Performance Issues

In general, setting PgSqlCommand.ParameterCheck property to true leads to some performance loss.
When PgSqlCommand.CommandType is "Text" the synchronization is performed on client, so performance reduces slightly.
When PgSqlCommand.CommandType is "StoredProcedure", dotConnect for PostgreSQL sends additional requests to server which are necessary to determine quantity and type of parameters. Thus performance mostly depends on how fast these additional queries are executed.

To optimize query multiple execution you can manually call PgSqlCommand.Prepare method that creates compiled version of the query on server and forces synchronization. After the query is prepared it is not advised to alter PgSqlCommand.Text or PgSqlParameter.Direction properties because the PgSqlCommand becomes unprepared again. The recommended practice is to set up query text and parameters, execute PgSqlCommand.Prepare method, and afterwards change only parameters' values.

Examples

The following example demonstrates use of PgSqlParameter class with a function that returns a row of data. It assumes that you have a stored procedure on the server like this one:

    CREATE OR REPLACE FUNCTION getdept(int4, int4)
      RETURNS SETOF dept AS
    $BODY$DECLARE
       rc dept%ROWTYPE;
       minDeptNo alias for $1;
       maxDeptNo alias for $2;
      BEGIN
         FOR rc IN SELECT * FROM public.dept  WHERE deptno >= minDeptNo AND deptno <= maxDeptNo ORDER BY deptno LOOP
             RETURN NEXT rc;
         END LOOP;
         RETURN;
      END;
     $BODY$
      LANGUAGE 'plpgsql' VOLATILE;

[C#]

    static void Main(string[] args) {

      PgSqlConnection connection = new PgSqlConnection("host=localhost;database=test;user=postgres");
      PgSqlCommand command;
      PgSqlParameter minDeptNo, maxDeptNo;  //input parameters
      PgSqlParameter retDeptNo, retDeptName, retDeptLoc;  //return value parameters

      connection.Open();
      command = connection.CreateCommand();
      command.CommandText = "getdept";
      command.CommandType = CommandType.StoredProcedure;
      minDeptNo = command.Parameters.Add("minDeptNo", PgSqlType.Int);
      maxDeptNo = command.Parameters.Add("maxDeptNo", PgSqlType.Int);

      retDeptNo = command.Parameters.Add("deptno", PgSqlType.Int);
      retDeptName = command.Parameters.Add("dname", PgSqlType.VarChar, 12);
      retDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13);

      retDeptNo.Direction = ParameterDirection.ReturnValue;
      retDeptName.Direction = ParameterDirection.ReturnValue;
      retDeptLoc.Direction = ParameterDirection.ReturnValue;

      command.Prepare();

      minDeptNo.Value = 10;
      maxDeptNo.Value = 20;

      command.ExecuteNonQuery();
      connection.Close();

      Console.Write("deptno = {0}, deptname = {1}, loc = {2}", retDeptNo.Value, retDeptName.Value, retDeptLoc.Value);
      Console.ReadLine();
    }

[Visual Basic]

Sub Main()
    Dim connection As PgSqlConnection = New PgSqlConnection("host=localhost;database=test;user=postgres")
    Dim command As PgSqlCommand
    Dim minDeptNo, maxDeptNo As PgSqlParameter  'input parameters
    Dim retDeptNo, retDeptName, retDeptLoc As PgSqlParameter  'return value parameters

    connection.Open()
    command = connection.CreateCommand()
    command.CommandText = "getdept"
    command.CommandType = CommandType.StoredProcedure
    minDeptNo = command.Parameters.Add("minDeptNo", PgSqlType.Int)
    maxDeptNo = command.Parameters.Add("maxDeptNo", PgSqlType.Int)

    retDeptNo = command.Parameters.Add("deptno", PgSqlType.Int)
    retDeptName = command.Parameters.Add("dname", PgSqlType.VarChar, 12)
    retDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13)

    retDeptNo.Direction = ParameterDirection.ReturnValue
    retDeptName.Direction = ParameterDirection.ReturnValue
    retDeptLoc.Direction = ParameterDirection.ReturnValue

    command.Prepare()

    minDeptNo.Value = 10
    maxDeptNo.Value = 20

    command.ExecuteNonQuery()
    connection.Close()

    Console.Write("deptno = {0}, deptname = {1}, loc = {2}", retDeptNo.Value, retDeptName.Value, retDeptLoc.Value)
    Console.ReadLine()
End Sub

Another way to invoke a stored procedure is to use SELECT statement. This sample demonstrates usage of parameters with PgSqlCommand.ParameterCheck property set to true.

[C#]

    static void Main(string[] args) {

      PgSqlConnection connection = new PgSqlConnection("host=localhost;database=test;user=postgres");
      PgSqlCommand command;
      PgSqlParameter minDeptNo, maxDeptNo;  //input parameters
      PgSqlParameter retDeptNo, retDeptName, retDeptLoc;  //return value parameters

      connection.Open();
      command = connection.CreateCommand();
      command.ParameterCheck = true;
      command.CommandText = "SELECT * FROM getdept(?, ?)";
      minDeptNo = command.Parameters[0];
      maxDeptNo = command.Parameters[1];

      retDeptNo = command.Parameters.Add("deptno", PgSqlType.Int);
      retDeptName = command.Parameters.Add("dname", PgSqlType.VarChar, 12);
      retDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13);

      retDeptNo.Direction = ParameterDirection.ReturnValue;
      retDeptName.Direction = ParameterDirection.ReturnValue;
      retDeptLoc.Direction = ParameterDirection.ReturnValue;

      command.Prepare();

      minDeptNo.Value = 10;
      maxDeptNo.Value = 20;

      command.ExecuteNonQuery();
      connection.Close();

      Console.Write("deptno = {0}, deptname = {1}, loc = {2}", retDeptNo.Value, retDeptName.Value, retDeptLoc.Value);
      Console.ReadLine();
    }

[Visual Basic]

  Sub Main()
    Dim connection As PgSqlConnection = New PgSqlConnection("host=localhost;database=test;user=postgres;")
    Dim command As PgSqlCommand
    Dim minDeptNo, maxDeptNo As PgSqlParameter  'input parameters
    Dim retDeptNo, retDeptName, retDeptLoc As PgSqlParameter  'return value parameters

    connection.Open()
    command = connection.CreateCommand()
    command.ParameterCheck = True

    command.CommandText = "SELECT * FROM getdept(?, ?)"
    minDeptNo = command.Parameters(0)
    maxDeptNo = command.Parameters(1)

    retDeptNo = command.Parameters.Add("deptno", PgSqlType.Int)
    retDeptName = command.Parameters.Add("dname", PgSqlType.VarChar, 12)
    retDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13)

    retDeptNo.Direction = ParameterDirection.ReturnValue
    retDeptName.Direction = ParameterDirection.ReturnValue
    retDeptLoc.Direction = ParameterDirection.ReturnValue

    command.Prepare()

    minDeptNo.Value = 10
    maxDeptNo.Value = 20

    command.ExecuteNonQuery()
    connection.Close()

    Console.Write("deptno = {0}, deptname = {1}, loc = {2}", retDeptNo.Value, retDeptName.Value, retDeptLoc.Value)
    Console.ReadLine()
  End Sub

This example shows how to get results through parameters for a query that returns aliased and non-aliased columns. Note that you have to check how PostgreSQL names columns that represent compound statements.

[C#]

    static void Main(string[] args) {

      PgSqlConnection connection = new PgSqlConnection("host=localhost;database=test;user=postgres;");
      PgSqlCommand command;
      PgSqlParameter retSalary, retJob, retCount;  //return value parameters

      connection.Open();
      command = connection.CreateCommand();
      command.ParameterCheck = true;
      command.CommandText = "SELECT Sum(Sal) AS Salary, Count(*), Job FROM emp GROUP BY Job ORDER BY Salary DESC";

      retCount = command.Parameters.Add("count", PgSqlType.Int);
      retSalary = command.Parameters.Add("Salary", PgSqlType.Int);
      retJob = command.Parameters.Add("Job", PgSqlType.VarChar, 40);

      retCount.Direction = ParameterDirection.ReturnValue;
      retSalary.Direction = ParameterDirection.ReturnValue;
      retJob.Direction = ParameterDirection.ReturnValue;

      command.ExecuteNonQuery();
      connection.Close();

      Console.Write("count = {0}, salary = {1}, job = {2}", retCount.Value, retSalary.Value, retJob.Value);
      Console.ReadLine();
    }

[Visual Basic]

  Sub Main()

    Dim connection As PgSqlConnection = New PgSqlConnection("host=localhost;password=postgres;database=test;user=postgres;")
    Dim command As PgSqlCommand
    Dim retSalary, retJob, retCount As PgSqlParameter  'return value parameter

    connection.Open()
    command = connection.CreateCommand()
    command.ParameterCheck = True
    command.CommandText = "SELECT Sum(Sal) AS Salary, Count(*), Job FROM emp GROUP BY Job ORDER BY Salary DESC"

    retCount = command.Parameters.Add("count", PgSqlType.Int)
    retSalary = command.Parameters.Add("Salary", PgSqlType.Int)
    retJob = command.Parameters.Add("Job", PgSqlType.VarChar, 40)

    retCount.Direction = ParameterDirection.ReturnValue
    retSalary.Direction = ParameterDirection.ReturnValue
    retJob.Direction = ParameterDirection.ReturnValue

    command.ExecuteNonQuery()
    connection.Close()

    Console.Write("count = {0}, salary = {1}, job = {2}", retCount.Value, retSalary.Value, retJob.Value)
    Console.ReadLine()
  End Sub

See Also

PgSqlCommand Class | PgSqlParameter Class


PostgreSQL Specific Features

This section describes dotConnect for PostgreSQL support of PostgreSQL-specific technologies.

  • Using Secure Connections
  • Network Tunneling
  • Working with Composite Types


dotConnect for PostgreSQL Namespaces

dotConnect for PostgreSQL support@devart.com

Using Secure Connections

dotConnect for PostgreSQL allows you to establish secure network connections. You can do it using SSL protocol. This article describes basic concepts for these technologies and how to use it in dotConnect for PostgreSQL.
The article consists of following sections:

  • Why Using Secure Connections?
  • Using SSL Connections
  • Setting Up SSL Connection
  • Using SSL Connection without authentication

Why Using Secure Connections?

When PostgreSQL client communicates with PostgreSQL server, all communication (with the exception of the user password) is done in plain text. This means that anyone who gets between your client and the server can have full access to all information transmitted, and even change the data while it is in transit. In order to protect your information you need to encrypt communications between the PostgreSQL server and the client application.

Using SSL Connections

The Secure Sockets Layer protocol enables two parties to negotiate a 'secure' communications channel, ensuring the privacy, authenticity, and integrity of message data. The negotiation mechanism follows:

  1. The client requests a SSL connection from the server.
  2. The two parties negotiate a common ciphersuite, which consists of a key exchange algorithm, a certificate verification algorithm, an encryption algorithm, and an integrity check.
  3. The server provides its certificate so it can be authenticated by the client. Optionally, the client may provide its certificate to be authenticated by the server.
  4. The two parties compute the cryptographic parameters used in the ciphersuite, such as the secret keys needed for data encryption.
  5. The two parties exchange application data, using the generated session key, negotiated algorithms and computed cryptographic parameters.
Once the cryptographic parameters are established, the application data is transparently encrypted and checked for integrity in both directions.

To check whether your PostgreSQL server supports SSL you can examine the value of the 'ssl' system variable:

    SHOW VARIABLES LIKE 'have_openssl'
If server returns YES, you can go on to setup client. If the response is NO, or if something refuses to work in the existing configuration, please visit the please visit PostgreSQL documentation topic Secure TCP/IP Connections with SSL.

Setting Up SSL Connection

Once server is ready to use SSL connections you only have to setup client properly. You must have 3 additional files reachable:

  • authority certificate (for example root.crt) - used to verify identity of client and server
  • client certificate (for example client.crt) - used to encrypt and decrypt data during connection.
  • private key (for example client.crt) - proves client certificate sent by owner; does not indicate certificate owner is trustworthy.

Please refer to OpenSSL site for information about these files. The later part assumes you have valid certificates and private key.

The property SslOptions.CipherList by default is empty, which means that client agrees to use any of available ciphers. The following ciphers are allowed in dotConnect for PostgreSQL:

  • DES(40)
  • DES or DES(56)
  • 3DES or DES(168)
  • AES(128)
  • AES or AES(256) (used by default)
  • RC4(40)
  • RC4 or RC4(128)
  • RC2 or RC2(40)

You can use ALL keyword to indicate whole set of ciphers. To exclude certain cipher from the set use "-" sign. For instance, value of SslOptions.CipherList property "ALL:-RC4" means that any cipher but RC4 can be used. This property allows you to control performance-security trade-off using this property. To gain better performance you can use RC2 cipher. To achieve maximal traffic security pay attention at 3DES or AES ciphers. By default dotConnect for PostgreSQL tries to use ciphers beginning with most secure rather than fast ones.

The sample code below illustrates establishment of SSL connection.

[C#]

PgSqlConnection conn = new PgSqlConnection("user id=postgres;password=postgres;host=localhost;");
conn.SslOptions.CACert = "E:\\Test\\root.crt";
conn.SslOptions.Cert = "E:\\Test\\client.crt";
conn.SslOptions.Key = "E:\\Test\\client.key";
conn.SslOptions.SslMode = SslMode.Require;
conn.Open();

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection("user id=postgres;password=postgres;host=localhost;")
conn.SslOptions.CACert = "E:\Test\root.crt"
conn.SslOptions.Cert = "E:\Test\client.crt"
conn.SslOptions.Key = "E:\Test\client.key"
conn.SslOptions.SslMode = SslMode.Require
conn.Open()

Using SSL Connection without authentication

You can use SSL connection without authentication on both server and client side. If you don't want server to verify the client certificate, you need to configure PostgreSQL server without the root.crt, and if you don't want client to verify the server sertificate, don't set the SslOptions.CACert property of the connection.

Remember, when you disable authentication, the security of the connection between the clent and server decreases.

See Also

PgSqlConnection Class | SslOptions Class


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Network Tunneling

Usually when a client needs to connect to server it is assumed that a direct connection can be established. Nowadays though, due to security reasons or network topology, it is often necessary to use a proxy or bypass a firewall. This article describes different ways to connect to server with dotConnect for PostgreSQL.

  • Direct connection
  • Connection through proxy
  • Additional information

Direct connection

Direct connection to server means that server host is accessible from client without extra routing and forwarding. This is the simplest case. The only network setting you need is Host parameter of connection string. This is also the fastest and most reliable way of communicating with server. Use it whenever possible.

The following lines illustrate the simplicity:

[C#]

PgSqlConnection conn = new PgSqlConnection();
conn.ConnectionString = "user id=postgres;password=postgres;host=localhost;";
conn.Open();

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection
conn.ConnectionString = "user id=postgres;password=postgres;host=localhost;"
conn.Open()

Connection through proxy

Sometimes it is necessary to connect to server in another network. For example, client address is 10.0.0.2, server address is 192.168.0.10. The client and server reside in different networks, so the client can reach it only through proxy at address 10.0.0.1, which listens on port 808. In this case in addition to connection string parameter Host you have to setup PgSqlConnection.ProxyOptions object as follows:

[C#]

PgSqlConnection conn = new PgSqlConnection();
conn.ConnectionString = "user id=postgres;password=postgres;host=192.168.0.10;";
conn.ProxyOptions.Host = "10.0.0.1";
conn.ProxyOptions.Port = 808;
conn.ProxyOptions.User = "ProxyUser";
conn.ProxyOptions.Password = "ProxyPassword";
conn.Open();

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection
conn.ConnectionString = "user id=postgres;password=postgres;host=localhost;"
conn.ProxyOptions.Host = "10.0.0.1"
conn.ProxyOptions.Port = 808
conn.ProxyOptions.User = "ProxyUser"
conn.ProxyOptions.Password = "ProxyPassword"
conn.Open()

Note that setting parameters of PgSqlConnection.ProxyOptions automatically enables use of proxy server. Connections through proxy are available when PgSqlConnection.Protocol property is Tcp (default) or Http. You cannot use proxy when protocol is Pipe, Memory, Ssl or Ssh.

As usual, you can specify all settings in connection string:
Port=3307;Proxy Host=10.0.0.1;Proxy Port=808;Proxy User=ProxyUser;Proxy Password=ProxyPassword;User ID=postgres;Password=postgres;Host=192.168.0.10;

Additional information

Technically speaking, there is one more way to tunnel network traffic. The Secure Shell forwarding, or SSH, can be used for forwarding data. However, main purpose of SSH is traffic encryption rather than avoiding firewalls or network configuration problems. The article Using Secure Connections describes how to use SSH protocol in dotConnect for PostgreSQL.

Keep in mind that traffic tunneling or encryption always increases CPU usage and network load. It is recommended that you use direct connection whenever possible.

See Also

PgSqlConnection Class | Using Secure Connections


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Working with Composite Types

dotConnect for PostgreSQL fully supports PostgreSQL composite types. dotConnect for PostgreSQL allows you to treat these types in convenient way with special classes. This article describes what are PostgreSQL composite types and how you can use them in dotConnect for PostgreSQL.

As stated in PosgtreSQL server documentation, composite type describes the structure of a row or record. It is actually just a list of field names and their datatypes. Values of composite types can be used in many of the same ways that simple types can be used. For example, a column of a table can be declared to be of a composite type. When a table is created on the server, a composite type with same name is automatically created as well, so you can use it later to declare particular columns in other tables. Complete functionality for user-created composite types is introduced in PostgreSQL server 8.0. Server versions older than 8.0 have some restrictions on use of composite rows. Samples in this article assume that you work with 8.0 server.

The following SQL statement shows how to declare a composite type:

CREATE TYPE tperson AS (name text, age integer)

Later on you can use the created type as any other type on the server. For example, you can create another composite type that contains a field of type tperson. Below is code sample that demonstrates how to declare the type and create a table that uses it.

[C#]

static void CreateTable(PgSqlConnection conn)
{
  string str = "CREATE TYPE tperson AS (name text, age integer)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Type created");
  str = "CREATE TABLE personnel (id integer, person tperson)";
  pgCommand.CommandText = str;
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Table created");
}

[Visual Basic]

Sub CreateTable(ByVal conn As PgSqlConnection)
  Dim str As String = "CREATE TYPE tperson AS (name text, age integer)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Type created")
  str = "CREATE TABLE personnel (id integer, person tperson)"
  pgCommand.CommandText = str
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Table created")
End Sub

To insert some data into the table 'personnel' you can use either ROW constructor or quoted expressions. Both ways are presented below. Notice that the second and the third statements are equivalent. It is up to you to decide which way to use. Bear in mind, however, that quoting nested composite rows results in extra amount of quote symbols.

INSERT INTO personnel VALUES (1, ROW('Peter',36))
INSERT INTO personnel VALUES (2, ROW('Mark',NULL))
  or
INSERT INTO personnel VALUES (2, '("Mark",)')

Retrieving data from tables with composite rows can be as easy as fetch of common data types. If you have created type and table as described above and inserted some values, you can retrieve the data using the following code:

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT * FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    Console.Write(pgReader.GetInt32(0) + "\t");
    PgSqlRow pgRow = pgReader.GetPgSqlRow(1);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    Console.Write(pgRow[0] + "\t");
    Console.WriteLine(pgRow["age"]);
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT * FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    Console.Write(pgReader.GetInt32(0) & Chr(9))
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(1)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      Console.Write(pgRow(0) & Chr(9))
      Console.WriteLine(pgRow("age"))
    End If
  End While
  pgReader.Close()
End Sub

As you can see, using PostgreSQL composite types does not complicate things much. dotConnect for PostgreSQL utilizes four entities to operate composite types and their values. These are:

  • PgSqlRow Class that contains data for certain cell in a table.
  • PgSqlRowType Class that describes composite type.
  • PgSqlAttribute Class that helps to describe a composite type representing type columns as attributes.
  • PgSqlAttributeCollection Class that holds all attributes of a composite type.
To understand how these classes cooperate consider the following code. It writes to console all fields in a composite type regardless of how many fields were declared in this type.

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

dotConnect for PostgreSQL allows you to communicate with server using composite rows as parameters. This is performed in usual way. The following sample code inserts data into the table created above.

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and fill with data
  //Note that connection must be open to use this form of constructor
  PgSqlRow pgRow = new PgSqlRow("tperson",conn);
  pgRow[0] = "Fred";
  pgRow[1] = 24;
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",3);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  'Note that connection must be open to use this form of constructor
  Dim pgRow As PgSqlRow = New PgSqlRow("tperson", conn)
  pgRow(0) = "Fred"
  pgRow(1) = 24
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

As you can see, it is very easy to work with composite values in dotConnect for PostgreSQL. This article has introduced the main features you should be acquainted with. In addition there are extra capabilities you can take advantage of, such as data parsing, support of nested composite types and metadata caching. These features are described in reference for classes that you can find in See Also list.

See Also

PgSqlRow Class | PgSqlRowType Class | PgSqlAttribute Class | PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace

See Also

PostgreSQL Specific Features


Working with DataSets

This section describes working with DataSets with such dotConnect tools as DataSet Wizard, DataSet Manager, and DataSet Editor.

  • Using DataSet Wizard

    The DataSet Wizard is designed to create and manage typed provider-specific datasets. The wizard takes you step by step through the process of creating the typed PgSqlDataSet object and integrates it with you project. This topic provides information on every screen of DataSet Wizard.

  • Using DataSet Manager

    The DataSet Manager window displays the data sources in your project represented by PgSqlDataSet and PgSqlDataTable classes. You can use DataSet Manager to create a user interface with data-bound controls by dragging items from the window onto forms in the project. This article describes how to use DataSet Manager.

  • Using DataSet Editor

    The DataSet Editor is designed to tweak DataSets, set all the necessary parameters for them, create and edit their DataTables, etc. This topic provides information on on how to Edit DataSets with DataSet Editor.


Using DataSet Wizard

General Information

dotConnect for PostgreSQL leverages managing DataSets in your applications with special wizard that takes you through the process of creation and tuning of client-side data handling. This topic provides information on functions of every screen of dotConnect for PostgreSQL DataSet Wizard and how to use all its features. For detailed information on data access basics please refer to article "Using DataSets in ADO.NET" in MSDN.

There are three ways to invoke the wizard:

  • Click Tools main menu item in IDE, point to PostgreSQL, and click DataSet Wizard item.
  • In DataSet Manager, click Add New DataSet or Configure DataSet with Wizard button.
  • Right-click a PgSqlDataAdapter component and choose DataSet Wizard item.

The wizard allows you to keep resultsets structure as DataAdapters, TableAdapters or just metadata information. The behavior of Wizard slightly differs depending on whether you had some Windows Forms or Web Forms Designer focused when the DataSet Wizard was invoked. If there was a designer focused, its name is shown in Wizard caption, otherwise the caption contains name of the project, and DataAdapters can't be used as data source for database objects.

This feature is available in Professional Edition only.

Step 1: Choose DataSet

Devart DataSet Wizard - Choose DataSet to work with

This dialog allows you to choose whether you want to create new DataSet or modify existing one. When you select existing DataSet its tables are shown in the list. The wizard attempts to preserve existing tables and relations whenever possible.

Step 2: Choose Database Objects

Devart DataSet Wizard - Choose database objects

This dialog allows you to select database objects you want to include in the dataset. You can mark tables, views, individual columns, stored procedures and stored functions. Selecting a table automatically selects all its columns. Database relations are not listed in the database hierarchy because you will be able to setup it later.

Note that when you click Next, every selected stored procedure is executed with default parameters' values. Do not select stored procedures that may damage your data.

The buttons to the right of database tree allow you to create, configure, rename and remove connections. The Show all databases check box controls whether you can see all databases on the server or only those specified as default for connections. If a connection has no default database, all databases are visible regardless of this setting.

The Data Source type combo box to the right of the tree allows you to choose how to store all selected database objects. For example, if you choose Data Adapter, new DataAdapter components will be created for all checked tables, views and stored procedures. Similarly, if you choose Command Schema, DataSet will contain structure (metadata) of all selected objects. Every database object can be adjusted on the next step regardless of this setting.

The screenshot above demonstrates that you can select whole tables as well as individual columns.

The Conflict Option combo box allows you to generate update commands with the specified ConflictOption mode.

Step 3: Setup Individual Tables

Devart DataSet Wizard - Setup individual data tables

The DataSet Wizard allows you to configure data source for every individual table. Click on the list at the left part of screen to view its settings. The buttons Configure, Preview Data and Rename perform corresponding actions on underlying data source, while buttons Add and Remove control list of tables.

This page also allows you to map a table name. To do it, select a table from the list and press F2. As presented on the screenshot, tables dept and emp are renamed to departments and employees. These new names will be used on consecutive pages of DataSet Wizard.

The Data source combobox allows you to choose what way every database object will be represented: Table Adapter, Data Adapter or Command schema (this means that only description of data structure is stored in the DataSet). Choose required data source type and then click Configure button to set it up. You can also use existing DataAdapters on the form.

Another combobox, Update method, allows you to enable or disable generating of update commands. It has following options:

  • Do not generate update commands. You typically choose this option when adapter will be used only to read data from a data source, not write it back. Or you wish to fill in the commands yourself after the wizard has finished. This is the only choice available for stored procedures and Command schemas.
  • Generate update commands. When you choose Data Adapter as data source, DataSet Wizard generates SQL statements for the adapter's UpdateCommand, InsertCommand, and DeleteCommand properties. For Table Adapters the Wizard also generates Fill() and GetData() methods.
  • Use CommandBuilder. This option is available for Data Adapters only, if a Form Designer was focused when Wizard started. Wizard will create a CommandBuilder object, setup it and place it on the form.

Step 4: Choose Column Mappings

Devart DataSet Wizard - Cobfigure columns mapping

This step allows you to adjust column name mapping. Click on a table in the left list to reveal its columns. Note that column names must be unique. You can't add or delete columns on this step.

You can map a table name in step 3.

Step 5: Specify Database Relations

Devart DataSet Wizard - Configure DataSet relations

The last step in generating dataset allows you to add, delete or edit database relation. The Wizard automatically imports existing data constraints from database. You can setup a relationship that maintains information about corresponding records in two data tables in a dataset. Creating a relationship also creates a foreign-key constraint that is added to the child table. A foreign-key constraint can implement referential integrity between parent and child tables.

  • Update rule. Specifies how changes are made to child records when a parent record is updated to maintain referential integrity.
  • Delete rule. Specifies how changes are made to child records when a parent record is deleted to maintain referential integrity.
  • Accept/Reject rule. Specifies how changes are made to child records when changes to a parent record are accepted or rejected to maintain referential integrity. For this option the only allowed values are None and Cascade.

The following values are available:

  • None. No action taken on related rows. This is the default value.
  • Cascade. Delete or update related rows.
  • SetDefault. Set values in related rows to some default value.
  • SetNull. Set values in related rows to DBNull.

The screenshot contains example of a relation in single table. According to the layout, if a record is deleted, all MGR fields that once pointed to the record become NULL.

Step 6: Choose DataSet placement

Devart DataSet Wizard - Wizard finished successfully

After dataset is generated you can let Wizard create an instance of generated class. It will be visible in Forms Designer. This option is not available if no designer was focused when wizard started.

Keep in mind that DataSet Wizard creates additional .xse file with some settings. This file is required for the project to build correctly.

See Also

Developing Database Applications with dotConnect for PostgreSQL


Using DataSet Manager

The DataSet Manager window displays the data sources in your project represented by PgSqlDataSet and PgSqlDataTable classes. You can use DataSet Manager to create a user interface with data-bound controls by dragging items from the window onto forms in the project. Every item has a drop-down list where you can select the type of control to create when dragging it onto a form. You can customize the control list with additional controls, including controls that you have created.

With DataSet Manager you can:

  • Create forms that display data by dragging items from DataSet Manager onto forms.
  • Connect existing controls to data by dragging items from DataSet Manager onto existing controls.
  • Customize the list of controls available for each data type in DataSet Manager.
  • Choose which control should be created when dragging an item onto a form in your Windows application.
  • Create and add new data sources in your project.
  • Open datasets for editing in the DataSet Editor.

This feature is available in Professional Edition only.

Opening the DataSet Manager Window

To display the DataSet Manager window, click Tools in the main menu, point to PostgreSQL, and choose DataSet Manager. This menu item is only available when a project is open in Visual Studio.

Populating the DataSet Manager Window

You populate the DataSet Manager window by adding PgSqlDataSet and PgSqlDataTable components to your project. One of the easy ways to do it is using the DataSet Wizard.

Note that a data source is available in DataSet Manager only if its form is opened. When you close a form, the PgSqlDataSet and PgSqlDataTable components located on it disappear from the DataSet Manager window.

Creating Data-bound Controls

You can drag an item from DataSet Manager onto a form to create a new data-bound control, or you can drag an item from DataSet Manager onto an existing control to set up the data binding between the control and the item dragged onto it. Each node in the DataSet Manager window allows you to choose the type of control that will be created when you drag it onto a form. You must choose between a Grid layout, where all columns or properties are displayed in a DataGridView, or a Details layout, where all columns or properties are displayed in individual controls. You can choose the control to be created prior to dragging by selecting an item in DataSet Manager and choosing the control from the item's drop-down control list.

Data-bound Controls That Display Related Records

DataSet Manager displays related tables in a hierarchical tree view. For example, in a dataset with Dept and Emp tables (where a department can have many employees), the Emp table appears as the last column in the Dept table as an expandable node. To display data from this related table and set up the data binding to display the employees for a selected department, you would drag items from this related tree view (as opposed to items from the individual top-level nodes for Dept and Emp).

Commands Available in DataSet Manager

The following commands are available through the DataSet Manager toolbar or popup menu:

  • Add New DataSet
    Opens the DataSet Wizard, which assists you in creating new data sources in your project.
  • Edit DataSet with Designer
    Opens the selected dataset in the DataSet Designer.
  • Configure DataSet with Wizard
    Opens the DataSet Wizard populated with information from the selected data source.
  • Refresh
    Synchronizes the DataSet Manager window with the data sources in your project. This operation is performed automatically, so actually there is no need to use this option.
  • Preview Data
    Shows the Data Preview form where you can inspect and edit selected table.

Cross-form References

When you drag an item from the DataSet Manager window onto a form that does not have an instance of the DataSet, DataSet Manager creates an additional DataLink component. For more information about cross-form referencing please refer to topic InterForm Technology.

See Also

Using DataSet Wizard | InterForm Technology | DataLink Component Architecture | Developing Database Applications with dotConnect for PostgreSQL


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using DataSet Editor

  • General Information
  • Creating typed DataSet
  • Using created DataSet

General Information

dotConnect for PostgreSQL supports working with both strongly typed and untyped DataSets. The DataSet Editor is a tool that allows you to create a strongly typed DataSet visually. This tutorial shows how to set the DataSet schema with the editor manually. For information about typed DataSet generation with the help of wizard, see tutorial Using DataSet Wizard.

This walkthrough supposes that you know how to establish the connection to the PgSql server (see Logging onto the Server) and how to use Devart configuration window for data tables and commands.

Creating typed DataSet

In this tutorial, we will create a strongly typed DataSet from an untyped one. It will include tables Dept and Emp; for their definitions, see the tables.sql script which is located in the dotConnect for PostgreSQL installation directory. The following steps need to be performed:

  1. Create an untyped DataSet PgSqlDataSet1. To do this, you may either drop an PgSqlDataSet object to the form or double-click it in the toolbox. Select the Untyped PgSqlDataSet option and click OK:

    Add PgSqlDataSet dialog box

    Double-click new DataSet or select the Edit item from the pop-up menu to start DataSet Editor.

  2. Create a data table. Use the Add new table to DataSet button to create a new data table. Rename the table to "Dept" with the corresponding item of the pop-up menu.

  3. Configure data table. Set up DataTable select and update commands. Double-click the table or select the Configure Data Table item from the pop-up menu. DataTable Editor window will appear:

    For detailed information about DataTable Editor using, see the Working with Command Editor topic.

  4. Generate data table schema. Populate the Columns collection of the data table by clicking the Create Columns item from the table item pop-up menu:

    Otherwise, you will be prompted to create table columns during the DataSet schema saving.

  5. Configure additional data tables. Repeat steps 2-4 to add other data tables (the only Emp table in our case):

    Setting up emp table

    Note:To remove redundant data tables from your DataSet, use the Remove table from the DataSet button.

  6. Create associations. Use the Edit DataSet relations button to set up associations between your tables. Add and edit relations in the relation editor:

  7. Save DataSet Schema. Use the Save Schema button to save your DataSet. Set the schema name to NewDataSet. After schema saving the NewDataSet class is generated. It will be available in the toolbox and can be used for other typed DataSets creation with the same schema. PgSqlDataSet1 object becomes an instance of typed NewDataSet and cannot be changed by the editor anymore:

Using created DataSet

The PgSqlDataSet1 object can be used as common typed DataSet now. For example, the following code will

  1. fill the PgSqlDataSet1 object;
  2. insert a new record into the Dept table;
  3. delete the row with Empno = 20 from the Emp table.

[C#]

pgDataSet1.Fill();
pgDataSet1.Dept.AddDeptRow(50, "IT", "San-Francisco");
pgDataSet1.Emp.RemoveEmpRow(pgDataSet1.Emp.FindByEMPNO(20));

[Visual Basic]

pgDataSet1.Fill()
pgDataSet1.Dept.AddDeptRow(50, "IT", "San-Francisco")
pgDataSet1.Emp.RemoveEmpRow(pgDataSet1.Emp.FindByEMPNO(20))

See Also

Working with Command Editor | Using DataSet Wizard | Logging Onto The Server


WinForms-Specific Features

This section describes dotConnect for PostgreSQL features, specific for WinForms applications.

  • InterForm Technology

    Devart data providers intend to leverage design time aspects of development as much as possible. In this direction dotConnect for PostgreSQL introduces new technology that allows referencing components that reside on different forms of a WinForms application. This article describes the InterForm technology.

  • DataLink Component Architecture

    This article provides information on how to implement advanced data binding with the DataLink component. The article describes advanced features of the component and shows how to use it together with the InterForm technology.


InterForm Technology

Devart data providers intend to leverage design time aspects of development as much as possible. In this direction dotConnect for PostgreSQL introduces new technology that allows referencing components that reside on different forms of a WinForms application. This article describes how to use the InterForm technology.

  • Introduction
  • InterForm Fundamentals
  • Requirements
  • Limitations
  • Use Cases and Recommendations

Introduction

Modern applications usually implement multiform user interface and centralized data access model. However, Visual Studio provides rather inconvenient tools for design-time development of such applications. For example, it is very uncomfortable to retrieve live data in design time with single database connection and unified data access and storage module. Moreover, you have to write additional code to maintain shared connections and datasets.

The InterForm technology addresses these problems and allows you to circumvent most obstacles on the way to design time development of applications with a good architecture.

InterForm Fundamentals

When you work in design time, it is very easy to establish cross form reference with InterForm. Select the reference property in Properties window, then click the drop down button and navigate through the tree to find the component you want to connect to.

This results in two actions. First, dotConnect for PostgreSQL establishes reference to the selected component, so you can use it right away. Second, dotConnect for PostgreSQL creates a virtual link that describes the referenced component symbolically. This string has three constituents: form name, component name, and, optionally, name of nested component. For example, when a DataLink object references table table1 in PgSqlDataSet dataSet1 on a MyForm, the virtual link string looks like MyForm.dataSet1.table1. When the referencing component is loaded in run time or design time, dotConnect for PostgreSQL tries to resolve the virtual link. In case when referenced component cannot be found, the reference is set to null in design time, or an exception is thrown in run time. In design time, when you open the form with referenced components, the actual references are updated. When the referenced form is closed, the actual references are set back to null.

The InterForm technology can be used with properties that reference the following types:

  • PgSqlConnection
  • PgSqlCommand
  • PgSqlDataTable
  • PgSqlDataSet

There's important note about inheritance. Consider you have a form with a component, and this component is referenced from somewhere. Consider you have a descendant of this form. In this case the reference will still point to the ancestor component, not the descendant.

Requirements

There are some requirements for InterForm to function properly. In design time, the form that contains referenced components should be always open, so that virtual links can be resolved. For the same reason, in run time the form that contains referenced components should be created before any form that references it. And there should be only one instance of the form, so that virtual links can be resolved to unique components.

Limitations

The InterForm technology is supported for WinForms applications only (not available for ASP.NET and Compact Framework). The InterForm links are resolved as long as referenced form designer is created, so you have to keep it open. Likewise, if you change the name of a referenced component, and the referencing form is not open, the virtual link is not updated.

Note that in some cases, like inheritance and frame embedding, the IDE compiles ancestor (or original frame) and uses it in design time. In the compiled version the virtual link is not available, so the project may need to be recompiled to reflect most recent changes in references.

As mentioned before, the form that contains referenced components should be created before any form that references it. Hence it is not possible to establish cross-reference links like two forms referencing each other.

Use Cases and Recommendations

If you wish to use advantages of the InterForm technology, we recommend to keep all data access components on a single form, which is created before other forms in run time, and that is kept open in design time. This approach will help to build a centralized application and avoid common problems.

Below we demonstrate some examples of using the InterForm technology to solve some problems that developers encounter frequently.

Shared single connection. It is often required that a complex application with many forms and modules uses single PgSqlConnection that can be adjusted in single location. Using standard techniques, you would have to pass the connection in run time everywhere, which means no design time operations. But with the InterForm technology you can:

  1. Setup the connection on a standalone form.
  2. Make sure this form is created before other forms in run time.
  3. Point your components to the connection and use all design time features.

Unified data source. Sometimes application architecture requires that some set of components uses same data source. Again, this leads to inconvenient design-time operations for multiform applications. But with the InterForm technology you can:

  1. Setup the data access components on a standalone form.
  2. Create DataLink components to reference the data access components.
  3. Use the DataLink objects as data source.

Now when you resetup the data access components, the changes are propagated to other controls through DataLink objects automatically.

See Also

General Concepts in Database Application Development | DataLink Component Architecture | Developing Database Applications with dotConnect for PostgreSQL


DataLink Component Architecture

This article provides information on how to implement advanced data binding with the DataLink component. The article describes advanced features of the component and shows how to use it together with the InterForm technology.

  • General Information
  • DataLink Features
  • DataLink Advanced Features
  • Use Case

General Information

With the DataLink component, you can universally bind all Windows Forms controls to data sources.

The DataLink component simplifies the process of binding controls to a data source. The component is the preferred way to bind your Windows Forms controls to data sources because it provides the following advantages over traditional data binding:

  • Design-time data binding
  • Encapsulation of CurrencyManager functionality with CurrencyManager events at design time
  • Simpler creation of a list that supports the IBindingList interface
  • A level of indirection between the data source and the control

The DataLink component is built over the .NET Framework BindingSource class. So, you can use it as an advanced alternative to BindingSource.

DataLink Features

The DataLink component provides several features for binding controls to data. With these features, you can implement most data-binding scenarios with almost no coding on your part. The DataLink component accomplishes this by providing a consistent interface for accessing most usable data sources

The consistent interface provided by the DataLink component greatly simplifies the process of binding data to controls. For data-source types that provide change notification, the DataLink component automatically communicates changes between the control and the data source. For data-source types that do not provide change notification, events are provided that let you raise change notifications. The following list shows the features supported by the DataLink component:

  • Design time support
  • Indirection
  • Currency management
  • Data source as a list
  • DataLink as an IBindingList
  • Custom and transactional item creation
  • IEnumerable support
  • Sorting and filtering with the IBindingListView interface
  • Integration with BindingNavigator

For detailed information on these features please refer to MSDN topic BindingSource Component Architecture.

DataLink Advanced Features

One of the most exciting features about the DataLink component is that it supports the InterForm technology, which means that you can employ cross-form binding in your applications. For example, you can synchronize current positions in two datasets on different forms without writing a line of code. The DataLink component supports both typed and untyped PgSqlDataSet and PgSqlDataTable components, as well as relations in the dataset schemas.

The DataLink component has powerful design-time property editor. The editor allows picking data source from any open form in the project.

Use Case

One of the attributes of a good application architecture is unified data source block, in other words, when some set of components uses same data source. The DataLink component allows you to build this scheme and retain convenient design-time setup for multiform applications. To achieve this goal, you should:

  1. Setup the data access components on a standalone form.
  2. Create DataLink components to reference the data access components.
  3. Use the DataLink objects as data source.

Now when you resetup the data access components, the changes are propagated to other controls through DataLink objects automatically.

See Also

General Concepts in Database Application Development | InterForm Technology | Developing Database Applications with dotConnect for PostgreSQL


ASP.NET-Specific Features

This section describes dotConnect for PostgreSQL features, specific for ASP.NET applications.

  • ASP.NET Provider Model Support
  • Using ExtendedMembership Provider in ASP.NET MVC 4 Application
  • Using PgSqlDataSource Component
  • Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL
  • Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL
  • Using Entity Framework Implementation of ASP.NET Identity 1 for PostgreSQL
  • Using Entity Framework Implementation of ASP.NET Identity 2 for PostgreSQL
  • Configuring Trust Level for Web Applications


ASP.NET Provider Model Support

dotConnect for PostgreSQL can be used in the ASP.NET provider model. It allows developers to write better structured applications and easily switch data storage in ASP.NET applications from other media such as Microsoft SQL Server. For detailed information on the basics refer to MSDN whitepaper: ASP.NET 2.0 Provider Model: Introduction to the Provider Model.

dotConnect for PostgreSQL implements the following providers: Membership, Session State, Role, Profile, Site Map, Web Event, and Personalization. This feature is available in Professional Edition only.

This topic provides information on how to set up ASP.NET application to use dotConnect for PostgreSQL as one of these providers. It consists of the following sections:

  • Installation and setup
  • Membership provider
  • SimpleMembership provider
  • Role provider
  • Profile provider
  • Session State provider
  • Site Map provider
  • Web Event provider
  • Personalization provider
  • Deployment

Installation and setup

All providers are contained in the Devart.Data.PostgreSql.Web.dll assembly. You should add a reference to this assembly in your project in order to use the ASP.NET provider model. Another condition for the providers to function properly is existence of certain database objects. Before using ASP.NET providers, you have to run the InstallWebTables.sql script against the database you wish to use. The script can be found in the \Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET 2 folder.

During the installation process dotConnect for PostgreSQL adds new entries into the machine.config file. They are used by websites when the settings are not overridden with a local Web.config file. You can choose to keep the settings in machine.config, in which case they will be used for all web sites, or in Web.config files, where you can set up specific parameters. Note that the default connection string in the machine.config file is incorrect, so you will want to adjust or override it.

When you redefine an identifier in the Web.config file, you have to add the remove keyword in the appropriate section, as shown below:
  <remove name="PgSqlServices" />
  <add name="PgSqlServices" connectionString="host=server;database=test;user id=postgres;" />
This example demonstrates how to adjust connection string parameters. By default dotConnect for PostgreSQL creates a stub connection string with the name PgSqlServices.

You can also configure your website with the standard Control Panel applet "ASP.NET Configuration Settings". To open it, navigate to Control Panel | Administrative Tools | Internet Information Services, then select a site or a virtual directory, open its properties, switch to ASP.NET, and click Edit Configuration. This dialog provides control over various site settings, including the connection string.

Membership provider

The fundamental job of a membership provider is to interface with data sources containing data regarding a site's registered users, and to provide methods for creating users, deleting users, verifying login credentials, changing passwords, and so on. The .NET Framework's System.Web.Security namespace includes the class named MembershipUser that defines the basic attributes of a membership user and that a membership provider uses to represent individual users.

To access this functionality, use the Devart.Data.PostgreSql.Web.Providers.PgSqlMembershipProvider class. It behaves as the System.Web.Security.RoleProvider class (you can read its description in MSDN). The following example shows the Web.config file for an ASP.NET application configured to use PgSqlMembershipProvider.

<configuration>
  <connectionStrings>
    <add name="PgSqlServices"
         connectionString="host=server;database=test;user id=postgres;" />
  </connectionStrings>
  <system.web>
    ...
    <membership defaultProvider="AspNetPgSqlMembershipProvider"
      userIsOnlineTimeWindow="15">
      <providers>
        <add
          name="AspNetPgSqlMembershipProvider"
          type="Devart.Data.PostgreSql.Web.Providers.PgSqlMembershipProvider,
                Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                PublicKeyToken=09af7300eec23701"
          connectionStringName="PgSqlServices"
          enablePasswordRetrieval="false"
          enablePasswordReset="true"
          requiresQuestionAndAnswer="true"
          requiresUniqueEmail="false"
          passwordFormat="Hashed"
          maxInvalidPasswordAttempts="5"
          passwordAttemptWindow="10" />
      </providers>
    </membership>
  </system.web>
</configuration>

Note: replace "7.1.26.0" with the actual provider version.

Role provider

The fundamental job of a role provider is to interface with data sources containing role data mapping users to roles, and to provide methods for creating roles, deleting roles, adding users to roles, and so on. Given a user name, the role manager relies on the role provider to determine what role or roles the user belongs to. The role manager also implements administrative methods such as Roles.CreateRole and Roles.AddUserToRole by calling the underlying methods in the provider.

To access this functionality use the Devart.Data.PostgreSql.Web.Providers.PgSqlRoleProvider class. It behaves as the System.Web.Security.RoleProvider class (you can read its description in MSDN). The following example shows the Web.config file for an ASP.NET application configured to use PgSqlRoleProvider. Note that you can configure PgSqlRoleProvider to use the same database and user information as PgSqlMembershipProvider in order to use a single database for authentication and authorization information.

<configuration>
  <connectionStrings>
    <add name="PgSqlServices"
         connectionString="host=server;database=test;user id=postgres;" />
  </connectionStrings>
  <system.web>
    ...
    <roleManager defaultProvider="AspNetPgSqlRoleProvider"
      enabled="true"
      cacheRolesInCookie="true"
      cookieName=".ASPROLES"
      cookieTimeout="30"
      cookiePath="/"
      cookieProtection="All" >
      <providers>
        <add
          name="AspNetPgSqlRoleProvider"
          type="Devart.Data.PostgreSql.Web.Providers.PgSqlRoleProvider,
                Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                PublicKeyToken=09af7300eec23701"
          connectionStringName="PgSqlServices" />
      </providers>
    </roleManager>
  </system.web>
</configuration>

Note: replace "7.1.26.0" with the actual provider version.

SimpleMembership

SimpleMembership is a new Membership API designed to improve and simplify the use of the built in security in ASP.NET. These SimpleMembership API are implemented as SimpleRoleProvider and SimpleMembershipProvider providers. As their predecessors, they are intended to work with data sources containing data regarding a site's registered users and with data sources containing role data mapping users to roles respectively.

To support this functionality, dotConnect for PostgreSQL implements PgSqlExtendedMembershipProvider and PgSqlExtendedRoleProvider classes, which behave as the above-mentioned standard provider classes. You can read our Using ExtendedMembership Provider in ASP.NET MVC 4 Application tutorial to see how to use the dotConnect for PostgreSQL SimpleMembership providers' implementation.

Profile provider

The fundamental job of a profile provider is to write profile property values supplied by ASP.NET to persistent profile data sources, and to read the property values back from the data source when requested by ASP.NET.

Unlike Session State provider, Profile provider is a typed structured data storage. It supports both registered and anonymous users. Profile providers also implement methods that allow consumers to manage profile data sources - for example, to delete profiles that haven't been accessed since a specified date.

The user profile is accessed using the Profile property of the current HttpContext object. The following example shows the Web.config file for an ASP.NET application configured to use PgSqlProfileProvider.

<configuration>
  <connectionStrings>
    <add name="PgSqlServices"
         connectionString="host=server;database=test;user id=postgres;" />
  </connectionStrings>
  <system.web>
    ...
    <profile defaultProvider="AspNetPgSqlProfileProvider" >
      <providers>
        <add
          name="AspNetPgSqlProfileProvider"
          type="Devart.Data.PostgreSql.Web.Providers.PgSqlProfileProvider,
                Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                PublicKeyToken=09af7300eec23701"
          connectionStringName="PgSqlServices" />
      </providers>
      <properties>
        <add name="ZipCode" />
        <add name="CityAndState" />
      </properties>
    </profile>
  </system.web>
</configuration>

Note: replace "7.1.26.0" with the actual provider version.

Here ZipCode and CityAndState are examples of profile elements. For detailed information on how to construct properties section refer to MSDN.

Session State provider

The session-state store provider is called by the SessionStateModule class during the processing of an ASP.NET page to communicate with the data store for the storage and retrieval of session variables and related session information such as the time-out value. Session data within each ASP.NET application is stored separately for each SessionID property. ASP.NET applications do not share session data.

For information on how to employ this functionality refer to ASP.NET Session State topic in MSDN. The following example shows the Web.config file for an ASP.NET application configured to use PgSqlSessionStateStore.

<configuration>
  <appSettings/>
  <connectionStrings>
    <add name="PgSqlServices"
         connectionString="host=server;database=test;user id=postgres;"/>
  </connectionStrings>
  <system.web>
    <sessionState
      cookieless="true"
      regenerateExpiredSessionId="true"
      mode="Custom"
      customProvider="PgSqlSessionProvider">
      <providers>
        <add name="PgSqlSessionProvider"
          type="Devart.Data.PostgreSql.Web.Providers.PgSqlSessionStateStore,
                Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                PublicKeyToken=09af7300eec23701"
          connectionStringName="PgSqlServices"
          enableExpiredSessionAutoDeletion="true"
          expiredSessionAutoDeletionInterval="1800"
          writeExceptionsToEventLog="false"/>
      </providers>
    </sessionState>
  </system.web>
</configuration>

Note: replace "7.1.26.0" with the actual provider version.

The sessions, created by ASP.NET have a timeout value for each session (by default, 20 minutes). If a session is not accessed within the timeout interval, it is considered expired, and is no longer valid. The date and time when the session expires is stored in the Expires column of the aspnet_sessions table.

By default, expired sessions are not deleted from the table automatically. You can use the enableExpiredSessionAutoDeletion parameter to enable automatic deletion of the expired sessions and the expiredSessionAutoDeletionInterval to specify the interval between automatic deletions of expired sessions, as shown in the example above.

Site Map provider

Site Map provider provides the interface between ASP.NET's data-driven site-navigation features and site map data sources. The fundamental job of PgSqlSiteMapProvider is to read site map data from a data source and build an upside-down tree of SiteMapNode objects, and to provide methods for retrieving nodes from the site map. Each node in the tree represents one node in the site map. Node properties such as Title, Url, and ChildNodes define the characteristics of each node and allow the tree to be navigated in any direction.

To access this functionality use Devart.Data.PostgreSql.Web.Providers.PgSqlSiteMapProvider class. It behaves as described in reference for System.Web.SiteMaProvider class. The following example shows the Web.config file for an ASP.NET application configured to use PgSqlSiteMaProvider.

<system.web>
  <siteMap defaultProvider="PgSqlSiteMapProvider">
    <providers>
      <add name="PgSqlSiteMapProvider"
           type="Devart.Data.PostgreSql.Web.Providers.PgSqlSiteMapProvider,
                 Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                 PublicKeyToken=09AF7300EEC23701"
           connectionStringName="ConnectionString"
           securityTrimmingEnabled="true"
           />
    </providers>
  </siteMap>
</system.web>

Note: replace "7.1.26.0" with the actual provider version.

Web Event provider

Web Event provider provides the interface between ASP.NET's health monitoring subsystem and data sources that log or further process the events ("Web events") fired by that subsystem.

To access this functionality use Devart.Data.PostgreSql.Web.Providers.PgSqlWebEventProvider class. It behaves as described in reference for System.Web.Management.WebEventProvider class. The following example shows the Web.config file for an ASP.NET application configured to use PgSqlWebEventProvider. Note that proper use of the provider also requires many other subsections of healthMonitoring to be correctly configured.

<system.web>
  <healthMonitoring enabled="true" heartbeatInterval="0">
    ...
    <providers>
      <clear/>
      <add name="PgSqlWebEventProvider"
           type="Devart.Data.PostgreSql.Web.Providers.PgSqlWebEventProvider,
                 Devart.Data.PostgreSql.Web, Version=7.1.26.0, Culture=neutral,
                 PublicKeyToken=09AF7300EEC23701"
           connectionStringName="ConnectionString"
           maxEventDetailsLength="1073741823"
           buffer="false"
           bufferMode="Notification" />
    </providers>
    ...
  </healthMonitoring>
<system.web>

Note: replace "7.1.26.0" with the actual provider version.

Personalization provider

The fundamental job of a personalization provider is to provide persistent storage for personalization state regarding the content and layout of web pages.

To access this functionality use Devart.Data.PostgreSql.Web.Providers.PgSqlPersonalizationProvider class. It behaves as described in reference for System.Web.UI.WebControls.WebParts.PersonalizationProvider class. The following example shows the Web.config file for an ASP.NET application configured to use PgSqlPersonalizationProvider.

<system.web>
    <webParts>
      <personalization defaultProvider="WebPartProvider">
        <providers >
          <add name="WebPartProvider"
               connectionStringName="ConnectionString"
               type="Devart.Data.PostgreSql.Web.Providers.PgSqlPersonalizationProvider,
                     Devart.Data.PostgreSql.Web, 7.1.26.0, Culture=neutral,
                     PublicKeyToken=09af7300eec23701" />
        </providers>
      </personalization>
    </webParts>
<system.web>

Note: replace "7.1.26.0" with the actual provider version.

Deployment

To deploy ASP.NET applications written with dotConnect for PostgreSQL you should register run-time assemblies Devart.Data.dll, Devart.Data.PostgreSql.dll, and Devart.Data.PostgreSql.Web.dll at Global Assembly Cache (GAC) for appropriate framework or place it in the folder of your application (Bin folder for web projects).

Also place App_Licenses.dll assembly in the Bin folder. For more information about this assembly refer to Licensing topic.

Keep in mind that web application are usually run in a partially trusted environment. Here are the permissions required by dotConnect for PostgreSQL:

  • medium trust plus SocketPermission


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using ExtendedMembership Provider in ASP.NET MVC 4 Application

dotConnect for PostgreSQL implements SimpleMembership functionality as PgSqlExtendedMembershipProvider and PgSqlExtendedRoleProvider classes. This tutorial describes how to use the new ASP.NET MVC membership provider functionality in ASP.NET MVC 4 application (using the Internet Application template).

To complete this tutorial you need ASP.NET MVC 4 installed. It is preinstalled with Visual Studio 2012 and later. For Visual Studio 2010 you can download it from here.

In order to create an ASP.NET MVC 4 application using our PgSqlExtendedMembershipProvider, perform the following steps:

  1. Create an ASP.NET MVC 4 Web Application in Visual Studio. To do it, select New -> Project from the File menu, click Web under Installed Templates, and select ASP.NET MVC 4 Web Application in the list of available templates.

    Selecting a project template

    Then select the Internet Application template in the opened New ASP.NET MVC4 Project dialog box.

    Selecting ASP.NET MVC 4 web application template

  2. Add necessary references to our assemblies to the project. You need to add references to the Devart.Data, Devart.Data.PostgreSql, Devart.Data.PostgreSql.Web assemblies. Note that you should add the Devart.Data.PostgreSql.Web assembly by selecting it as a file (not from the extension list) from the NET4 subdirectory of the dotConnect for PostgreSQL installation directory (by default, from Program Files\Devart\dotConnect\PostgreSQL\NET4), not the one from the Extensions list. The Devart.Data.PostgreSql.Web assembly that is in Extensions list is for .NET Framework 2.0, and we need the one for .NET Framework 4. The required assembly has the revision number 4 in its version.

  3. In the Web.config file replace the DefaultConnection connection string with the actual connection string to the app database. Replace the providerName value with "Devart.Data.PostgreSql". For example, your connection string may look like the following:

    <connectionStrings>
    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;"
      providerName="Devart.Data.PostgreSql" />
  </connectionStrings>

  4. In the Web.config file remove the following tag:
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />

  5. Add the following lines to the Web.config file:

      <membership defaultProvider="PgSqlExtendedMembershipProvider">
    <providers>
      <remove name="PgSqlExtendedMembershipProvider"/>
      <add name="PgSqlExtendedMembershipProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlExtendedMembershipProvider,
        Devart.Data.PostgreSql.Web, Version=7.1.26.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
        description="dotConnect for PostgreSQL extended membership provider" connectionStringName="DefaultConnection" />
    </providers>
  </membership>
  <roleManager enabled="true" defaultProvider="PgSqlExtendedRoleProvider">
    <providers>
      <remove name="PgSqlExtendedRoleProvider"/>
      <add name="PgSqlExtendedRoleProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlExtendedRoleProvider,
          Devart.Data.PostgreSql.Web, Version=7.1.26.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
          description="dotConnect for PostgreSQL extended role provider" connectionStringName="DefaultConnection" />
    </providers>
  </roleManager>

    Note: Replace 7.1.26.4 in the code with your actual version.

  6. In the InitializeSimpleMembershipAttribute.cs or InitializeSimpleMembershipAttribute.vb file (that is located in the Filters project folder), replace the namespace "WebMatrix.WebData" with the "Devart.Common.Web".

  7. Now you can run the application and check whether it works by registering a user.

    Registering a test user

    As you can see, the user is registered and logged in.

    Test user is registered

dotConnect for PostgreSQL ASP.NET Membership Database

dotConnect for PostgreSQL uses the following ASP.NET membership database for its SimpleMembership provider:

ExtendedMemberShip database schema

By default, the application automatically verifies if the tables exist by the specified connection string. The userprofile table is automatically created by Entity Framework runtime if it is not already present in the database. Other tables are created by the WebSecurity.InitializeDatabaseConnection method, defined in the Devart.Common.Web namespace. If these tables are already created, no actions are performed.

However you can create these tables manually. Execute the DDL script %Install_Directory%\Devart\dotConnect\PostgreSQL\NET4\InstallExtendedWebTables.sql (for example C:\Program Files\Devart\dotConnect\PostgreSQL\NET4\InstallExtendedWebTables.sql) against the database server to create the database tables to store the user and role information.

If you are sure that the necessary tables are always present in the specified database and want to disable this automatic verification, you may re-register our provider in your Web.config file with the following settings:

  <membership defaultProvider="PgSqlExtendedMembershipProvider">
    <providers>
      <remove name="PgSqlExtendedMembershipProvider"/>
      <add name="PgSqlExtendedMembershipProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlExtendedMembershipProvider,
        Devart.Data.PostgreSql.Web, Version=7.1.26.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
        description="dotConnect for PostgreSQL extended membership provider" connectionStringName="DefaultConnection"
        useridcolumn="UserId" usernamecolumn="UserName" usertablename="UserProfile" />
    </providers>
  </membership>
  <roleManager enabled="true" defaultProvider="PgSqlExtendedRoleProvider">
    <providers>
      <remove name="PgSqlExtendedRoleProvider"/>
      <add name="PgSqlExtendedRoleProvider" type="Devart.Data.PostgreSql.Web.Providers.PgSqlExtendedRoleProvider,
        Devart.Data.PostgreSql.Web, Version=7.1.26.4, Culture=neutral, PublicKeyToken=09af7300eec23701"
        description="dotConnect for PostgreSQL extended role provider" connectionStringName="DefaultConnection"
        useridcolumn="UserId" usernamecolumn="UserName" usertablename="UserProfile" />
    </providers>
  </roleManager>

Note: Replace 7.1.26.4 in the code with your actual version.

Note: In case dotConnect for PostgreSQL is installed on the target computer with the ASP.NET providers option, you may use shortened registration of our provider in the Web.config file as necessary records are added to machine.config. Add the following membership and roleManager elements to the system.web tag of your Web.config file:

<configuration>
  ...
  <system.web>
    ...
    <membership defaultProvider="PgSqlExtendedMembershipProvider"/>
    <roleManager enabled="true" defaultProvider="PgSqlExtendedRoleProvider"/>
  </system.web>
  ...
</configuration>


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using PgSqlDataSource Component

The PgSqlDataSource data source control represents data in a PostgreSQL database to data-bound controls. You can use the PgSqlDataSource control in conjunction with a data-bound control to retrieve data from a database and to display, edit, and sort data on a Web page with little or no code. This topic explains how to use the control in different ways.

  • Usage Basics
  • Load Balancing
  • Data Paging Overview
  • Automatic Data Paging
  • Manual Data Paging
  • Design Time Support
  • Demos

Usage Basics

To connect to a database, you must set the ConnectionString property to a valid connection string. To retrieve data from a database, set the SelectCommand property with a SQL query, you can also set the SelectCommand property to the name of a stored procedure. The SQL query that you specify can also be a parameterized query.

The PgSqlDataSource control retrieves data whenever the Select method is called. This method provides programmatic access to the method that is specified by SelectMethod property. The Select method is automatically called by controls that are bound to the PgSqlDataSource when their DataBind method is called. If you set the DataSourceID property of a data-bound control, the control automatically binds to data from the data source, as required. Setting the DataSourceID property is the recommended method for binding an PgSqlDataSource control to a data-bound control. Alternatively, you can use the DataSource property, but then you must explicitly call the DataBind method of the data-bound control. Some examples of data-bound controls that can use PgSqlDataSource are DataGrid, DetailsView, DataList, and DropDownList. You can call the Select method programmatically at any time to retrieve data from the underlying database.

You can perform data operations, such as updates, inserts, and deletes. To perform these data operations, set the appropriate command text and any associated parameters for the operation that you want to perform.

Note that PgSqlDataSource is available in Professional Edition only.

Load Balancing

If you display data on your page using a PgSqlDataSource, you can increase the performance of the page by using the data caching capabilities of the data source control. Caching reduces the processing load on the database servers at the expense of memory on the Web server; in most cases, this is a good trade-off. The PgSqlDataSource automatically caches data when the EnableCaching property is set to true and the CacheDuration property is set to the number of seconds that the cache stores data before the cache entry is discarded. You can also specify a CacheExpirationPolicy and an optional SqlCacheDependency value.

Data Paging Overview

PgSqlDataSource optimizes data retrieval with advanced data paging. The feature is intented to work with data-bound controls that support paginal data access (for example, DataGrid and DetailsView). In this case the database is queried for only a subset of data. The data is sorted on the database server as well. This allows applications to minimize traffic database server load.

The feature is controlled by the DataPagingMode property, which can have one of the following values:

  • Auto - data paging and sorting is performed automatically.
  • Manual - data paging and sorting is performed in a callback routine.
  • Disabled - no additional data processing is performed.

Automatic Data Paging

When DataPagingMode is set to Auto, PgSqlDataSource takes the responsibility to determine which subset of rows should be returned. This mode is applicable to CommandType=Text queries only.

The following markup demonstrates how to configure PgSqlDataSource component to use automatic data paging:

<cc1:PgSqlDataSource ID="PgSqlDataSource1" runat="server"
    ConnectionString="User Id=postgres;Password=postgres;Host=db;Port=5435;Database=test;Persist Security Info=True;"
      SelectCommand="SELECT * FROM dept" DataPagingMode="Auto">
</cc1:PgSqlDataSource>

Manual Data Paging

When DataPagingMode is set to Manual, the rows to return are chosen by a handler of the PgSqlDataSource.OnSelecting event. The event handler should determine the record count and prepare a PgSqlCommand object to be executed.

Manual data paging is applicable to queries with CommandType Text and StoredProcedure.

The following markup demonstrates how to configure PgSqlDataSource component to use manual data paging:

<cc1:PgSqlDataSource ID="PgSqlDataSource1" runat="server"
    ConnectionString="User Id=postgres;Password=postgres;Host=db;Port=5435;Database=test;Persist Security Info=True;"
      SelectCommand="get_dept_paged"
    SelectCommandType="StoredProcedure"
    DataPagingMode="Manual">
    <SelectParameters>
        <asp:Parameter Name="SortExpression" Type="String" />
        <asp:Parameter Name="StartIndex" Type="Int32" />
        <asp:Parameter Name="PageSize" Type="Int32" />
    </SelectParameters>
</cc1:PgSqlDataSource>

Given that the stored procedure has the following code:

CREATE OR REPLACE FUNCTION test.get_dept_paged(startindex integer, pagesize integer)
  RETURNS SETOF test.dept AS '
DECLARE
  rc test.dept%ROWTYPE;
BEGIN
  FOR rc IN SELECT * FROM test.dept LIMIT PageSize OFFSET StartIndex LOOP
    RETURN NEXT rc;
  END LOOP;
END;'
LANGUAGE 'plpgsql' VOLATILE;

The following event handler demonstrates how to control data paging:

[C#]

protected void PgSqlDataSource1_Selecting(object sender,
                                            SqlDataSourceSelectingEventArgs e) {
  PgSqlCommand rowCountCommand = new PgSqlCommand("SELECT count(*) FROM dept");
  rowCountCommand.Connection = new PgSqlConnection(PgSqlDataSource1.ConnectionString);
  rowCountCommand.Connection.Open();
  try {
    e.Arguments.TotalRowCount = (int)(long)rowCountCommand.ExecuteScalar();
  }
  finally {
    rowCountCommand.Connection.Close();
  }
  e.Command.Parameters["SortExpression"].Value = e.Arguments.SortExpression;
  e.Command.Parameters["StartIndex"].Value = e.Arguments.StartRowIndex;
  e.Command.Parameters["PageSize"].Value = e.Arguments.MaximumRows;
}

[Visual Basic]

protected sub PgSqlDataSource1_Selecting(ByVal sender as object, _
                                           ByVal e as SqlDataSourceSelectingEventArgs)

  Dim rowCountCommand as PgSqlCommand = new PgSqlCommand("SELECT count(*) FROM dept")
  rowCountCommand.Connection = new PgSqlConnection(PgSqlDataSource1.ConnectionString)
  rowCountCommand.Connection.Open()

  try
    e.Arguments.TotalRowCount = CInt(CLng(rowCountCommand.ExecuteScalar()))
  finally
    rowCountCommand.Connection.Close()
  End Try

  e.Command.Parameters["SortExpression"].Value = e.Arguments.SortExpression
  e.Command.Parameters["StartIndex"].Value = e.Arguments.StartRowIndex
  e.Command.Parameters["PageSize"].Value = e.Arguments.MaximumRows

end sub

Design Time Support

PgSqlDataSource component exposes its features in design time with convenient editor. In the editor you can set up connection string, adjust SELECT, INSERT, UPDATE, and DELETE statement, modify parameters, and so on. The screenshot demonstrates the Command Generator tab of the component editor, where you control how the data is inserted and updated in the table. The component editor allows you to preview the data you are working with.

Demos

dotConnect for PostgreSQL includes a set of useful demo projects that can be used as a good starting point in ASP.NET development. The demos include:

DataSource Demo

The demo iullustrates the different paging modes described above.

LoadOnDemand Demo

This sample demonstrates the load data on demand technique with dotConnect for PostgreSQL components. Client-side script is used to handle scrolling and to send asynchronous postback to the Web server. Server-side handler uses ObjectDataSource or PgSqlDataSource to populate more rows. Portion of data is loaded from DB server and displayed in the grid.

Ajax Demo

This sample demonstrates data binding and editing in an asynchronous way. All AJAX asynchronous operations are implemented using standard components only. The demo shows AJAX usage with a single table and with two tables in a master-detail relationship.

3-rd Party Components Demo

These samples demonstrate using PgSqlDataSource with popular 3-rd party controls such as DevExpress and Telerik grids.

See Also

ASP.NET Provider Model Support


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL

ASP.NET Identity is a new system of user authentication and authorization, that continues the evolution of ASP.NET membership system, and is used in the Visual Studio 2013 or Visual Studio 2013 Update 1 project templates for ASP.NET MVC, Web Forms, Web API and SPA. You can read more on ASP.NET Identity in Microsoft documentation.

dotConnect for PostgreSQL enables you to employ an implementation of ASP.NET Identity for PostgreSQL database using either ADO.NET or Entity Framework functionality in your web applications. This allows you to use such ASP.NET Identity benefits as unit-testable user authentication system, social login support, OWIN integration, etc. This tutorial demonstrates creating an ADO.NET implementation of ASP.NET Identity.

To complete this tutorial you need Visual Studio 2013 or Visual Studio 2013 Update 1 installed. For Visual Studio 2013 Update 2 or higher see Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL.

In order to create an ASP.NET MVC 5 application using dotConnect for PostgreSQL for storing identity information, perform the following steps:

  1. In the Add New Project dialog box expand Visual C# on the left, then Web, and then select ASP.NET Web Application. Name your project, for example, "AspNet_Identity_Application" and then click OK.

    Add New Project dialog box

  2. In the New ASP.NET Project dialog box, select the MVC template with the default options (that includes Individual User Accounts as authentication method) and click OK.

    New ASP.NET Project dialog box

  3. In Solution Explorer, right-click your project and select Manage NuGet Packages from the shortcut menu. In the search text box dialog, type "Identity.EntityFramework". Select this package in the list of results and click Uninstall. You will be prompted to uninstall the dependency package EntityFramework. Click Yes since we will no longer this package on this application.

  4. Add references to the necessary dotConnect for PostgreSQL assemblies:

    • Devart.Data.dll
    • Devart.Data.PostgreSql.dll
    • Devart.Data.PostgreSql.Web.Identity.dll

    For ASP.NET Identity 1 you need to add the reference to the Devart.Data.PostgreSql.Web.Identity.dll, having the revision number 0, and installed to the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET Identity 1 folder

When creating an ASP.NET application, using ASP.NET Identity, you can use the existing ASP.NET Identity functionality as is or customize this functionality. For example, you may add storing some custom information about the user. In our tutorial we will demonstrate both options.

- Using Existing ASP.NET Identity Functionality

First, you need to create a schema that will store information about users. To do it, execute the Install_identity_tables.sql script, which goes with dotConnect for PostgreSQL. By default, this script is in the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET Identity 1 folder. You can also copy this script from the Identity Database Script chapter of this topic. After this perform the following steps:

  1. In Visual Studio remove the IdentityModels.cs (or IdentityModels.vb for Visual Basic) file that is in the Models folder, from the project.

  2. In the Controllers project folder open the AccountController.cs (or AccountController.vb for Visual Basic) file.

    Replace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

    Replace the constructor code:

    [C#]

            public AccountController()
            : this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())))
        {
        }

    [Visual Basic]

        Public Sub New()
        Me.New(New UserManager(Of ApplicationUser)(New UserStore(Of ApplicationUser)(New ApplicationDbContext())))
    End Sub

    with

    [C#]

        public AccountController()
        : this(new UserManager<ApplicationUser>(new PgSqlUserStore()))
    {
    }

    [Visual Basic]

        Public Sub New()
        Me.New(New UserManager(Of ApplicationUser)(New PgSqlUserStore()))
    End Sub

  3. In the web.config file of your project, replace the default connection string with your PostgreSQL one.

    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;" providerName="Devart.Data.PostgreSql" />

+ Extending ASP.NET Identity Functionality

If you want to extend the out-of-the-box ASP.NET Identity functionality, you may inherit from the standard ASP.NET Identity classes. In our tutorial we will create a new user class that stores additional information about users - their emails.

To implement email storing, please perform the following steps:

  1. Open the IdentityModels.cs (or IdentityModels.vb for Visual Basic) file from the Models project folder.

  2. Replace the imported namespace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
  3. Remove the code of the ApplicationDbContext class.

  4. Add the Email property to the ApplicationUser class that is inherited from the IdentityUser class.

    Code before:

    [C#]

    // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
    public class ApplicationUser : IdentityUser
    {
    }

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("DefaultConnection")
        {
        }
    }

    [Visual Basic]

        ' You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
    Public Class ApplicationUser
        Inherits IdentityUser
    End Class

    Public Class ApplicationDbContext
        Inherits IdentityDbContext(Of ApplicationUser)
        Public Sub New()
            MyBase.New("DefaultConnection")
        End Sub
    End Class

    Code after:

    [C#]

  public class ApplicationUser : IdentityUser {

    public ApplicationUser() {
    }

    public string Email { get; set; }
  }

    [Visual Basic]

    Public Class ApplicationUser
        Inherits IdentityUser

        Public Sub New()
        End Sub

        Public Property Email() As String
            Get
                Return m_Email
            End Get
            Set
                m_Email = Value
            End Set
        End Property
        Private m_Email As String
    End Class

  5. After this we need to create a database that will store the user information. Modify the Install_identity_tables.sql script, which goes with dotConnect for PostgreSQL. By default, this script is in the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET Identity 1 folder. You can also copy this script from the Identity Database Script chapter of this topic. . Add a column for storing emails to the AspNetUsers table.

    Before adding the column:

    CREATE TABLE "AspNetUsers" (
  "Id" varchar(128) NOT NULL,
  "UserName" varchar(256) NOT NULL,
  "PasswordHash" varchar(256) NULL,
  "SecurityStamp" varchar(256) NULL,
  PRIMARY KEY ("Id")
);

    After adding the column:

    CREATE TABLE "AspNetUsers" (
  "Id" varchar(128) NOT NULL,
  "UserName" varchar(256) NOT NULL,
  "PasswordHash" varchar(256) NULL,
  "SecurityStamp" varchar(256) NULL,
  "Email" varchar(256) NULL,
  PRIMARY KEY ("Id")
);

  6. Execute this script.

  7. After this we need to create a UserTable class descendant that will read/write the ApplicationUser objects from/to the database. It can be implemented in two ways. The first way is using SQL to read and update the database.

    [C#]

      public class MyUserTable : UserTable<ApplicationUser> {

    public MyUserTable(DbDataSource dataSource)
      : base(dataSource) {
    }

    public override int Insert(ApplicationUser user) {

      return DataSource.ExecuteNonQuery("INSERT INTO MY_IDENTITY_SCHEMA.\"AspNetUsers\" (\"Id\", \"UserName\", \"PasswordHash\", \"SecurityStamp\", \"Email\") VALUES (:p0, :p1, :p2, :p3, :p4)",
                                        new object[] { user.Id, user.UserName, user.PasswordHash, user.SecurityStamp, user.Email });
    }

    public override int Update(ApplicationUser user) {

      return DataSource.ExecuteNonQuery("UPDATE MY_IDENTITY_SCHEMA.\"AspNetUsers\" SET \"UserName\" = :p0, \"PasswordHash\" = :p1, \"SecurityStamp\" = :p2, \"Email\" = :p3 WHERE \"Id\" = :p4",
                                        new object[] { user.UserName, user.PasswordHash, user.SecurityStamp, user.Email, user.Id });
    }

    protected override ApplicationUser Materialize(DataRecord record) {

      ApplicationUser user = base.Materialize(record);

      if (user != null)
        user.Email = (string)record["Email"];

      return user;
    }

  }

    [Visual Basic]

    Public Class MyUserTable
    Inherits UserTable(Of ApplicationUser)

    Public Sub New(dataSource As DbDataSource)
        MyBase.New(dataSource)
    End Sub

    Public Overrides Function Insert(user As ApplicationUser) As Integer

        Return DataSource.ExecuteNonQuery("INSERT INTO MY_IDENTITY_SCHEMA.""AspNetUsers"" (""Id"", ""UserName"", ""PasswordHash"", ""SecurityStamp"", ""Email"") VALUES (:p0, :p1, :p2, :p3, :p4)", New Object() {user.Id, user.UserName, user.PasswordHash, user.SecurityStamp, user.Email})
    End Function

    Public Overrides Function Update(user As ApplicationUser) As Integer

        Return DataSource.ExecuteNonQuery("UPDATE MY_IDENTITY_SCHEMA.""AspNetUsers"" SET ""UserName"" = :p0, ""PasswordHash"" = :p1, ""SecurityStamp"" = :p2, ""Email"" = :p3 WHERE ""Id"" = :p4", New Object() {user.UserName, user.PasswordHash, user.SecurityStamp, user.Email, user.Id})
    End Function

    Protected Overrides Function Materialize(record As DataRecord) As ApplicationUser

        Dim user As ApplicationUser = MyBase.Materialize(record)

        If user IsNot Nothing Then
            user.Email = DirectCast(record("Email"), String)
        End If

        Return user
    End Function

End Class

    Alternatively we can create a class, which provides the same functionality, but uses the functionality of the UserTable class, inherited from AspNetTable, instead of performing SQL statements.

    [C#]

    public class MyUserTable : UserTable<ApplicationUser> {

    public MyUserTable(DbDataSource dataSource)
      : base(dataSource) {
    }

    protected override List<string> GetInsertColumns() {
        var columns = base.GetInsertColumns();
        columns.Add("Email");
        return columns;
    }
    public override int Insert(ApplicationUser user) {

      return Insert(user.Id, user.UserName, user.PasswordHash, user.SecurityStamp, user.Email);
    }

    public override int Update(ApplicationUser user) {

        return Update(user.UserName, user.PasswordHash, user.SecurityStamp, user.Email, // SET
            user.Id // WHERE
        );
    }

    protected override ApplicationUser Materialize(DataRecord record) {

        ApplicationUser user = base.Materialize(record);

        if (user != null)
            user.Email = (string)record["Email"];

        return user;
    }

}

    [Visual Basic]

    Public Class MyUserTable
    Inherits UserTable(Of ApplicationUser)

    Public Sub New(dataSource As DbDataSource)
        MyBase.New(dataSource)
    End Sub

    Protected Overrides Function GetInsertColumns() As List(Of String)
        Dim columns = MyBase.GetInsertColumns()
        columns.Add("Email")
        Return columns
    End Function
    Public Overrides Function Insert(user As ApplicationUser) As Integer

        Return Insert(user.Id, user.UserName, user.PasswordHash, user.SecurityStamp, user.Email)
    End Function

    Public Overrides Function Update(user As ApplicationUser) As Integer

        Return Update(user.UserName, user.PasswordHash, user.SecurityStamp, user.Email, user.Id)
    End Function

    Protected Overrides Function Materialize(record As DataRecord) As ApplicationUser

        Dim user As ApplicationUser = MyBase.Materialize(record)

        If user IsNot Nothing Then
            user.Email = DirectCast(record("Email"), String)
        End If

        Return user
    End Function

End Class

    In this example we have overridden the GetInsertColumns() method to add the "Email" column to the list of the columns, used for generating the INSERT command. Since we haven't overridden the GetUpdateColumns() method, the same "Email" column will also be present in the column list used for generating the UPDATE command. We pass the parameter values for the commands, generated automatically, in the Insert and Update methods.

  8. After you have created the MyUserTable class in one or another way, create a TableFactory descendant that returns our custom UserTable implementation, that reads and saves ApplicationUser objects from/to database.

    [C#]

      public class MyTableFactory : TableFactory<ApplicationUser, IdentityRole>, ITableFactory<ApplicationUser, IdentityRole> {

    public MyTableFactory(DbDataSource dataSource)
      : base(dataSource) {
    }

    public override UserTable<ApplicationUser> CreateUserTable() {

      return new MyUserTable(DataSource);
    }
  }

    [Visual Basic]

    Public Class MyTableFactory
    Inherits TableFactory(Of ApplicationUser, IdentityRole)
    Implements ITableFactory(Of ApplicationUser, IdentityRole)

    Public Sub New(dataSource As DbDataSource)
        MyBase.New(dataSource)
    End Sub

    Public Overrides Function CreateUserTable() As UserTable(Of ApplicationUser)

        Return New MyUserTable(DataSource)
    End Function
End Class

  9. Create a PgSqlDataSource descendant, that creates our custom TableFactory.

    [C#]

      public class MyDataSource : PgSqlDataSource {

    public MyDataSource()
      : base() {
    }

    public override ITableFactory<MyIdentityUser, IdentityRole> CreateTableFactory<MyIdentityUser, IdentityRole>() {

      return (ITableFactory<MyIdentityUser, IdentityRole>)new MyTableFactory(this);
    }
  }

    [Visual Basic]

    Public Class MyDataSource
    Inherits PgSqlDataSource

    Public Sub New()
        MyBase.New()
    End Sub

    Public Overrides Function CreateTableFactory(Of MyIdentityUser, IdentityRole)() As ITableFactory(Of MyIdentityUser, IdentityRole)

        Return DirectCast(New MyTableFactory(Me), ITableFactory(Of MyIdentityUser, IdentityRole))
    End Function
End Class

    We also can modify the MyDataSource class constructor in order to specify connection string name instead of DefaultConnection in the config file or a custom name of the schema where the identity tables reside. The MyDataSource class constructor for it can be the following:

    [C#]

        public MyDataSource()
      : base("name=MyConnection", "MY_IDENTITY_SCHEMA") {    }

    [Visual Basic]

    Public Sub New()
    MyBase.New("name=MyConnection", "MY_IDENTITY_SCHEMA")
End Sub

  10. In the web.config file of your project, replace the default connection string with your PostgreSQL one.

    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;" providerName="Devart.Data.PostgreSql" />

    Or, if you are going to use another connection string name, add the new connection string.

  11. Create a PgSqlUserStore class descendant, that will be used in our application. We will pass it in the AccountController to the UserManager being created.

    [C#]

      public class MyUserStore : PgSqlUserStore<ApplicationUser, IdentityRole> {

    public MyUserStore()
      : base(new MyDataSource()) {
    }
  }

    [Visual Basic]

    Public Class MyUserStore
    Inherits PgSqlUserStore(Of ApplicationUser, IdentityRole)

    Public Sub New()
        MyBase.New(New MyDataSource())
    End Sub
End Class

  12. In the Controllers project folder open the AccountController.cs (or AccountController.vb for Visual Basic) file.

  13. Replace the imported namespace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity

  14. Replace the constructor code

    [C#]

            public AccountController()
            : this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())))
        {
        }

    [Visual Basic]

    Public Sub New()
    Me.New(New UserManager(Of ApplicationUser)(New UserStore(Of ApplicationUser)(New ApplicationDbContext())))
End Sub

    with:

    [C#]

            public AccountController()
            : this(new UserManager<ApplicationUser>(new MyUserStore()))        {
        }

    [Visual Basic]

    Public Sub New()
    Me.New(New UserManager(Of ApplicationUser)(New MyUserStore()))
End Sub

  15. After this we need to update our application and add code for specifying user's email. Open the Models\AccountViewModels.cs (or Models\AccountViewModels.vb for Visual Basic) file and add the email field to the RegisterViewModel class.

    Code before:

    [C#]

        public class RegisterViewModel
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }
    }

    [Visual Basic]

        Public Class RegisterViewModel
        <Required> _
        <Display(Name := "User name")> _
        Public Property UserName() As String
            Get
                Return m_UserName
            End Get
            Set
                m_UserName = Value
            End Set
        End Property
        Private m_UserName As String

        <Required> _
        <StringLength(100, ErrorMessage := "The {0} must be at least {2} characters long.", MinimumLength := 6)> _
        <DataType(DataType.Password)> _
        <Display(Name := "Password")> _
        Public Property Password() As String
            Get
                Return m_Password
            End Get
            Set
                m_Password = Value
            End Set
        End Property
        Private m_Password As String

        <DataType(DataType.Password)> _
        <Display(Name := "Confirm password")> _
        <Compare("Password", ErrorMessage := "The password and confirmation password do not match.")> _
        Public Property ConfirmPassword() As String
            Get
                Return m_ConfirmPassword
            End Get
            Set
                m_ConfirmPassword = Value
            End Set
        End Property
        Private m_ConfirmPassword As String
    End Class

    Code after:

    [C#]

        public class RegisterViewModel
    {
        [Required]
        [Display(Name = "User name")]
        public string UserName { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Password")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirm password")]
        [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
        public string ConfirmPassword { get; set; }

        [DataType(DataType.EmailAddress)]
        [Display(Name = "E-mail")]
        public string Email { get; set; }
    }

    [Visual Basic]

    Public Class RegisterViewModel
    <Required> _
    <Display(Name := "User name")> _
    Public Property UserName() As String
        Get
            Return m_UserName
        End Get
        Set
            m_UserName = Value
        End Set
    End Property
    Private m_UserName As String

    <Required> _
    <StringLength(100, ErrorMessage := "The {0} must be at least {2} characters long.", MinimumLength := 6)> _
    <DataType(DataType.Password)> _
    <Display(Name := "Password")> _
    Public Property Password() As String
        Get
            Return m_Password
        End Get
        Set
            m_Password = Value
        End Set
    End Property
    Private m_Password As String

    <DataType(DataType.Password)> _
    <Display(Name := "Confirm password")> _
    <Compare("Password", ErrorMessage := "The password and confirmation password do not match.")> _
    Public Property ConfirmPassword() As String
        Get
            Return m_ConfirmPassword
        End Get
        Set
            m_ConfirmPassword = Value
        End Set
    End Property
    Private m_ConfirmPassword As String

    <DataType(DataType.EmailAddress)> _
    <Display(Name := "E-mail")> _
    Public Property Email() As String
        Get
            Return m_Email
        End Get
        Set
            m_Email = Value
        End Set
    End Property
    Private m_Email As String
End Class

  16. Open the Views\Account\Register.cshtml file and edit the Register method. Add a field for email.

        <div class="form-group">
        @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
        </div>
    </div>

  17. Open the Controllers\AccountController.cs (or Models\AccountController.vb for Visual Basic) file and add code for passing email to the Register method of the AccountController class.

    Code before:

    [C#]

            public async Task<ActionResult> Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = new ApplicationUser() { UserName = model.UserName };
                var result = await UserManager.CreateAsync(user, model.Password);
                if (result.Succeeded)
                {
                    await SignInAsync(user, isPersistent: false);
                    return RedirectToAction("Index", "Home");
                }
                else
                {
                    AddErrors(result);
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }

    [Visual Basic]

            Public Function Register(model As RegisterViewModel) As Task(Of ActionResult)
            If ModelState.IsValid Then
                Dim user = New ApplicationUser() With { _
                    Key .UserName = model.UserName _
                }
                Dim result = Await UserManager.CreateAsync(user, model.Password)
                If result.Succeeded Then
                    Await SignInAsync(user, isPersistent := False)
                    Return RedirectToAction("Index", "Home")
                Else
                    AddErrors(result)
                End If
            End If

            ' If we got this far, something failed, redisplay form
            Return View(model)
        End Function

    Code after:

    [C#]

            public async Task<ActionResult> Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = new ApplicationUser() { UserName = model.UserName, Email = model.Email };
                var result = await UserManager.CreateAsync(user, model.Password);
                if (result.Succeeded)
                {
                    await SignInAsync(user, isPersistent: false);
                    return RedirectToAction("Index", "Home");
                }
                else
                {
                    AddErrors(result);
                }
            }

            // If we got this far, something failed, redisplay form
            return View(model);
        }

    [Visual Basic]

            Public Function Register(model As RegisterViewModel) As Task(Of ActionResult)
            If ModelState.IsValid Then
                Dim user = New ApplicationUser() With { _
                    Key .UserName = model.UserName, _
                    Key .Email = model.Email _
                }
                Dim result = Await UserManager.CreateAsync(user, model.Password)
                If result.Succeeded Then
                    Await SignInAsync(user, isPersistent := False)
                    Return RedirectToAction("Index", "Home")
                Else
                    AddErrors(result)
                End If
            End If

            ' If we got this far, something failed, redisplay form
            Return View(model)
        End Function

- Checking Application

Now we can run our application and check if everything works correctly.

  1. Run the application by pressing CTRL+F5.

    Getting started page
  2. Switch to the Register tab on the top of the page.

    Registration page

    For an example with extended ASP.NET Identity functionality the page looks like the following:

    Registration page (with e-mail)
  3. Enter a new user name and password (and email - if you have created an example with extended ASP.NET Identity functionality) to the corresponding boxes and click the Register button.
  4. The new user is now registered and logged in.

    User is registered
  5. After this you may use an appropriate database tool to connect to the database where the user data is stored and verify that the data is stored correctly.

+ Identity Database Script

CREATE TABLE "AspNetRoles" (
  "Id" varchar(128) NOT NULL,
  "Name" varchar(256) NOT NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUsers" (
  "Id" varchar(128) NOT NULL,
  "UserName" varchar(256) NOT NULL,
  "PasswordHash" varchar(256) NULL,
  "SecurityStamp" varchar(256) NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUserClaims" (
  "Id" serial NOT NULL,
  "ClaimType" varchar(256) NULL,
  "ClaimValue" varchar(256) NULL,
  "UserId" varchar(128) NOT NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUserLogins" (
  "UserId" varchar(128) NOT NULL,
  "LoginProvider" varchar(128) NOT NULL,
  "ProviderKey" varchar(128) NOT NULL,
  PRIMARY KEY ("UserId", "LoginProvider", "ProviderKey")
);

CREATE TABLE "AspNetUserRoles" (
  "UserId" varchar(128) NOT NULL,
  "RoleId" varchar(128) NOT NULL,
  PRIMARY KEY ("UserId", "RoleId")
);

CREATE INDEX "IX_AspNetUserClaims_UserId" ON "AspNetUserClaims" ("UserId");

CREATE INDEX "IX_AspNetUserLogins_UserId" ON "AspNetUserLogins" ("UserId");

CREATE INDEX "IX_AspNetUserRoles_RoleId" ON "AspNetUserRoles" ("RoleId");

CREATE INDEX "IX_AspNetUserRoles_UserId" ON "AspNetUserRoles" ("UserId");

ALTER TABLE "AspNetUserClaims"
  ADD CONSTRAINT "FK_AspNetUserClaims_AspNetUsers_User_Id" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserLogins"
  ADD CONSTRAINT "FK_AspNetUserLogins_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserRoles"
  ADD CONSTRAINT "FK_AspNetUserRoles_AspNetRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AspNetRoles" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserRoles"
  ADD CONSTRAINT "FK_AspNetUserRoles_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

See Also

Using Entity Framework Implementation of ASP.NET Identity 1 for PostgreSQL | Using Entity Framework Implementation of ASP.NET Identity 2 for PostgreSQL | Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL

ASP.NET Identity is a new system of user authentication and authorization, that continues the evolution of ASP.NET membership system, and is used in the Visual Studio 2013 Update 2 project templates for ASP.NET MVC, Web Forms, Web API and SPA. You can read more on ASP.NET Identity in Microsoft documentation.

dotConnect for PostgreSQL enables you to employ an implementation of ASP.NET Identity for PostgreSQL database using either ADO.NET or Entity Framework functionality in your web applications. This allows you to use such ASP.NET Identity benefits as unit-testable user authentication system, social login support, OWIN integration, etc. This tutorial demonstrates creating an ADO.NET implementation of ASP.NET Identity.

To complete this tutorial you need Visual Studio 2013 Update 2 or higher. For Visual Studio 2013 or Visual Studio 2013 Update 1 see Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL.

In order to create an ASP.NET MVC 5 application using dotConnect for PostgreSQL for storing identity information, perform the following steps:

  1. In the Add New Project dialog box expand Visual C# on the left, then Web, and then select ASP.NET Web Application. Name your project, for example, "AspNet_Identity_Application" and then click OK.

    Add New Project dialog box

  2. In the New ASP.NET Project dialog box, select the MVC template with the default options (that includes Individual User Accounts as authentication method) and click OK.

    New ASP.NET Project dialog box

  3. In Solution Explorer, right-click your project and select Manage NuGet Packages from the shortcut menu. In the search text box dialog, type "Identity.EntityFramework". Select this package in the list of results and click Uninstall. You will be prompted to uninstall the dependency package EntityFramework. For Visual Studio 2013 Update 2 click Yes. For Visual Studio 2013 Update 3 or higher click No.

  4. Add references to the necessary dotConnect for PostgreSQL assemblies:

    • Devart.Data.dll
    • Devart.Data.PostgreSql.dll
    • Devart.Data.PostgreSql.Web.Identity.dll

    For ASP.NET Identity 2 you need to add the reference to the Devart.Data.PostgreSql.Web.Identity.dll, having the revision number 2, and installed to the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET Identity 2 folder

When creating an ASP.NET application, using ASP.NET Identity, you can use the existing ASP.NET Identity functionality as is or customize this functionality. For example, you may add storing some custom information about the user. In our tutorial we will demonstrate both options.

- Using Existing ASP.NET Identity Functionality

First, you need to create a schema that will store information about users. To do it, execute the Install_identity_tables.sql script, which goes with dotConnect for PostgreSQL. By default, this script is in the Program Files\Devart\dotConnect\PostgreSQL\Web\ASP.NET Identity 2 folder. You can also copy this script from the Identity Database Script chapter of this topic. After this perform the following steps:

  1. In the Models project folder open the IdentityModels.cs (or IdentityModels.vb for Visual Basic) file. that is in the Models folder, from the project.

  2. Replace the file contents with

    [C#]

    using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

namespace AspNet_Identity_Application.Models
{
    public static class ApplicationUserExtensions
    {
        public static async Task<ClaimsIdentity> GenerateUserIdentityAsync(this ApplicationUser user, UserManager<ApplicationUser> manager)
        {
            // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
            var userIdentity = await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
            // Add custom user claims here
            return userIdentity;
        }
    }
}

    [Visual Basic]

Imports System.Security.Claims
Imports System.Threading.Tasks
Imports Microsoft.AspNet.Identity
Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

Public Module ApplicationUserExtensions
    <System.Runtime.CompilerServices.Extension> _
    Public Async Function GenerateUserIdentityAsync(user As ApplicationUser, manager As UserManager(Of ApplicationUser)) As Task(Of ClaimsIdentity)
        ' Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
        Dim userIdentity = Await manager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie)
        ' Add custom user claims here
        Return userIdentity
    End Function
End Module

    Note that if you have specified the name for the application other than "AspNet_Identity_Application", you must use the corresponding namespace name in the code above instead of "AspNet_Identity_Application".

  3. In the Controllers project folder open the AccountController.cs (or AccountController.vb for Visual Basic) file.

    If you use Visual Studio 2013 Update 2, replace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

    If you use Visual Studio 2013 Update 3 or higher, there is no such line, just add the above code to the beginning of the file.

  4. In the App_Start project folder open the IdentityConfig.cs (or IdentityConfig.vb for Visual Basic) file.

    Replace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

  5. Replace the following line in the Create method:

    [C#]

    var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));

    [Visual Basic]

    Private manager As var = New ApplicationUserManager(New UserStore(Of ApplicationUser)(context.[Get](Of ApplicationDbContext)()))

    with:

    [C#]

    var manager = new ApplicationUserManager(new PgSqlUserStore());

    [Visual Basic]

    Dim manager = New ApplicationUserManager(New PgSqlUserStore())

  6. In the App_Start project folder open the Startup.Auth.cs (or Startup.Auth.vb for Visual Basic) file.

    If you use Visual Studio 2013 Update 2, replace

    [C#]

    using Microsoft.AspNet.Identity.EntityFramework;

    [Visual Basic]

    Imports Microsoft.AspNet.Identity.EntityFramework

    with:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

    If you use Visual Studio 2013 Update 3 or higher, there is no such line, just add the above code to the beginning of the file.

  7. Delete the following line:

    [C#]

    app.CreatePerOwinContext(ApplicationDbContext.Create);

    [Visual Basic]

    app.CreatePerOwinContext(ApplicationDbContext.Create)

  8. For Visual Studio 2013 Update 3 or higher only - in the Controllers project folder open the ManageController.cs (or ManageController.vb for Visual Basic) file. Add the following code to the beginning of the file:

    [C#]

    using Devart.Common.Web.Identity;
using Devart.Data.PostgreSql.Web.Identity;
using ApplicationUser = Devart.Common.Web.Identity.IdentityUser;

    [Visual Basic]

    Imports Devart.Common.Web.Identity
Imports Devart.Data.PostgreSql.Web.Identity
Imports ApplicationUser = Devart.Common.Web.Identity.IdentityUser

  9. In the web.config file of your project, replace the default connection string with your PostgreSQL one.

    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;" providerName="Devart.Data.PostgreSql" />

+ Extending ASP.NET Identity Functionality

The Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL tutorial contains an example with adding a new Email column to the AspNetUsers table. In ASP.NET Identity 2 the AspNetUsers table was significantly extended, and now it includes such Email column. However the approach to extending ASP.NET Identity functionality is the same, and you can take a look at this topic if you need to implement extended ASP.NET Identity 2 functionality.

- Checking Application

Now we can run our application and check if everything works correctly.

  1. Run the application by pressing CTRL+F5.

    Getting started page
  2. Switch to the Register tab on the top of the page.

    Registration page

    For an example with extended ASP.NET Identity functionality the page looks like the following:

    Registration page (with e-mail)
  3. Enter a new user name and password (and email - if you have created an example with extended ASP.NET Identity functionality) to the corresponding boxes and click the Register button.
  4. The new user is now registered and logged in.

    User is registered
  5. After this you may use an appropriate database tool to connect to the database where the user data is stored and verify that the data is stored correctly.

+ Identity Database Script

CREATE TABLE "AspNetRoles" (
  "Id" varchar(128) NOT NULL,
  "Name" varchar(256) NOT NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUserRoles" (
  "UserId" varchar(128) NOT NULL,
  "RoleId" varchar(128) NOT NULL,
  PRIMARY KEY ("UserId", "RoleId")
);

CREATE TABLE "AspNetUsers" (
  "Id" varchar(128) NOT NULL,
  "Email" varchar(256) NULL,
  "EmailConfirmed" boolean NOT NULL,
  "PasswordHash" varchar(256) NULL,
  "SecurityStamp" varchar(256) NULL,
  "PhoneNumber" varchar(256) NULL,
  "PhoneNumberConfirmed" boolean NOT NULL,
  "TwoFactorEnabled" boolean NOT NULL,
  "LockoutEndDateUtc" timestamp without time zone NULL,
  "LockoutEnabled" boolean NOT NULL,
  "AccessFailedCount" int NOT NULL,
  "UserName" varchar(256) NOT NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUserClaims" (
  "Id" serial NOT NULL,
  "UserId" varchar(128) NOT NULL,
  "ClaimType" varchar(256) NULL,
  "ClaimValue" varchar(256) NULL,
  PRIMARY KEY ("Id")
);

CREATE TABLE "AspNetUserLogins" (
  "LoginProvider" varchar(128) NOT NULL,
  "ProviderKey" varchar(128) NOT NULL,
  "UserId" varchar(128) NOT NULL,
  PRIMARY KEY ("LoginProvider", "ProviderKey", "UserId")
);

CREATE UNIQUE INDEX "RoleNameIndex" ON "AspNetRoles" ("Name");

CREATE INDEX "IX_AspNetUserRoles_UserId" ON "AspNetUserRoles" ("UserId");

CREATE INDEX "IX_AspNetUserRoles_RoleId" ON "AspNetUserRoles" ("RoleId");

CREATE UNIQUE INDEX "UserNameIndex" ON "AspNetUsers" ("UserName");

CREATE INDEX "IX_AspNetUserClaims_UserId" ON "AspNetUserClaims" ("UserId");

CREATE INDEX "IX_AspNetUserLogins_UserId" ON "AspNetUserLogins" ("UserId");

ALTER TABLE "AspNetUserRoles"
  ADD CONSTRAINT "FK_AspNetUserRoles_AspNetRoles_RoleId" FOREIGN KEY ("RoleId") REFERENCES "AspNetRoles" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserRoles"
  ADD CONSTRAINT "FK_AspNetUserRoles_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserClaims"
  ADD CONSTRAINT "FK_AspNetUserClaims_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

ALTER TABLE "AspNetUserLogins"
  ADD CONSTRAINT "FK_AspNetUserLogins_AspNetUsers_UserId" FOREIGN KEY ("UserId") REFERENCES "AspNetUsers" ("Id")
  ON DELETE CASCADE;

See Also

Using Entity Framework Implementation of ASP.NET Identity 1 for PostgreSQL | Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL | Using Entity Framework Implementation of ASP.NET Identity 2 for PostgreSQL


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using Entity Framework Implementation of ASP.NET Identity 1 for PostgreSQL

ASP.NET Identity is a new system of user authentication and authorization, that continues the evolution of ASP.NET membership system, and is used in the Visual Studio 2013 project templates for ASP.NET MVC, Web Forms, Web API and SPA. You can read more on ASP.NET Identity in Microsoft documentation.

dotConnect for PostgreSQL enables you to employ an implementation of ASP.NET Identity for PostgreSQL database using either ADO.NET or Entity Framework functionality in your web applications. This allows you to use such ASP.NET Identity benefits as unit-testable user authentication system, social login support, OWIN integration, etc. This tutorial demonstrates creating an Entity Framework implementation of ASP.NET Identity.

To complete this tutorial you need Visual Studio 2013 installed.

In order to create an ASP.NET MVC 5 application using dotConnect for PostgreSQL for storing identity information, perform the following steps:

  1. In the Add New Project dialog box expand Visual C# on the left, then Web, and then select ASP.NET Web Application. Name your project, for example, "AspNet_Identity_Application" and then click OK.

    Add New Project dialog box

  2. In the New ASP.NET Project dialog box, select the MVC template with the default options (that includes Individual User Accounts as authentication method) and click OK.

    New ASP.NET Project dialog box

  3. Add references to the necessary dotConnect for PostgreSQL assemblies:

    • Devart.Data.dll
    • Devart.Data.PostgreSql.dll
    • Devart.Data.PostgreSql.Entity.EF6.dll

    You need to add the last file from the Entity\EF6 subfolder of the dotConnect for PostgreSQL installation folder. Or you may add it from the GAC.

  4. In the web.config file of your project, replace the default connection string with your PostgreSQL one.

    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;" providerName="Devart.Data.PostgreSql" />

  5. Register the Entity Framework provider in the <providers> section of the web.config file

    Before the registration:

        <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>

    After the registration:

        <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>

    Note: replace "7.1.26.0" with the actual version.

  6. Open the IdentityModels.cs file from the Models project folder.

  7. Add the following namespaces to the using list:

    [C#]

    using System.Data.Entity;
using System.Data.Entity.Migrations;

    [Visual Basic]

    Imports System.Data.Entity
Imports System.Data.Entity.Migrations

  8. Add the new Configuration class and register the dotConnect for PostgreSQL provider SQL generator for Code-First Migrations.

    [C#]

        internal class Configuration : DbMigrationsConfiguration<ApplicationDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            SetSqlGenerator("Devart.Data.PostgreSql", new Devart.Data.PostgreSql.Entity.Migrations.PgSqlEntityMigrationSqlGenerator());
        }
    }

    [Visual Basic]

        Friend Class Configuration
        Inherits DbMigrationsConfiguration(Of ApplicationDbContext)
        Public Sub New()
            AutomaticMigrationsEnabled = True
            SetSqlGenerator("Devart.Data.PostgreSql", New Devart.Data.PostgreSql.Entity.Migrations.PgSqlEntityMigrationSqlGenerator())
        End Sub
    End Class

  9. Extend the ApplicationDbContext class code.

    We need to add a static constructor setting the database initializer for the context.

    After this we also need to add the OnModelCreating method, where we change type for character properties that aren't a part of entity key (they are filtered by their names) from the TEXT data type to VARCHAR(256) via a lightweight convention.

    The code before editing:

    [C#]

        public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("DefaultConnection")
        {
        }
    }

    [Visual Basic]

        Public Class ApplicationDbContext
        Inherits IdentityDbContext(Of ApplicationUser)
        Public Sub New()
            MyBase.New("DefaultConnection")
        End Sub
    End Class

    The code after editing:

    [C#]

        public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {
        public ApplicationDbContext()
            : base("DefaultConnection")
        {
        }

        static ApplicationDbContext()
        {

            Database.SetInitializer(new MigrateDatabaseToLatestVersion<ApplicationDbContext, Configuration>());
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {

            base.OnModelCreating(modelBuilder);

            modelBuilder
              .Properties()
              .Where(p => p.PropertyType == typeof(string) &&
                          !p.Name.Contains("Id") &&
                          !p.Name.Contains("Provider"))
              .Configure(p => p.HasMaxLength(256));
        }

    }

    [Visual Basic]

        Public Class ApplicationDbContext
        Inherits IdentityDbContext(Of ApplicationUser)
        Public Sub New()
            MyBase.New("DefaultConnection")
        End Sub

        Shared Sub New()

            Database.SetInitializer(New MigrateDatabaseToLatestVersion(Of ApplicationDbContext, Configuration)())
        End Sub

        Protected Overrides Sub OnModelCreating(modelBuilder As DbModelBuilder)

            MyBase.OnModelCreating(modelBuilder)

            modelBuilder.Properties().Where(Function(p) p.PropertyType = GetType(String) AndAlso Not _
                p.Name.Contains("Id") AndAlso Not p.Name.Contains("Provider")).Configure(Function(p) _
                p.HasMaxLength(256))
        End Sub
    End Class

Checking Application

Now we can run our application and check if everything works correctly.

  1. Run the application by pressing CTRL+F5.

    Getting started page
  2. Switch to the Register tab on the top of the page.

    Registration page
  3. Enter a new user name and password to the corresponding boxes and click the Register button.
  4. The new user is now registered and logged in, and the ASP.NET Identity tables are created in the PostgreSQL database.

    User is registered
  5. After this you may use an appropriate database tool to connect to the database where the user data is stored and verify that the data is stored correctly.

See Also

Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL | Using Entity Framework Implementation of ASP.NET Identity 2 for PostgreSQL | Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Using Entity Framework Implementation of ASP.NET Identity 2.0 for PostgreSQL

ASP.NET Identity is a new system of user authentication and authorization, that continues the evolution of ASP.NET membership system, and is used in the Visual Studio 2013 project templates for ASP.NET MVC, Web Forms, Web API and SPA. You can read more on ASP.NET Identity in Microsoft documentation.

dotConnect for PostgreSQL enables you to employ an implementation of ASP.NET Identity for PostgreSQL database using either ADO.NET or Entity Framework functionality in your web applications. This allows you to use such ASP.NET Identity benefits as unit-testable user authentication system, social login support, OWIN integration, etc. This tutorial demonstrates creating an Entity Framework implementation of ASP.NET Identity.

To complete this tutorial you need Visual Studio 2013 Update 2 or higher installed.

In order to create an ASP.NET MVC 5 application using dotConnect for PostgreSQL for storing identity information, perform the following steps:

  1. In the Add New Project dialog box expand Visual C# on the left, then Web, and then select ASP.NET Web Application. Name your project, for example, "AspNet_Identity_Application" and then click OK.

    Add New Project dialog box

  2. In the New ASP.NET Project dialog box, select the MVC template with the default options (that includes Individual User Accounts as authentication method) and click OK.

    New ASP.NET Project dialog box

  3. Add references to the necessary dotConnect for PostgreSQL assemblies:

    • Devart.Data.dll
    • Devart.Data.PostgreSql.dll
    • Devart.Data.PostgreSql.Entity.EF6.dll

    You need to add the last file from the Entity\EF6 subfolder of the dotConnect for PostgreSQL installation folder. Or you may add it from the GAC.

  4. In the web.config file of your project, replace the default connection string with your PostgreSQL one.

    <add name="DefaultConnection" connectionString="host=server;database=test;user id=postgres;" providerName="Devart.Data.PostgreSql" />

  5. Register the Entity Framework provider in the <providers> section of the web.config file

    Before the registration:

        <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>

    After the registration:

        <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>

    Note: replace "7.1.26.0" with the actual version.

  6. Open the IdentityModels.cs file from the Models project folder.

  7. Add the following namespaces to the using list:

    [C#]

    using System.Data.Entity;
using System.Data.Entity.Migrations;

    [Visual Basic]

    Imports System.Data.Entity
Imports System.Data.Entity.Migrations

  8. Add the new Configuration class and register the dotConnect for PostgreSQL provider SQL generator for Code-First Migrations.

    [C#]

        internal class Configuration : DbMigrationsConfiguration<ApplicationDbContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = true;
            SetSqlGenerator("Devart.Data.PostgreSql", new Devart.Data.PostgreSql.Entity.Migrations.PgSqlEntityMigrationSqlGenerator());
        }
    }

    [Visual Basic]

        Friend Class Configuration
        Inherits DbMigrationsConfiguration(Of ApplicationDbContext)
        Public Sub New()
            AutomaticMigrationsEnabled = True
            SetSqlGenerator("Devart.Data.PostgreSql", New Devart.Data.PostgreSql.Entity.Migrations.PgSqlEntityMigrationSqlGenerator())
        End Sub
    End Class

  9. Extend the ApplicationDbContext class code.

    We need to add a static constructor setting the database initializer for the context.

    After this we also need to add the OnModelCreating method, where we change type for character properties that aren't a part of entity key (they are filtered by their names) from the TEXT data type to VARCHAR(256) via a lightweight convention.

    The code before editing:

    [C#]

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
  {
        public ApplicationDbContext()
            : base("DefaultConnection", throwIfV1Schema: false)
      {
        }
        public static ApplicationDbContext Create()
      {
            return new ApplicationDbContext();
        }
    }

    [Visual Basic]

    Public Class ApplicationDbContext
    Inherits IdentityDbContext(Of ApplicationUser)
    Public Sub New()
        MyBase.New("DefaultConnection", throwIfV1Schema:=False)
    End Sub
    Public Shared Function Create() As ApplicationDbContext
        Return New ApplicationDbContext()
    End Function
End Class

    The code after editing:

    [C#]

        public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
        {
        public ApplicationDbContext()
            : base("DefaultConnection", throwIfV1Schema: false)
        {
        }
        static ApplicationDbContext()
      {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<ApplicationDbContext, Configuration>());
        }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {

            base.OnModelCreating(modelBuilder);

            modelBuilder
              .Properties()
              .Where(p => p.PropertyType == typeof(string) &&
                          !p.Name.Contains("Id") &&
                          !p.Name.Contains("Provider"))
              .Configure(p => p.HasMaxLength(256));
        }

        public static ApplicationDbContext Create()
        {
            return new ApplicationDbContext();
        }
    }

    [Visual Basic]

        Public Class ApplicationDbContext
        Inherits IdentityDbContext(Of ApplicationUser)
        Public Sub New()
            MyBase.New("DefaultConnection", throwIfV1Schema:=False)
        End Sub
        Shared Sub New()
            Database.SetInitializer(New MigrateDatabaseToLatestVersion(Of ApplicationDbContext, Configuration)())
        End Sub
        Protected Overrides Sub OnModelCreating(modelBuilder As DbModelBuilder)

            MyBase.OnModelCreating(modelBuilder)

            modelBuilder.Properties().Where(Function(p) p.PropertyType = GetType(String) AndAlso Not _
                p.Name.Contains("Id") AndAlso Not p.Name.Contains("Provider")).Configure(Function(p) _
                p.HasMaxLength(256))
        End Sub
        Public Shared Function Create() As ApplicationDbContext
            Return New ApplicationDbContext()
        End Function
    End Class

Checking Application

Now we can run our application and check if everything works correctly.

  1. Run the application by pressing CTRL+F5.

    Getting started page
  2. Switch to the Register tab on the top of the page.

    Registration page
  3. Enter a new Email and password to the corresponding boxes and click the Register button.
  4. The new user is now registered and logged in, and the ASP.NET Identity tables are created in the PostgreSQL database.

    User is registered
  5. After this you may use an appropriate database tool to connect to the database where the user data is stored and verify that the data is stored correctly.

See Also

Using Entity Framework Implementation of ASP.NET Identity 1 for PostgreSQL | Using ADO.NET Implementation of ASP.NET Identity 1 for PostgreSQL | Using ADO.NET Implementation of ASP.NET Identity 2 for PostgreSQL


Configuring Trust Level for Web Applications

When dotConnect for PostgreSQL application is used in partially trusted code (this is actual for web projects), it requires medium trust plus SocketPermission.

Since dotConnect for PostgreSQL uses standard Microsoft .NET licensing, it additionally requires RegistryPermission. And though SecurityPermission is granted by default when using medium trust level, the set of flags for the SecurityPermission must be extended. You need to add the following flags: Assertion, SkipVerification, UnmanagedCode, and SerializationFormatter.

You can configure the trust level for your application in the following ways:

First, you can modify the .NET Framework configuration file for the medium trust level. Open the web_mediumtrust.config file, that is located in the Windows\Microsoft.NET\Framework\<version>\Config\ folder, where <version> is the version of the target .NET Framework.

Add the following lines to the SecuityClasses tag:

<SecurityClass Name="RegistryPermission" Description="System.Security.Permissions.RegistryPermission, mscorlib, Version=4.0.0.0, Culture=neutral,PublicKeyToken=b77a5c561934e089"/>
<SecurityClass Name="SocketPermission" Description="System.Net.SocketPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

Add the corresponding IPermissions elements to the PermissionSet tag with the Name attribute equal to "ASP.Net":

<PermissionSet class="NamedPermissionSet" version="1" Name="ASP.Net">
    <IPermission
            class="RegistryPermission"
            version="1"
            Unrestricted="true"
    />
    <IPermission
            class="SocketPermission"
            version="1"
            Unrestricted="true"
    />

However, since the access to this file may be restricted on target computer, you may define your custom trust level. For this, add the following lines to the system.web tag at the beginning of your application web.config file:

<configuration>
    <system.web>
        <securityPolicy>
                  <trustLevel name="Custom" policyFile="web_customtrust.config" />
        </securityPolicy>
        <trust level="Custom" originUrl="" />
This trustLevel tag here introduces the new "Custom" trust level, defined in the web_customtrust.config (that is located in the same directory as the web.config file). The trust tag sets the current trust level to "Custom".

Create the web_customtrust.config file (just copy the content of your web_mediumtrust.config to it and make the changes, described above). You will need to deploy this file with your application.


Working with Command Editor

This topic describes how to use command editor for setting SQL commands to the different data access components, like PgSqlDataTable, PgSqlDataAdapter, PgSqlCommand or PgSqlDataSource. To adjust such component, one generally should set up select, insert, update and delete commands, and, if applicable, assign their parameters. The command editor allows doing this in a simple and visual way.

In this topic, we work with an PgSqlDataTable object. The following steps need to be performed to set up PgSqlDataTable commands:

  1. Create an object (e.g., add PgSqlDataTable to the form from the toolbox).

  2. Set up a connection.

    An open connection is required for some operations performed in command editor (for example, generation of update commands). If the connection is not initialized, any of such operations will prompt you setting the connection properties. For detailed information on how to establish a connection, see tutorial Logging Onto The Server.

  3. Specify the select command.

    Select type of a select command from the Type list box. The select command can be one of the following types - Text, StoredProcedure, or TableDirect.

    • Text option means that the specified SQL statement will be used as a command text.

    PgSqlDataTableEditor - Select Text

    • The StoredProcedure option allows you to select a stored procedure from the procedure list what are available for the current user (i.e., the user specified in the connection).

    • The TableDirect option allows you to bind some table from current user's schema to your data object directly. With the All check box selected you can choose a table from all available schemas.

    You can use the Preview button to see the result set that will be returned by the select command. The Preview Data window will open:

    The Open and Close buttons fill and clear the result set accordingly. If you use the only source table, in the Preview Data window you can also modify data in this table and save the changes with the Update button. Note that update commands are dynamically generated based on the columns mentioned in the select query. Thus if your select command does not include table's primary key, data modification may cause data loss or corruption.

  4. Set the select parameters.

    Let the select query have some parameter(s), like the following one:

                SELECT * FROM dept WHERE deptno = @pDeptNo

    In this case, when moving to this tab you will be prompted for generating parameters for your data object. You may also add and edit them manually.

    PgSqlDataTableEditor dialog box - Select Parameters

    This tab allows you to set the following parameter options:

    • Common parameter properties. The data type, direction, value and size of parameter can be set in the corresponding controls.
    • Parameter Value Editor is available for setting large string values of parameter or values of complex type parameter. To start the editor use the … button.
    • Null Value. To set the null value of parameter, check the Null Value check box. The Is Null Mapping check box sets the SourceColumnNullMapping property of the parameter.
    • Column Bindings. You may bind some column to parameter's value and use Current, Original, Proposed or Default value of this column (which may be of no use for select commands, but the same options are available for other types of commands). For this purpose, the Source Column text box and the Source Version list box should be used.

  5. Generate commands

    PgSqlDataTableEditor - Command Generator

    Also, Command Editor allows you to generate insert/update/delete commands for your data access component. You can do it on the Command Generator tab. If you work with several database tables, you should select one for which the update commands will be generated with the corresponding combo box.

    Select the commands which should be generated with the corresponding check boxes. The insert and update commands can be generated in such way that the assigned values will be returned as output parameters. To enable this mode, select the With refresh SQL check boxes. The Quote names check box specifies whether database objects' names will be quoted.

    Click the Get Table Fields button to see the grid with fields for the selected table. In this grid you may check whether particular fields will be Key, Updating and Refreshing.

    • For update and delete statement parameter specifying use the Key fields.
    • For specifying values that can be set by the generated insert and update commands use the Update checkboxes.
    • To select fields that which values will be returned, if the With refresh SQL option is enabled, use Refreshing fields.

  6. Edit update commands

    If you want to edit update commands go to the Update Commands tab.

    PgSqlDataTableEditor - Update Commands

    You can specify the SQL statement for each command, delete a redundant command using the Remove button, and tune a command with the Edit button. It opens PgSqlCommandEditor dialog with two pages - CommandText and Parameters.

    PgSqlCommand editor - parameters

See Also

PgSqlDataTable Class | PgSqlDataAdapter Class | PgSqlCommand Class | Using PgSqlDataSource Component


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Retrieving Metadata

Usually you have to dig through SQL references to find out how to get metadata information for specific DBMS. There are few servers that support same SQL commands. Sometimes the syntax differs slightly, sometimes a server does not support certain statement. Now you can forget about those problems because dotConnect for PostgreSQL retrieves the metadata for you.

Since dotConnect for PostgreSQL 2.00 you can take advantage of a very useful feature - GetSchema method. It allows you to read server schema information without writing queries and parsing the output. All information you may want to obtain is brought to you by single function in easy-to-process format. You can get information on databases, tables, columns, indexes, users, stored procedures and functions, user-defined procedures, and reserved words. The method is introduced in System.Data.Common.DbConnection.

How To Use

GetSchema method is available in three overloads, each of them serves its own purpose. All overloads return System.Data.DataTable object that contains information about server elements.

[C#]

public virtual abstract DataTable GetSchema();

[Visual Basic]

Overloads Public Overridable MustOverride Function GetSchema() As DataTable

If you call the GetSchema method without parameters, or with single parameter "MetaDataCollections" (which is actually the same), the table object returned by the method will contain three columns. The first field of every row is a keyword allowed to be passed to the method (as collectionName argument). The second field is the number of restriction values for this keywords (passed through restrictionValues argument). The third field is not used in dotConnect for PostgreSQL. It is always zero.

[C#]

public virtual abstract DataTable GetSchema(
   string collectionName
);

[Visual Basic]

Overloads Public Overridable MustOverride Function GetSchema( _
   ByVal collectionName As String _
) As DataTable

GetSchema with 1 argument returns general information about the collection queried. For example, GetSchema("Users") returns list of users on the server.

[C#]

public virtual abstract DataTable GetSchema(
   string collectionName,
   string[] restrictionValues
);

[Visual Basic]

Overloads Public Overridable MustOverride Function GetSchema( _
   ByVal collectionName As String, _
   ByVal restrictionValues() As String _
) As DataTable

In this overload first parameter is name of a collection, and second parameter is the array of restrictions to be applied when querying information. These restrictions specify which subset of the collection will be returned. The restrictions can include, for example, the database name (in this case, only collection elements belonging to this database will be returned) or the mask for the name of collection elements (only the elements satisfying this mask will be returned). The quantity and description of restrictions allowed for each metadata collection are represented in the table here. Their number can also be obtained from the return of the GetSchema() method. If the second parameter is null/Nothing, it is ignored.

Instead of specifying the metadata collection name as a string constant, you may use members of System.Data.DbMetaDataCollectionNames and Devart.Data.PostgreSql.PgSqlMetadataCollectionNames as the first GetSchema argument values. The members of these classes are the string fields, each field stores the corresponding metadata collection name. It is recommended to use these fields rather than manually input the collection names manually as the string constants because in case of using these fields, you will find misspellings at compile-time, and intellisense will show you all the available metadata collection names.

GetSchema Method Reference

GetSchema supports two kinds of wildcards: "%" and "_". These special characters behave exactly as in LIKE operator. "%" means zero or more of any characters, "_" means any single character.

When calling the GetSchema method, you can pass all or few of restrictions, applicable to the chosen collection. In the latter case, you have to put "%" wildcard in the place of omitted restriction, if it must be specified before the restriction you want to apply. For example, GetSchema("Casts", new string[] { "%", "%", "date" }) returns list of all casts to type "date". Or, suppose you want to query all functions within a certain schema: GetSchema("Functions", new string[] { "%", "public" }) returns list of all functions in schema public. Note that this collection may accept 8 restrictions, however, you do not need to specify all of them.

The following table provides detailed information on metadata collections that can be retrieved using the GetSchema method, and restrictions that can be applied for them. Some collections may be not supported in older server versions. If you try to get metadata for unsupported collection you will get exception with message "Collection not defined".

Collection Name

 Number of restrictions

Remarks
MetaDataCollections 0

Returns this list. Same as using GetSchema() method without parameters.
ReservedWords 0

Lists all reserved words used in the server.
AggregateFunctions 2

GetSchema("AggregateFunctions") returns detailed list of all aggregate functions on the server.

  • The first restriction for this collection is a name of a function. If specified, the method returns all overloads with given name.
  • The second restriction is name of function definer. For example, you can issue "%" as the first restriction, and "postgres" as the second one, to obtain list of functions defined by user "postgres".
Arguments 5

GetSchema("AggregateFunctions") returns the list of the function arguments. The following restrictions may be specified:

  • Schema name
  • Function name
  • User name
  • Type
  • Function OID (for overload functions)
Casts 3

GetSchema("Casts") returns list of casts available on the server.

  • The first restriction for this collection is namespace of a cast.
  • The second restriction is source type for the cast.
  • The third restriction is target type for the cast.
Columns 3

Returns list of columns, their schema, table, type, and some extra information.

  • Restricted by schema name, GetSchema returns columns of all tables within the schema.
  • The second restriction is name of a table that GetSchema method should search in.
  • At last, you can set column name pattern to filter columns by name.
Databases 3

Returns list of databases on the server.

  • The first restriction is a name of a database.
  • The second restriction is definer's name.
  • The last restriction is encoding of the database.
DatasourceInformation 1

Returns information about data sources.

The only restriction is schema name.
Domains 9

Returns list of domains on the server. The restrictions for this collection are the following:

  • Domain name
  • Definer
  • OID type
  • Base type
  • Type length
  • Typmod
  • Number of dimensions
  • Schema name
  • OID
ForeignKeys 4

Returns list of foreign keys on the server. The restrictions for this collection are the following:

  • Key name
  • Schema name
  • Table name
  • OID
Functions 8

Returns list of functions on the server. The following restrictions may be specified:

  • Function name
  • Schema name
  • Definer
  • Language
  • Arguments count
  • Return type OID
  • Return type
  • OID
Groups 1

Lists all groups on the server, including IDs and members.

The only restriction is a group name.
Indexes 4

Returns list of indexes and their details. Restricted by:

  • Index name
  • Schema name
  • Table name
  • OID
Languages 2

Lists all languages on the server.

The first restriction is a language name, the second is OID.
NestedTables 5

Lists nested tables on the server. Restricted by:

  • Table name
  • Schema name
  • Parent table name
  • Parent schema name
  • OID
Operators 2

Returns list of operators allowed on the server.

Restrict it by OID and name.
PrimaryKeys 3

Returns list of primary keys on the server.

  • First restriction is key name.
  • Second is schema name
  • Third is table name
Schemas 2

Returns list of schemas on the server.

  • The first restriction is OID
  • The second restriction is schema name
Tables 4

Returns list of tables on the server. Restrict the collection with:

  • OID
  • Table name
  • Schema name
  • Definer
Triggers 6

Returns list of triggers on the server. Restricted by:

  • OID
  • Trigger name
  • Schema name
  • Definer
  • Language
  • Arguments count
Types 5

Returns list of types on the server. Restricted by:

  • OID
  • Type name
  • Schema name
  • Definer
  • Type Length
Users 1

Lists all users on the server.

When restricted by username, returns information about specific user.
Views 4

Returns list of types on the server. Restricted by:

  • OID
  • View name
  • Schema name
  • Definer

Samples

The following code fragment is an elegant way to detect existence of a table.

[C#]

string tableName = "dept";
if (myDbConnection.GetSchema("Tables", new string[] { "Test", tableName }).Rows.Count > 0)
{
Console.WriteLine("Table " + tableName + " exists in the database.");
}

[Visual Basic]

Dim tableName As String = "dept"
Dim restrictions() As String = {"Test", tableName}
If (myDbConnection.GetSchema("Tables", restrictions).Rows.Count > 0) Then
  Console.WriteLine("Table " + tableName + " exists in the database.")
End If

The next sample shows how to retrieve columns information from a table and render it to console.

[C#]

static void GetTableInfo(PgSqlConnection myDbConnection, string tableName)
{
  myDbConnection.Open();
  DataTable myDataTable = myDbConnection.GetSchema("Columns", new string[] { "Test", tableName });
  for (int i = 0; i < myDataTable.Columns.Count; i++)
  {
    Console.Write(myDataTable.Columns[i].Caption + "\t");
  }
  Console.WriteLine();
  foreach (DataRow myRow in myDataTable.Rows)
  {
    foreach (DataColumn myCol in myDataTable.Columns)
    {
      Console.Write(myRow[myCol] + "\t");
    }
    Console.WriteLine();
  }
  myDbConnection.Close();
}

[Visual Basic]

Public Sub GetTableInfo(ByVal myDbConnection As PgSqlConnection, ByVal tableName As String)
  myDbConnection.Open()
  Dim restrictions() As String = {"Test", tableName}
  Dim myDataTable As DataTable = myDbConnection.GetSchema("Columns", restrictions)
  Dim i As Int32
  For i = 0 To myDataTable.Columns.Count - 1
    Console.Write(myDataTable.Columns(i).Caption & Chr(9))
  Next
  Console.WriteLine()
  Dim myRow As DataRow
  Dim myCol As DataColumn
  For Each myRow In myDataTable.Rows
    For Each myCol In myDataTable.Columns
      Console.Write(myRow(myCol) & Chr(9))
    Next
    Console.WriteLine()
  Next
  myDbConnection.Close()
End Sub

The following sample demonstrates how to generate SQL CREATE TABLE statement basing on metadata retrieved with GetSchema method. The generated script will work with all database management systems that support ANSI standard. Only column name and type are included in the script.

[C#]

static void GetCreateTable(PgSqlConnection myDbConnection, string tableName)
{
  //Open the connection
  myDbConnection.Open();
  //Fill DataTable with columns information
  DataTable myDataTable = myDbConnection.GetSchema("Columns", new string[] { "Test", tableName });
  string queryText = "CREATE TABLE " + tableName + " (\n";
  string fieldLine;
  DataRow myRow;
  //For every row in the table
  for (int i = 0; i < myDataTable.Rows.Count; i++)
  {
    //Get column name and type
    myRow = myDataTable.Rows[i];
    fieldLine = myRow[0] + " " + myRow[1];
    //Add coma or closing bracket
    if (i < myDataTable.Rows.Count - 1)
    {
      fieldLine = fieldLine + ",\n";
    }
    else
    {
      fieldLine = fieldLine + ")";
    }
    //Add new column to script
    queryText = queryText + fieldLine;
  }
  Console.WriteLine(queryText);
  //Close the connection
  myDbConnection.Close();
}

[Visual Basic]

Public Sub GetCreateTable(ByVal myDbConnection As PgSqlConnection, ByVal tableName As String)
  'Open the connection
  myDbConnection.Open()
  Dim restrictions() As String = {"Test", tableName}
  'Fill DataTable with columns information
  Dim myDataTable As DataTable = myDbConnection.GetSchema("Columns", restrictions)
  Dim queryText As String = "CREATE TABLE " + tableName + " (" + System.Environment.NewLine
  Dim fieldLine As String
  Dim myRow As DataRow
  Dim i As Int32
  'For every row in the table
  For i = 0 To myDataTable.Rows.Count - 1
    'Get column name and type
    myRow = myDataTable.Rows(i)
    fieldLine = myRow(0) & " " & myRow(1)
    'Add coma or closing bracket
    If (i < myDataTable.Rows.Count - 1) Then
      fieldLine = fieldLine + "," + System.Environment.NewLine
    Else
      fieldLine = fieldLine + ")"
    End If
    'Add new column to script
    queryText = queryText + fieldLine
  Next
  Console.WriteLine(queryText)
  'Close the connection
  myDbConnection.Close()
End Sub

Also you can get a metadata of query result set using the GetSchemaTable method of PgSqlDataReader and the ShemaTable property of PgSqlDataTable classes.

See Also

PgSqlConnection Class | DbConnectionBase.GetSchema Method


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Asynchronous Query Execution

dotConnect for PostgreSQL supports a very useful feature - asynchronous execution of methods that take most of time in database applications. Traditionally, the main thread of the application went blocked during opening a connection, transferring large blocks of data, and other operations alike. Now you can entrust execution of a query to a background thread and concentrate on performing other operations, for example, an update of user interface elements, or on a preparation of another query for execution.

The article consists of following sections:

  • Understanding Asynchronous Methods
  • Completion Signalling
  • Transparent Asynchronous Fetch
  • Samples

Understanding Asynchronous Methods

dotConnect for PostgreSQL provides you with asynchronous methods for most of the time-consuming operations: connecting, data retrieving, and DML statement execution. For every synchronous method two asynchronous methods are implemented, with prefixes "Begin" and "End" respectively. The table below summarizes the new methods in the command object:

Table 1. Asynchronous methods
Class | Synchronous method | Asynchronous methods
 |  | Begin part | End part
PgSqlConnection | Open | BeginOpen | EndOpen
PgSqlCommand | ExecuteReader | BeginExecuteReader | EndExecuteReader
PgSqlCommand | ExecuteNonQuery | BeginExecuteNonQuery | EndExecuteNonQuery
PgSqlDataTable | Fill | BeginFill | EndFill
PgSqlDump | Backup | BeginBackup | EndBackup
PgSqlDump | BackupQuery | BeginBackupQuery | EndBackupQuery
PgSqlDataTable | Restore | BeginRestore | EndRestore

A typical usage of asynchronous methods looks like the following code.

[C#]

IAsyncResult myResult = myCommand.BeginExecuteNonQuery(null, null);
...
rowsAffected = myCommand.EndExecuteNonQuery(myResult);

[Visual Basic]

Dim myResult As IAsyncResult = myCommand.BeginExecuteNonQuery(Nothing, Nothing)
...
Dim rowsAffected As Int32 = myCommand.EndExecuteNonQuery(myResult)

First, application calls the "Begin" method and passes it all the parameters needed to accomplish the task. This method returns IAsyncResult object that represents the operation invoked and is used for later processing. After the process has been invoked, application can proceed to do its job.
Later, when the query has finished its execution, application calls the "End" method, passing it IAsyncResult object returned by the "Begin" method that has been invoked earlier.
If something goes wrong with the query, the exception is thrown only when application calls "End" method.

Completion Signalling

The common synchronous method calls do not return until the operation is finished. In the asynchronous cases, the begin call returns immediately, so there is a need to determine when the operation is actually complete. dotConnect for PostgreSQL provides you with three ways to catch the query termination.

All of the methods listed in the table 1 accept at least two parameters. For example, DbCommandBase.BeginExecuteReader method is declared in the following way:

[C#]

public IAsyncResult BeginExecuteReader(
   AsyncCallback callback,
   object stateObject,
   CommandBehavior behavior
);

[Visual Basic]

Public Function BeginExecuteReader( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object, _
   ByVal behavior As CommandBehavior _
) As IAsyncResult

The way you get signalled about query termination depends on what values you pass to the "Begin" method.

  • Callback: pass a delegate as callback parameter, along with (optionally) a user-defined state object stateObject. When this approach is used, dotConnect for PostgreSQL will call that passed-in delegate, and make the state object available through the IAsyncResult object (passed as the second parameter to the delegate). To avoid calling a delegate, pass null (Nothing in Visual Basic) to the callback parameter.
  • Synchronization objects: the IAsyncResult objects returned by the begin methods have a WaitHandle property that contains an event object. The event object can be used in synchronization primitives such as WaitHandle.WaitAny and WaitHandle.WaitAll. This allows the calling code to wait for multiple pending operations, and be notified either when one or all of them finish.
  • Polling: the IAsyncResult object also has an IsCompleted boolean property. This property will change to true when the operation completes, so it can be used by code that needs to perform some continuous activity; that code can periodically check the property and, if it changes, process the results.

In either case you must call corresponding "End" method to continue using the connection that serves the operation. If you try to start another asynchronous operation on connection that already serves a "Begin" method, an exception will be thrown. If you do not call the corresponding "End" method, some system resources may leak. Note that calling the "End" method without waiting for the operation to complete is allowed. In this case the method will block the current thread until the operation finishes.

Every asynchronous method that invokes an operation has stateObject parameter. You can pass it any object you find useful thus providing the callback routine any information it may require. The value of stateObject is accessible through IAsyncResult.AsyncState property.

Transparent Asynchronous Fetch

The PgSqlDataTable component provides even more features in the area of asynchronous execution. In addition to BeginFill and EndFill methods, it allows you to pause (SuspendFill), continue (BeginFill again), or stop (CancelFetch) the fetch process. Moreover, the component has NonBlocking property, which turns common fill into transparent asynchronous operation. To capture the end moment of the operation in a non-blocking fetch, watch for the SyncRoot property or handle the FetchFinished event.

For more information on the PgSqlDataTable component refer to topic PgSqlDataTable Advanced Features.

Samples

A sample is provided below for each of the signalling methods.

Polling

The following sample starts an asynchronous execution of UPDATE statement, then periodically checks whether the operation is complete, while performing some operations (writes a dot to console). Once query is done, the routine returns and application is ready to close.

[C#]

using System;
using Devart.Data.PostgreSql;

namespace MyNamespace
{
  class Class1
  {
    static PgSqlConnection myConnection = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
    static PgSqlCommand myCommand = new PgSqlCommand(
      "UPDATE Emp SET Sal = Sal + 500 WHERE Sal < 2000");

    static void PerformAsync()
    {
      myCommand.Connection = myConnection;
      myConnection.Open();
      int rowsAffected;
      try
      {
        IAsyncResult myResult = myCommand.BeginExecuteNonQuery(null, null);
        Console.Write("In progress...");
        while (!myResult.IsCompleted)
        {
          Console.Write(".");
          //Perform here any operation you need
        }
        rowsAffected = myCommand.EndExecuteNonQuery(myResult);
        Console.WriteLine();
        Console.WriteLine("Operation complete. Rows Affected: " + rowsAffected);
      }
      catch
      {
        Console.WriteLine("Error during execution.");
      }
      finally
      {
        myConnection.Close();
      }
    }

    static void Main(string[] args)
    {
      PerformAsync();
      Console.WriteLine("About to exit");
      Console.ReadLine();
    }
  }
}

[Visual Basic]

Imports Devart.Data.PostgreSql
Imports System

Module Module1

  Dim myConnection As New PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  Dim myCommand As PgSqlCommand = New PgSqlCommand( _
    "UPDATE Emp SET Sal = Sal + 500 WHERE Sal < 2000")

  Public Sub PerformAsync()
    myCommand.Connection = myConnection
    myConnection.Open()
    Dim rowsAffected As Int32
    Try
      Dim myResult As IAsyncResult = myCommand.BeginExecuteNonQuery(Nothing, Nothing)
      Console.Write("In progress...")
      While Not myResult.IsCompleted
        Console.Write(".")
        'Perform here any operation you need
      End While
      rowsAffected = myCommand.EndExecuteNonQuery(myResult)
      Console.WriteLine()
      Console.WriteLine("Operation complete. Rows Affected: " & rowsAffected)
    Catch
      Console.WriteLine("Error during execution.")
    Finally
      myConnection.Close()
    End Try
  End Sub

  Sub Main()
    PerformAsync()
    Console.WriteLine("About to exit.")
    Console.ReadLine()
  End Sub

End Module

Synchronization objects

This method is very effective when several database operations can be executed simultaneously. The sample code opens two connections, then starts two asynchronous executions and waits for either to finish. Once an operation is signaled complete, the code processes results of the operation. Afterwards the application finishes the second operation. Using this method, we reduce query execution time from sum of two operations to the time of the slowest operation.

[C#]

using System;
using Devart.Data.PostgreSql;

namespace MyNamespace
{

  public class Class1
  {

    static void Main(string[] args)
    {
      //Set up objects required to execute the queries

      PgSqlConnection[] myConnections = new PgSqlConnection[2];
      PgSqlCommand[] myCommands = new PgSqlCommand[2];
      IAsyncResult[] aResults = new IAsyncResult[2];
      string conStr = "host=server;database=test;user id=postgres;";
      myConnections[0] = new PgSqlConnection(conStr);
      myCommands[0] = new PgSqlCommand(
        "UPDATE Dept SET Loc='LA' WHERE DeptNo=10", myConnections[0]);
      myConnections[1] = new PgSqlConnection(conStr);
      myCommands[1] = new PgSqlCommand(
        "UPDATE Emp SET Sal = Sal + 500 WHERE Sal < 2000", myConnections[1]);
      try
      {
        //Open the connections
        myConnections[0].Open();
        myConnections[1].Open();
        //Invoke execution of both queries
        aResults[0] = myCommands[0].BeginExecuteNonQuery(null, null);
        aResults[1] = myCommands[1].BeginExecuteNonQuery(null, null);
        Console.WriteLine("Waiting for operations to complete...");
        //Wait for any of the queries to finish
        int ind = System.Threading.WaitHandle.WaitAny(new System.Threading.WaitHandle[] {
                                                             aResults[0].AsyncWaitHandle,
                                                             aResults[1].AsyncWaitHandle });
        //Process results of the query that finished first
        Console.WriteLine("Result #{0}: {1}", ind,
          myCommands[ind].EndExecuteNonQuery(aResults[ind]));
        //Process results of another query
        int anotherIndex = 1 - ind;
        Console.WriteLine("Result #{0}: {1}", (anotherIndex),
          myCommands[anotherIndex].EndExecuteNonQuery(aResults[anotherIndex]));
      }
      catch
      {
        Console.WriteLine("Error during a query.");
      }
      finally
      {
        myConnections[0].Close();
        myConnections[1].Close();
      }
      Console.WriteLine("About to exit");
      Console.ReadLine();
    }
  }
}

[Visual Basic]

Imports System
Imports Devart.Data.PostgreSql

Module Module1

  Sub Main()
    'Set up objects required to execute the queries
    Dim myConnections(1) As PgSqlConnection
    Dim myCommands(1) As PgSqlCommand
    Dim aResults(1) As IAsyncResult
    Dim conStr As String = "host=server;database=test;user id=postgres;"
    myConnections(0) = New PgSqlConnection(conStr)
    myCommands(0) = New PgSqlCommand( _
      "UPDATE Dept SET Loc='LA' WHERE DeptNo=10", myConnections(0))
    myConnections(1) = New PgSqlConnection(conStr)
    myCommands(1) = New PgSqlCommand( _
      "UPDATE Emp SET Sal = Sal + 500 WHERE Sal < 2000", myConnections(1))
    Try
      'Open the connections
      myConnections(0).Open()
      myConnections(1).Open()
      'Invoke execution of both queries
      aResults(0) = myCommands(0).BeginExecuteNonQuery(Nothing, Nothing)
      aResults(1) = myCommands(1).BeginExecuteNonQuery(Nothing, Nothing)
      Console.WriteLine("Waiting for operations to complete...")
      Dim waitHandles() As System.Threading.WaitHandle = { _
                              aResults(0).AsyncWaitHandle, aResults(1).AsyncWaitHandle}
      'Wait for any of the queries to finish
      Dim ind As Int32 = System.Threading.WaitHandle.WaitAny(waitHandles)
      'Process results of the query that finished first
      Console.WriteLine("Result #{0}: {1}", ind, _
        myCommands(ind).EndExecuteNonQuery(aResults(ind)))
      'Process results of another query
      Dim anotherIndex As Int32 = 1 - ind
      Console.WriteLine("Result #{0}: {1}", (anotherIndex), _
        myCommands(anotherIndex).EndExecuteNonQuery(aResults(anotherIndex)))
    Catch
      Console.WriteLine("Error during a query.")
    Finally
      myConnections(0).Close()
      myConnections(1).Close()
    End Try
    Console.WriteLine("About to exit")
    Console.ReadLine()
  End Sub

End Module

Callback

This method is probably the most effective in many situations. The sample code initiates establishment of two connections with different servers. A connection itself is passed as stateObject parameter. This allows a delegate to know what connection has finished negotiation with servers and to end the asynchronous operation. Using this method, we obtain results of an operation once it is complete, without having to wait for the slower operations that might precede it.

[C#]

using System;
using Devart.Data.PostgreSql;

namespace MyNamespace
{
  class Class1
  {
    static PgSqlConnection myConnection1 = new PgSqlConnection(
        "User Id=postgres;Host=localhost");
    static PgSqlConnection myConnection2 = new PgSqlConnection(
        "User Id=postgres;Host=server");

    static void OperationComplete(IAsyncResult ar)
    {
      try
      {
        PgSqlConnection currentConnection = (PgSqlConnection)ar.AsyncState;
        currentConnection.EndOpen(ar);
        Console.WriteLine("Connection string: "+currentConnection.ConnectionString +
                           ", server version: "+currentConnection.ServerVersion);
      }
      catch
      {
        Console.WriteLine("Error during opening.");
      }
    }

    static void PerformAsync()
    {
      myConnection1.BeginOpen(new AsyncCallback(OperationComplete), myConnection1);
      myConnection2.BeginOpen(new AsyncCallback(OperationComplete), myConnection2);
      Console.WriteLine(
        "Waiting for operations to complete.
        Hit Enter when both connections are established.");
      Console.ReadLine();
      myConnection1.Close();
      myConnection2.Close();
    }

    static void Main(string[] args)
    {
      PerformAsync();
    }
  }
}

[Visual Basic]

Imports System
Imports Devart.Data.PostgreSql

Module Module1

  Dim myConnection1 As New PgSqlConnection( _
     "User Id=postgres;Host=localhost")
  Dim myConnection2 As New PgSqlConnection( _
     "User Id=postgres;Host=server")

  Public Sub OperationComplete(ByVal ar As IAsyncResult)
    Try
      Dim currentConnection As PgSqlConnection = CType(ar.AsyncState, PgSqlConnection)
      currentConnection.EndOpen(ar)
      Console.WriteLine("Connection string: " & currentConnection.ConnectionString & _
                         ", server version: " & currentConnection.ServerVersion)
    Catch
      Console.WriteLine("Error during opening.")
    End Try
  End Sub

  Public Sub PerformAsync()
    myConnection1.BeginOpen(AddressOf OperationComplete, myConnection1)
    myConnection2.BeginOpen(AddressOf OperationComplete, myConnection2)
    Console.WriteLine( _
      "Waiting for operations to complete. _
        Hit Enter when both connections are established.")
    Console.ReadLine()
    myConnection1.Close()
    myConnection2.Close()
  End Sub

  Sub Main()
    PerformAsync()
  End Sub

End Module

See Also

PgSqlCommand Class | PgSqlConnection Class | PgSqlDataTable Class


Enterprise Library Data Access Block

dotConnect for PostgreSQL can be used in conjunction with Microsoft Enterprise Library Data Access Application Block, which boosts development productivity in many cases. This topic describes what is Enterprise Library, what part of it can be substituted with dotConnect for PostgreSQL, and how to use the bundle in your applications. The topic consists of following sections:

  • Enterprise Library overview
  • Data Access Application Block
  • When to use the Data Access Application Block
  • Configuring dotConnect for PostgreSQL as Data Access Block
  • Examples
  • Informational Resources

The first three sections contain general information on Enterprise Library and its benefits. You can safely skip it if you are acquainted with the matter. The last section practically demonstrates how to start using dotConnect for PostgreSQL as Data Access Application Block.

This feature is available in Professional Edition only.

Enterprise Library Overview

Enterprise Library is a set of application blocks - reusable software components designed to help developers with usual enterprise development tasks.

Enterprise Library is designed for:

  • Consistency. All Enterprise Library application blocks feature consistent design patterns and implementation approaches.
  • Extensibility. All application blocks allow developers to customize the behavior by adding own code.
  • Ease of use. Graphical configuration tool, simpler installation procedure, clearer and more complete documentation and samples.
  • Integration. Application blocks are designed to work well together and are tested to make sure that they do.

Application blocks help solve common problems that developers face from one project to another. They have been designed to encapsulate the Microsoft recommended best practices for .NET applications. Application blocks can be added to applications quickly and easily.

Data Access Application Block

The Enterprise Library Data Access Application Block simplifies common data access functionality. Applications can use this application block in a variety of situations, such as reading data for display, passing data through application layers, and submitting changed data back to the database system. The application block supports both stored procedures and in-line SQL. Common maintenance tasks, such as managing connections and creating and caching parameters, are encapsulated in the application block's methods. In other words, the Data Access Application Block provides access to the most often used features of ADO.NET in simple-to-use classes. The Block exposes a model that supports encapsulation of database-specific features, which allows applications to be ported from one database type to another without modifying the client code.

The Data Access Application Block provides the following benefits:

  • It leverages the functionality provided by ADO.NET and allows you to use ADO.NET together with the application block.
  • It reduces the need to write boilerplate code to perform standard tasks.
  • It helps maintain consistent data access practices, both within an application and across the enterprise.
  • It reduces difficulties in changing the database type.

When to Use the Data Access Application Block

The Data Access Application Block includes a small number of methods that simplify the most common methods of accessing a database. Each method encapsulates the logic required to retrieve the data and manage the connection to the database. You should consider using the application block if your application uses standard data access techniques.

The application block supplements the code in ADO.NET that allows you to use the same code with different database types. The GenericDatabase class allows you to use the application block with any configured ADO.NET DbProviderFactory object.

The Data Access Application Block is a complement to ADO.NET; it is not a replacement. The application block provides simplicity and convenience while helping developers use ADO.NET with best practices. If your application needs to retrieve data in specialized way, or if your code needs customization to take advantage of features specific to PostgreSQL, using dotConnect for PostgreSQL might suit you better.

Configuring dotConnect for PostgreSQL as Data Access Block

The rest of the article demonstrates configuring and using Enterprise Library. In this article we will consider parts of the DataAccessQuickStart sample found in Program Files\Devart\dotConnect\PostgreSQL\EnterpriseLibrary\ folder. You can study it in conjunction with this article. The sample represents integral project that demonstrates primary techniques, while the article explains most important points.

The first thing to do in using dotConnect for PostgreSQL as Data Access Block is adjusting application settings. All settings are stored in single file, App.config. No other configuration file is needed. This file (App.config) in your sources should look like the following example:

<configuration>
  <configSections>
    <section
      name="dataConfiguration"
      type="
        Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
        Microsoft.Practices.EnterpriseLibrary.Data"/>
  </configSections>
  <connectionStrings>
    <add
      name="DataAccessQuickStart"
      providerName="Devart.Data.PostgreSql"
      connectionString="host=localhost;
                        database=postgres;
                        schema=public;
                        port=5432;
                        User id = postgres;
                        password = postgres;" />
  </connectionStrings>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Devart.Data.PostgreSql" />
      <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql"
            description="Devart dotConnect for PostgreSQL" type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </DbProviderFactories>
  </system.data>
  <dataConfiguration
    defaultDatabase="DataAccessQuickStart">
    <providerMappings>
      <add
      databaseType="Devart.Data.PostgreSql.EnterpriseLibrary.PgSqlDatabase,
                    Devart.Data.PostgreSql.EnterpriseLibrary"
      name="dotConnect for PostgreSQL" />
    </providerMappings>
  </dataConfiguration>
</configuration>

The following assemblies need to be referenced by the solution: Microsoft.Practices.EnterpriseLibrary.Data and Microsoft.Practices.EnterpriseLibrary.Common.

After compilation App.config is renamed to YourAppName.exe.config where YourAppName.exe is name of the executable file, and placed next to the file. Application reads the file when it is loaded. In the fragment presented the XML tree contains some mandatory general information (file types and schemas), and controls whether encryption should be used (disabled in this case).

Note that for web applications and web services metaconfiguration file is web.config in the root directory of your web site or virtual directory.

The most important line in metaconfiguration file is <storageProvider ... path="dataConfiguration.config" />. It points to configuration file that controls Data Access Application Block, which, in turn, should be something like this:

<?xml version="1.0" encoding="utf-8"?>
<dataConfiguration>
  <xmlSerializerSection
    type="
      Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
      Microsoft.Practices.EnterpriseLibrary.Data">
    <enterpriseLibrary.databaseSettings
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/data">
      defaultInstance="DataAccessQuickStart"
      <databaseTypes>
        <databaseType
          name="PgSql"
          type="Devart.Data.PostgreSql.EnterpriseLibrary.PgSqlDatabase,
                Devart.Data.PostgreSql.EnterpriseLibrary" />
      </databaseTypes>
      <instances>
        <instance
          name="DataAccessQuickStart"
          type="PgSql"
          connectionString="LocalQuickStart" />
      </instances>
      <connectionStrings>
        <connectionString name="LocalQuickStart">
          <parameters>
            <parameter name="host" value="localhost" isSensitive="false" />
            <parameter name="user id" value="root" isSensitive="false" />
            <parameter name="password" value="root" isSensitive="false" />
            <parameter name="database" value="test" isSensitive="false" />
          </parameters>
        </connectionString>
      </connectionStrings>
    </enterpriseLibrary.databaseSettings>
  </xmlSerializerSection>
</dataConfiguration>

The latter XML is of much more interest to database developer because it actually contains data used to connect to database. In Enterprise Library you handle databases with Microsoft.Practices.EnterpriseLibrary.Data.Database class, which is initialized according to this configuration file. The file describes possible database instances that can be created in application.

In Data Access Application Block obtaining handle to database is as simple as following statement:
Database db = DatabaseFactory.CreateDatabase();
If an argument was not supplied to the method it searches configuration XML for defaultInstance attribute of enterpriseLibrary.databaseSettings node. Its value is name of the instance to use. This instance must be described in instances node. Type of the instance determines what provider to use (enumerated in databaseTypes) and name of connection string. The connection string itself is defined in connectionStrings node. Its arguments are self-explanatory.

This is how Data Access Application Block initializes database connections. Single configuration file can describe multiple data providers, connection strings and databases. You can refer to certain database in your code directly:
Database db = DatabaseFactory.CreateDatabase("myInstanceName");

Microsoft provides a GUI tool to create and configure visually the files App.config and dataConfiguration.config. You can find in Start menu shortcut Enterprise Library Configuration to the file EntLibConfig.exe. This tool also allows you to setup encryption for the configuration file.

Note that unlike App.config, dataConfiguration.config file is not copied automatically to output directory. You can do it manually, or run appropriate command line in a Post-build event of your project. Another way to make sure that configuration is up to date is to hardcode full path in App.config file.

The following assemblies need to be referenced by the solution: Microsoft.Practices.EnterpriseLibrary.Data, Microsoft.Practices.EnterpriseLibrary.Common and Microsoft.Practices.EnterpriseLibrary.Configuration. They are typically located in bin folder of Enterprise Library like \Program Files\Microsoft Enterprise Library\bin\. Add namespace Microsoft.Practices.EnterpriseLibrary.Data to using (Imports in Visual Basic) clause of your sources to have important classes visible (for example, Database and DBCommandWrapper).

To use dotConnect for PostgreSQL as Data Access Application Block you have to add reference to Devart.Data.PostgreSql.EnterpriseLibrary.dll assembly. dotConnect for PostgreSQL is shipped with sources of this assembly, so if you need to alter it or add custom functionality, add Devart.Data.PostgreSql.EnterpriseLibrary project to your solution.

Examples

The following routine returns list of customers from corresponding table. It returns the list as string object where individual customers are separated with line breaks.

public string GetCustomerList() {

  // Create the Database object, using the default
  // database service as described above.
  Database db = DatabaseFactory.CreateDatabase();
  // Define SQL query to retrieve the data.
  string sqlCommand = "Select Name From Customers";
  // Create ADO.NET DbCommand object
  DbCommand dbCommand = db.GetSqlStringCommand(sqlCommand);
  // Create intermediate data holder
  StringBuilder readerData = new StringBuilder();
  // DataReader that will hold the returned results
  // The ExecuteReader call will request the connection to be closed upon
  // the closing of the DataReader. The DataReader will be closed
  // automatically when it is disposed.
  using (IDataReader dataReader = db.ExecuteReader(dbCommand)) {
    // Iterate through DataReader
    while (dataReader.Read()) {
      // Get the value of the 'Name' column in the DataReader
      readerData.Append(dataReader["Name"]);
      readerData.Append(Environment.NewLine);
    }
  }
  return readerData.ToString();
}

The next example demonstrates usage of parameters. The routine returns DataSet that contains all products within given category.

public DataSet GetProductsInCategory(int Category) {

  Database db = DatabaseFactory.CreateDatabase();
  string sqlCommand = "Select * From Products Where CategoryID = :CategoryID";
  DbCommand dbCommand = db.GetSqlStringCommand(sqlCommand);
  // Create and add integer input parameter
  db.AddInParameter(dbCommand, "CategoryID", DbType.Int32, Category);
  // DataSet that will hold the returned results
  DataSet productsDataSet = null;
  // Open connection, execute the query and close connection
  productsDataSet = db.ExecuteDataSet(dbCommand);
  return productsDataSet;
}

The next example shows how to modify a DataSet. The routine retrieves data, inserts new row into table and updates changes. You can alter or delete existing rows in same way.

public int UpdateProducts() {

  Database db = DatabaseFactory.CreateDatabase();
  // Create DataSet that receives initial data
  DataSet productsDataSet = new DataSet();
  string sqlCommand = "Select ProductID, ProductName, CategoryID,
                       UnitPrice, LastUpdate From Products";
  DbCommand dbCommand = db.GetSqlStringCommand(sqlCommand);
  // Declare table name to refer later
  string productsTable = "Products";
  // Retrieve the initial data
  db.LoadDataSet(dbCommand, productsDataSet, productsTable);
  // Get the table that will be modified
  DataTable table = productsDataSet.Tables[productsTable];
  // Add a new product to existing DataSet
  DataRow addedRow = table.Rows.Add(new object[] {
                       DBNull.Value, "New product", 11, 25 });
  // Setup Insert command
  DbCommand insertCommand = db.GetSqlStringCommand("Insert Into Products " +
    "(ProductName, CategoryID, UnitPrice) Values (:ProductName,
                                             :CategoryID,:UnitPrice)");
  db.AddInParameter(insertCommand, "ProductName", DbType.String,
                                   "ProductName", DataRowVersion.Current);
  db.AddInParameter(insertCommand, "CategoryID", DbType.Int32,
                                   "CategoryID", DataRowVersion.Current);
  db.AddInParameter(insertCommand, "UnitPrice", DbType.Decimal,
                                   "UnitPrice", DataRowVersion.Current);
  // Update the DataSet, capturing the number of rows that were affected
  int rowsAffected = db.UpdateDataSet(productsDataSet, "Products",
                                      insertCommand, null,
                                      null, UpdateBehavior.Standard);
  return rowsAffected;
}

More examples can be found in DataAccessQuickStart demo project. You can open it in your IDE and explore other features of Enterprise Library.

Informational Resources

  • The homepage to start from is http://msdn2.microsoft.com/en-us/library/aa480453.aspx. It contains download information and links to other useful locations.
  • If you are going to use Enterprise Library, take a look through corresponding page published in January, 2006: http://msdn.microsoft.com/en-us/library/cc467893.aspx.
  • Finally, after you install the library, refer to Visual Studio Integrated Help Collection for detailed information on every aspect of the product.
  • If you encounter problems using it, make sure you are acquainted with FAQ: http://channel9.msdn.com/wiki/default.aspx/Channel9.EnterpriseLibraryFAQ.


SQL Server Integration Services

This section describes SQL Server Integration Services support in dotConnect for PostgreSQL (dotConnect for PostgreSQL SSIS Data Flow components).

General Information on SSIS Support
This section provides an introduction to Devart dotConnect for PostgreSQL SSIS Data Flow components.

Creating a PostgreSQL Connection
This topic describes creating a connection to PostgreSQL in Integration Services package.

Devart PostgreSql Source
This topic describes the Devart PostgreSql Source component.

Devart PostgreSql Destination
This topic describes the Devart PostgreSql Destination component.

SSIS Tutorials
This section contains tutorials on using dotConnect for PostgreSQL in Integration Services packages.


General Information on SSIS Support

This section provides an introduction to Devart dotConnect for PostgreSQL SSIS Data Flow components.

SSIS Support Overview
This topic provides an overview of SQL Server Integration Services and Devart dotConnect for PostgreSQL as its component.

Requirements for SSIS Data Flow Components
This topic describes requirements that should be met prior to installation.

SSIS Data Flow Components Installation
This topic describes how to install Devart dotConnect for PostgreSQL SSIS Data Flow components in BIDS 2008.


SSIS Support Overview

SQL Server Integration Services (SSIS) is a component of the Microsoft SQL Server database software designed to perform a variety of tasks for data migration. SSIS is a platform intended for data integration and workflow applications. It is a powerful data warehousing tool created for the purposes of data extraction, transformation, and loading (ETL).

SSIS allows you to create packages that migrate data from a data source to a destination, applying transformations at the same time, if necessary. With its rich set of built-in tasks and transformations combined with a visual development tool based on Microsoft Visual Studio, that is called the SQL Server Business Intelligence Development Studio (BIDS), you can easily manage data flow tasks. Besides, you can keep track of the package execution through the color-coded, real-time monitoring feature of this tool.

Devart dotConnect for PostgreSQL SSIS embeds into SQL Server Integration Services and thus enables data migration to and from PostgreSQL.

See Also

Installation Requirements | Installation


Requirements for SSIS Data Flow Components

Prior to installing Devart dotConnect for PostgreSQL SSIS, make sure that the following requirements are met.

  • SQL Server Integration Services 2008, 2012, 2014, or 2016 (SSIS component) is installed.
  • BIDS 2008 (Business Intelligence Development Studio) or Microsoft SQL Server Integration Services Designer is installed.
  • Internet connection is available.

SQL Server 2008

To check that Business Intelligence Development Studio is installed, click Start -> All Programs, click the Microsoft SQL Server 2008 folder. Business Intelligence Development Studio should be present in this folder.

To verify that SQL Server Integration Services component is installed, run Business Intelligence Development Studio, then click the File menu -> New -> Project. This will display the New Project window; locate the Project Types area and make sure that it contains the Business Intelligence Projects item.

SQL Server 2012 - 2016

To verify that SQL Server Integration Services component and Microsoft SQL Server Integration Services Designer are installed, run SQL Server Data Tools (on the Start menu, point to All Programs, click Microsoft SQL Server, and then click SQL Server Data Tools). Then on the File menu point to New and click Project. This will display the New Project window; locate the Installed templates area and make sure that it contains the Business Intelligence -> Integration Services item.

See Also

SSIS Overview | Installation


SSIS Data Flow Components Installation

In BIDS 2008 (installed with SQL Server 2008), Devart dotConnect for PostgreSQL SSIS Data Flow components are not added to the Toolbox by default. To install our Data Flow components to the Toolbox, perform the following steps:

  1. Create an Integration Services Project (for details refer to SQL Server Integration Services Tutorials).
  2. Right-click in the Toolbox floating window to call its context menu and select Choose Items. .Net Framework Components tab of the Choose Toolbox Items dialog box is displayed; switch to its SSIS Data Flow Items tab.
  3. Locate and select the Devart PostgreSql Source and Devart PostgreSql Destination items, and click OK. Now these components are added to the toolbox.
  4. Drag them to the corresponding toolbox sections for further convenience.

In Microsoft SQL Server Integration Services Designer (installed with SQL Server 2012, 2014, or 2016), our components are added to the toolbox automatically when you install dotConnect for PostgreSQL. They are added to the Common tab of the Toolbox.

See Also

SSIS Overview | Installation Requirements


Creating PostgreSQL Connection

To create a connection to PostgreSQL, do the following:

  1. Right-click in the Connection Managers pane and select New Connection from the context menu. The Add SSIS Connection Manager dialog box is displayed:

  2. In the Connection manager type list select DevartPostgreSql and click Add. The General tab of the PostgreSql Connection Manager Editor dialog box is displayed:

  3. Specify the server and port to connect to, your PostgreSQL user name and password. If necessary, additionally specify the database and the schema to connect to.


Devart PostgreSql Source

Devart PostgreSql Source is a data flow component that makes data from PostgreSQL available to other data flow components. It provides a convenient editor dialog box, which allows you to easily define which data to load.

To call the Devart PostgreSql Source Editor, double-click the Devart PostgreSql Source data flow object.

This dialog box has the following components:

  • The Tables area allows you to view the existing PostgreSQL tables, expand their nodes to view columns, and drag them from this area to the Query area.

    • The Show all schemas Show all schemas button enables displaying all the objects of the selected connection; otherwise, only the objects of the default schema for the connection are displayed.
    • The Refresh Objects Refresh Objects button updates the list of PostgreSQL tables.
  • The Variables area allows you to view the system and user variables grouped in the corresponding nodes, and if necessary, drag them to the Query area.

  • The Query area is intended for creating a query to be executed against the PostgreSQL database. You can drag the required PostgreSQL tables and variables to this area, or write the query yourself.

    • The Preview Data Refresh Objects button calls the Preview Data window that displays the query execution result.
  • The Properties area displays properties of the currently selected PostgreSQL table, column or variable.
  • The PostgreSql Connection drop-down list is intended for selecting the corresponding Devart PostgreSql Connection Manager.


Devart PostgreSql Destination

Devart PostgreSql Destination is designed for loading data into PostgreSQL tables.

For data migration to the PostgreSQL database, Devart PostgreSql Destination component uses the COPY command.

The PostgreSQL table you want to migrate data to can be selected in the Table Name combo box on the Component Properties tab of the Devart PostgreSql Destination data flow object.

The action that should be performed with data during migration is defined by the Action parameter of Devart PostgreSql Destination object, that provides the following options: Insert, Update, Delete, and BulkInsert. As all of the actions have certain peculiarities:

  • Insert - as this case is the most common, we decided to cover it in a detailed tutorial. It uses simple INSERT statements to load data to PostgreSQL.
  • BulkInsert - uses PostgreSQL-specific technique to quickly load data to PostgreSQL. For data migration to the PostgreSQL database, Devart PostgreSql Destination component uses the COPY command.
  • Update - Devart PostgreSql Destination component in the Update mode enables updating data in a PostgreSQL table.

    Note:

    Peculiarity of this action consists in the fact, that performing it requires using primary key values of the PostgreSQL table. Thus, when performing an update, you must know and specify the primary key values of the PostgreSQL table to update a record.
  • Delete - Devart PostgreSql Destination component enables deleting data from a PostgreSQL table.

    Note:

    As is the case with the Update action, the ID column from the local data source corresponding to the Primary key values column in the PostgreSQL table, must be used.

The amount of data that can be migrated at a time is limited by the BufferSize property.

BufferSize defines the maximum size of the local buffer, its default value is 262144.

Additionally, Devart PostgreSql Destination allows setting the BulkInsertMode property, which determines the mode to use for data loading. It can be text or binary.

Devart PostgreSQL Data Flow components support error outputs, which allow you to manage how the component treats row-level errors in both incoming and outgoing data.

The error output includes the column set taking part in the data flow and additional columns, they are ErrorCode that identifies the error, ErrorColumn that contains the lineage identifier of the error column and ErrorDescription that provides a detailed description of the error.

The ErrorCode column can accept the following values:

ErrorCode | Description
-1 | Means that the record is valid.
>0 | Means that the record causes an error.

Additionally, when the primary key values are automatically generated for the target table, Devart PostgreSql Destination retrieves the generated values and adds them to its output columns.

See Also

Loading Data to PostgreSQL


SSIS Tutorials

This section provides tutorials for the Devart PostgreSQL data flow components.

Loading Data from PostgreSQL
This tutorial describes how to load data from the PostgreSQL database via the Devart PostgreSQL Source component.

Loading Data to PostgreSQL
This tutorial describes how to load data to the PostgreSQL database via the Devart PostgreSQL Destination component.

SQL Server Import and Export Wizard Tutorial
This tutorial describes how to import a table from a PostgreSQL server to SQL Server using SQL Server Import and Export Wizard.


Loading Data from PostgreSQL

This tutorial requires SQL Server 2012 and Microsoft SQL Server Integration Services Designer. A similar Integration Services package can be created with SQL Server 2008 and BIDS 2008; however, there may be some differences, mostly in using the Toolbox. In BIDS 2008, dotConnect for PostgreSQL SSIS Data Flow components are not added to the Toolbox by default. You need to add them yourself as described in SSIS Data Flow Components Installation in BIDS 2008. The names of the Toolbox tabs are also different in BIDS 2008 and Microsoft SQL Server Integration Services Designer.

For the purpose of this tutorial, we create a Devart PostgreSql Source and an OLE DB Destination.

In the Control Flow tab, from the Control Flow Items tab in the Toolbox, drag Data Flow Task to the design area. The Data Flow Task is created.

Switch to the Data Flow tab. From the Other Destinations tab of the Toolbox drag the OLE DB Destination to the design area.

From the Common tab of the Toolbox drag Devart PostgreSql Source to the design area. (By default dotConnect for PostgreSQL SSIS Data Flow components are added to the Common tab when installing dotConnect for PostgreSQL.)

Connect the two data flow objects with a Data Flow path.

For this example we need two connections - one for the OLE DB Destination, the other one for the Devart PostgreSql Source. To create a connection to PostgreSQL, do the following:

  1. Right-click in the Connection Managers pane and select New Connection from the context menu. The Add SSIS Connection Manager dialog box is displayed:

  2. In the Connection manager type list select DevartPostgreSql and click Add. The General tab of the PostgreSql Connection Manager Editor dialog box is displayed:

  3. Specify the server and port to connect to, your PostgreSQL user name and password. If necessary, additionally specify the database and the schema to connect to.

The connection is now created.

To create a connection for the OLE DB Source we do the following:

  1. Right-click in the Connection Managers pane and then click New OLE DB Connection. The Configure OLE DB Connection Manager dialog box is displayed.
  2. Click New. The Connection Manager dialog box is displayed; fill in the connection settings as required, e.g. as follows:

    Click OK.

  3. Click OK in the Configure OLE DB Connection Manager dialog box.

The connection for the OLE DB source is now created.

Note:

If you create an Integration Services package in BIDS 2008, you will need to do additional actions to open the Configure OLE DB Connection Manager dialog box instead of simply selecting New OLE DB Connection from the shortcut menu. To be more specific, you will need to right-click in the Connection Managers pane and then click New Connection instead of New OLE DB Connection, as the latter is not present in BIDS 2008. After this, the Add SSIS Connection Manager dialog box is displayed. In the Connection manager type list select OLEDB and click Add. Then the Configure OLE DB Connection Manager dialog box is displayed, and after this you need to perform the steps above.

After the two required connections are created, we can proceed to customizing the data flow items.

For the sake of this example, we will also create a variable, for this:

  1. Right-click the design surface and in the context menu select the Variables item.

    The Variables tool window is displayed.

  2. Click the Add Variable button in the toolbar of the Variables tool window.
  3. A new variable is created and displayed in the tool window. Rename it as required, then go to the Properties tool window and set the variable properties.

    In this example we call the variable 'myvar' and set the following properties:

    • ValueType = Int32
    • Value = 7007

    other properties are left set to their default values.

Now we proceed to customizing the Devart PostgreSql Source.

Double-click the Devart PostgreSql Source data flow object.

The Devart PostgreSql Source Editor dialog box is displayed.

Drag the required table (in our example we use the Products table from the dotConnect for PostgreSQL sample crm_demo database) from the PostgreSQL Objects area to the Query area:

Then we add a WHERE clause and drag the variable we have previously created from the User node of the Variables area to the Query area, thus we get the following query:

Click the Preview Data button to view the result of the query execution. The Preview Data window is displayed:

Click Close to return to the Devart PostgreSql Source Editor dialog box.

In the editor dialog box click OK.

If all options are set correctly, the red marker on the data flow object disappears.

Drag the OLE DB Destination data flow object to the design area.

Connect the two data flow objects with a Data Flow path.

Proceed to customizing the OLE DB Destination.

Right-click the OLE DB Destination data flow object. The Connection Manager tab of the OLE DB Destination Editor dialog box is displayed.

Specify the following settings in this tab:

  • Select the required connection in the OLE DB connection manager drop-down list;
  • Select Table or View in the Data access mode drop-down list;
  • Select the required database object name in the Name of the table or the view drop-down list.

Switch to the Mappings tab.

This tab displays mapping defined automatically by SSIS on the basis of the column name correspondence. If necessary, specify mapping between the source and destination columns either using the Input Columns drop-down lists, or just by drawing lines between the corresponding columns:

Switch to the Error Output tab.

This tab allows you to specify in what way component failure should be treated; the following options are available: Fail component, Redirect row, Ignore failure.

After all options are set, click OK.

Make sure that the red marker is absent on the OLE DB Destination data flow object.

Right-click the design area and select Execute Task in the context menu. The green color of the data flow objects indicates that the data flow process is completed successfully:

See Also

Source Overview


Loading Data to PostgreSQL

This tutorial requires SQL Server 2012 and Microsoft SQL Server Integration Services Designer. A similar Integration Services package can be created with SQL Server 2008 and BIDS 2008; however, there may be some differences, mostly in using the Toolbox. In BIDS 2008, dotConnect for PostgreSQL SSIS Data Flow components are not added to the Toolbox by default. You need to add them yourself as described in SSIS Data Flow Components Installation in BIDS 2008. The names of the Toolbox tabs are also different in BIDS 2008 and Microsoft SQL Server Integration Services Designer.

For the purpose of this tutorial, we create an OLE DB Source and a Devart PostgreSql Destination.

In the Control Flow tab, from the Control Flow Items tab in the Toolbox, drag Data Flow Task to the design area. The Data Flow Task is created.

Switch to the Data Flow tab. From the Other Sources tab of the Toolbox drag the OLE DB Source to the design area.

From the Common tab of the Toolbox drag Devart PostgreSql Destination to the design area. (By default dotConnect for PostgreSQL SSIS Data Flow components are added to the Common tab when installing dotConnect for PostgreSQL.)

Connect the two data flow objects with a Data Flow path.

For this example we need two connections - one for the OLE DB Source, the other one for the Devart PostgreSql Destination. To create a connection to PostgreSQL, do the following:

  1. Right-click in the Connection Managers pane and select New Connection from the context menu. The Add SSIS Connection Manager dialog box is displayed:

  2. In the Connection manager type list select DevartPostgreSql and click Add. The General tab of the PostgreSql Connection Manager Editor dialog box is displayed:

  3. Specify the server and port to connect to, your PostgreSQL user name and password. If necessary, additionally specify the database and the schema to connect to.

The connection is now created.

To create a connection for the OLE DB Source we do the following:

  1. Right-click in the Connection Managers pane and then click New OLE DB Connection. The Configure OLE DB Connection Manager dialog box is displayed.
  2. Click New. The Connection Manager dialog box is displayed; fill in the connection settings as required, e.g. as follows:

    Click OK.

  3. Click OK in the Configure OLE DB Connection Manager dialog box.

The connection for the OLE DB source is now created.

Note:

If you create an Integration Services package in BIDS 2008, you will need to do additional actions to open the Configure OLE DB Connection Manager dialog box instead of simply selecting New OLE DB Connection from the shortcut menu. To be more specific, you will need to right-click in the Connection Managers pane and then click New Connection instead of New OLE DB Connection, as the latter is not present in BIDS 2008. After this, the Add SSIS Connection Manager dialog box is displayed. In the Connection manager type list select OLEDB and click Add. Then the Configure OLE DB Connection Manager dialog box is displayed, and after this you need to perform the steps above.

After the two required connections are created, we can proceed to customizing the data flow items.

In the Data Flow design area, double-click the OLE DB Source data flow item.

The Connection Manager tab of the OLE DB Source Editor dialog box is displayed.

Specify the following settings in this tab:

  • Select the required connection in the OLE DB connection manager drop-down list;
  • Select the Data access mode, e.g. SQL command;
  • Enter the required query in the SQL command text field.

Switch to the Columns tab.

Configure the properties used by the data flow to obtain data from the OLE DB typer:

  • Select the required columns in the Available External Columns box;
  • Configure Output Column names, if necessary.

Switch to the Error Output tab.

This tab allows you to specify in what way component failure should be treated; the following options are available: Fail component, Redirect row, Ignore failure.

After all options are set, click OK.

If all options are set correctly, the red marker on the data flow object disappears.

Proceed to customizing the Devart PostgreSql Destination data flow object.

Double-click the Devart PostgreSql Destination in the design area. The Connection Managers tab of the Advanced Editor for Devart PostgreSql Destination dialog box is displayed.

Select the Devart PostgreSQL Connection Manager in the Connection Manager drop-down list and go to the Component Properties tab.

Here you can customize the data flow component properties. Pay attention to Custom properties. In addition to the Insert operation, Devart PostgreSql Destination supports Update, Delete, and high-performance BulkInsert operation.

Go to the Column Mappings tab.

This tab displays mapping defined automatically by SSIS on the basis of the column name correspondence. If necessary, the default mapping can be changed in this tab according to your needs. For this, use the Input Column drop-down lists, or just draw connecting lines between the required column names.

After mapping is defined, switch to the following Input and Output Properties tab.

In this tab you can review input and output properties of the data flow component. Click OK.

Make sure that the red marker is absent on the Devart PostgreSql Destination data flow object.

Right-click the design area and select Execute Task in the context menu. The green color of the data flow objects indicates that the data flow process is completed successfully:

See Also

Destination Overview | Loading Data from PostgreSQL


SQL Server Import and Export Wizard Tutorial

This tutorial describes how to create a simple Integration Services package that imports a table from a PostgreSQL server to SQL Server using SQL Server Import and Export Wizard for further operations such as analysis or reporting.

For dotConnect for PostgreSQL this tutorial is considered outdated. dotConnect for PostgreSQL offers its own Source and Destination components with advanced features, and we recommend using these components instead.

SQL Server Integration Services - diagram

In this walkthrough:

  • Requirements
  • Creating the Integration Services Project
  • Running the Wizard to Create the Basic Package
  • Creating a PostgreSQL Connection in the IDE
  • Fine-tuning Type Mapping
  • Additional Information

Requirements

The tutorial requires SQL Server 2008 or 2012 installed on the computer. In order to connect to PostgreSQL server you need the server itself running, dotConnect for PostgreSQL installed and Business Intelligence Development Studio running. Note that Business Intelligence Solutions support is only available in Professional Edition of dotConnect for PostgreSQL.

Creating the Integration Services Project

  1. On the Start menu, point to All Programs, point to Microsoft SQL Server, and click SQL Server Business Intelligence Development Studio.

  2. On the File menu, point to New, and click Project to create a new Integration Services project.

  3. In the New Project dialog box, select Integration Services Project in the Templates pane.

  4. Click OK.

    New Project dialog box

Running the Wizard to Create the Basic Package

  1. In Project menu, click the SSIS Export and Import Wizard item.

  2. On the Welcome page of the SQL Server Import and Export Wizard, click Next.

  3. On the Choose a Data Source page, select Devart dotConnect for PostgreSQL as Data source and provide connection settings for your server, click Next. If the connection settings are incorrect, the wizard shows a warning and does not advance to the next step.

    SQL Server Import and Export Wizard - Choose a Data Source

  4. On the Choose Destination page, provide connection settings for your SQL Server instance:

    SQL Server Import and Export Wizard - Choose a Destination

  5. On the Specify Table Copy or Query page, click Write a query to specify the data to transfer. The other option, Copy data from one or more tables or views, allows you to transfer several database objects at once, but for the purpose of this tutorial we will demonstrate flexibility of queries used in the wizard. Click Next.

    SQL Server Import and Export Wizard - Specify Table Copy or Query

  6. On the Provide a Source Query page, in the SQL statement box, type or copy the following SQL statement:

    SELECT
  "CompanyName",
  "FirstName",
  "LastName",
  "MobilePhone"
FROM
  "Company", "Person Contact"
WHERE
  "Person Contact"."CompanyID" = "Company"."CompanyID"

    This query is based on tables from the CRM Demo sample project shipped with dotConnect for PostgreSQL. You can use any query you find suitable.

    Click Next.

  7. On the Select Source Tables and Views page, click [dbo].[Query], and then change the table name, Query, to Companies. Optionally, you can edit column metadata and table options. To do it, click Edit Mappings.

  8. On the the next page the wizard informs you about type conversion status and possible problems. You can safely ignore warnings about missing files, if any. Click Next.

  9. On the final screen, view the actions that the wizard performs. When finished, the Status column for each action should display "Success".

    SQL Server Import and Export Wizard - The execution was successful

  10. Click Close.

This creates a new package named Package.dtsx. Now you can save it and run to test the functionality of the package. Once executed in Business Intelligence Development Studio, the package should look as follows:

Pacjkage designer - Data Flow

The wizard can be launched as a standalone tool from the Start menu: Microsoft SQL Server 2008 | Import and Export Data (or Microsoft SQL Server 2012 | Import and Export Data). In this case the wizard includes additional steps that allow you to run the package immediately or save it.

Creating a PostgreSQL Connection in the IDE

You can also create a PostgreSQL connection in the Connection Managers pane of Business Intelligence Development Studio. This allows you to use PostgreSQL connectivity in the packages when editing them. To create a new PostgreSQL connection follow these steps:

  1. Right-click in the Connection Managers pane, choose New ADO.NET Connection.

  2. In the Configure ADO.NET Connection Manager dialog, click New....

    Configure ADO.NET Connection Manager dialog box

  3. Click on the Provider list, choose dotConnect for PostgreSQL, click OK.

  4. In the Connection Parameters group, provide the connection settings. If you need some advanced settings of dotConnect for PostgreSQL, click the All button to the left.

    Connection Manager dialog box

  5. Click OK.

  6. Make sure that the line with your User Id is selected in the Data connections list and click OK.

  7. Notice the new item in the Connection Managers pane.

Fine-Tuning Type Mapping

dotConnect for PostgreSQL is seamlessly integrated with SQL Server 2008/2012 Business Intelligence Solutions, and most of the connectivity options are available in design time. One issue that might require attention is type mapping between PostgreSQL, SQL Server, and Integration Services. dotConnect for PostgreSQL initially configures type mapping with reasonable defaults, so in most cases no adjustments are required. Should you need to change the default type mapping, you can do it in the following files:

  • PostgreSQLToMSSql10.xml
  • PostgreSQLToSSIS10.xml
  • MSSQLToPostgreSQL.xml
  • SSISToPostgreSQL.xml

The default location of these files is
\Program Files\Microsoft SQL Server\100\DTS\MappingFiles\

Additional Information

SQL Server Business Intelligence Solutions is a platform well documented by Microsoft, so you might find some useful information in MSDN:

  • SQL Server Integration Services
  • Integration Services Videos (SQL Server 2008)


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Sync Framework Tutorial

Microsoft Sync Framework is a data synchronization platform, allowing data synchronization between any applications, services or devices regardless of the network used and data source type. To allow data source agnostic synchronization, Sync Framework uses synchronization providers for connecting to each of the data sources. Sync Framework database synchronization providers, similar to ADO.NET providers, allow other Sync Framework components to work without the need to concern on the underlying database implementation.

Note that Sync Framework is supported only in the Professional Edition of dotConnect for PostgreSQL.

  • Sync Framework Support Overview
  • Sample Application
  • Database Provisioning
    • Creating Synchronization Scope without Filter
    • Creating Synchronization Scope with Filter
    • Creating Synchronization Scope with Filter Based on Template
  • Synchronization
    • Provisioning Production Database
    • Synchronization
  • Database Deprovisioning
    • Deprovisioning Synchronization Scope
    • Deprovisioning Template
    • Deprovisioning Storage

Sync Framework Support Overview

Sync Framework architecture allows clients both to synchronize data via the central server or to exchange data directly. The following main classes are used for data synchronization:

  • SyncOrchestrator - creates and manages synchronization sessions. This class is provided by Sync Framework.
  • DbSyncProvider - implements the synchronization service for interaction with a database and shields SyncOrchestrator from the specific implementation of the database. dotConnect for PostgreSQL provides its own PgSqlSyncProvider class implementation for PostgreSQL database.
  • DbSyncAdapter - maintains the interaction between the DbSyncProvider and the database. This class is provided by Sync Framework.

To include database data to synchronization, first you need to provision the database. Provisioning means the creation of Sync Framework auxiliary tables, stored procedures, functions, and triggers for tracking data changes in the specified synchronization scope - a table or a group of tables to synchronize data from. Both databases being synchronized must be provisioned in order to synchronise data.

PgSqlSyncScopeProvisioning is the key class for performing database provisioning. It allows provisioning a synchronization scope. We will describe the provisioning and synchronization scopes in more details in our tutorial below.

After the provisioning, the databases can be synchronised. When synchronizing databases, you may retrieve synchronization operation statistics. It includes the time synchronization took, the number of processed changes and failed changes.

In case there is no need to synchronise a database or any specific scope any more, the database (or scope) can be deprovisioned. This means deleting of the unneeded Sync Framework database objects and/or data. User tables and data are retained. dotConnect for PostgreSQL offers the PgSqlSyncScopeDeprovisioning class for scope deprovisioning.

The parent class of the PgSqlSyncProvider class is the descendant of the standard Sync Framework DbSyncProvider class. Other synchronization classes of dotConnect for PostgreSQL are not inherited from the standard Sync Framework classes, but provide the same interface.

Sample Application

For this tutorial you need Visual Studio 2008 or higher, and Sync Framework 2.1.

In our tutorial we will synchronize two databases with identical structure. Let's call them the development database and the production database. We will use a simple database of one table "Product" for our tutorial. Here is its script:

CREATE table "Products"
  (
  "Id" INT NOT NULL PRIMARY KEY,
  "Name" VARCHAR(100),
  "CategoryId" INT,
  "IsAvailable" boolean
  );

INSERT INTO "Products"
  VALUES (1, 'HP 2000-2b19WM ', 1, true
  ), (2, 'Dell Adamo XPS', 1, false
  ), (3, 'DELL LAPTOP I14Z', 1, true
  ), (4, 'HP DC5750 Desktop Computer Dual Core/ ', 2, true
  ), (5, 'Apple iMac All In One', 2, false
  ), (6, 'Sharp - AQUOS - ', 3, true
  ), (7, 'Samsung ST76', 4, true
  ), (8, 'Canon PowerShot', 4, true
  ), (9, 'Olympus OM-D E-M5', 4, true
  );

If you want to configure data synchronization for a new database, and its tables are not created yet, they can be automatically generated during the provisioning. However, in our tutorial we will create them manually.

Create a new console application in Visual Studio. It could be any other project type as well, but for simplicity's sake we'll use console project throughout the tutorial.

Add the references to the following assemblies to your project:

  • Devart.Data.Synchronization
  • Devart.Data.PostgreSql.Synchronization
  • Microsoft.Synchronization Version 2.1
  • Microsoft.Synchronization.Data Version 3.1
  • Devart.Data.PostgreSql

Database Provisioning

The first step of the synchronization is database provisioning. We will start from the development database and demonstrate different provisioning scenarios. Provisioning includes defining the synchronization scope and creating the necessary database objects.

The synchronization scope is one or more tables (with the specified columns to synchronize) that will be synchronized as a whole. The synchronization scope can include all columns in a table or just a subset of them. It can include all rows or only the rows that match some filter condition. You also can create a template for filters (a condition including a variable), and then create multiple synchronization scopes using filters based on this template.

When creating a synchronization scope, you must create descriptions for the tables of this scope. The synchronization scope tables can either already exist in the database, or they be created during the database provisioning based on their descriptions.

Creating Synchronization Scope without Filter

You can create table descriptions in two ways. The first way is to create the description manually, and the second is to use the PgSqlSyncDescriptionBuilder class to generate the description based on an existing database table. Since the tables are already created, we will use the second option.

Add the following code to the Main method:

[C#]

      // Specify the connection to development database. Replace the sample connection string with your one.
      PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      // Define the scope, named ProductsScope
      DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("ProductsScope");

      // Retrive the description for the Products table from the database
      DbSyncTableDescription tableDesc = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection);

      // Add the table description to the scope definition
      scopeDesc.Tables.Add(tableDesc);

      // Create the scope
      PgSqlSyncScopeProvisioning devProvision = new PgSqlSyncScopeProvisioning(devConnection, scopeDesc);

      // Start the provision
      devProvision.Apply();

[Visual Basic]

      ' Specify the connection to development database. Replace the sample connection string with your one.
      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      ' Define the scope, named ProductsScope
      Dim scopeDesc As New DbSyncScopeDescription("ProductsScope")

      ' Retrive the description for the Products table from the database
      Dim tableDesc As DbSyncTableDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection)

      ' Add the table description to the scope definition
      scopeDesc.Tables.Add(tableDesc)

      ' Create the scope
      Dim devProvision As New PgSqlSyncScopeProvisioning(devConnection, scopeDesc)

      ' Start the provision
      devProvision.Apply()

After executing this code, Sync Framework creates the following database objects in the database:

  • schema_version table - contains the information on the version of Sync Framework that provisioned the database.
  • scope_info table - contains the list of all the provisioned scopes.
  • scope_config table - contains scope configuration information.
  • products_tracking the table with metadata of the provisioned table "products".
  • Stored procedures and functions for selecting/inserting the updated strings and metadata updates.
  • Insert/update/delete triggers for tracking changes in the provisioned table.

Creating Synchronization Scope with Filter

Now we will demonstrate creating synchronization scope with a filter. The filter is just a SQL WHERE condition that allows synchronizing not all the data of a table, but only the rows that meets certain condition. This filter condition is added to the selectchanges procedure that gets the changed data.

The following code creates the synchronization scope with the filter.

[C#]

      //Specify connection to dev database
      PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      DbSyncScopeDescription devScope = new DbSyncScopeDescription("DevCategoryScope");
      DbSyncTableDescription tableDesc = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection);
      devScope.Tables.Add(tableDesc);

      SyncScopeProvisioning devProvision = new PgSqlSyncScopeProvisioning(devConnection, devScope);

      //Specify filter clause
      devProvision.Tables["Products"].AddFilterColumn("CategoryId");

      devProvision.Tables["Products"].FilterClause = "t.CategoryId = 1";

      //Skip create Sync Framework objects because we have already created them on the previous step
      devProvision.SetCreateTableDefault(DbSyncCreationOption.Skip);
      //Create new selectchanges procedure for our scope
      devProvision.SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.Create);

      devProvision.Apply();

[Visual Basic]

      'Specify connection to dev database
      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      Dim devScope As New DbSyncScopeDescription("DevCategoryScope")
      Dim tableDesc As DbSyncTableDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection)
      devScope.Tables.Add(tableDesc)

      Dim devProvision As SyncScopeProvisioning = New PgSqlSyncScopeProvisioning(devConnection, devScope)

      'Specify filter clause
      devProvision.Tables("Products").AddFilterColumn("CategoryId")

      devProvision.Tables("Products").FilterClause = "t.CategoryId = 1"

      'Skip create Sync Framework objects because we have already created them on the previous step
      devProvision.SetCreateTableDefault(DbSyncCreationOption.Skip)
      'Create new selectchanges procedure for our scope
      devProvision.SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.Create)

      devProvision.Apply()

The AddFilterColumn call specifies the column from the provisioned table, that will be used in the filter and must be added to the tracking table. FilterClause specifies the condition. Note that we use the alias t when specifying the condition. This alias refers to the tracking table.

After this code is executed, the specified filter column is added to the products_tracking tracking table. An updated products_insert trigger will set values to this column. Sync Framework also creates the stored procedure for selecting changes with the specified filter applied.

Creating Synchronization Scope with Filter Based on Template

Creating a filter template is similar to creating a synchronization scope with a filter. The difference is that the filter condition uses a parameter instead of value. You can then create multiple synchronization scopes based on this template by supplying a value that will substitute this parameter in the filter condition. The template itself cannot be used for synchronization.

For example, in our tutorial we will create an IsAvailableTemplate template with the condition "t.Available = f_Available" where f_Available is a parameter of a boolean type. We will create two synchronization scopes by providing values for this parameter. They will be the AvailableScope scope with f_Available = true and NotAvailableScope with f_Available = false.

Here is the code for creating the template:

[C#]

      PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      // Create a template named "IsAvaibleTemplate"
      DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("IsAvaibleTemplate");

      // Definition for tables.
      DbSyncTableDescription productsDescription =
          PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection);
      scopeDesc.Tables.Add(productsDescription);

      SyncScopeProvisioning templateProvisioning = new PgSqlSyncScopeProvisioning(devConnection, scopeDesc, SyncScopeProvisioningType.Template);

      templateProvisioning.Tables[0].AddFilterColumn("IsAvailable");
      templateProvisioning.Tables[0].FilterClause = "t.\"IsAvailable\" = f_available";
      templateProvisioning.Tables[0].FilterParameters.Add(new PgSqlParameter("f_available", PgSqlType.Boolean));

      templateProvisioning.SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.Create);

      templateProvisioning.Apply();

[Visual Basic]

      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      ' Create a template named "IsAvaibleTemplate"
      Dim scopeDesc As New DbSyncScopeDescription("IsAvaibleTemplate")

      ' Definition for tables.
      Dim productsDescription As DbSyncTableDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", devConnection)
      scopeDesc.Tables.Add(productsDescription)

      Dim templateProvisioning As SyncScopeProvisioning = New PgSqlSyncScopeProvisioning(devConnection, scopeDesc, SyncScopeProvisioningType.Template)

      templateProvisioning.Tables(0).AddFilterColumn("IsAvailable")
      templateProvisioning.Tables(0).FilterClause = "t.""IsAvailable = f_available"
      templateProvisioning.Tables(0).FilterParameters.Add(New PgSqlParameter("f_available", PgSqlType.[Boolean]))

      templateProvisioning.SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.Create)

      templateProvisioning.Apply()

After executing this code, the new selectchanges procedure will contain the parameter in the filtering condition.

And now let's create synchronization scopes based on the template. To create such scope, you need to call the PopulateFromTemplate method and pass the new scope name, the name of the template, and the value of the filter parameter to it.

[C#]

       PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      // Create a synchronization scope
       PgSqlSyncScopeProvisioning devProvAvailable = new  PgSqlSyncScopeProvisioning(devConnection);

      // Populate the scope description from template
      devProvAvailable.PopulateFromTemplate("AvaibleScope", "IsAvaibleTemplate");

      // Set value to the parameter
      devProvAvailable.Tables["Products"].FilterParameters["f_available"].Value = true;

      // Set description for template.
      devProvAvailable.UserComment = "Scope for available products";

      devProvAvailable.Apply();

[Visual Basic]

      Dim devConnection As New  PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      ' Create a synchronization scope
      Dim devProvAvailable As New  PgSqlSyncScopeProvisioning(devConnection)

      ' Populate the scope description from template
      devProvAvailable.PopulateFromTemplate("AvaibleScope", "IsAvaibleTemplate")

      ' Set value to the parameter
      devProvAvailable.Tables("Products").FilterParameters("f_available").Value = True

      ' Set description for template.
      devProvAvailable.UserComment = "Scope for available products"

      devProvAvailable.Apply()

The code for creating the NotAvaibleScope is almost the same, just change the scope name and the filter parameter value.

Creating Synchronization Scope with Subset of Columns of Existing Table

Here is an example of creating synchronization scope for synchronizing data in only a subset of table columns.

[C#]

      PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      // Define scope with name ProductsScope"
      DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("ProductsScopeWithColumnSpec");

      // Specify the list of columns of the Products Table to include
      Collection<string> columnsToInclude = new Collection<string>();
      columnsToInclude.Add("Id");
      columnsToInclude.Add("Name");
      columnsToInclude.Add("CategoryId");
      columnsToInclude.Add("Available");

      // Retrive description for Products with specified columns from database
      DbSyncTableDescription tableDesc =
          PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", columnsToInclude, devConnection);

      // add the table description to the sync scope definition
      scopeDesc.Tables.Add(tableDesc);

      // create a development scope provisioning object based on the OrdersScope
      PgSqlSyncScopeProvisioning devProvision = new PgSqlSyncScopeProvisioning(devConnection, scopeDesc);

      // start the provision
      devProvision.Apply();

[Visual Basic]

      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      ' Define scope with name ProductsScope"
      Dim scopeDesc As New DbSyncScopeDescription("ProductsScopeWithColumnSpec")

      ' Specify the list of columns of the Products table to include
      Dim columnsToInclude As New Collection(Of String)()
      columnsToInclude.Add("Id")
      columnsToInclude.Add("Name")
      columnsToInclude.Add("CategoryId")
      columnsToInclude.Add("Available")

      ' Retrive description for Products with specified columns from database
      Dim tableDesc As DbSyncTableDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForTable("Products", columnsToInclude, devConnection)

      ' add the table description to the sync scope definition
      scopeDesc.Tables.Add(tableDesc)

      ' create a development scope provisioning object based on the OrdersScope
      Dim devProvision As New PgSqlSyncScopeProvisioning(devConnection, scopeDesc)

      ' start the provision
      devProvision.Apply()

Synchronization

To synchronize databases you need first to provision the Production database, and then to actually synchronize the databases.

Provisioning Production Database

When provisioning the production database, the DbSyncScopeDescription class is used to specify the synchronization scope name and tables to synchronize. The latter can be either specified explicitly or retrieved from the already provisioned development database.

[C#]

     PgSqlConnection productionConnection = new PgSqlConnection(@"Database=development;host=prodserver;user id=postgres;password=password");
     PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

     //Get definition for ProductsScope from dev
     DbSyncScopeDescription scopeDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForScope("DevCategoryScope", devConnection);

     //Provise production using this definition
     SyncScopeProvisioning productionProvisioning = new PgSqlSyncScopeProvisioning(productionConnection, scopeDescription);

      productionProvisioning.Apply();

[Visual Basic]

     Dim productionConnection As New PgSqlConnection("Database=development;host=prodserver;user id=postgres;password=password")
     Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

     'Get definition for ProductsScope from dev
     Dim scopeDescription As DbSyncScopeDescription = PgSqlSyncDescriptionBuilder.GetDescriptionForScope("DevCategoryScope", devConnection)

     'Provise production using this definition
     Dim productionProvisioning As SyncScopeProvisioning = New PgSqlSyncScopeProvisioning(productionConnection, scopeDescription)

     productionProvisioning.Apply()

Synchronization

Synchronization is performed via the SyncOrchestrator class. You need to assign the synchronization provider instances to its RemoteProvider and LocalProvider properties and then run its Synchronize method.

[C#]

      PgSqlConnection productionConnection = new  PgSqlConnection(@"Database=development;host=prodserver;user id=postgres;password=password");
      PgSqlConnection devConnection = new  PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      SyncOrchestrator syncOrchestrator = new SyncOrchestrator();

      //Specify source database
      syncOrchestrator.RemoteProvider = new PgSqlSyncProvider("DevCategoryScope", devConnection, null, null);

      //Specify production database
      syncOrchestrator.LocalProvider = new PgSqlSyncProvider("DevCategoryScope", productionConnection, null, null);

      syncOrchestrator.Synchronize();

[Visual Basic]

      Dim productionConnection As New PgSqlConnection("Database=development;host=prodserver;user id=postgres;password=password")
      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      Dim syncOrchestrator As New SyncOrchestrator()

      'Specify source database
      syncOrchestrator.RemoteProvider = New PgSqlSyncProvider("DevCategoryScope", devConnection, Nothing, Nothing)

      'Specify production database
      syncOrchestrator.LocalProvider = New PgSqlSyncProvider("DevCategoryScope", productionConnection, Nothing, Nothing)

      syncOrchestrator.Synchronize()

Database Deprovisioning

When deprovisioning the database, the objects, created by Sync Framework, that are not used any more are deleted. If there is at least one scope that still uses these objects, they will not be deleted. User database objects are not deleted at all. You can deprovision a provisioned scope, a template with all scopes built on it, or the whole database.

Deprovisioning Synchronization Scope

To deprovision a single synchronization scope you need to create a PgSqlSyncScopeDeprovisioning object and execute its DeprovisionScope method, which accepts the scope name as its parameter.

Deprovisioning Template

Template deprovisioning deletes the template and all the synchronization scopes, based on this template. The DeprovisionTemplate method of PgSqlSyncScopeDeprovisioning is used to deprovision a template.

[C#]

      PgSqlConnection devConnection = new PgSqlConnection(@"Database=development;host=devserver;user id=postgres;password=password");

      // Remove the "IsAvaibleTemplate" template from the dev database.
      PgSqlSyncScopeDeprovisioning templateDeprovision = new PgSqlSyncScopeDeprovisioning(devConnection);

      // Remove the scope.
      templateDeprovision.DeprovisionTemplate("IsAvaibleTemplate");

[Visual Basic]

      Dim devConnection As New PgSqlConnection("Database=development;host=devserver;user id=postgres;password=password")

      ' Remove the "IsAvaibleTemplate" template from the dev database.
      Dim templateDeprovision As New PgSqlSyncScopeDeprovisioning(devConnection)

      ' Remove the scope.
      templateDeprovision.DeprovisionTemplate("IsAvaibleTemplate")

Deprovisioning Storage

Storage deprovisioning removes all the templates, synchronization scopes, and all the Sync Framework database objects in the connection schema. The DeprovisionStore method is used for storage deprovisioning.

See Also

Entity Framework section | Entity Framework Support Overview


Workflow Foundation Support

This section describes dotConnect for PostgreSQL integration with Windows Workflow Foundation.

  • PostgreSQL Workflow Instance Store

    This topic describes how to configure the PostgreSQL Workflow Instance Store to enable persistence for your workflows.

  • Workflow Tracking Support

    This topic describes how to use our PgSqlTrackingParticipant class that stores workflow TrackingRecord objects in the PostgreSQL database.

See Also

Development Tools and Features | Devart.Data.PostgreSql Namespace


PostgreSQL Workflow Instance Store

As of version 7.2, dotConnect for PostgreSQL implements PostgreSQL Workflow Instance Store. To use PostgreSQL Workflow Instance Store you need PostgreSQL server 8 or higher.

Before using PostgreSQL Workflow Instance Store, you need to create a database that is used to persist workflow instances. dotConnect for PostgreSQL provides the scripts for creating this database. They are placed to the WF Services subfolder of the dotConnect for PostgreSQL installation folder. By default it is %ProgramFiles%\Devart\dotConnect\PostgreSQL\WF Services\. Note that there are two versions of scripts - for .NET Framework 4.5, and for previous versions of .NET Framework.

If you target .NET Framework 4.5, execute the PgSqlInstanceStoreSchema45.sql script first and then execute PgSqlInstanceStoreLogic45.sql. If you target .NET Framework 3.0, 3.5, or 4.0, execute the PgSqlInstanceStoreSchema.sql script first and then execute PgSqlInstanceStoreLogic.sql. You may use these scripts to clean up the persistence database to have a fresh database in the same way, just execute them in the same order.

Configuring InstanceStore for Self-Hosted Workflows that use WorkflowApplication

To enable persistence for self-hosted workflows that use WorkflowApplication, perform the following steps:

  1. Add the reference to Devart.Data.PostgreSql.WorkflowFoundation.dll in your project.

  2. Specify the using directive:

    [C#]

    using Devart.Data.PostgreSql.DurableInstancing;

    [Visual Basic]

    Imports Devart.Data.PostgreSql.DurableInstancing

  3. Create PgSqlInstanceStore and assign the following code to the InstanceStore property of WorkflowApplication:

    [C#]

    PgSqlInstanceStore store = new PgSqlInstanceStore(your_connection_string);
WorkflowApplication wfApp = new WorkflowApplication(new Workflow1());
wfApp.InstanceStore = store;

    [Visual Basic]

    Dim store As New PgSqlInstanceStore(your_connection_string)
Dim wfApp As New WorkflowApplication(New Workflow1())
wfApp.InstanceStore = store
  4. Call the Persist() method on the WorkflowApplication to persist a workflow.

Configuring InstanceStore with PgSqlInstanceStoreBehavior Class

To enable persistence using the PgSqlInstanceStoreBehavior class, perform the following steps:

  1. Add a reference to the Devart.Data.PostgreSql.Activities.Description.dll

  2. Add the following statement at the top of the source file after the existing "using" statements.

    [C#]

    using Devart.Data.PostgreSql.Activities.Description;

    [Visual Basic]

    Imports Devart.Data.PostgreSql.Activities.Description

  3. Create an instance of the WorkflowServiceHost and add endpoints for the workflow service.

    [C#]

    WorkflowServiceHost host = new WorkflowServiceHost(new CountingWorkflow(), new Uri(hostBaseAddress));
host.AddServiceEndpoint("ICountingWorkflow", new BasicHttpBinding(), "");

    [Visual Basic]

    Dim host As New WorkflowServiceHost(New CountingWorkflow(), New Uri(hostBaseAddress))
host.AddServiceEndpoint("ICountingWorkflow", New BasicHttpBinding(), "")

  4. Construct an PgSqlInstanceStoreBehavior object and to set properties of the behavior object.

    [C#]

    PgSqlInstanceStoreBehavior instanceStoreBehavior = new PgSqlInstanceStoreBehavior(connectionString);
instanceStoreBehavior.HostLockRenewalPeriod = new TimeSpan(0, 0, 5);
instanceStoreBehavior.InstanceCompletionAction = InstanceCompletionAction.DeleteAll;
instanceStoreBehavior.InstanceLockedExceptionAction = InstanceLockedExceptionAction.AggressiveRetry;
instanceStoreBehavior.InstanceEncodingOption = InstanceEncodingOption.GZip;
instanceStoreBehavior.RunnableInstancesDetectionPeriod = new TimeSpan("00:00:02");
host.Description.Behaviors.Add(instanceStoreBehavior);

    [Visual Basic]

    Dim instanceStoreBehavior As New PgSqlInstanceStoreBehavior(connectionString)
instanceStoreBehavior.HostLockRenewalPeriod = New TimeSpan(0, 0, 5)
instanceStoreBehavior.InstanceCompletionAction = InstanceCompletionAction.DeleteAll
instanceStoreBehavior.InstanceLockedExceptionAction = InstanceLockedExceptionAction.AggressiveRetry
instanceStoreBehavior.InstanceEncodingOption = InstanceEncodingOption.GZip
instanceStoreBehavior.RunnableInstancesDetectionPeriod = New TimeSpan("00:00:02")
host.Description.Behaviors.Add(instanceStoreBehavior)

  5. Open the workflow service host.

    [C#]

    host.Open();

    [Visual Basic]

    host.Open()

Configuring InstanceStore with Config File

To configure PostgreSQL Instance Store by using the postgresqlInstanceStore behavior element in a configuration file, perform the following steps:

  1. Add the following behavior extension element to the Machine.config file so that you can use the <postgresqlInstanceStore> service behavior element in the configuration files of your applications to configure persistence for your services:

    <configuration>
    <system.serviceModel>
        <extensions>
            <behaviorExtensions>
                <add name="postgresqlInstanceStore" type="Devart.Data.PostgreSql.Activities.Configuration.PgSqlInstanceStoreElement, Devart.Data.PostgreSql.WorkflowFoundation, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
            </behaviorExtensions>
        </extensions>
    </system.serviceModel>
</configuration>

    Note: Replace 7.1.26.0 in the code with your actual version.

  2. Configure PostgreSQL Instance Store by using the postgresqlInstanceStore behavior element in a configuration file of your application:

    <configuration>
    <system.serviceModel>
      <behaviors>
        <serviceBehaviors>
            <behavior name="">
                <postgresqlInstanceStore
                    connectionString="host=server;database=test;user id=postgres;"
                    instanceEncodingOption="GZip | None"
                    instanceCompletionAction="DeleteAll | DeleteNothing"
                    instanceLockedExceptionAction="NoRetry | BasicRetry |AggressiveRetry"
                    hostLockRenewalPeriod="00:00:30"
                    runnableInstancesDetectionPeriod="00:00:05" />
            </behavior>
        </serviceBehaviors>
      </behaviors>
    </system.serviceModel>
</configuration>

See Also

Workflow Tracking Support | Development Tools and Features


Workflow Tracking Support

dotConnect for PostgreSQL provides PgSqlTrackingParticipant class that stores TrackingRecord objects in the PostgreSQL database. Tracking participants are the objects that allow tracking the execution of a workflow instances by subscribing for tracking records that are emitted by the workflow runtime. The tracking participants contain the logic to process the tracking records.

To store tracking records to an PostgreSQL database, first you need to create the schema for storing tracking records. dotConnect for PostgreSQL provides the scripts for creating this database. They are placed to the WF Services subfolder of the dotConnect for PostgreSQL installation folder. By default it is %ProgramFiles%\Devart\dotConnect\PostgreSQL\WF Services\. Execute the PgSqlTrackingSchema.sql script first and then execute PgSqlTrackingLogic.sql. You may use these scripts to clean up the persistence database to have a fresh database in the same way, just execute them in the same order.

Configuring InstanceStore with PgSqlTrackingParticipant class

To use PgSqlTrackingParticipant class, perform the following steps:

  1. Add the Devart.Data.PostgreSql.WorkflowFoundation assembly to References of your solution.
  2. Add the following line to your code: "using Devart.Data.PostgreSql.ActivitiesTracking".
  3. Create a TrackingProfile instance.
  4. Add tracking queries to the profile.
  5. Create an PgSqlTrackingParticipant instance, passing a connection string as the parameter to its constructor
  6. Assign the tracking profile to the TrackingProfile property of your PgSqlTrackingParticipant object.
  7. Add the tracking participant to Extensions of your WorkflowApplication.

[C#]

TrackingProfile profile = new TrackingProfile {
  Name = "SampleTrackingProfile",
  ActivityDefinitionId = "*",
};
profile.Queries.Add(new WorkflowInstanceQuery { States = { "*" } });
profile.Queries.Add(new ActivityStateQuery { States = { "*" } });
profile.Queries.Add(new ActivityScheduledQuery());
profile.Queries.Add(new BookmarkResumptionQuery() { Name = "*" });

PgSqlTrackingParticipant trackingParticipant = new PgSqlTrackingParticipant("host=server;database=test;user id=postgres;");
trackingParticipant.TrackingProfile = profile;

WorkflowApplication wfApp = new WorkflowApplication(new Workflow1());
wfApp.Extensions.Add(trackingParticipant);

wfApp.Run();

[Visual Basic]

Dim profile As New TrackingProfile() With { _
    Key .Name = "SampleTrackingProfile", _
    Key .ActivityDefinitionId = "*" _
}
profile.Queries.Add(New WorkflowInstanceQuery() With { _
    Key .States = {"*"} _
})
profile.Queries.Add(New ActivityStateQuery() With { _
    Key .States = {"*"} _
})
profile.Queries.Add(New ActivityScheduledQuery())
profile.Queries.Add(New BookmarkResumptionQuery() With { _
    Key .Name = "*" _
})

Dim trackingParticipant As New PgSqlTrackingParticipant("host=server;database=test;user id=postgres;")
trackingParticipant.TrackingProfile = profile

Dim wfApp As New WorkflowApplication(New Workflow1())
wfApp.Extensions.Add(trackingParticipant)

wfApp.Run()

Configuring Workflow Tracking with Config File

To configure PostgreSQL Tracking by using the postgresqlTracking behavior element in a configuration file, perform the following steps:

  1. Add the following behavior extension element to the Machine.config file so that you can use the <postgresqlTracking> service behavior element in the configuration files of your applications to configure persistence for your services:

    <configuration>
    <system.serviceModel>
        <extensions>
            <behaviorExtensions>
                <add name="postgresqlTracking" type="Devart.Data.PostgreSql.Activities.Configuration.PgSqlTrackingElement, Devart.Data.PostgreSql.WorkflowFoundation, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
            </behaviorExtensions>
        </extensions>
    </system.serviceModel>
</configuration>

    Note: Replace 7.1.26.0 in the code with your actual version.

  2. Configure PostgreSQL Tracking by using the postgresqlTracking behavior element in a configuration file of your application:

    <configuration>
    <system.serviceModel>
     <tracking>
        <profiles>
              <trackingProfile name="Sample Tracking Profile">
                <workflow activityDefinitionId="*">
                  <workflowInstanceQueries>
                        <workflowInstanceQuery>
                          <states>
                            <state name="Started"/>
                            <state name="Completed"/>
                          </states>
                        </workflowInstanceQuery>
                  </workflowInstanceQueries>
                </workflow>
              </trackingProfile>
            </profiles>
      </tracking>
    <behaviors>
        <serviceBehaviors>
                <behavior name="">
              <postgresqlTracking
                        connectionString="host=server;database=test;user id=postgres;"
                        profileName="Sample Tracking Profile" />
                </behavior>
        </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

Configuring Workflow Tracking with PgSqlTrackingBehavior Class

To enable tracking using the PgSqlTrackingBehavior class, perform the following steps:

  1. Add a reference to the Devart.Data.PostgreSql.WorkflowFoundation.dll.

  2. Add the following statement at the top of the source file after the existing "using" statements.

    [C#]

    using Devart.Data.PostgreSql.Activities.Description;

    [Visual Basic]

    Imports Devart.Data.PostgreSql.Activities.Description

  3. Create an instance of the WorkflowServiceHost and add endpoints for the workflow service.

    [C#]

    WorkflowServiceHost host = new WorkflowServiceHost(new CountingWorkflow(), new Uri(hostBaseAddress));
host.AddServiceEndpoint("ICountingWorkflow", new BasicHttpBinding(), "");

    [Visual Basic]

    Dim host As New WorkflowServiceHost(New CountingWorkflow(), New Uri(hostBaseAddress))
host.AddServiceEndpoint("ICountingWorkflow", New BasicHttpBinding(), "")

  4. Construct an PgSqlTrackingBehavior object and to set properties of the behavior object.

    [C#]

    ServiceHost svcHost = new ServiceHost(typeof(WorkflowService), new
                               Uri("http://localhost:8001/Sample"));
PgSqlTrackingBehavior trackingBehavior = new PgSqlTrackingBehavior(connectionString){
     ProfileName = "Sample Tracking Profile"
};
svcHost.Description.Behaviors.Add(trackingBehavior);

    [Visual Basic]

    Dim svcHost As New ServiceHost(GetType(WorkflowService), New Uri("http://localhost:8001/Sample"))
Dim trackingBehavior As New PgSqlTrackingBehavior(connectionString) With { _
    Key .ProfileName = "Sample Tracking Profile" _
}
svcHost.Description.Behaviors.Add(trackingBehavior)

  5. Open the workflow service host.

    [C#]

    svcHost.Open();

    [Visual Basic]

    svcHost.Open()

Workflow Tracking Information

The PgSqlTrackingParticipant class stores the workflow tracking information in the created schema. Its tables are described below:

  • wf_tracking_record - contains all tracking records.
  • wf_record_type - maps numeric record type values in wf_tracking_record table to the corresponding type names.
  • wf_annotation - contains annotations for tracking records.
  • wf_instance_record - contains additional information for records of WorkflowInstanceRecord and derived types. This table should be joined with wf_tracking_record table to get all the WorkflowInstanceRecord data.
  • wf_activity_info - contains values from ActivityInfo objects that are used in many record types.
  • wf_unhandled_exception_record - contains additional information for records of WorkflowInstanceUnhandledExceptionRecord type. This table should be joined with wf_tracking_record and wf_instance_record tables.
  • wf_value_collection - contains key/value collections used in tracking record (arguments and variables).
  • wf_value - contains keys and values for each collection in wf_value_collection table.
  • wf_activity_state_record - contains additional information for records of ActivityStateRecord type. This table should be joined with wf_tracking_record table.
  • wf_activity_scheduled_record - contains additional information for records of ActivityScheduledRecord type. This table should be joined with wf_tracking_record table.
  • wf_fault_propagation_record - contains additional information for records of FaultPropagationRecord type. This table should be joined with wf_tracking_record table.
  • wf_cancel_requested_record - contains additional information for records of CancelRequestedRecord type. This table should be joined with wf_tracking_record table.
  • wf_bookmark_resumption_record - contains additional information for records of BookmarkResumptionRecord type. This table should be joined with wf_tracking_record table.
  • wf_custom_tracking_record - contains additional information for records of CustomTrackingRecord type. This table should be joined with wf_tracking_record table

Here is the diagram of this schema:

To retrieve the workflow tracking information, execute queries to these tables. For example, to retrieve all the ActivityStateRecord data for today, use the following query.

SELECT * FROM wf_tracking_record TR
 INNER JOIN wf_activity_state_record SR ON TR.RECORD_ID = SR.RECORD_ID
WHERE TR.event_time::date >=  current_date

See Also

PostgreSQL Workflow Instance Store | Development Tools and Features


ORM Solutions

This section describes support for ORM solutions in dotConnect for PostgreSQL.

  • Entity Framework
  • LinqConnect
  • Entity Developer Overview


Entity Framework

This section describes Entity Framework support in dotConnect for PostgreSQL.

  • Entity Framework Support
  • Entity Framework Data Type Mapping
  • Entity Framework Tutorial
  • Entity Framework Canonical Functions
  • Working with Transactions in Entity Framework
  • Generating Database from Model
  • Entity Framework Spatials
  • Entity Framework Provider Configuration


Entity Framework Support

The latest ADO.NET evolution focuses on raising the level of abstraction from the logical (relational) level to the conceptual (entity) level. For this purpose Microsoft introduces the Entity Framework, designed to simplify data - object conversion and embed data access queries into program code.

The Devart dotConnect product line supports the ADO.NET Entity Framework for the following databases: Oracle, MySQL, PostgreSQL, SQLite, DB2, and the following cloud applications: Salesforce, Dynamics CRM, SugarCRM, Zoho CRM, MailChimp, ExactTarget, Bigcommerce, Magento, QuickBooks, and FreshBooks.

The article consists of the following sections:

  • What is ADO.NET Entity Framework?
  • Entity Framework Support Key Features
  • Using the Entity Data Provider
  • Using the Entity Data Provider with Entity Framework v6
  • Using the Entity Data Provider with Entity Framework Core
  • Deploying an Entity Framework Project
  • Visual Model Creation
  • Compatibility and Requirements
  • Migration between ADO.NET Entity Data Model (*.edmx) and Devart Entity Model (*.edml)

What is ADO.NET Entity Framework?

The Entity Framework is a set of technologies in ADO.NET that support development of data-oriented software applications. The Entity Framework is designed to enable developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications. Entity Framework applications provide the following benefits:

  • Applications can work in terms of a more application-centric conceptual model, including types with inheritance, complex members, and relationships.
  • Applications are freed from hard-coded dependencies on a particular data engine or storage schema.
  • Mappings between the conceptual model and the storage-specific schema can change without changing the application code.
  • Developers can work with a consistent application object model that can be mapped to various storage schemas, possibly implemented in different data sources.
  • Multiple conceptual models can be mapped to a single storage schema.
  • Language-integrated query support provides compile-time syntax validation for queries against a conceptual model.

Entity Framework Support Key Features

  • Conceptual approach to enterprise development
  • High performance
  • Wide support for LINQ to Entities
  • Wide support for EntitySQL
  • Full CRUD (Create, Retrieve, Update, Delete) support
  • Wide support for server data types
  • Capability to use stored procedures when manipulating data
  • Stored procedure import support
  • Visual Studio EDM Wizard support (reverse engineering of database objects to entity model)
  • Visual Studio LightSwitch support
  • Generate Database Wizard (Model-First) support
  • Configurable Code-First CreateDatabase/DatabaseExists/DropDatabase functionality support
  • Support for Code-First Migrations with database-specific features
  • Entity Framework Spatials support
  • Support for database-specific system functions in LINQ to Entities and Entity SQL
  • Full-text search support
  • Batch updates
  • Entity Framework provider configuration

Using the Entity Data Provider

Use of dotConnect for PostgreSQL in the Entity Framework is similar to use of standard SqlClient. Generally it conforms to the following scheme:

  1. Open your project.
  2. Add new item ADO.NET Entity Data Model to your project and specify its name.
  3. Choose Generate from database.
  4. Choose the dotConnect you use as data provider and specify the connection string.
  5. Select tables that are actually used in your project and click Generate to finish the process. If the selected tables contain foreign keys, they will be reflected in the generated models as well.
  6. Specify a name for the model namespace. Note that this name should be different from the database (schema) name.

For your convenience there is a brief Entity Framework Tutorial that you can use to get acquainted with the technology. You can also take a look at Entity Framework samples available with the product, or download separate Entity Framework Query Samples package. The latter is a standard Microsoft demo with added PostgreSQL connectivity.

Using the Entity Data Provider with Entity Framework v6

Since there are no global Entity Framework provider registration for Entity Framework v6, you should register our provider manually in the config file of your project. For this you should add the following line:

<provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices,
Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />

to the entityFramework -> providers section.

<entityFramework>
    <providers>
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices,
      Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
</entityFramework>

Note: replace 7.1.26.0 with the actual assembly version.

If it suits for your project, you may omit the exact assembly version:

<entityFramework>
    <providers>
        <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices, Devart.Data.PostgreSql.Entity.EF6" />
    </providers>
</entityFramework>

This section appears in the project config file only after you add the NuGet EntityFramework package either explicitly, by executing the "install-package EntityFramework" command, or implicitly, by adding an Entity Framework v6 model for SQL Server via EDM Wizard.

Using the Entity Data Provider with Entity Framework Core

dotConnect for PostgreSQL currently supports Entity Framework Core. Entity Framework Core is supported only for the Full .NET Framework platform of version 4.5.1 and higher. Dynamic database object creation (tables/FK/PK/indexes/triggers/sequences) based on an Entity Framework model is supported. Database-First via Package Manager Console is not supported.

Please note that only a part of Entity Framework provider configuration settings is supported for Entity Framework Core. Also, not all Entity Framework v6 features are supported because Entity Framework Core does not support a lot of Entity Framework v6 features itself.

In order to use Entity Framework Core you need Visual Studio 2013 or higher.

In order to register an Entity Framework provider and set a connection string, you need to override the OnConfiguring method of your DbContext class descendant.

[C#]

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {

  optionsBuilder.UsePgSql(@"host=server;database=test;user id=postgres;");
}

[Visual Basic]

Protected Overrides Sub OnConfiguring(optionsBuilder As DbContextOptionsBuilder)

    optionsBuilder.UsePgSql("host=server;database=test;user id=postgres;")
End Sub

The mapping supported by Entity Framework Core is described in details in the corresponding section of Entity Framework documentation. If you plan to support several data sources for one base Entity Framework model, that is mapped to tables and columns named differently in different data sources, you can use special provider-specific extension methods in fluent mapping in order to support specific mapping for each data source simultaneously. dotConnect for PostgreSQL provides the following extension methods:

  • ForPgSqlToTable() - specifies the table name.
  • ForPgSqlHasColumnName() - specifies the column name.
  • ForPgSqlHasColumnType() - specifies the column type.
  • ForPgSqlHasName() - specifies the the name of the index and primary key.
  • ForPgSqlHasConstraintName() - specifies the foreign key.
  • ForPgSqlHasDefaultValueSql() - specifies the column default value.

Deploying an Entity Framework Project

When deploying Entity Framework projects, it is necessary to:

  1. Check if the required assemblies Devat.Data.dll, Devart.Data.PostgreSql.dll, and Devart.Data.PostgreSql.Entity.EF<Version>.dll are available for your application. The <Version> here is the version of Entity Framework used in your application. For Entity Framework v1 the assembly is called Devart.Data.PostgreSql.Entity.EF1.dll "1", for Entity Framework v4 it is Devart.Data.PostgreSql.Entity.EF4.dll, for Entity Framework v5 and v6 it is Devart.Data.PostgreSql.Entity.EF5.dll or Devart.Data.PostgreSql.Entity.EF6.dll respectively. For Entity Framework Core it is Devart.Data.PostgreSql.Entity.EFCore.dll. The assembly should reside in the application's folder or in GAC.

  2. If you use Code-First Migrations feature of Entity Framework v4 or Entity Framework v5, you also need to check if the Devart.Data.PostgreSql.Entity.Migrations.EF<Version>.dll assembly is available for your application. For Entity Framework v6 this assembly is not needed.
  3. If you use Entity Framework Spatials and NetTopologySuite, you also need to check if the Devart.Data.PostgreSql.Entity.Spatials.EF<Version>.dll assembly is available for your application.
  4. For Entity Framework v1 - v6, you need to inform your environment about the provider factory existence (add the entry to the DbProviderFactories section as it is described above).
<system.data>
  <DbProviderFactories>
    <remove invariant="Devart.Data.PostgreSql" />
    <add name="dotConnect for PostgreSQL" invariant="Devart.Data.PostgreSql"
     description="Devart dotConnect for PostgreSQL"
     type="Devart.Data.PostgreSql.PgSqlProviderFactory, Devart.Data.PostgreSql,
       Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
  </DbProviderFactories>
</system.data>

Replace 7.1.26.0 here with your actual version.

You can find the necessary assemblies in the Entity folder in the provider installation folder, in the subfolder, corresponding to the Entity Framework version necessary.

If you are registering the provider in the machine.config file, please take into account the Entity Framework version. Entity Framework v1 - specific applications require an entry in the .NET Framework 2.0 configuration file, and Entity Framework v4 and later - specific applications should be registered in the .NET Framework 4.0 configuration file. For Entity Framework Core there is no need to register the provider in the machine.config file.

You can also read Micrsoft's Deployment Considerations on ADO.NET Entity Framework.

Visual Model Creation

dotConnect for PostgreSQL is tightly integrated with Visual Studio Entity Data Model Wizard for generating model definitions. dotConnect for PostgreSQL also includes several demo projects that show how to use the product in conceptual programming against data.

Moreover, dotConnect providers have a bundled visual ORM model designer - Entity Developer. Entity Developer provides far more advanced model editing functionality than standard Visual Studio EDM Designer. It provides better support for Model-First and Database-First development wider mapping support, and powerful template-based code generation. Visit this webpage for more information on Entity Developer benefits.

dotConnect for PostgreSQL also supports Visual Studio LightSwitch, so you can develop LightSwitch applications with our providers. You can find a tutorial on creating a simple LightSwitch application using dotConnect for PostgreSQL here: Tutorial: How to Connect Visual Studio LightSwitch to PostgreSQL with dotConnect for PostgreSQL Data Provider.

Compatibility and Requirements

dotConnects for Oracle, MySQL, PostgreSQL, SQLite, and DB2 are compatible with the latest version of ADO.NET Entity Framework and Visual Studio. The following server versions are required for Entity Framework to function properly:

  • Oracle: 9.2.0.4 or higher
  • MySQL: 5.0 or higher
  • PostgreSQL: 8.0 or higher
  • SQLite: any supported version
  • DB2: 9 and higher

Migration between ADO.NET Entity Data Model (*.edmx) and Devart Entity Model (*.edml)

To migrate your ADO.NET Entity Data Model to Devart Entity Model, change the extension of the model file to edml (edmx -> edml), set the Build Action property of your model to "DevartEntityDeploy", and Custom Tool to "DevartEfGenerator". After that the model can be edited with the Devart Entity Developer.

To migrate your Devart Entity Model to ADO.NET Entity Data Model, change the model file extension (edml ->edmx), set the Build Action property of your model to "EntityDeploy", and Custom Tool to "EntityModelCodeGenerator". After that the model can be edited with Entity Designer.

Both *.edml and *.edmx can be opened and edited manually using XML Editor.

See Also

Entity Framework Tutorial | Devart LinqConnect | http://blog.devart.com/tag/entity-framework


Entity Framework Data Type Mapping

PostgreSQL to .NET type mapping

Type mapping rules from this table are used when generating a model from a database with Entity Data Model Wizard in Visual Studio 2008 - 2015 and Create Model Wizard in Entity Developer.

PostgreSQL data types | SSDL 1 | CSDL 1 | .NET
boolean | boolean | Boolean | System.Boolean
smallint, int2 | smallint | Int16 | System.Int16
integer, int4 | int | Int32 | System.Int32
bigint, int8 | bigint | Int64 | System.Int64
real | real | Single | System.Single
double precision, money | double precision | Double | System.Double
numeric, decimal, float | numeric, decimal, float | Decimal | System.Decimal
date, timestamp, timestamp with time zone, timestamp without time zone | date, timestamp, timestamptz | DateTime | System.DateTime
time, time with time zone, time without time zone, interval | time, timetz, interval | Time | System.TimeSpan
timestamp with time zone | datetimeoffset | DateTimeOffset | System.DateTimeOffset
char, varchar, text, citext, enum, bit, varbit, cidr, inet, macaddr, point, line, lseg, box, path, polygon, circle, xml*, character, character varying, bit varying, json, jsonb | char, varchar, text, enum, bit, varbit, cidr, inet, macaddr, point, line, lseg, box, path, polygon, circle, xml, json, jsonb | String | System.String
bytea | bytea | Binary | System.Byte[]
uuid2 | uuid | Guid | System.Guid
geometry3 | spatial_geometry | Geometry, GeometryCollection, GeometryLineString, GeometryMultiLineString, GeometryMultiPoint, GeometryMultiPolygon, GeometryPoint, GeometryPolygon | System.Data.Spatial.DbGeometry
geography3 | spatial_geography | Geography, GeographyCollection, GeographyLineString, GeographyMultiLineString, GeographyMultiPoint, GeographyMultiPolygon, GeographyPoint, GeographyPolygon | System.Data.Spatial.DbGeography

1 Note that when mapping corresponding database data type, you will need the .NET type with larger precision. That is because, for example, any Int32 value can be stored in the NUMBER(10) column, but largest NUMBER(10) column value cannot be stored in the Int32 field, it requires Int64 field.

2 Uuid and xml data types appeared in PostgreSQL 8.3.

3 Supported in Entity Framework v5 and v6.

.NET to PostgreSQL default type mapping

.NET | CSDL 1 | SSDL 1 | PostgreSQL data types
System.Boolean | Boolean | boolean | boolean
System.Byte | Byte | byte | smallint
System.Byte[] | Binary | bytea | bytea
System.Data.Spatial.DbGeometry2 | Geometry | spatial_geometry | geometry
System.Data.Spatial.DbGeography2 | Geography | spatial_geography | geography
System.DateTime | DateTime | timestamp | timestamp
System.DateTimeOffset | DateTimeOffset | datetimeoffset | timestamp with time zone
System.Decimal | Decimal | numeric | numeric
System.Double | Double | double precision | double precision
System.Guid | Guid | uuid | uuid
System.Int16 | Int16 | smallint | smallint
System.Int32 | Int32 | int | integer
System.Int64 | Int64 | bigint | bigint
System.SByte | SByte | sbyte | smallint
System.Single | Single | real | real
System.String | String | char, varchar | char, varchar
System.TimeSpan | Time | timestamp | timestamp

1 Note that when mapping corresponding database data type, you will need the .NET type with larger precision. That is because, for example, any Int32 value can be stored in the NUMBER(10) column, but largest NUMBER(10) column value cannot be stored in the Int32 field, it requires Int64 field.

2 Supported in Entity Framework v5 and v6.

DateTimeOffcet type is not supported.


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Entity Framework Tutorial

This tutorial guides you through the process of creating a simple application powered by ADO.NET Entity Framework. In less than 5 minutes you will have a ready-to-use data access layer for your business objects.

Please note that this tutorial is not applicable for Entity Framework Core. It is intended for previous Entity Framework versions.

In this walkthrough:

  • Introducing the ADO.NET Entity Framework
  • Requirements
  • Entity Framework v6
  • Generating Model from Database
  • Querying Data
  • Inserting New Data
  • Updating Data
  • Deleting Data
  • Additional Information

Introducing the ADO.NET Entity Framework

ADO.NET Entity Framework is an object-relational mapping (ORM) framework for the .NET Framework. It is designed to enable developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema. The goal is to decrease the amount of code and maintenance required for data-oriented applications.

Requirements

In order to connect to PostgreSQL server you need dotConnect for PostgreSQL installed and IDE running. ADO.NET Entity Framework requires .NET Framework 3.5 Service Pack 1 or higher, Visual Studio 2008 Service Pack 1 or higher, and PostgreSQL server 8.0 or higher. Note that Entity Framework support is not available in Standard Edition of dotConnect for PostgreSQL.

For Entity Framework 6, you will also need a NuGet Visual Studio extension installed since it is used for adding EntityFramework NuGet package. Alternatively you may create model for Entity Framework v1 or v4, which don't require NuGet, in this tutorial.

In this tutorial it is assumed that you already have the database objects created. You have to execute a script from the following file if you have not done so yet:
\Program Files\Devart\dotConnect\PostgreSQL\Samples\crm_demo.sql

In this sample we will create a simple console application. It could be any other project type as well, but for simplicity's sake we'll use console project throughout the tutorial. Start Visual Studio and create a new console application.

Entity Framework v6

The following actions are required if you want to create an Entity Framework v6 model.

Open the Package Manager Console window and execute the following command in it.

install-package EntityFramework

After this add the following line:

<provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices,
Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />

to the entityFramework -> providers section.

<entityFramework>
    <providers>
      <provider invariantName="Devart.Data.PostgreSql" type="Devart.Data.PostgreSql.Entity.PgSqlEntityProviderServices,
      Devart.Data.PostgreSql.Entity.EF6, Version=7.1.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />
    </providers>
</entityFramework>

Note: replace 7.1.26.0 with the actual assembly version.

After this you need to rebuild the project before running the EDM wizard.

Generating Model from Database

  1. In the Solution Explorer right-click on the project and choose Add | New Item.
  2. In the dialog select ADO.NET Entity Data Model, click Add. This launches Entity Data Model Wizard.
  3. In the wizard select Generate from database, click Next.
  4. Pick an existing dotConnect for PostgreSQL connection string or create a new one. When creating a new connection select PostgreSQL Server in the Data Source list, then dotConnect for PostgreSQL in the Data provider list. See the screenshot below.
    EDM wizard - connection
  5. Agree to include the sensitive data in the connection string.
  6. In the Save entity connection settings... box type CrmDemoEntities. This will be the name of the main data access class. Click Next.
  7. Select database objects that will be used in the model. These are all objects from the crm_demo script, including auxiliary tables.
    EDM wizard - selecting objects
  8. Click Finish. The model will be generated and opened in EDM Designer.
    Entity data model

The model you've just generated is ready to use. Its name is Model1.edmx, unless you changed it in the step 2. You can inspect it visually in the designer or take a look behind the scenes with XML Editor.

The wizard creates classes for all selected tables that represent entities. It also creates a descendant of System.Data.Objects.ObjectContext class, which controls the connection to the database, and the whole data flow. This class includes properties and methods named after your database objects. You will use these members to retrieve and modify data in the context. The code is contained in an autogenerated file Model1.Designer.cs (Model1.Designer.vb).

Note that if you have an association between two properties of non-coinciding numeric types, you can manually change both conceptual and storage types to the type that will be wide enough to include data for each property.

Querying Data

All Entity Framework operations are executed through the ObjectContext descendant, which is named CrmDemoEntities in this tutorial. To retrieve data you have to first create an instance of the context, then prepare a query with LINQ to Entities or EntitySQL or their mix, and then access the object returned by the query, which may be a collection of objects or a single object.

Let's read all the data from the table Company, sort it by CompanyID, and output some columns. Add the following block of code to the method Main:

[C#]

CrmDemoEntities context = new CrmDemoEntities();
var query = from it in context.Company
            orderby it.CompanyID
            select it;

foreach (Company comp in query)
  Console.WriteLine("{0} | {1} | {2}", comp.CompanyID, comp.CompanyName, comp.Country);

Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoEntities = New CrmDemoEntities
Dim query = From it In context.Company _
    Order By it.CompanyID _
    Select it

Dim comp As Company
For Each comp In query
  Console.WriteLine("{0} | {1} | {2}", comp.CompanyID, comp.CompanyName, comp.Country)
Next

Console.ReadLine()

As simple as that. You prepare a query and then iterate through it as you would do with a usual collection of objects. The database interaction is performed by Entity Framework in the background. Now let's see who is who in this code sample.

  • CrmDemoEntities is the name of the class that knows all about your model and does everything to handle it. You named it in the step 6. All Entity Framework operations are performed within this class's properties and methods. It is recommended that you keep a single instance of the class throughout your application because it consumes lots of resources.
  • query, it - these are arbitrary variable names in the LINQ to Entities statement. The former is used as the collection of data objects, the latter is not used outside the statement.
  • context.Company refers to a public property of CrmDemoEntities class. This property represents the collection of all companies in the context.
  • Company (in the foreach statement) is the name of an autogenerated class. This class maps to the Company table in the database and is named after it.

Here is the project's output in the console:

Note that the LINQ to Entities query code just describes the query. It does not execute it. This approach is known as deferred execution.

Now let's query data from two tables united with a foreign key. Replace the old code with this:

[C#]

CrmDemoEntities context = new CrmDemoEntities();

var query = from it in context.Products.Include("Product_Categories")
            orderby it.Product_Categories.CategoryName, it.ProductName
            select it;

foreach (Products product in query)
  Console.WriteLine("{0} | {1} | {2}",
    product.Product_Categories.CategoryName, product.ProductName, product.Price);

Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoEntities = New CrmDemoEntities
Dim query = From it In context.Products.Include("Product_Categories") _
Order By it.Product_Categories.CategoryName, it.ProductName _
Select it

Dim product As Products
For Each product In query
  Console.WriteLine("{0} | {1} | {2}", _
    product.Product_Categories.CategoryName, product.ProductName, product.Price)
Next
Console.ReadLine()

This sample is much like the previous one, with exception that it adds the Include method that instructs the query to retrieve data from one more table.

Inserting New Data

What earlier was adding rows to tables, now is just adding new objects to context collections. When you are ready to send the changes to the database, call the SaveChanges() method of the context. Before doing this, you must first set all properties that do not support null (Nothing) values. The SaveChanges() method generates and executes commands that perform the equivalent INSERT, UPDATE, or DELETE statements against the data source.

Let's add a new product and a new category to the database. Replace the old code with this:

[C#]

CrmDemoEntities context = new CrmDemoEntities();

// Create a new category
Product_Categories newCategory = new Product_Categories();
newCategory.CategoryID = 1000;
newCategory.CategoryName = "New category";
context.AddToProduct_Categories(newCategory);

// Create a new product
Products newProduct = new Products();
newProduct.ProductID = 2000;
newProduct.ProductName = "New product";
newProduct.Price = 20;
// Associate the new product with the new category
newProduct.Product_Categories = newCategory;
context.AddToProducts(newProduct);

// Send the changes to the database.
// Until you do it, the changes are cached on the client side.
context.SaveChanges();

// Request the new product from the database
var query = from it in context.Products.Include("Product_Categories")
            where it.ProductID == 2000
            select it;

// Since we query for a single object instead of a collection, we can use the method First()
Products product = query.First();
Console.WriteLine("{0} | {1} | {2}",
  product.Product_Categories.CategoryName, product.ProductName, product.Price);
Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoEntities = New CrmDemoEntities

' Create a new category
Dim newCategory As Product_Categories = New Product_Categories()
newCategory.CategoryID = 1000
newCategory.CategoryName = "New category"
context.AddToProduct_Categories(newCategory)

' Create a new product
Dim newProduct As Products = New Products()
newProduct.ProductID = 2000
newProduct.ProductName = "New product"
newProduct.Price = 20
' Associate the new product with the new category
newProduct.Product_Categories = newCategory
context.AddToProducts(newProduct)

' Send the changes to the database.
' Until you do it, the changes are cached on the client side.
context.SaveChanges()

' Request the new product from the database
Dim query = From it in context.Products.Include("Product_Categories") _
            Where it.ProductID = 2000 _
            Select it

' Since we query for a single object instead of a collection, we can use the method First()
Dim product As Products = query.First()
Console.WriteLine("{0} | {1} | {2}", _
  product.Product_Categories.CategoryName, product.ProductName, product.Price)
Console.ReadLine()

The methods AddToProduct_Categories, AddToProducts, and others are automatically generated in the context. Such methods exist for every class in your model.

Note that after you have added the new product and category by submitting the changes, you cannot execute this solution again as is. To execute the solution again, change the names and IDs of the objects to be added.

Updating Data

Entity instances are modified as usual. The only thing to remember is that you have to invoke the SaveChanges() method to send the data to the database.

Append the following block to the existing code and launch the project:

[C#]

product.ProductName = "Edited product";
product.Price = 15;
context.SaveChanges();

[Visual Basic]

product.ProductName = "Edited product"
product.Price = 15
context.SaveChanges()

Deleting Data

To extract an instance from a context use the DeleteObject method of the context. The object is removed from the collection of its type, but not destroyed. To delete the object's data from the database invoke the SaveChanges() method.

You can do this with a block of code like the following:

[C#]

context.DeleteObject(newCategory);
context.DeleteObject(newProduct);
context.SaveChanges();

[Visual Basic]

context.DeleteObject(newCategory)
context.DeleteObject(newProduct)
context.SaveChanges()

Additional Information

Now that you can perform the basic data manipulation with Entity Framework, you can move on to some advanced topics. Here are some useful links to MSDN:

  • ADO.NET Entity Framework
  • LINQ to Entities
  • Entity SQL Language

For hands-on experience download the separate Entity Framework Query Samples package or use samples shipped with dotConnect for PostgreSQL. You can access the samples from the Start menu.

To understand deeper the works of Entity Framework engine you can watch the generated SQL statements in dbMonitor.

See Also

Entity Framework section | Entity Framework Support Overview


Entity Framework Canonical Functions

This article can be useful for programmers who want to develop a cross-database applications and use the canonical functions. I

Entity Framework Canonical Functions are a set of functions, which are supported by all Entity Framework providers. These canonical functions will be translated to the corresponding data source functionality for the provider.

The tables below contain information about these functions supported by the Devart products. Functions supported by the following DBMS: MySQL, PostgreSQL, Oracle, SQLite, DB2, SQL Server 2005, and SQL Server 2008 are marked with green.

Please note, that the "EF version" column contains a number of Entity Framework version in which this function was defined. Additionally note that Entity Framework Canonical Functions are not supported in Entity Framework Core. This topic is applicable only to previous Entity Framework versions.

Aggregate Canonical Functions

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
Avg | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
BigCount* | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Count | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Max | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Min | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
StDev | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
StDevP | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Sum | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Var | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
VarP | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
You can read more about Aggregate Canonical functions in MSDN.

* Only SQL Server has an aggregate function COUNT_BIG(expr). This function is compiled to the ordinary COUNT(expr) in other databases.

Math Canonical Functions

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
Abs | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Ceiling | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Floor | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Power | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Round(value) | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Round(value, digits) | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Truncate | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
You can read more about Math Canonical functions in MSDN.

String Canonical Functions

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
Concat | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Contains | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
EndsWith | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
IndexOf | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Left | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Length | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
LTrim | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Replace | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Reverse | v1 | Yes | Yes | Yes / No * | Yes | No | Yes | Yes
Right | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
RTrim | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Substring | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
StartsWith | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
ToLower | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
ToUpper | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Trim | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes

* The Reverse function is supported with PostgreSQL 9.1 and higher.

You can read more about String Canonical functions in MSDN.

Date and Time Canonical Function

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
AddNanoseconds* | v4 | Yes | No | Yes | Yes | No | Yes | Yes
AddMicroseconds | v4 | Yes | No | Yes | Yes | Yes | Yes | Yes
AddMilliseconds | v4 | Yes | No | Yes | Yes | Yes | Yes | Yes
AddSeconds | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
AddMinutes | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
AddHours | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
AddDays | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
AddMonths | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
AddYears | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
CreateDateTime | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
CreateDateTimeOffset | v4 | Yes | No | No | Yes | No | No | Yes
CreateTime | v4 | Yes | Yes | Yes | Yes | Yes | No | Yes
CurrentDateTime | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
CurrentDateTimeOffset | v4 | Yes | No | No | Yes | No | No | Yes
CurrentUtcDateTime | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Day | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
DayOfYear | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
DiffNanoseconds | v4 | No | No | No | No | No | Yes | Yes
DiffMilliseconds | v4 | No | No | No | No | Yes | Yes | Yes
DiffMicroseconds | v4 | No | No | No | No | Yes | Yes | Yes
DiffSeconds | v4 | No | No | No | No | Yes | Yes | Yes
DiffMinutes | v4 | No | No | No | No | Yes | Yes | Yes
DiffHours | v4 | No | No | No | No | Yes | Yes | Yes
DiffDays | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
DiffMonths | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
DiffYears | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
GetTotalOffsetMinutes | v1 | Yes | No | No | Yes | No | No | Yes
Hour | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Millisecond | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Minute | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Month | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Second | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Truncate | v4 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Year | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
You can read more about Date and Time Canonical functions in MSDN.

* Some DBMS can store nanoseconds into the dates, but .NET type DateTime doesn't allow nanoseconds storage. It can recognize only 100-nanoseconds intervals. The AddNanoseconds in dotConnect for SQLite realization can add only integer value of the 100-nanoseconds intervals. So, if you call AddNanoseconds(224), in the database to the value will be added only 200 nanoseconds.

Bitwise Canonical Functions

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
BitWiseAnd | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
BitWiseNot | v1 | No | Yes | Yes | Yes | Yes | Yes | Yes
BitWiseOr | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
BitWiseXor | v1 | Yes | Yes | Yes | Yes | Yes | Yes | Yes
You can read more about Bitwise Canonical functions in MSDN.

Other Canonical Functions

Canonical Function Name | EF version | Oracle | MySQL | PostgreSQL | SQLite | DB2 | MS SQL Server 2005 | MS SQL Server 2008/2012
NewGuid | v1 | Yes | No | Yes * | Yes | Yes | Yes | Yes
You can read more about this group of functions in MSDN.

* For PostgreSQL, several methods for generating GUID are supported. With dotConnect for PostgreSQL you can select the method to use with the config.QueryOptions.NewGuidGenerationMethod property (see Query Options for more information).
In conclusion, please note that the functionality of the different DBMS varies. It is reason why not all the functions can be implemented by standard routines and SQL statements. Sometimes similar functions can return different values because of different accuracy. Especially it concerns mathematic and aggregate functions.

See Also

Entity Framework Support | Entity Framework Tutorial


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Working with Transactions in Entity Framework

In this article we consider a short description of the Entity Framework transactional models. There are also some simple code listings illustrating different aspects of the transactional model.

A transaction is a series of operations performed as a single unit of work. Entity Framework transactions are a part of its internal architecture. The SaveChanges method operates within a transaction and saves results of the work. It is designed to ensure data integrity. The common reason of integrity problems is a Concurrency violation, which can be raised during the saving process. Concurrency violation occurs an OptimisticConcurrencyException in this case. To resolve this conflict call the Refresh method with the StoreWins or ClientWins value, and after that call SaveChanges again. But be aware, that the Refresh with the ClientWins option can be a source of problem too. It rewrites all changes made to the data after context query execution.

Imagine we want the SaveChanges to be only a part of more complicated update process. For example, we want to execute several SaveChanges as one operation in a single ObjectContext or DbContext.

The possible solution is to use the database connection. The connection is accessed differently for ObjectContext and DbContext. An example for ObjectContext:

[C#]

    var connection = context.Connection;

[Visual Basic]

    Dim connection = context.Connection

For DbContext you should open the connection of internal ObjectContext which is within DbContext.

[C#]

    var connection = ((IObjectContextAdapter)dbContext).ObjectContext.Connection;

[Visual Basic]

    Dim connection = DirectCast(dbContext, IObjectContextAdapter).ObjectContext.Connection

The rest of the sample is the same for ObjectContext and DbContext:

[C#]

       //Opening connection
        connection.Open();
        DEPT department = context.DEPT.Where(d => d.DEPTNO == 10).First();
        department.LOC = "TEST";
        //Opening transaction
        using (System.Data.Common.DbTransaction transaction = context.Connection.BeginTransaction())
        {
           //This call participates in the transaction
           context.SaveChanges();
           department.DNAME = "TEST";
           //This call also participates in the transaction
           context.SaveChanges();
           //Replace the flag condition with the one you need
           //or remove it and leave only commit part
           if(flag)
           {
              //transaction completed successfully, both calls succeeded
              transaction.Commit();
           }
           else
           {
              //something is wrong, both calls are rolled back
              transaction.Rollback();
           }
        }

[Visual Basic]

        'Opening connection
        connection.Open()
    Dim department As Dept = context.Depts.Where(Function(ByVal d As Dept) d.Deptno = 10).First()
    department.LOC = "TEST"
        'Opening transaction
        Using transaction As System.Data.Common.DbTransaction = Context.Connection.BeginTransaction()
        {
           'This call participates in the transaction
            Context.SaveChanges()
        department.DNAME = "TEST"
           'This call also participates in the transaction
           context.SaveChanges();
           'Replace the flag condition with the one you need
           'or remove it and leave only commit part
           if(flag)
           {
              'transaction completed successfully, both calls succeeded
              transaction.Commit()
           }
           else
           {
              'something is wrong, both calls are rolled back
              transaction.Rollback()
           }
        }

The transaction is opened on database connection, and SaveChanges are added to this transaction.

You can use TransactionScope as another approach (our solutions have implementation of the TransactionScope for Oracle, MySQL and PostgreSQL database servers). It can be used both as a local transaction replacement and as a wrapping transaction for the local SaveChanges.

The TransactionScope ensures that changes to objects in the object context are coordinated with a message queue. Object Services use this transaction when it saves changes to the database. When an UpdateException occurs, the operation is retried up to two times. The changes in the object context are accepted when the operation succeeds. See Managing Transactions in Object Services for more information.

A TransactionScope object has three options:

  1. Join the ambient transaction, or create a new one if one does not exist (Required).
  2. Be a new root scope, that is, start a new transaction and have that transaction be the new ambient transaction inside its own scope (RequiresNew).
  3. Not take part in a transaction at all. There is no ambient transaction as a result (Suppress).

The following code displays the RequiresNew usage.

[C#]

        DEPT department = context.DEPT.Where(d => d.DEPTNO == 25).First();
        department.DNAME = "xxx";
        using (TransactionScope tscope = new TransactionScope(TransactionScopeOption.RequiresNew))
        {
           //a new transaction will be created for this call
           context.SaveChanges();
           tscope.Complete();
        }

[Visual Basic]

        Dim department As Dept = Context.Depts.Where(Function(ByVal d As Dept) d.DEPTNO = 25).First()
    department.Dname = "xxx"
    Using TScope As New TransactionScope(TransactionScopeOption.RequiresNew)
       'a new transaction will be created for this call
        Context.SaveChanges()
            TScope.Complete()
    End Using

You can find more information about Transactions in MSDN.


Generating Database from Model

Entity Framework v4, v5, and v6 allow you to use Model First feature to generate database, and the SSDL, and MSL. In this article we consider how to use this functionality.

Note that this functionality is not supported in Entity Framework Core.

This feature provides a possibility to start from a conceptual model and then to generate the other parts of the EDM (Entity Data Model) and the database. Create Database from Model wizard can be used for database generation from an Entity Data Model in Visual Studio 2010 - 2015.

Entity Framework workflow for DDL generating from CSDL includes two actions. The first one generates SSDL and MSL from CSDL. It is common for all providers and cannot be customized independently. The second action is specific to Entity Framework provider and can be modified for specific DBMS.

Devart offers additional templates for database script generation.

The following steps will guide you through database generation wizard:

  1. Create an EF model. The given example shows a CRM_DEMO schema.
    Entity Framework model
  2. Select a corresponding template in the model properties window. Then right-click on the diagram and run the Create Database from Model wizard by choosing Generate Database from Model from the popup menu.
    generating database from model
    3. Note Note:
    The default schema name for Microsoft SQL Server database is "dbo". Don't forget to change it to the necessary one before the code generation.
  3. Here is a DDL script generated for the current model.
    Generate Database Wizard - Summary and Settings

As a result of these steps you will obtain a valid database-specific DDL script. You can run this script against your database to create a valid database schema.

Please also note that dotConnect for PostgreSQL goes with its own ORM designer - Entity Developer. It provides advanced Model First support and a number of other features, not available in Visual Studio EDM designer.

See Also

Entity Framework | Entity Framework Tutorial


Entity Framework Spatials

This section is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

This section describes support for Entity Framework spatials in dotConnect for PostgreSQL.

  • Spatials Overview
  • Choosing Spatial Service
  • Spatial Options
  • DbGeometry/DbGeography Support in Spatial Services


Spatials Overview

This topic is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

In PostgreSQL, the 'geometry' and 'geography' PostGIS data types are used to represent spatials. Entity Framework 5 uses DbGeometry and DbGeography types from the System.Data.Entity.dll assembly for this purpose (.NET Framework 4.5). Entity Framework 6 uses DbGeometry and DbGeography types from the EntityFramework.dll (.NET Framework 4.0 and .NET Framework 4.5).

When using XML mapping spatial types are mapped in the following way in edmx/edml files:

PostGIS data types | SSDL | CSDL | .NET
geometry | spatial_geometry | Geometry, GeometryCollection, GeometryLineString, GeometryMultiLineString, GeometryMultiPoint, GeometryMultiPolygon, GeometryPoint, GeometryPolygon | DbGeometry
geography | spatial_geography | Geography, GeographyCollection, GeographyLineString, GeographyMultiLineString, GeographyMultiPoint, GeographyMultiPolygon, GeographyPoint, GeographyPolygon | DbGeography

dotConnect for PostgreSQL supports PostGIS 2.0 or higher.

See Also

Choosing Spatial Service


Choosing Spatial Service

This topic is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

A spatial service is used for reading spatial objects from the database, saving objects to database, working with static and instance methods and properties of the DbGeometry and DbGeography classes.

Spatial Services, Provided by dotConnect for PostgreSQL

NetTopologySuite

The NetTopologySuiteSpatialService class is used. It uses NetTopologySuite library.

Provider value is a NetTopologySuite object, which can be used with third-party libraries that support NetTopologySuite (like SharpMap v1 and higher).

This service requires NetTopologySuite.dll, GeoAPI.dll, and PowerCollections.dll assemblies from the NetTopologySuite project website.

Well-Known Text (WKT)

PgSqlWktSpatialService class is used. Provider value is a WKT representation (string), which can be used with third-party libraries that support WKT.

Extended Well-Known Text (EWKT)

PgSqlExtendedWktSpatialService class is used. Provider value is a EWKT (WKT with SRID specified) representation (string), which can be used with third-party libraries that support EWKT.

Well-Known Binary (WKB)

PgSqlWkbSpatialService class is used. Provider value is a WKB representation (byte[]), which can be used with third-party libraries that support WKB.

WKB data is compact, so it generates less traffic than WKT or EWKT.

Spatial Service Comparison

Spatial service | DbGeometry and DbGeography | SRID | WellKnownValue support1 | Stored procedures and functions
 |  |  |  | In params and function return value | Out / InOut params
NetTopologySuite | Yes 2 | Yes | Yes | Yes | No
Well-Known Text (WKT) | No 3 | No 4 | Yes | Yes | No
Extended Well-Known Text (EWKT) | No 3 | Yes | Yes | Yes | No
Well-Known Binary (WKB) | No 3 | No 4 | Yes | Yes | No

1 DbGeometryWellKnownValue and DbGeographyWellKnownValue data types support (data contract serializable representation of a DbGeometry/DbGeography values).

2 Most features are supported, but not all of them.

3 Minimal feature set is supported. See details in the DbGeometry/DbGeography Support in Spatial Services topic.

4 When persisting data to the database, default SRID values from the GeometryDefaultSrid and GeographyDefaultSrid settings are used. When retrieving SDO_GEOMETRY data from the database, its WKT/WKB representation is retrieved, and SRID is ignored.

See the Spatial Service Type topic to get more information on specifying which spatial service to use.

See Also

Default SRID | Spatial Service Type | Area and Distance Units


Spatial Options

This section is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

This section describes Entity Framework provider settings for Entity Framework spatials in dotConnect for PostgreSQL.

  • Spatial Service Type
  • Default SRID
  • Area and Distance Units


Spatial Service Type

This topic is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

The spatial service used is specified in the SpatialServiceType property.

[C#]

var config = PgSqlEntityProviderConfig.Instance;
config.SpatialOptions.SpatialServiceType = SpatialServiceType.NetTopologySuite;

[Visual Basic]

Dim config = PgSqlEntityProviderConfig.Instance
config.SpatialOptions.SpatialServiceType = SpatialServiceType.NetTopologySuite

Setting this property is enough to use spatials. You can omit setting other options related to spatials.

Alternatively, you may specify the spatial service to use in the project config file. For this, you need to update or add the configSections element like it is described in the Entity Framework Provider Configuration section and then add the following Devart.Data.PostgreSql.Entity tag to the configuration tag:

 <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
  <SpatialOptions SpatialServiceType="NetTopologySuite" />
 </Devart.Data.PostgreSql.Entity>

Note: If you need to set multiple Entity Framework provider options for dotConnect for PostgreSQL, don't add multiple Devart.Data.PostgreSql.Entity tags. Specify all settings in one Devart.Data.PostgreSql.Entity tag.

See Also

Default SRID | Choosing Spatial Service | Area and Distance Units | DbGeometry/DbGeography Support in Spatial Services


Default SRID

This topic is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

When creating DbGeometry / DbGeography using such static methods as FromText(String), FromBinary(Byte[]), FromGml(String), the default SRID values are used.

User can set these default values with the GeometryDefaultSrid and GeographyDefaultSrid settings.

[C#]

var config = PgSqlEntityProviderConfig.Instance;
config.SpatialOptions.GeometryDefaultSrid = 0; // this is the default value
config.SpatialOptions.GeographyDefaultSrid = 4326; // this is the default value

[Visual Basic]

Dim config = PgSqlEntityProviderConfig.Instance
config.SpatialOptions.GeometryDefaultSrid = 0
' this is the default value
config.SpatialOptions.GeographyDefaultSrid = 4326
' this is the default value

Alternatively, you may specify the default SRID values in the project config file. For this, you need to update or add the configSections element like it is described in the Entity Framework Provider Configuration section and then add the following Devart.Data.PostgreSql.Entity tag to the configuration tag:

 <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
  <SpatialOptions GeometryDefaultSrid="0" GeographyDefaultSrid="4326" />
 </Devart.Data.PostgreSql.Entity>

Note: If you need to set multiple Entity Framework provider options for dotConnect for PostgreSQL, don't add multiple Devart.Data.PostgreSql.Entity tags. Specify all settings in one Devart.Data.PostgreSql.Entity tag.

dotConnect for PostgreSQL also provides the following additional settings that control the use of default SRID values:

  • config.SpatialOptions.AlwaysUseGeometryDefaultSrid - forces the provider to always use the config.SpatialOptions.GeometryDefaultSrid value instead of reading the actual SRID for the DbGeometry spatial from the database. Default value is false.
  • config.SpatialOptions.AlwaysUseGeographyDefaultSrid - forces the provider to always use the config.SpatialOptions.GeographyDefaultSrid value instead of reading the actual SRID for the DbGeometry spatial from the database. Default value is false.

Enabling these options may be useful for EWKT and NetTopologySuite spatial services in case all the database objects have the same SRID value as it may increase performance of working with spatial data. It also reduces traffic a bit for all databases, which is useful when materializing a large number of spatial objects.

See Also

Choosing Spatial Service | Area and Distance Units


Area and Distance Units

Some PostgreSQL functions accept an additional argument "unit", that allows setting measurement unit for function result. Particularly this applies to the functions, returning the length of an object, distances between objects, and area of objects.

DbGeometry/DbGeography classes have their own methods to get these values (Length, Area, and Distance), however they cannot use this PostgreSQL-specific feature of selecting measurement units directly.

User can specify the necessary measurement units with GeometryDistanceUnit / GeographyDistanceUnit and GeometryAreaUnit / GeographyAreaUnit settings. The default values of these settings are DistanceMeasurementUnit.Default and AreaMeasurementUnit.Default.

[C#]

var config = PgSqlEntityProviderConfig.Instance;
config.SpatialOptions.GeometryDistanceUnit = DistanceMeasurementUnit.Meter;
config.SpatialOptions.GeographyDistanceUnit = DistanceMeasurementUnit.Mile;
config.SpatialOptions.GeometryAreaUnit = AreaMeasurementUnit.SquareKilometer;
config.SpatialOptions.GeographyAreaUnit = AreaMeasurementUnit.Acre;

[Visual Basic]

Dim config = PgSqlEntityProviderConfig.Instance
config.SpatialOptions.GeometryDistanceUnit = DistanceMeasurementUnit.Meter
config.SpatialOptions.GeographyDistanceUnit = DistanceMeasurementUnit.Mile
config.SpatialOptions.GeometryAreaUnit = AreaMeasurementUnit.SquareKilometer
config.SpatialOptions.GeographyAreaUnit = AreaMeasurementUnit.Acre

Alternatively, you may specify measurement units in the project config file. For this, you need to update or add the configSections element like it is described in the Entity Framework Provider Configuration section and then add the following Devart.Data.PostgreSql.Entity tag to the configuration tag:

 <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
  <SpatialOptions
    GeometryDistanceUnit="Meter"
    GeographyDistanceUnit="Mile"
    GeometryAreaUnit="SquareKilometer"
    GeographyAreaUnit="Acre" />
 </Devart.Data.PostgreSql.Entity>

Note: If you need to set multiple Entity Framework provider options for dotConnect for PostgreSQL, don't add multiple Devart.Data.PostgreSql.Entity tags. Specify all settings in one Devart.Data.PostgreSql.Entity tag.

The following measurement units are available:

DistanceMeasurementUnit:

  • Default (default unit is meter)
  • Meter
  • Kilometer
  • Mile
  • NauticalMile
  • Yard
  • Foot

AreaMeasurementUnit:

  • Default (default unit is square meter)
  • SquareMeter
  • SquareKilometer
  • SquareMile
  • SquareYard
  • SquareFoot
  • Acre
  • Hectare

See Also

Choosing Spatial Service | Default SRID


DbGeometry/DbGeography Support in Spatial Services

This topic is applicable to Entity Framework v5 and v6. It is not applicable to Entity Framework Core, which does not support spatials.

The following table demonstrates which properties and methods of DbGeometry and DbGeography are supported by available spatial services:

Method/Property |  |  | Spatial service
Name | DbGeometry | DbGeography | NetTopologySuite1 | WKT | EWKT | WKB
Instance Properties
Area | √ | √ | Yes | No | No | No
Boundary | √ | – | Yes | No | No | No
Centroid | √ | – | Yes | No | No | No
ConvexHull | √ | – | Yes | No | No | No
CoordinateSystemId | √ | √ | Yes | Yes 2 | Yes | Yes 2
Dimension | √ | √ | Yes | No | No | No
ElementCount | √ | √ | Yes | No | No | No
Elevation | √ | √ | Yes | No | No | No
EndPoint | √ | √ | Yes | No | No | No
Envelope | √ | – | Yes | No | No | No
ExteriorRing | √ | – | Yes | No | No | No
InteriorRingCount | √ | – | Yes | No | No | No
IsClosed | √ | √ | Yes | No | No | No
IsEmpty | √ | √ | Yes | No | No | No
IsRing | √ | – | Yes | No | No | No
IsSimple | √ | – | Yes | No | No | No
IsValid | √ | – | Yes | No | No | No
Latitude | – | √ | Yes | No | No | No
Length | √ | √ | Yes | No | No | No
Longitude | – | √ | Yes | No | No | No
Measure | √ | √ | Yes | No | No | No
PointCount | √ | √ | Yes | No | No | No
PointOnSurface | √ | – | Yes | No | No | No
ProviderValue | √ | √ | Yes | Yes | Yes | Yes
SpatialTypeName | √ | √ | Yes | No | No | No
StartPoint | √ | √ | Yes | No | No | No
WellKnownValue | √ | √ | Yes | Yes | Yes | Yes
XCoordinate | √ | – | Yes | No | No | No
YCoordinate | √ | – | Yes | No | No | No
Instance Methods
AsBinary | √ | √ | Yes | No | No | Yes
AsGml | √ | √ | Yes | No | No | No
StartPoint | √ | √ | Yes | No | No | No
AsText | √ | √ | Yes | Yes | Yes | No
Buffer | √ | √ | Yes | No | No | No
Contains | √ | – | Yes | No | No | No
Crosses | √ | – | Yes | No | No | No
Difference | √ | √ | Yes | No | No | No
Disjoint | √ | √ | Yes | No | No | No
Distance | √ | √ | Yes | No | No | No
ElementAt | √ | √ | Yes | No | No | No
InteriorRingAt | √ | – | Yes | No | No | No
Intersection | √ | √ | Yes | No | No | No
Intersects | √ | √ | Yes | No | No | No
Overlaps | √ | – | Yes | No | No | No
PointAt | √ | √ | Yes | No | No | No
Relate | √ | – | Yes | No | No | No
SpatialEquals | √ | √ | Yes | No | No | No
SymmetricDifference | √ | √ | Yes | No | No | No
Touches | √ | – | Yes | No | No | No
Union | √ | √ | Yes | No | No | No
Within | √ | – | Yes | No | No | No
Static Methods
FromBinary(Byte[]) | √ | √ | Yes | No | No | Yes
FromBinary(Byte[], Int32) | √ | √ | Yes | No | No | No
FromGml(String) | √ | √ | Yes | No | No | No
FromGml(String, Int32) | √ | √ | Yes | No | No | No
FromText(String) | √ | √ | Yes | Yes | Yes | No
FromText(String, Int32) | √ | √ | Yes | No | No | No
GeometryCollectionFromBinary | √ | √ | Yes | No | No | No
GeometryCollectionFromText | √ | √ | Yes | No | No | No
LineFromBinary | √ | √ | Yes | No | No | No
LineFromText | √ | √ | Yes | No | No | No
MultiLineFromBinary | √ | √ | Yes | No | No | No
MultiLineFromText | √ | √ | Yes | No | No | No
MultiPointFromBinary | √ | √ | Yes | No | No | No
MultiPointFromText | √ | √ | Yes | No | No | No
MultiPolygonFromBinary | √ | √ | Yes | No | No | No
MultiPolygonFromText | √ | √ | Yes | No | No | No
PointFromBinary | √ | √ | Yes | No | No | No
PointFromText | √ | √ | Yes | No | No | No
PolygonFromBinary | √ | √ | Yes | No | No | No
PolygonFromText | √ | √ | Yes | No | No | No

1 The Yes mark in the NetTopologySuite column does not mean the feature is completely supported. It means that NetTopologySuite declares support for it, and it is used by our NetTopologySuite spatial service. However, this feature may not be implemented for some types and cases in the NetTopologySuite library.

2 WKT and WKB spatial services always return config.SpatialOptions.GeometryDefaultSrid for DbGeometry and config.SpatialOptions.GeographyDefaultSrid for DbGeography as CoordinateSystemId.

See Also

Choosing Spatial Service


Entity Framework Provider Configuration

Entity Framework support features can be configured either in code using Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfig class or in the project .config file. The PgSqlEntityProviderConfig class is available in the Devart.Data.PostgreSql.Entity.dll assembly. For example, this code is used to enable batch updates feature:

[C#]

PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;
config.DmlOptions.BatchUpdates.Enabled = true;

[Visual Basic]

Dim Config As PgSqlEntityProviderConfig
Config = PgSqlEntityProviderConfig.Instance
Config.DmlOptions.BatchUpdates.Enabled = True

To configure Entity Framework provider with a config file, you need to add the following section to the configSections tag:

<configSections>
  <section name="Devart.Data.PostgreSql.Entity"
  type="Devart.Data.PostgreSql.Entity.Configuration.PgSqlEntityProviderConfigurationSection,
  Devart.Data.PostgreSql.Entity.EF[Version], Version=7.1.26.0, Culture=neutral,
  PublicKeyToken=09af7300eec23701" />
</configSections>

Where [Version] is the version of the Entity Framework used. For Entity Framework v1 it is "1", for Entity Framework v4 it is "4", for Entity Framework v5 and v6 it is "5" or "6" respectively. For Entity Framework Core it is "Core".

If there is no configSections element in your config file, add it. It must be the first element. If it's not the first element, your application will throw an error when starting.

Then add the following element to the configuration tag:

 <Devart.Data.PostgreSql.Entity xmlns="http://devart.com/schemas/Devart.Data.PostgreSql.Entity/1.0">
 </Devart.Data.PostgreSql.Entity>

And use the following elements of the Devart.Data.PostgreSql.Entity tag to configure Entity Framework provider.

  • DmlOptions
  • QueryOptions
  • SqlFormatting
  • CodeFirstOptions
  • Workarounds
  • DatabaseScript

For more details on using PgSqlEntityProviderConfig class or configuring Entity Framework provider with a config file see the following topics:

  • DML Options
  • Batch Updates
  • Query Options
  • SQL Formatting
  • Code First Options
  • Additional Options
  • Database Script Generation Settings


DML Options

To increase a configurability of dotConnect for PostgreSQL as Entity Framework provider and provide more flexibility in behavior, we have added a number of DML options that influence the INSERT/UPDATE/DELETE commands and stored procedure calls.

Currently this feature is not yet supported for Entity Framework Core. It is supported only for Entity Framework v1 - v6.

Except for the batch updates settings, which are described in the Batch Updates topic, the list of DML options includes:

  • ReuseParameters - enables reusing existing parameters instead of creating new ones. For example, if the batch contains 30 INSERT statements, inserting the number 1024, one :p1 parameter will be used instead of creating 30 :p1 - :p30 parameters. Set this property to true only if a large number of the same values is sent to the database. Otherwise, it may even cause performance loss, if there are many parameters in a batch.
  • ParametersAsLiterals - determines if parameter values are inserted into SQL statements as literals instead of parameters. This behaviour is implemented in Connector .NET and can improve performance a bit in some rare cases.

  • InsertNullBehaviour. NULL values can be inserted in different ways. This configuration property allows the developer to determine the behaviour suitable for his particular application. Here is the list of possible alternatives:

    • InsertNull. In this case NULLs are inserted explicitly (for each column that do not have a non-NULL value specified) like in the following example:

      INSERT INTO "Company"
  ("CompanyID","CompanyName","Web","Email","Address_AddressTitle","Address_Address",
  "Address_City","Address_Region","Address_PostalCode","Address_Country",
  "Address_Phone","Address_Fax","PrimaryContact_ContactID","PersonContact_ContactID")
VALUES
  (:p0,:p1,:p2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL)

    • Omit. In this case provider simply omits all columns that do not have non-NULL values like in the following example:

      INSERT INTO "Company"("CompanyID","CompanyName","Web")VALUES(:p0,:p1,:p2)
    • InsertDefaultOrNull. In this case provider determines if there is a default value specified in the SSDL part of the model, and if it is available, this value is persisted to the database. If there is no default value specified, the behaviour is identical to the InsertNull one.
    • InsertDefaultOrOmit. In this case provider determines if there is a default value specified in the SSDL part of the model as well. However, if there is no default value specified for a column, it is omitted from the INSERT command completely.
  • EmptyUpdates. When set to false, the provider turns off the generation of fake updates for parent entities. The default value is true.

Please note that the last two options work with both common DefaultValue SSDL attribute and the new custom devart:DefaultValue SSDL attribute. The latter attribute does not trigger the type consistency check, so you can use a wider range of default values, like CURRENT_TIMESTAMP or my_sequence.nextval.

Here is a simple example:

<Property Name="ProductID" Type="int" Nullable="false"
devart:DefaultValue="my_sequence.nextval" StoreGeneratedPattern="Identity" />

The generated SQL command looks like the following:

INSERT INTO "Product"
  ("ProductID","ProductName","UnitScale","InStock","Price","DiscontinuedPrice")
  VALUES(my_sequence.nextval,:p0,:p1,:p2,:p3,:p4)

These options can be set either in code as the properties of the EntityProviderConfig.DmlOptions object or in the project config file as the attributes of the DmlOptions element of the Devart.Data.PostgreSql.Entity tag.

The example code that enables the ReuseParameters option:

[C#]

PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;
config.DmlOptions.ReuseParameters = true;

[Visual Basic]

Dim Config As PgSqlEntityProviderConfig
Config = PgSqlEntityProviderConfig.Instance
Config.DmlOptions.ReuseParameters = True

If the InsertNullBehaviour is set to InsertNullBehaviour.InsertDefaultOrNull or InsertNullBehaviour.InsertDefaultOrOmit, and the column has DefaultValue, then the following rules are applied when executing INSERT:

  • For Primary Key columns, DefaultValue is always inserted.
  • For a column with StoreGeneratedPattern, DefaultValue is always inserted too.
  • For a nullable column without StoreGeneratedPattern, if the value is not NULL, then this value is inserted, otherwise, the DefaultValue is inserted.
  • For a not null column without StoreGeneratedPattern of .NET reference type (string, byte[]), if the value is not NULL, then this value is inserted, otherwise, the DefaultValue is inserted.
  • For a not null column of value type (Int32, DateTime, etc) without StoreGeneratedPattern, the value cannot be NULL, so this value is inserted.


Batch Updates

By default Entity Framework updates data one statement at a time. dotConnect for PostgreSQL allows grouping several INSERT/UPDATE/DELETE statements into one SQL block and merging their parameters. Now, instead of sending each DML statement separately, SaveChanges generates and executes statement batches. It increases SaveChanges performance substantially because of reducing number of server calls. This feature is called Batch Updates.

Currently this feature is not yet supported for Entity Framework Core. It is supported only for Entity Framework v1 - v6.

Note that in situations when other applications significantly load the database server, you will get even more performance gain with batch updates, because they reduce the number of database server calls.

Batch Updates Settings

Batch Updates are configured with a number of parameters either in code with the PgSqlEntityProviderConfig class or in the project config file as the attributes of the BatchUpdates element of the DmlOptions tag.

  • Enabled - enables batch updates. If set to false (the default value), other Batch Updates settings are ignored.
  • BatchSize - specifies the maximal number of commands in a batch. Optimal batch size is different for each specific case and DBMS, however, the default value 30 provides good enough results in most cases. If this property is set to 0, all commands will be encapsulated in one batch. In this case, the performance goes down, and DBMS will probably fail with an error because of the too large command size.

  • AsynchronousBatch - determines whether batches are executed asynchronously (false by default), or a new batch will be created and executed only after the successful execution of the previous batch. It is recommended to enable asynchronous batch execution when the batch size is large. If the batch size is small, the performance gain is compensated by synchronization costs. However, if the batch size is too large, the performance gain will not be significant. To conclude: BatchSize should be large enough to take some time to execute, and small enough not to make the main thread wait for the background thread for too long.

    Activating asynchronous batch execution makes sense only if your application will be run on multiple-core processors. On single-core processors asynchronous batch execution provides even less performance than synchronous one.

For example, this code is used to enable batch updates:

[C#]

PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;
config.DmlOptions.BatchUpdates.Enabled = true;

[Visual Basic]

Dim Config As PgSqlEntityProviderConfig
Config = PgSqlEntityProviderConfig.Instance
Config.DmlOptions.BatchUpdates.Enabled = True

Batch Updates Limitations

TransactionScope cannot be used with batch updates. When using batch updates, concurrency check is not performed. However, you may still enable concurrency check as it is described above.

Some statements cannot be united into batches. When such a statement is encountered, the batch with previously added commands is executed immediately, then this statement is executed separately.

The following statements cannot be united into batches:

  • Statements with the RETURNING clause, for example, statements that update or insert entities with columns having the StoreGeneratedPattern attribute value set to Identity or Computed.
  • Calls of stored procedures or functions that have non-empty CommandText.


Query Options

dotConnect for PostgreSQL has some options that customize translating LINQ to Entities to SQL statements. The list of these options includes:

  • NoEscapeLike - allows disabling ESCAPE in LIKE expression. The default value is false.
  • CaseInsensitiveLike - allows using case insensitive comparison mode, when translating LINQ to Entities extension methods .Contains(), .EndsWith(), .StartsWith(). The default value is false.

  • NewGuidGenerationMethod. Determines which method to use for GUID generation when translating the NewGuid Entity Framework canonical function. This option can have the following values:

    • Default. In this case GUIDs are generated using a specific SQL expression. PostgreSQL uuid-ossp functions are not used.

    • UuidGenerateV1. In this case the uuid_generate_v1() PostgreSQL function is used. This function generates a version 1 UUID. Note that generation involves the MAC address of the computer and a time stamp, and thus, may reveal the identity of the computer that created the GUID and the time of the generation.

    • UuidGenerateV1mc. In this case the uuid_generate_v1mc() PostgreSQL function is used. It generates a version 1 UUID using a random multicast MAC address instead of the real MAC address of the computer.
    • UuidGenerateV4. In this case the uuid_generate_v4() PostgreSQL function is used. This function generates a version 4 UUID, derived entirely from random numbers.

  • OrderByNullBehavior. Determines how NULL values will participate in sorting (whether to add NULLS FIRST or NULLS LAST to the ORDER BY clause of generated SQL queries). This option can have the following values:

    • Default. In this case neither NULLS FIRST nor NULLS LAST is added to the generated ORDER BY clauses.

    • NullsFirst . In this case NULLS FIRST is added to the generated ORDER BY clauses.

    • NullsLast. In this case NULLS LAST is added to the generated ORDER BY clauses.
  • UseCSharpNullComparisonBehavior - allows performing NULL checks when comparing a property (column) with a value (parameter) in LINQ to Entities. The default value is false.

These options can be set either in code as the properties of the EntityProviderConfig.QueryOptions object or in the project config file as the attributes of the QueryOptions element of the Devart.Data.PostgreSql.Entity tag.


SQL Formatting

dotConnect for PostgreSQL includes settings for disabling code formatting. This reduces the size of generated SQL statements a bit. The formatting can be completely enabled or disabled using the PgSqlEntityProviderConfig.SqlFormatting.Enable() or PgSqlEntityProviderConfig.SqlFormatting.Disable() methods respectively. More specific settings are available as well:

  • ColumnListStacking - disables inserting new lines in the SELECT list. If set to true, the list looks like the following:

    SELECT
"Extent1"."CompanyID",
"Extent1"."CompanyName",
"Extent1"."Web",
"Extent1"."Email",
"Extent1"."Address_AddressTitle",
"Extent1"."Address_Address",
"Extent1"."Address_City",
...

    instead of

    SELECT "Extent1"."CompanyID", "Extent1"."CompanyName", "Extent1"."Web", "Extent1"."Email", "Extent1"."Address_AddressTitle", "Extent1"."Address_Address", "Extent1"."Address_City", ...
  • ExtraSpaces - determines whether to insert spaces between operators and operands and after commas.
  • Indenting - determines whether to indent keywords in multi-line queries.
  • MultilineStatements - determines whether to split statements to several lines.

These options can be set either in code as the properties of the EntityProviderConfig.SqlFormatting object or in the project config file as the attributes of the SqlFormatting element of the Devart.Data.PostgreSql.Entity tag.


Code First Options

dotConnect for PostgreSQL includes settings for configuring DDL generation in Entity Framework Code First. The following settings are available.

  • RemoveSchemaFromDefaultConstraintName - When set to true, the schema (database) name prefix is removed from default constraint names (primary keys, foreign keys) generated by Code-First Migrations. Default value is true.

  • AddTableNameInDefaultIndexName - When set to true, the table name is added to default index name generated by Code-First Migrations (like 'IX_TableName_ColumnName'). When set to false, then default index names will be like 'IX_ColumnName'. Default value is true.
  • TruncateLongDefaultNames - When set to true, long default names of indexes, primary keys, and foreign keys generated by Code-First Migrations will be truncated if they exceed the limit of 63 characters. This option does not affect the truncation of long default names generated by Code-First CreateDatabase() and DropDatabase() functionality. They are always truncated if they exceed the limit of 63 characters. However it affects the algorithm of this truncation and renaming of these identifiers. When it is set to true, the names of these identifiers are identical both in Code-First CreateDatabase() and in Code-First Migrations. Default value is false.

These options can be set either in code as the properties of the EntityProviderConfig.CodeFirstOptions object or in the project config file as the attributes of the CodeFirstOptions element of the Devart.Data.PostgreSql.Entity tag.


Additonal Options

One of the most sophisticated issues with supporting Entity Framework is to accommodate the peculiarities of different DBMS, because Entity Framework is the easiest to use with Microsoft SQL Server. Some of the conflicts may be resolved with the following options, which can be set as the properties from the Workarounds class or in the config file as the attributes of the Workarounds element of the Devart.Data.PostgreSql.Entity tag.:

IgnoreSchemaName

Default value is false. When set to true, this property makes provider remove the schema (database) name from all commands and queries, no matter whether Schema is specified in the model or not. A command will use the schema from the connection.

This workaround is very useful in EF 4.1 Code First, since the "dbo" schema is set by default (like in SQL Server), and writing either attribute-based or fluent mapping is rather a time-consuming task. This functionality is useful in case of the Model or Database First approach as well. If the production and testing schemas have identical structure, it is enough to use this workaround, and no manual Schema replacing or removing is necessary in this case.

IgnoreDboSchemaName

Default value is true for Entity Framework 4.3 Code-First Migrations. When set to true, this property makes provider remove the "dbo" schema (database) name from all commands and queries. A command will use the schema from the connectio n.

Unlike the previous option, it allowsyou to explicitly specify a schema name other than "dbo" for tables.

DisableQuoting

Default value is false. This property allows the user to disable quoting all identifiers in all queries and commands.

The example code that disables quoting:

[C#]

PgSqlEntityProviderConfig config = PgSqlEntityProviderConfig.Instance;
config.Workarounds.DisableQuoting = true;

[Visual Basic]

Dim Config As PgSqlEntityProviderConfig
Config = PgSqlEntityProviderConfig.Instance
Config.Workarounds.DisableQuoting = True


Database Script Generation Settings

dotConnect for PostgreSQL allows configuring creating and deleting database objects in the CreateDatabase() and DeleteDatabase() methods. These customizations are rather useful for the Code First approach. You can tweak the behaviour of the methods using the PgSqlEntityProviderConfig.DatabaseScript.Schema and PgSqlEntityProviderConfig.DatabaseScript.ForeignKey classes.

  • DeleteDatabaseBehaviour. This enumeration determines the behavior of the DeleteDatabase() function.

    • ModelObjectsOnly - this is the default value. Only the tables that model objects are mapped to are created/deleted.
    • AllSchemaObjects - all tables will be created/deleted from schemas or databases that model objects were mapped to.

    • Schema - entire schema, containing model objects, is created/deleted. If the model contains objects from other schemas, these schemas will be created/deleted as well.

      Note that if there are model objects, mapped to database objects in other schemas, these schemas are created/deleted only when using the following database initialization strategies: CreateDatabaseIfNotExists, DropCreateDatabaseIfModelChanges, DropCreateDatabaseAlways or when explicitly using the CreateDatabase()/DeleteDatabase() methods of the ObjectContext class or the Database class that is used with DbContext instead of using a database initialization strategy. If you use the MigrateDatabaseToLatestVersion database initialization strategy, you need to generate a code-based migration and add SQL commands for creating/deleting necessary schemas using the Sql() method of the DbMigration class.

      If several schemas are specified in the Schema connection string parameter, all of these schemas are created/deleted.

    • Database - the entire database is deleted when calling DeleteDatabase(). When calling CreateDatabase(), dotConnect for PostgreSQL tries to create the database. The user must have enough privileges for these actions (for example, by default, postgres user has such privileges). If several schemas are specified in the Schema connection string parameter, all of these schemas are created/deleted.
  • AuthorizationUsername - set the authorization user name.

PgSqlEntityProviderConfig.DatabaseScript.ForeignKey Settings

  • Enabled. Turns on/off generation of foreign constraints. The default value is true.
  • IndexCreation. When set to true, an index is created for the columns being parts of the foreign key. The default value is true.


LinqConnect

This section describes LinqConnect, formerly known as LINQ to PostgreSQL, in dotConnect for PostgreSQL.

  • Devart LinqConnect
  • LinqConnect Tutorial
  • LinqConnect Data Type Mapping
  • Working with Transactions in LinqConnect


Devart LinqConnect

LinqConnect is the fast and lightweight ORM solution, which is closely compatible to Microsoft LINQ to SQL and contains its own advanced features, such as complex type support, advanced data fetching options, configurable compiled query caching, and others. LinqConnect is integrated into dotConnect for Oracle, dotConnect for MySQL, dotConnect for PostgreSQL, and dotConnect for SQLite.

LinqConnect includes run time assemblies to be used directly by your code, and a visual tool - Entity Developer, which helps you build object-relational model from scratch or by reverse-engineering your database.

The article consists of the following sections:

  • What is LINQ?
  • Why Use LinqConnect?
  • Key Features
  • Visual Model Creation
  • Feature Information

What is LINQ?

LINQ stands for Language-Integrated Query, which means that data retrieval is no longer a separate language. The LINQ engine allows .NET applications to connect to databases without bothering much about columns and rows. The data you receive is automatically formed as objects ready to use by your business logic.

LINQ to Relational Data may be thought of as an object-relational mapping (ORM) tool. The type-safe LINQ queries get compiled into MSIL on the fly, and the query clauses are translated into SQL and sent to PostgreSQL server for execution. This makes your data access layer safer, faster, and greatly more convenient to design.

Why Use LinqConnect?

Let's briefly enumerate just four main reasons to use LinqConnect in your applications:

  • Development time: it is really faster, having stripped off better part of the mundane work.
  • Maintenance time and effort: greatly designed application does not need as much maintenance as a poorly written one.
  • Performance: high enough without lots of efforts on optimizing your code. Even higher if you bother to do so.
  • Security: LINQ to SQL enforces good application architecture, which leaves less room for design vulnerabilities.

Key Features

  • Interchangeable with Microsoft LINQ to SQL
  • Wide support for LINQ capabilities
  • Wide database support
  • High performance
  • Visual schema modelling with Entity Developer
  • Visual Studio integration
  • POCO classes used (no need to use a common base class)
  • Full CRUD (Create, Retrieve, Update, Delete) support
  • Batch updates
  • PLINQ support
  • ASP.NET Dynamic Data support
  • Change tracking support
  • Inheritance mapping (Table per hierarchy, Table per type)
  • Metadata mapping
  • Well-thought predefined templates for class generation
  • Custom templates for generated classes
  • Visual Studio debugger visualizer for DataQuery objects
  • Query logging
  • dbMonitor support

Visual Model Creation

LinqConnect includes a powerful visual tool for creating entity model that describes your business objects and their mapping to the database. You can design the model from scratch or reverse-engineer an existing database, in which case you will have the classes and the relations with just several clicks.

Screenshot Entity Developer

Entity Developer generates the classes in C# or Visual Basic. These classes (the model) is used by your application code.

Feature Information

Requirements

LinqConnect requires .NET Framework 3.5 or later installed on the computer.

Documentation And Samples

LinqConnect includes that covers LinqConnect usage and run time reference.

For a quick start with the technology you can use LinqConnect Tutorial.

There are three demo projects in C# and Visual Basic that can help you start using LinqConnect. Use Start menu to open them.

Discussion Forum

LinqConnect has a dedicated forum where you can get help on using the technology within Devart dotConnects.

See Also

| LINQ to PostgreSQL Tutorial | ADO.NET Entity Framework Support


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

LinqConnect Tutorial

This tutorial guides you through the process of creating a simple application powered by LinqConnect (formerly LINQ to PostgreSQL) technology. In less than 5 minutes you will have a ready-to-use data access layer for your business objects.

In this walkthrough:

  • Introducing the LinqConnect Technology
  • Requirements
  • Preparing the Project
  • Generating Model from Database
  • Querying Data
  • Inserting New Data
  • Updating Data
  • Deleting Data
  • Additional Information

Introducing the LinqConnect Technology

LinqConnect is the fast and lightweight ORM solution, which is closely compatible to Microsoft LINQ to SQL and contains its own advanced features, such as complex type support, advanced data fetching options, configurable compiled query caching, and others.

LINQ stands for Language-Integrated Query, which means that data retrieval is no longer a separate language. The LINQ engine allows .NET applications to connect to databases without bothering much about columns and rows. The data you receive is automatically formed as objects ready to use by your business logic.

LINQ to Relational Data may be thought of as an object-relational mapping (ORM) tool. The type-safe LINQ queries get compiled into MSIL on the fly, and the query clauses are translated into SQL and sent to PostgreSQL server for execution. This makes your data access layer safer, faster, and greatly more convenient to design.

Requirements

In order to connect to PostgreSQL server you need the server itself running, dotConnect for PostgreSQL installed and IDE running. LinqConnect requires .NET Framework 3.5, Visual Studio 2008, and PostgreSQL server 8.0 or higher. Note that LinqConnect feature is only available in Professional Edition of dotConnect for PostgreSQL.

In this tutorial it is assumed that you already have the database objects created. You have to execute a script from the following file installed by default to
\Program Files\Devart\dotConnect\PostgreSQL\Samples\crm_demo.sql

Preparing the Project

Create a new console application in Visual Studio. It could be any other project type as well, but for simplicity's sake we'll use console project throughout the tutorial. The rest of the tutorial assumes that the name of the project is ConsoleApplication1. If you project is named otherwise, you will have to substitute this name with the actual one in Solution Explorer.

Generating Model from Database

  1. Add Devart LinqConnect Model to the project. To do this, right-click on the project node in Solution Explorer, point to Add, click New Item.... In the Add New Item dialog select Data category, choose Devart LinqConnect Model template, and click Add. This automatically launches Create New Model wizard, which creates a new empty model or generates it from database.
    Add item dialog box
  2. Click Next on the welcome screen.
  3. Fill in connection settings and click Next.
    Entity Developer Create Model Wizard - Setup data connection properties
  4. Choose database objects that will be used in the model. These are all objects from the crm_demo script, including auxiliary tables. Click Next.
    Entity Developer Create Model Wizard - Choose database object
  5. On the next screen you can adjust naming rules for entities and their members. For the CRM Demo database no rules are required, so just click Next.
    Entity Developer Create Model Wizard - Setup naming rules
  6. Input CrmDemoContext as namespace, and CrmDemoDataContext as the name of DataContext descendant. This will be the name of the main data access class. Click Next.
    Entity Developer Create Model Wizard - Model properties
  7. Press Finish. The model will be generated and opened in Entity Developer add-in.
  8. In the main menu, click File | Save. This updates the generated CrmDemoDataContext model code in Visual Studio.

The model you've just generated is ready to use.

Entity Developer diagram

Entity Developer creates classes for all selected tables that represent entities. It also creates a descendant of Devart.Data.Linq.DataContext class, which controls the connection to the database, and the whole data flow. This class includes properties and methods named after your database objects. You will use these members to retrieve and modify data in the context. The generated code is contained in the file DataContext.Designer.cs (DataContext.Designer.vb). You may write your own partial classes and methods for it in the file DataContext.cs (DataContext.vb).

Querying Data

All LINQ to PostgreSQL operations are executed through the DataContext descendant, which is named CrmDemoDataContext in this tutorial. To retrieve data you have to first create an instance of the context, then prepare a query with LinqConnect, and then access the object returned by the query, which may be a collection of objects or a single object.

Let's read all the data from the table Company, sort it by CompanyID, and output some columns. Add the following block of code to the method Main:

[C#]

CrmDemoDataContext context = new CrmDemoDataContext();
var query = from it in context.Companies
            orderby it.CompanyID
            select it;

foreach (Company comp in query)
  Console.WriteLine("{0} | {1} | {2}", comp.CompanyID, comp.CompanyName, comp.Country);

Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoDataContext = New CrmDemoDataContext
Dim query = From it In context.companies _
    Order By it.CompanyID _
    Select it

Dim comp As company
For Each comp In query
    Console.WriteLine("{0} | {1} | {2}", comp.CompanyID, comp.CompanyName, comp.Country)
Next

Console.ReadLine()

As simple as that. You prepare a query and then iterate through it as you would do with a usual collection of objects. The database interaction is performed by LinqConnect in the background. Now let's see who is who in this code sample.

  • CrmDemoDataContext is the name of the class that knows all about your model and does everything to handle it. All LinqConnect operations are performed within this class's properties and methods. It is recommended that you keep a single instance of the class throughout your application because it consumes lots of resources, and entities are not allowed to be shared through different data contexts.
  • query, it are arbitrary variable names in the LINQ to SQL statement. The former is used as the collection of data objects, the latter is not used outside the statement.
  • context.Companies refers to a public property of CrmDemoDataContext class. This property represents the collection of all companies in the context.
  • Company (in the foreach statement) is the name of an autogenerated class. This class maps to the Company table in the database and is named after it.

Here is the project's output in the console:

Note that the LINQ query code just describes the query. It does not execute it. This approach is known as deferred execution.

Now let's query data from two tables united with a foreign key. Replace the old code with this:

[C#]

CrmDemoDataContext context = new CrmDemoDataContext();
var query = from it in context.Companies
            orderby it.CompanyID
            select it;

foreach (Company comp in query) {
  if (comp.PersonContacts.Count > 0) {
    Console.WriteLine("{0} | {1} | {2}",
      comp.CompanyName, comp.PersonContacts[0].FirstName,
      comp.PersonContacts[0].LastName);
  }
}

Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoDataContext = New CrmDemoDataContext
Dim query = From it In context.companies _
    Order By it.CompanyID _
    Select it

Dim comp As company
For Each comp In query
    If comp.personcontacts.Count > 0 Then
        Console.WriteLine("{0} | {1} | {2}", _
              comp.CompanyName, comp.personcontacts(0).FirstName, _
              comp.personcontacts(0).LastName)
    End If
Next

Console.ReadLine()

As you can see, the LINQ query statement was not changed at all. The data about the contact persons was retrieved from the database automatically when you accessed the corresponding property of the company object. This is one of the great things about LINQ: you do not have to worry about dependencies when writing queries.

Inserting New Data

What earlier was adding rows to tables, now is just adding new objects to context collections. When you are ready to send the changes to the database, call SubmitChanges() method of the context. Before doing this, you must first set all properties that do not support null (Nothing) values. The SubmitChanges() method generates and executes commands that perform the equivalent INSERT, UPDATE, or DELETE statements against the data source.

Let's add a new product and a new category to the database. Replace the old code with this:

[C#]

CrmDemoDataContext context = new CrmDemoDataContext();

// Create a new category
ProductCategory newCategory = new ProductCategory();
newCategory.CategoryID = 1000;
newCategory.CategoryName = "New category";

// Create a new product
Product newProduct = new Product();
newProduct.ProductID = 2000;
newProduct.ProductName = "New product";
newProduct.Price = 20;

// Associate the new product with the new category
newProduct.ProductCategory = newCategory;
context.Products.InsertOnSubmit(newProduct);

// Send the changes to the database.
// Until you do it, the changes are cached on the client side.
context.SubmitChanges();

// Request the new product from the database
var query = from it in context.Products
            where it.ProductID == 2000
            select it;

// Since we query for a single object instead of a collection, we can use the method First()
Product product = query.First();
Console.WriteLine("{0} | {1} | {2}",
  product.ProductCategory.CategoryName, product.ProductName, product.Price);
Console.ReadLine();

[Visual Basic]

Dim context As CrmDemoDataContext = New CrmDemoDataContext
' Create a new category
Dim newCategory As productcategory = New productcategory()
newCategory.CategoryID = 1000
newCategory.CategoryName = "New category"

' Create a new product
Dim newProduct As product = New product()
newProduct.ProductID = 2000
newProduct.ProductName = "New product"
newProduct.Price = 20
' Associate the new product with the new category
newProduct.productcategory = newCategory
context.products.InsertOnSubmit(newProduct)

' Send the changes to the database.
' Until you do it, the changes are cached on the client side.
context.SubmitChanges()

' Request the new product from the database
Dim query = From it In context.products _
            Where it.ProductID = 2000 _
            Select it

' Since we query for a single object instead of a collection, we can use the method First()
Dim product As product = query.First()
Console.WriteLine("{0} | {1} | {2}", _
  product.productcategory.CategoryName, product.ProductName, product.Price)
Console.ReadLine()

The InsertOnSubmit() method is created for every collection in the context. This method stores in the database information about all linked objects. As shown in the example, it is only necessary to call InsertOnSubmit() once to submit both product and category objects.

Note that after you have added the new product and category by submitting the changes, you cannot execute this solution again as is. To execute the solution again, change the IDs of the objects to be added.

Updating Data

Entity instances are modified as usual. The only thing to remember is that you have to invoke the SubmitChanges() method to send the data to the database.

Append the following block to the existing code and launch the project:

[C#]

product.ProductName = "Edited product";
product.Price = 15;
context.SubmitChanges();

[Visual Basic]

product.ProductName = "Edited product"
product.Price = 15
context.SubmitChanges()

Deleting Data

To extract an instance from a context use the DeleteOnSubmit method of the corresponding collection. The object is removed from the collection of its type, but not destroyed. To delete the object's data from the database invoke the SubmitChanges() method.

You can do this with a block of code like the following:

[C#]

context.products.DeleteOnSubmit(newProduct);
context.productcategories.DeleteOnSubmit(newCategory);
context.SubmitChanges();

[Visual Basic]

context.products.DeleteOnSubmit(newProduct)
context.productcategories.DeleteOnSubmit(newCategory)
context.SubmitChanges()

Deletion of objects is affected by attributes in the model. When DeleteRule parameter is Cascade, dependent objects are deleted automatically. When this parameter is SetNull, dependent objects are not deleted, but the relation is nullified. When no rule is specified, the order of deletion sequence is important.

Additional Information

Now that you can perform the basic data manipulation with LinqConnect, you can move on to some advanced topics. dotConnect for PostgreSQL includes a help section dedicated to the LinqConnect technology. You can access it online at http://www.devart.com/linqconnect/docs/ or locally in Visual Studio help collections.

LinqConnect is developed closely to the Microsoft's implementation of LINQ to SQL, so you might find some useful information in MSDN:

  • LINQ to SQL
  • LINQ to SQL: .NET Language-Integrated Query for Relational Data

For hands-on experience use samples shipped with dotConnect for PostgreSQL. You can access the samples from the Start menu.

To understand deeper the works of LinqConnect engine you can watch the generated SQL statements in dbMonitor or using the DataContext.Log property.

See Also

LinqConnect section | Devart LinqConnect


LinqConnect Data Type Mapping

Type mapping rules from this table are used when PostgreSQL table columns are mapped to the entity properties of LinqConnect model.

PostgreSQL data type | CLR data type
bool | System.Boolean
int2, smallint | System.Int16
int2vector | System.Int16[]
int, integer, int4, oid | System.Int32
oidvector | System.Int32[]
big, int8, bigserial | System.Int64
real, single, float4 | System.Single
double precision, double, float, float8, money | System.Double
numeric | System.Decimal
date, timestamp, timestamptz, timestamp with time zone | System.DateTime
time, interval, timetz, time with time zone | System.TimeSpan
box, character, char, character varying, varchar, cid, cidr, circle, inet, line, lseg, macaddr, path, point, polygon, text, bit, bit varying, varbit, xid, name, tid, cursor, abstime | System.String
bytea | System.Byte[]
bit, varbit | System.Collections.BitArray


Language

C#

Show All

Languages dotConnect for PostgreSQL support@devart.com

Working with Transactions in LinqConnect

In this article we consider a short description of the LinqConnect transactional models. There are also some simple code listings illustrating different aspects of the transactional model.

LinqConnect has transactions as a part of its architecture.

Implicit Local Transaction. LinqConnect starts a local DbTransaction and uses it to execute generated SQL commands, if there is no open transaction into the LinqConnect connection instance. When all SQL commands have been successfully completed, LinqConnect commits the transaction and returns.

Explicit Local and Distributed Transaction. LinqConnect performs a check whether this call was executed in the scope of the Transaction started by user (local or distributed), when SubmitChanges is called. It is executed in the context of the same transaction, if the DataContext.Transaction property is set to a DbTransaction instance. Please note, that you should either commit or rollback the transaction (LinqConnect does not perform it for you).

[C#]

        //Opening connection
        context.Connection.Open();
        DEPT department = context.DEPT.Where(d => d.DEPTNO == 10).First();
        department.LOC = "TEST";
        //Opening transaction.
        //Transaction property
        context.Transaction = context.Connection.BeginTransaction();
        //This call participates in the transaction
        context.SubmitChanges();
        department.DNAME = "TEST";
        //This call also participates in the transaction
        context.SubmitChanges();
        //Replace the flag condition with the one you need
        //or remove it and leave only commit part
        if(flag)
        {
          //transaction completed successfully, both calls succeeded
          context.Transaction.Commit();
        }
        else
        {
          //something is wrong, both calls are rolled back
          context.Transaction.Rollback();
        }

[Visual Basic]

        'Opening connection
    Context.Connection.Open()
    Dim department As Dept = context.Depts.Where(Function(ByVal d As Dept) d.Deptno = 10).First()
    department.LOC = "TEST"
    'Opening transaction
    'Transaction property
    Context.Transaction = Context.Connection.BeginTransaction()
    'This call participates in the transaction
    Context.SubmitChanges()
    department.DNAME = "TEST"
    'This call also participates in the transaction
    context.SubmitChanges()
    'Replace the flag condition with the one you need
    'or remove it and leave only commit part
    If(flag)
         'transaction completed successfully, both calls succeeded
          Context.Transaction.Commit()
    Else
         'something is wrong, both calls are rolled back
          Context.Transaction.Rollback()
        End If

Here is an example for DataContext.Transaction usage. In LinqConnect we have a context-level Transaction property.

In Microsoft LINQ to SQL the connection corresponding to the transaction must match the connection used for constructing the DataContext. An exception is thrown, if a different connection is used.

Devart LinqConnect implements this situation a bit differently - we use a new connection for every querying operation for performance reasons. There is a way to obtain the planned behaviour, however. To achieve this, you can use Devart.Data.DataContext.MaxUsedConnections property:

[C#]

Devart.Data.DataContext.MaxUsedConnections = 1;

[Visual Basic]

Devart.Data.DataContext.MaxUsedConnections = 1

Then all queries will be executed using the single instance of the connection. In case of submitting the changes the DataContext.Connection persists.

Distributed Transactions and TransactionScope. Here is a code sample about usage Suppress option of TransactionScope:

[C#]

        DEPT department = context.DEPT.Where(d => d.DEPTNO == 25).First();
        department.DNAME = "xxx";
        using (TransactionScope tscope = new TransactionScope(TransactionScopeOption.Suppress))
        {
        //a new transaction will be created for this call
            context.SubmitChanges();
            tscope.Complete();
         }

[Visual Basic]

        Dim department As Dept = Context.Depts.Where(Function(ByVal d As Dept) d.DEPTNO = 25).First()
    department.Dname = "xxx"
    Using TScope As New TransactionScope(TransactionScopeOption.Suppress)
        'a new transaction will be created for this call
        Context.SubmitChanges()
        TScope.Complete()
    End Using

You can find more information about Transactions in MSDN.


Entity Developer Overview

Entity Developer is a powerful modeling and code generation tool for LinqConnect and ADO.NET Entity Framework. You can design an entity model from scratch or reverse-engineer an existing database, in which case you will have the classes and the relations with just several clicks. All model editing operations are performed in GUI, eliminating the need of manual XML code editing. Code for different programming languages can be generated for the model with predefined or custom T4-like templates.

Entity Developer Key Features

  • Support for ADO.NET Entity Framework v1 - v6
  • LinqConnect support
  • Visual schema modelling
  • Customizable and intuitive user interface
  • Reverse engineering model from database
  • Execution of LINQ to SQL, LINQ to Entities, and Entity SQL queries
  • Well-thought predefined templates for class generation and flexible T4-like template language for custom templates
  • TPC, TPT, TPH inheritances support
  • Customizable naming rules for database objects
  • Data viewing and editing
  • State-of-the-art diagram with diagram overview and printing
  • Entity Framework Storage Schema editing
  • Undo/Redo support
  • Comprehensive help system
  • Two ways of work: in integration with Visual Studio or standalone

Using Entity Developer

Entity Developer can be used as a separate application or as an add-in to Visual Studio 2008, Visual Studio 2010, Visual Studio 2012, Visual Studio 2013, or Visual Studio 2015. If the Visual Studio is installed on the PC, Entity Developer will be integrated with it during its installation, retaining the capability to be used as a separate application.

To start working with Entity Developer as a Visual Studio add-in, choose Add New Item... from the Project menu, then choose Devart LinqConnect Model or Devart Entity Framework Model, and click OK. The model will be added to your project and it will be opened as Entity Developer diagram. After this you may design the model manually or generate model entities from database by clicking the Create From Database button on the Entity Developer Model toolbar or by choosing Create From Database from the Tools -> Entity Developer menu. After you have finished editing model, just save it, and the code for it will be generated automatically.

Entity Framework model in Entity Developer VS addin

If you want to use Entity Developer as a separate application, you may launch it from the Devart dotConnect for PostgreSQL program group in the Start Menu. Then create and design your model or generate the new one from database. After the model is finished, generate code for it and add the generated code files to your Visual Studio project.

See Entity Developer documentation for more information about using it. To open the documentation, choose Entity Developer Documentation from the dotConnect for PostgreSQL program group in the Start Menu or press F1 when Entity Developer window or dialog is active.

Note: Entity Developer is available with dotConnect for PostgreSQL Professional Edition only.

See Also

Devart LinqConnect | Entity Framework Support


Integration

This section describes how dotConnect for PostgreSQL integrates with other development software.

  • Visual Studio 2008 - 2015 Advanced Integration
  • Using dbMonitor


Visual Studio 2008 - 2015 Advanced Integration

dotConnect for PostgreSQL integrates tightly with design-time features of Visual Studio 2008, 2010, 2012, 2013, and 2015 such as Server Explorer. This is also mentioned as Data Designer Extensibility features, or DDEX. The integration helps to design applications in more convenient and fast way. For example, you can take advantage of DataSet Designer, Data Source wizard, Query Builder, TableAdapter configuration, use Preview Data capability and configure web SqlDataSource component.

This topic provides information on what new features are available and how to use them.

Note that Server Explorer integration is not available for Compact Framework projects and in Visual Studio Express editions except Microsoft Web Developer Express 2008 and 2010.

This article consists of the following sections:

  • Integrating with Server Explorer
  • Design-time integration with project data
  • Getting more help and information

Integrating with Server Explorer

Server Explorer is the server management console for Visual Studio. Use this window to open data connections and to log on to servers and explore their databases. With Server Explorer you can view and retrieve information from all of the databases you are connected to. Use Server Explorer to list database tables, views, stored functions, types, sequences, and expand individual nodes to list their columns or arguments. Connections created with Server Explorer are later available in other parts of Visual Studio such as Data Designers.

To access Server Explorer, choose Server Explorer on the View menu.

Add/Modify Connection Dialog Box

Add Connection dialog box

This dialog box allows you to create and modify database connections. There are three ways to access this dialog box:

  • From the Tools menu select Connect to Database.
  • Right-click the Data Connections node in Server Explorer and click Add Connection.
  • Right-click the data connection you want to modify in Server Explorer and click Modify Connection.

The dialog consists of several controls where you supply information needed to connect to server. The following list describes the most important controls.

Host
The name or IP address of host of PostgreSQL database to which to connect.
Port
The port of PostgreSQL database to which to connect. The default value is 5432.
User Id
The PostgreSQL login account.
Password
The password for the PostgreSQL login account.
Allow saving password
If set to true password is stored among the other connection parameters.
Database
Select name of PostgreSQL database you want to connect from drop down list or enter it manually.
List is available only if you specify other connection parameters.
Schema
The schema to use in database operations.

After you fill the controls with data click Test connection button to verify it or click OK button to apply changes and close the dialog.

Advanced Properties dialog box

The Advanced Properties dialog box allows you to specify all properties for the dotConnect for PostgreSQL connection. Invoke this dialog when you need to set specific and rarely used connection parameters.

Design-time integration with project data

Data source wizard

The Data Source Configuration Wizard creates and edits data sources in your application. These data sources can be made from databases, Web services, or objects, and can be bound to controls that display data on forms. After you run the wizard, the data source is available in the Data Sources window for dragging onto forms in Windows applications. For example, the wizard can generate and add DataSet to your project, which can be later customized with TableAdapter Configuration Wizard.

You can run the Data Source Configuration Wizard in any of the following ways:

  • Selecting Add New Data Source from the Data menu.
  • Selecting Add New Data Source from the Data Sources Window.
  • Selecting Add New Data Source from the DataSource property of bindable Windows Forms controls.
Data Source Configuration Wizard

When wizard starts, choose Database as data source type, and click Next. Then choose Dataset, and on the next page click the New Connection button. Change data source to PostgreSQL Server, provide logon information and click OK. After that you will have to choose whether to save sensitive information together with other parts of connection string in application configuration file. On the last page of the wizard you select database objects to include in dataset.

On wizard completion you can switch to Solution Explorer to manipulate generated datasets.

TableAdapter configuration

The TableAdapter Configuration Wizard creates and edits TableAdapters. The wizard creates TableAdapters based on SQL statements you enter or on existing stored procedures in the database. The wizard can also create new stored procedures in the database based on SQL statements you enter into the wizard.

A TableAdapter connects to a database, executes queries or stored procedures against a database, and fills a DataTable with the data returned by the query or stored procedure. In addition to filling existing data tables with data, TableAdapters can return new data tables filled with data.

Using parametrized TableAdapter queries

A parametrized query returns data that meets the conditions of a WHERE clause within the query. For example, you can parametrize a customer list to display only customers in a certain city by adding WHERE City = ? to the end of the SQL statement that returns a list of customers. You create parametrized TableAdapter queries in the DataSet Designer, or during creation of data-bound forms in a Windows application with the Parametrize Data Source command on the Data menu. The Parametrize Data Source command also creates controls on your form to input the parameter values and execute the query.

Web SQL data source wizard

This wizard is similar to common Data Source Configuration Wizard. To open it from an ASP.NET Web server control perform the following:

  • In Visual Web Developer, create or open an existing .aspx page and then switch to Design view.
  • From the Toolbox, drag one of the server controls that support data binding onto the page. For example, from the Standard group of the Toolbox, drag a GridView control onto the page.
  • Right-click the control and then click Show Smart Tag.
  • In the tasks window, from the Choose Data Source drop-down list, select New data source. (If there is no drop-down list available in the tasks window, click Choose Data Source.)

Getting more help and information

If you experience problems with using Visual Studio windows related to tasks described above just press F1 to open Visual Studio documentation.

If you wish to study more detailed the capabilities of Visual Studio integration you can pay attention to Creating Client Data Applications section in Visual Studio Help. dotConnect for PostgreSQL provides integration capabilities similar to standard data providers.

See Also

DataSet Wizard


Using dbMonitor

To extend monitoring capabilities of dotConnect for PostgreSQL applications there is an additional tool called dbMonitor. It is easy-to-use tool to provide visual monitoring of your database applications. dbMonitor can be used for any kind of applications - desktop, ASP.NET and windows services.

dbMonitor performs per-component tracing of database events such as commit, rollback, SQL statement execution, preparing, etc.

dbMonitor has the following features:

ID

Name

Description

1

Events grid

Events grid displays you all the traced database events. It provides brief description, timestamp, duration, and event status. Below the grid four windows are docked in the group: SQL, Parameters, Error, and Call Stack. They display information about the event, currently selected in the Events window. You may click the header of the events grid columns to sort the events by the clicked column.

2

Event details

This group of four windows includes:

  • The SQL window displays the SQL statements for the database event, selected in the Events window, if the event is an execution of SQL code.
  • The Parameters window displays the SQL statement parameters for the database event, selected in the Events window, if this event is an execution of SQL statement, containing parameters.
  • The Error window displays information resulted in error.
  • The Call stack window displays call stack of the function, that started the event.
You can view main details of the selected event, switching between following windows. The screen above shows window for SQL-statement of the event (this event is an execution of SQL code).
To open a window that you need, select corresponding item from the View menu.

3

Processes window

This window displays list of monitored processes and their status. It allows you to choose what process to trace. Events grid displays events only for the selected process. After process application is closed, it has Terminated status, but its event log is not cleared, you can still view their information or save it to file. To remove terminated process from the list, either right-click it and select Delete Inactive from the popup menu, or click it and then click the Delete Terminated Process button on the toolbar.

4

Object tree window

This window below the Processes window displays monitored objects. Objects are combined in a tree with top level All Objects node, second level connection object nodes, and third level object nodes. Object Tree also contains 'Pools' node to group connection pools. It allows you to view events for all process objects, for specific connection, or for specific object. Just click the node to trace events for this node and its descendants.

5

Call tree window

It contains merged call stacks of the database events for the process. You can use it to filter events by functions, that started them. Just click the function in call stack tree, and Events window will display only events, called from that function or its descendants.

Remote debugging

To use remote debugging for your applications, you should set the following properties:

  • PgSqlMonitor.Host - to the name or IP address of the computer, where dbMonitor will be used.
  • PgSqlMonitor.Port - to the port, that will be used for communicating between dbMonitor and your application.
Then in dbMonitor options you should set the same port value on the General tab of the Options Dialog Box. After this you may run your application and monitor database calls.

Unicode support

You can monitor applications using international databases by help of the Unicode support.

During monitoring you can easy switch between client processes and view hierarchy of objects being traced.

dbMonitor is intended to hamper application being monitored as less as possible.

Monitoring is accessible at design-time as well.

To trace your application with dbMonitor you should follow these steps:

  • Create an instance of PgSqlMonitor component in your application. You can do it by dropping PgSqlMonitor on form from toolbox or by creating it manually in code. Only one instance of PgSqlMonitor is needed in the application.
  • Set PgSqlMonitor.IsActive property to true to enable monitoring.
  • Start dbMonitor application before running your program. If dbMonitor is installed you can start it from PgSqlMonitor component designer by clicking "Run dbMonitor" verb or from PostgreSQL submenu of the Tools menu.

Optional. To trace your application remotely with dbMonitor you should follow these steps:

  • Perform the steps defined above.
  • Set PgSqlMonitor.Host property to the name of the station where dbMonitor is running.
  • Set PgSqlMonitor.Port property to port number of the dbMonitor application (1000 by default).
  • Run dbMonitor application and start tracing.

Note: dbMonitor utility is available with dotConnect for PostgreSQL Professional Edition only.

See Also

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace


Frequently Asked Questions

dotConnect for PostgreSQL | support@devart.com
Frequently Asked Questions |

This page contains frequently asked questions about dotConnect for PostgreSQL. When you have a question first of all please browse through this list. If this page does not contain the answer, refer to support page.

  1. What is the difference between the Standard and Professional editions?
    The Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes. The Professional Edition adds more classes, tools, technologies, and integration capabilities. The following list briefly enumerates main advantages of Professional Edition.
    • Entity Framework support allows you to employ the latest conceptual technology from Microsoft.
    • LinqConnect support allows you to focus on objects instead of relational data in database application development.
    • The PgSqlLoader class serves to load external data into the PostgreSQL database extremely fast.
    • The PgSqlDump class serves to store a database or its parts as a script and to restore database from the generated script.
    • The DataLink class serves for universal cross-form data binding.
    • The powerful PgSqlDataTable component as all-in-one table data access solution.
    • The PgSqlDataSet class allows using typed and untyped provider-specific datasets.
    • DataSet Wizard greatly simplifies process of generating datasets in your application.
    • DataSet Manager and DataSet Editor help managing the datasets.
    • Support for dbMonitor that performs per-component tracing of database events such as SQL statement execution, commit, rollback, etc.
    • Enterprise Library support allows you to take advantage of Data Access Application Block functionality.
    • ASP.NET 2.0 providers support allows using the data provider in ASP.NET 2.0 provider model.
    • Windows Workflow Foundation support includes PostgreSQL Workflow Instance Store and Workflow Tracking
    • Sync Framework support allows using dotConnect for PostgreSQL for synchronizing PostgreSQL data with other data sources.
    To test this functionality use the Trial Edition, which incorporates all aforementioned features.
  2. What is the difference between the Express and Standard editions?

    Express Edition is a free data provider with basic connectivity features. Standard Edition represents a fully-featured ADO.NET data provider with design time support and advanced classes.

    The following list briefly enumerates main advantages of Standard Edition.

    • The PostgreSQLScript class serves to execute series of SQL statements separated by special symbols
    • The PostgreSQLMonitor class monitors dynamic SQL execution in applications that use dotConnect for PostgreSQL
    • The PostgreSQLDependency class tracks changes on the server
    • The PostgreSQLSelectStatement class represents PostgreSQL SELECT statement
    • Design-time features allow you to move the development process from run time to design time, which is way more comfortable
    • The InterForm technology allows referencing components that reside on different forms of a WinForms application
    • Migration Wizard helps to migrate project to dotConnect for PostgreSQL from Microsoft ODBC and OLEDB data providers.
Installation and deployment
  1. I installed dotConnect for PostgreSQL trial, then I have bought and installed purchased version, but something went wrong.
    Make sure you had uninstalled the trial version correctly. There should be no old (trial) assemblies present in your system. Uninstall dotConnect for PostgreSQL and check your Global Assembly Cache and local folders for Devart.* assemblies. Remove all Devart.* files and reinstall dotConnect for PostgreSQL.
  2. How do I upgrade to a newer version of dotConnect for PostgreSQL?
    Close all running IDEs and help collections, then run the installation package of the newer version. You will be prompted to uninstall the previous version; agree and then proceed to installing the newer build.
  3. You say, there are sample projects, but I can't find any.
    Probably you installed dotConnect for PostgreSQL not in full mode. Please choose Full when installing dotConnect for PostgreSQL. All samples are installed by default in \Program Files\dotConnect\PostgreSQL\Samples folder.
  4. Are there any restrictions for Visual Studio Express editions?
    Yes, there are some. First, the provider add-in (and hence menu item) is not available. Second, components are not registered in toolbox automatically (though you can do it manually). Finally, advanced Visual Studio integration (DDEX) is not available, except Microsoft Web Developer Express 2008 and 2010.
  5. How do I deploy my application?

    To deploy an application written with dotConnect for PostgreSQL, you need to:

    • deploy the Devart runtime assemblies used by your application;
    • include the technical license resource;
    • in case your application uses provider factories, you also need to expose dotConnect for PostgreSQL to the system.

    For the detailed description of each of these steps, please refer to the Deployment and Licensing topics in dotConnect for PostgreSQL help.

  6. How to install dotConnect for PostgreSQL on machine that does not have Visual Studio or Delphi installed?
    Choose "Minimal" type when asked by the installer.
  7. How do I upgrade my projects from dotConnect for PostgreSQL 3.xx?

    In this release there were some important name changes in the product. Particularly, assemblies, namespaces, invariant name, and some types were changed as follows:
    "CoreLab.Data" became "Devart.Data";
    "CoreLab.PostgreSQL" became "Devart.Data.PostgreSQL";
    "PostgreSQLDirectFactory" became "PostgreSQLProviderFactory";
    Invariant name became "Devart.Data.PostgreSQL";

    Your projects must be updated to be compatible with dotConnect for PostgreSQL 4.0. Here is the list of files you should update:
    *.csproj, *.vbproj - references to assemblies
    *.cs, *.vb - namespaces
    *.licx - namespaces and assembly names
    Web.config - assembly names and web provider types

    This is done automatically when you invoke the Upgrade wizard from Visual Studio menu: Tools | PostgreSQL | Upgrade Wizard.

  8. I have received a message that Devart.Data is incompatible...

    Devart data providers use a common assembly (Devart.Data.dll), so it is necessary to install compatible providers versions. We release our ADO.NET data providers in a single pack, thus releases from the same date should be compatible. Also, Devart data providers should warn you before installation if an incompatible version of Devart.Data.dll was detected.
  9. I have received the following message - "error 0175: The specified store provider cannot be found in the configuration, or is not valid..". What does it mean and what should I do?

    You should put the Devart.Data, Devart.Data.PostgreSQL, and Devart.Data.PostgreSQL.Entity.EF<Version> assemblies in the Bin folder of your application (or place these assemblies in Global Assembly Cache). The <Version> here is the version of Entity Framework used in your application. For Entity Framework v1 the assembly is called Devart.Data.PostgreSql.Entity.EF1.dll, for Entity Framework v4 it is Devart.Data.PostgreSql.Entity.EF4.dll, for Entity Framework v5 or v6 it is Devart.Data.PostgreSql.Entity.EF5.dll or Devart.Data.PostgreSql.Entity.EF6.dll respectively. For Entity Framework Core it is Devart.Data.PostgreSql.Entity.EFCore.dll. Make sure that your application is licensed correctly (take a look at the Licensing article for more information).

    Information about provider registering is available in the Deployment article.
Subscriptions and Upgrades
  1. I have a registered version of dotConnect for PostgreSQL. Will I need to pay to upgrade to future versions?

    Since PostgreSQLDirect .NET 3.00, all upgrades to future versions are free to users with an active dotConnect for PostgreSQL Subscription.

    Users that have a registration for versions of dotConnect for PostgreSQL prior to PostgreSQLDirect .NET 3.00 can upgrade to dotConnect for PostgreSQL 4.00 to jump in on the Subscription Program.
  2. What are the benefits of the dotConnect for PostgreSQL Subscription Program?

    The dotConnect for PostgreSQL Subscription Program is an annual maintenance and support service for dotConnect for PostgreSQL users.

    Users with a valid dotConnect for PostgreSQL Subscription get the following benefits:

    • Access to new versions of dotConnect for PostgreSQL when they are released
    • Access to all dotConnect for PostgreSQL updates and bug fixes
    • Product support through the dotConnect for PostgreSQL Priority Support program
    • Notification of new product versions

    Priority Support is an advanced product support program which offers you expedited individual assistance with dotConnect for PostgreSQL-related questions from the dotConnect for PostgreSQL developers themselves. Priority Support is carried out over email and has a two business day response policy.

    The dotConnect for PostgreSQL Subscription Program is available for registered users of dotConnect for PostgreSQL 3.00 and higher.
  3. Can I use my version of dotConnect for PostgreSQL after my Subscription expires?

    Yes, you can. dotConnect for PostgreSQL version licenses are perpetual.
  4. Do I need a new subscription to use dotConnect for PostgreSQL 7?
    No, you don't. Provided that you have an active subscription, you will be able to download dotConnect for PostgreSQL 7 from Registered Users' Area.
Technical Licensing
  1. What is the licensing you use?
    dotConnect for PostgreSQL uses .NET component licensing. To build operational application dotConnect for PostgreSQL requires valid license. If no license is available, dotConnect for PostgreSQL does not work.
  2. How to embed license into my application?
    Usually you do not have to care about embedding license in your application. When you install dotConnect for PostgreSQL the system is configured so that licensing is done transparently. License is automatically added to project when you place a PgSqlConnection component onto a form.
    In some cases you have to manually add license. It is necessary for console applications, class libraries, some ASP.NET applications and existing projects initially built with dotConnect for PostgreSQL version that did not use component licensing, that is, 3.20 and older. For instructions on how to add license manually refer to Licensing topic in dotConnect for PostgreSQL help.
  3. On opening connection I get an exception saying "License not found...". What should I do?

    This generally indicates that license information could not be found, or you try to apply it in some way that does not suit the kind of application. For example:

    • File licenses.licx, required for dotConnect for PostgreSQL to function properly, could not be found.
    • File licenses.licx is not added as embedded resource.
    • File App_Licenses.dll not found in ASP.NET applications.

    To fix the problem determine type of your application and read corresponding section of "Licensing" topic.
  4. On opening connection I get an exception saying "License not valid...". What should I do?

    This means that license information was found but it is incorrect. It usually happens in the following cases:

    1. The project was earlier compiled with old or trial version of dotConnect for PostgreSQL.
    2. File licenses.config used by a class library does not refer to launched executable.
    3. The App_Licenses.dll belongs to other application or needs to be recompiled.
    4. Something's wrong with the operating system or installation of dotConnect for PostgreSQL.

    If you encounter one of these problems, do the following (the numbers of actions correspond to the numbers of the problems in the above list):

    1. Delete all files from the bin and obj folders and rebuild the project.
    2. Specify the executable in the licenses.config file.
    3. Rebuild App_Licenses.dll for the current application.
    4. Perform the following steps:
      1. uninstall dotConnect for PostgreSQL;
      2. remove all Devart.* and policy.*.Devart.* files from the GAC;
      3. clear the Program Files\Devart\dotConnect and Program Files\Common Files\Devart\dotConnect folders;
      4. re-install dotConnect for PostgreSQL.
  5. Deployed application worked fine some time, but in some moment it started to say "Sorry, your trial period has expired". But I do not use trial version any more.
    Probably you compiled the application with Trial edition of dotConnect for PostgreSQL, and deployed it with assemblies from non-trial version. In this case time limit is actual as well. To eliminate the problem just recompile the project.
  6. How to license ASP.NET applications?

    To support server-side compilation you ought to have special assembly App_Licenses.dll in the Bin directory of your site. To create this assembly execute Build Runtime Licenses command in the licenses.licx file context menu in the Solution Explorer view. Required assembly will be created automatically.

    Note that this is not necessary for precompiled ASP.NET applications (if nothing is compiled on server by user request). Precompiled applications are licensed as usual applications.
  7. How to make dotConnect for PostgreSQL work with SQL Server 2008 Business Intelligence Solutions?

    To do this install dotConnect for PostgreSQL on same computer where SQL Server 2008 resides.
  8. I am having problems with the licensing in my project... What am I to do?

    If any problems with licensing occurred in your project, you should use the License Information dialog to resolve them. You can access it from the Visual Studio menu: Tools | PostgreSQL | License Information.
  9. Do end-users need a license?
    No, end-users of your application do not require any license.
Connection pooling
  1. I call PgSqlConnection.Open(), then Close(). Physical connection is still visible by server. Isn't it a bug?
    No, it is not. This is Connection Pooling feature. Actual connection is not closed in order to be used later by your application. This boosts performance greatly.
  2. I get exception "Timeout expired. The timeout period elapsed..." What to do?
    The full text of the exception is "Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool. This may have occurred because all pooled connections were in use and max pool size was reached." It clearly states that you have run out of connections available. To solve the problem increase Max Pool Size connection string parameter value. The default value is 100. Another way to get extra connections is to clear one or all of the pools. Or you can turn connection pooling off using Pooling connection string parameter.
  3. How to prevent possible pooling problems?
    You can clear the pool explicitly. Generally pool is cleared automatically when connections are idle or closed by the server. To force the operation call ClearPool or ClearAllPools methods. Another solution is to disable the pool at all (set Pooling=false in connection string). If this does not help, the problem is not caused by pooling.
Documentation problems
  1. How to open documentation on dotConnect for PostgreSQL?
    There are several ways to open dotConnect for PostgreSQL documentation:
    • Use appropriate shortcut in start menu, for instance, Start - Programs - Devart dotConnect for PostgreSQL - Documentation.
    • Use command in the IDE: Tools - PostgreSQL - dotConnect for PostgreSQL Help.
    • Position cursor on some class from Devart.Data.PostgreSql and press F1.
    There is also same documentation in chm format. You can download it from our site at the following address: www.devart.com/dotconnect/postgresql/dcpostgresql.chm
  2. I can't see the documentation in Visual Studio Help Collection.
    Correctly installed documentation appears as separate node in combined collection of Visual Studio and Delphi. If you can't find dotConnect for PostgreSQL node there it is because you enabled topics filtering. To reveal the node set filter to "Devart Documentation", or "(unfiltered)", or "Visual C#" etc.
    Another possible reason is that you installed some IDE after installation of dotConnect for PostgreSQL. In this case use aforementioned methods to reach documentation.
  3. All topics in CHM file are blank.
    This can happen due to some patches from Microsoft installed on your system. Please read this page to find possible solutions for the problem. In most cases it is enough to right-click on the CHM file, select Properties, click on the "Unblock" button and click "Apply" to show the contents.
ORM solutions
  1. Are LINQ to SQL and Entity Framework supported?
    The Professional Edition of dotConnect for PostgreSQL supports both LinqConnect (formerly called LINQ to PostgreSQL) and the latest version of ADO.NET Entity Framework.
  2. Where do I start with Entity Framework or LinqConnect?
    For your convenience there are brief tutorials that you can use to get acquainted with the technologies:
    • Entity Framework Tutorial
  3. Are there any demo projects to play with?
    Yes, dotConnect for PostgreSQL includes several Entity Framework and LinqConnect samples in C# and Visual Basic. The samples demonstrate how to use several entities and a relationship between them. You can also download separate Entity Framework Query Samples package, which is a standard Microsoft demo with added PostgreSQL connectivity.
Miscellaneous
  1. I get concurrency error when modifying records using PgSqlDataAdapter or PgSqlDataTable. What can be wrong?
    This can happen when PgSqlCommandBuilder generates a query without primary key field. To avoid it use custom update command instead of generated by PgSqlCommandBuilder. This problem should not take place if primary key field participates in SELECT statement.
  2. No components can be found in the toolbox.
    This can happen if the installation encountered some problems. You can add the components to toolbox manually. This procedure is described in the Installation article in the documentation. Note that Microsoft Web Developer 2008 Express edition does not allow working with toolbox at all.
  3. dotConnect for PostgreSQL components in Visual Studio 2008 are grey...
    Make sure you're in Component Designer view. Do not confuse with Designer view. To switch between views use context menu of .aspx file in Solution Explorer. This relates to Web projects only.
  4. SQL Server Integration Service (SSIS) can't get the list of tables in my PostgreSQL server.
    This is an architecture limitation from Microsoft, SSIS understands metadata of SQL Server only. To circumvent this you have to write queries manually.
  5. Can I use dotConnect for PostgreSQL assemblies in the x64 process?
    dotConnect for PostgreSQL assemblies are built with the /platform:anycpu option. So, you can use provider's assemblies on any platform (x86 or x64). For more information, refer to http://msdn.microsoft.com/en-us/library/zekwfyz4.aspx
General issues related to PostgreSQL server
  1. Cannot connect to server on %host name%...
    This is actual for mobile edition. Use IP of the server instead of DNS name. It is recommended to use internal IP address. For information on how to address target machine refer to network administrator.
  2. How to get result set from a stored procedure?
    Set PgSqlCommand.CommandType to StoredProcedure and CommandText to name of the procedure, then issue PgSqlCommand.ExecuteReader() method.
    You can also do it through parameter with Direction set to System.Data.ParameterDirection.ReturnValue. For example on how to do it refer to article "Using Parameters" in dotConnect for PostgreSQL documentation.
  3. What about performance?
    We regularly carry out performance tests on different databases with miscellaneous environments. The tests show that dotConnect for PostgreSQL is much better than ODBC, OLEDB, and Npgsql. Besides that dotConnect for PostgreSQL has much more features than any other data provider.
  4. Non-latin characters in my data are not retrieved correctly.
    Use UTF-8 encoding. To enable it, set Connection.Unicode property to true or include Unicode=true; in connection string. Keep in mind, however, that this affects performance.
Mobile edition
  1. I'm getting "A socket operation encountered a dead network" when trying to connect with Mobile Edition in run time.
    Make sure that you have synchronized your device with a workstation because some synchronization tool (e.g., Microsoft ActiveSync or Windows Mobile Device Center) should be used when you work with mobile device or emulator. Before deployment make Connect and Cradle to the emulator you want to use via Device Emulator Manager (the Tools menu in Visual Studio). After cradle the ActiveSync icon in the tray should become green (indication that synchronization is successful). In the case of Windows Mobile Device Center, its Sync Center should return the "Connected" and "Sync completed" statuses.
  2. When deploying application compiled with a trial version to mobile device, I'm getting the "trial period expired" exception. What's wrong?
    The possible reason may be that the system date/time of the device is not synchronised with the date/time on your workstation; hence, the problem can be resolved by setting the date/time identical to the one on the workstation.


Reference

Assemblies

Assembly | Description
Devart.Data | This assembly is shared with other Devart data providers.
Devart.Data.PostgreSql | This assembly contains the dotConnect for PostgreSQL specific functionality.
Devart.Data.Synchronization | This assembly is shared with other Devart data providers and contains base classes for synchronizing databases with Microsoft Sync Framework.
Devart.Data.PostgreSql.Synchronization | This assembly contains the dotConnect for PostgreSQL specific classes for synchronizing databases with Microsoft Sync Framework.


%%ItemTitle%%

Devart.Data Send comments on this topic.

Assembly Overview

Namespaces

Namespace | Description
Devart.Common |
Devart.Data |


%%ItemTitle%%

See Also

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Common Namespace (Devart.Data)

Inheritance Hierarchy

Classes

Class | Description
DbCommandBase | Represents a SQL statement or stored procedure to execute against a data source.
DbCommandBuilder | Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.
DbCommandBuilderBase | Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.
DbConnectionStringBuilder | Generates automatically connection strings used to connect to a data source.
DbDataAdapter | Represents a set of data commands and a data source connection that are used to fill the DataSet and update a data source.
DbDataReaderBase | Allows to read a forward-only stream of rows from a data source.
DbDataSet | Represents an in-memory cache of data with connected model support.
DbDataSourceEnumerator | Retrieves list of available servers in the network.
DbDataTable | The DbDataTable class represents a single object that provides all of the functionality needed to retrieve and manipulate data from a data source. The DbDataTable class is built using existing ADO.NET components.
DbDump | Serves to store a database or its parts as a script and also to restore database from the received script.
DbLoader | Serves to load external data into the data source.
DbLoaderColumn | Represents the attributes for column loading.
DbLoaderColumnCollection | Represents a collection of columns relevant to a DbLoader.
DbMonitor | Allows to monitor dynamic SQL execution in applications that use .NET data providers.
DbParameterBase | Represents a parameter to a DbCommand, and optionally, its mapping to DataSet columns.
DbParameterBaseCollection | Collects all parameters relevant to a DbCommand as well as their respective mappings to DataSet columns.
DbProviderException | The base class for all exceptions thrown on data provider side. This does not include data source exceptions.
DbScript | Serves to execute series of SQL statements separated by special symbols.
DbTransactionBase | Base class for the dotConnect for PostgreSQL transaction class Devart.Data.PostgreSql.PgSqlTransaction
MonitorEventArgs | Provides data for the DbMonitor.TraceEvent event of the DbMonitor class.
ParentDataRelation | Establishes query-based master-detail relation.
ProxyException | Represents an exception that occurs when connecting through a proxy server.
ProxyOptions | Represents proxy server settings.
QueryRecordCountException | Describes an error that is raised during record count request process.
ScriptErrorEventArgs | Provides data for the DbScript.Error event of the DbScript class.
ScriptProgressEventArgs | Provides data for the DbScript.Progress event of the DbScript class.
SqlStatement | Represents a single statement in a script.
SqlStatementCollection | Represents collection of statements that constitute PostgreSQL script.
TransactionStateChangedEventArgs | Provides data for the DbTransactionBase.StateChanged event of the DbTransactionBase class.
TransactionStateChangeEventArgs | Base class for TransactionStateChangedEventArgs and TransactionStateChangingEventArgs classes.
TransactionStateChangingEventArgs | Provides data for the DbTransactionBase.StateChanging event of the DbTransactionBase class.

Enumerations

Enumeration | Description
DumpMode | Specifies what kind of information should be exported by Devart.Data.PostgreSql.PgSqlDump.
MonitorEventType | Describes type of the current DbMonitor event.
MonitorTracePoint | Determines when DbMonitor.TraceEvent event occurs.
RefreshRowMode | Describes autorefresh actions that can be taken by DbCommandBuilder and DbDataTable.
SqlStatementType | Describes type of a statement in a script.
TransactionAction | Indicates the operation, that is being performed or has been performed in the transaction in the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging events.

Delegates

Delegate | Description
MonitorEventHandler | Represents the method that will handle the DbMonitor.TraceEvent event of the DbMonitor class.
ProxyOptionsPropertyChanged | Represents the method that will handle the ProxyOptions.PropertyChanged event of the ProxyOptions class.
ScriptErrorEventHandler | Represents the method that will handle the DbScript.Error event of the DbScript.
ScriptProgressEventHandler | Represents the method that will handle the DbScript.Progress event of the DbScript.
TransactionStateChangedEventHandler | Represents the method that will handle the DbTransactionBase.StateChanged event of DbTransactionBase descendants.
TransactionStateChangingEventHandler | Represents the method that will handle the DbTransactionBase.StateChanging event of DbTransactionBase descendants.

See Also

Devart.Data Assembly


%%PageItemTitle%% Classes

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Common Namespace (Devart.Data) Classes

Inheritance Hierarchy

Classes

Class | Description
DbCommandBase | Represents a SQL statement or stored procedure to execute against a data source.
DbCommandBuilder | Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.
DbCommandBuilderBase | Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.
DbConnectionStringBuilder | Generates automatically connection strings used to connect to a data source.
DbDataAdapter | Represents a set of data commands and a data source connection that are used to fill the DataSet and update a data source.
DbDataReaderBase | Allows to read a forward-only stream of rows from a data source.
DbDataSet | Represents an in-memory cache of data with connected model support.
DbDataSourceEnumerator | Retrieves list of available servers in the network.
DbDataTable | The DbDataTable class represents a single object that provides all of the functionality needed to retrieve and manipulate data from a data source. The DbDataTable class is built using existing ADO.NET components.
DbDump | Serves to store a database or its parts as a script and also to restore database from the received script.
DbLoader | Serves to load external data into the data source.
DbLoaderColumn | Represents the attributes for column loading.
DbLoaderColumnCollection | Represents a collection of columns relevant to a DbLoader.
DbMonitor | Allows to monitor dynamic SQL execution in applications that use .NET data providers.
DbParameterBase | Represents a parameter to a DbCommand, and optionally, its mapping to DataSet columns.
DbParameterBaseCollection | Collects all parameters relevant to a DbCommand as well as their respective mappings to DataSet columns.
DbProviderException | The base class for all exceptions thrown on data provider side. This does not include data source exceptions.
DbScript | Serves to execute series of SQL statements separated by special symbols.
DbTransactionBase | Base class for the dotConnect for PostgreSQL transaction class Devart.Data.PostgreSql.PgSqlTransaction
MonitorEventArgs | Provides data for the DbMonitor.TraceEvent event of the DbMonitor class.
ParentDataRelation | Establishes query-based master-detail relation.
ProxyException | Represents an exception that occurs when connecting through a proxy server.
ProxyOptions | Represents proxy server settings.
QueryRecordCountException | Describes an error that is raised during record count request process.
ScriptErrorEventArgs | Provides data for the DbScript.Error event of the DbScript class.
ScriptProgressEventArgs | Provides data for the DbScript.Progress event of the DbScript class.
SqlStatement | Represents a single statement in a script.
SqlStatementCollection | Represents collection of statements that constitute PostgreSQL script.
TransactionStateChangedEventArgs | Provides data for the DbTransactionBase.StateChanged event of the DbTransactionBase class.
TransactionStateChangeEventArgs | Base class for TransactionStateChangedEventArgs and TransactionStateChangingEventArgs classes.
TransactionStateChangingEventArgs | Provides data for the DbTransactionBase.StateChanging event of the DbTransactionBase class.

See Also

Devart.Data Assembly


%%PageItemTitle%%

DbCommandBase Members | Devart.Common Namespace | DbCommand

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbCommandBase Class

Devart.Common Namespace : DbCommandBase Class

Represents a SQL statement or stored procedure to execute against a data source.

For a list of all members of this type, see DbCommandBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommand
Devart.Common.DbCommandBase
Devart.Data.PostgreSql.PgSqlCommand

Syntax

[Visual Basic]
Public MustInherit Class DbCommandBase
   Inherits DbCommand
   Implements IComponent, IDbCommand, IDisposable
[C#]
public abstract class DbCommandBase : DbCommand, IComponent, IDbCommand, IDisposable

Remarks

Abstract DbCommandBase class implements some of DbCommand functionality that is data source-independent.

Example

The following sample demonstrates how using base classes helps to create data source-independent code.

[C#]

public void PrintDept(DbConnectionBase myConnection) {
    DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
    myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
    myConnection.Open();
    DbDataReader myReader = myCommand.ExecuteReader();
    try {
        while (myReader.Read()) {
            Console.WriteLine(myReader.GetInt32(0).ToString() + " " +
                myReader.GetString(1) + " " + myReader.GetString(2));
        }
    }
    finally {
        myReader.Close();
        myConnection.Close();
    }
}

[Visual Basic]

Public Sub PrintDept(ByVal myConnection As DbConnectionBase)
    Dim myCommand As DbCommandBase = myConnection.CreateCommand()
    myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
    myConnection.Open()
    Dim myReader As DbDataReader = myCommand.ExecuteReader()
    Try
        While myReader.Read()
            Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", _
                myReader.GetString(1), " ", myReader.GetString(2)))
        End While
    Finally
        myReader.Close()
        myConnection.Close()
    End Try
End Sub

See Also

DbCommandBase Members | Devart.Common Namespace | DbCommand


%%PageItemTitle%% $$Members$$

DbCommandBase Class | Devart.Common Namespace | DbCommand

See Also Devart.Data Send comments on this topic.

DbCommandBase Class Members

Devart.Common Namespace : DbCommandBase Class

DbCommandBase overview

Public Fields

Public Field static (Shared in Visual Basic) DefaultCommandTimeout Gets or sets the default timeout for all commands.

Public Properties

Public Property CommandText | Overridden. Gets or sets the SQL statement to execute against a data source.
Public Property CommandTimeout | Overridden. Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.
Public Property CommandType | Overridden. Gets or sets a value indicating how the CommandText property is to be interpreted.
Public Property Connection (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbConnection used by this DbCommand.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Owner | Gets or sets a form or other container that the DbCommandBase instance belongs to.
Public Property ParameterCheck | Gets or sets a value indicating whether the command object regenerates parameter objects if text of the command is changed.
Public Property Parameters (Inherited from System.Data.Common.DbCommand) | Gets the collection of DbParameter objects.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Transaction (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbTransaction within which this DbCommand object executes.
Public Property UpdatedRowSource | Overridden. Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

Public Methods

Public Method BeginExecuteNonQuery | Overloaded. Starts an asynchronous invocation of an ExecuteNonQuery method.
Public Method BeginExecuteReader | Overloaded. Starts an asynchronous invocation of an ExecuteReader method.
Public Method Cancel | Overridden. Attempts to cancel the execution of a query currently running.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method CreateParameter (Inherited from System.Data.Common.DbCommand) | Creates a new instance of a DbParameter object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndExecuteNonQuery | Ends an asynchronous invocation of the ExecuteNonQuery method.
Public Method EndExecuteReader | Ends an asynchronous invocation of the ExecuteReader method.
Public Method ExecuteNonQuery | Overridden. Executes SQL statement against the Connection and returns the number of rows affected.
Public Method ExecutePageReader | Returns a specific subset of rows when paging through the results of a query.
Public Method ExecuteReader (Inherited from System.Data.Common.DbCommand) | Overloaded. Executes the CommandText against the Connection, and returns an DbDataReader.
Public Method ExecuteScalar | Overridden. Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRecordCount | Returns count of records in the resultset.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Prepare | Overridden. Creates a prepared (or compiled) version of the command on the server.
Public Method ResetCommandTimeout | Resets CommandTimeout to its default value, which is taken from DefaultCommandTimeout.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBase Class | Devart.Common Namespace | DbCommand


%%PageItemTitle%% $$Fields$$

DbCommandBase Class | Devart.Common Namespace | DbCommand

See Also Devart.Data Send comments on this topic.

DbCommandBase Class Fields

Devart.Common Namespace : DbCommandBase Class

For a list of all members of this type, see DbCommandBase members.

Public Fields

Public Field static (Shared in Visual Basic) DefaultCommandTimeout Gets or sets the default timeout for all commands.

See Also

DbCommandBase Class | Devart.Common Namespace | DbCommand


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | CommandTimeout Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DefaultCommandTimeout Field

Devart.Common Namespace > DbCommandBase Class : DefaultCommandTimeout Field (DbCommandBase)

Gets or sets the default timeout for all commands.

[Visual Basic]
Public Shared DefaultCommandTimeout As Integer
[C#]
public static int DefaultCommandTimeout

Return Type

The default timeout for all commands.

See Also

DbCommandBase Class | DbCommandBase Members | CommandTimeout Property


%%PageItemTitle%% $$Properties$$

DbCommandBase Class | Devart.Common Namespace | DbCommand

See Also Devart.Data Send comments on this topic.

DbCommandBase Class Properties

Devart.Common Namespace : DbCommandBase Class

For a list of all members of this type, see DbCommandBase members.

Public Properties

Public Property CommandText | Overridden. Gets or sets the SQL statement to execute against a data source.
Public Property CommandTimeout | Overridden. Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.
Public Property CommandType | Overridden. Gets or sets a value indicating how the CommandText property is to be interpreted.
Public Property Connection (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbConnection used by this DbCommand.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Owner | Gets or sets a form or other container that the DbCommandBase instance belongs to.
Public Property ParameterCheck | Gets or sets a value indicating whether the command object regenerates parameter objects if text of the command is changed.
Public Property Parameters (Inherited from System.Data.Common.DbCommand) | Gets the collection of DbParameter objects.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Transaction (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbTransaction within which this DbCommand object executes.
Public Property UpdatedRowSource | Overridden. Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

See Also

DbCommandBase Class | Devart.Common Namespace | DbCommand


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CommandText Property

Devart.Common Namespace > DbCommandBase Class : CommandText Property (DbCommandBase)

Gets or sets the SQL statement to execute against a data source.

[Visual Basic]
Overrides Public Property CommandText As String
[C#]
public override string CommandText {get; set;}

Return Type

The SQL statement or stored procedure to execute. The default value is an empty string ("").

Remarks

Sense of CommandText property depends on value of CommandType property.

When CommandType value is Text, property CommandText should contain text of a query that must be run on the server.

When the value is StoredProcedure, property CommandText must be a name of a procedure to execute.

When the value is set to TableDirect, CommandText must be name of a table you want to get all data from. All rows and columns are retrieved.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CommandTimeout Property

Devart.Common Namespace > DbCommandBase Class : CommandTimeout Property (DbCommandBase)

Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.

[Visual Basic]
Overrides Public Property CommandTimeout As Integer
[C#]
public override int CommandTimeout {get; set;}

Return Type

The time (in seconds) to wait for the command to execute. The default value is 30 seconds.

Remarks

A value of zero (0) specifies no limit to the wait time, rather than no wait time, and therefore should be avoided.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CommandType Property

Devart.Common Namespace > DbCommandBase Class : CommandType Property (DbCommandBase)

Gets or sets a value indicating how the CommandText property is to be interpreted.

[Visual Basic]
Overrides Public Property CommandType As CommandType
[C#]
public override CommandType CommandType {get; set;}

Return Type

One of the CommandType values. The default value is Text.

Remarks

CommandType can be one of the following values: Text, StoredProcedure, TableDirect.

When the value is Text, property CommandText should contain text of a query that must be run on the server.

When the value is StoredProcedure, CommandText property must be a name of a procedure to execute.

When the value is set to TableDirect, CommandText must be name of a table you want to get all data from. All rows and columns are retrieved.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Owner Property

Devart.Common Namespace > DbCommandBase Class : Owner Property (DbCommandBase)

Gets or sets a form or other container that the DbCommandBase instance belongs to.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

A form or other container that the object belongs to.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParameterCheck Property

Devart.Common Namespace > DbCommandBase Class : ParameterCheck Property

Gets or sets a value indicating whether the command object regenerates parameter objects if text of the command is changed.

[Visual Basic]
Public Property ParameterCheck As Boolean
[C#]
public bool ParameterCheck {get; set;}

Return Type

Value indicating whether the command object regenerates parameter objects if text of the command is changed. The default value is false.

Remarks

If true, the Parameters collection is automatically regenerated to reflect all parameters contained in command text. In other words, quantity of parameters in the collection always equals to quantity of parameters in the query string. If due to text changes the quantity of parameters is increased, then old parameters will retain their values while all new parameters will be empty. For detailed explanation on behavior of ParameterCheck property please read article Using Parameters in dotConnect.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatedRowSource Property

Devart.Common Namespace > DbCommandBase Class : UpdatedRowSource Property

Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

[Visual Basic]
Overrides Public Property UpdatedRowSource As UpdateRowSource
[C#]
public override UpdateRowSource UpdatedRowSource {get; set;}

Return Type

One of the UpdateRowSource values.

Remarks

The default UpdateRowSource value is Both unless the command is automatically generated (i.e. by DbCommandBuilder), in which case the default is None.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%% $$Methods$$

DbCommandBase Class | Devart.Common Namespace | DbCommand

See Also Devart.Data Send comments on this topic.

DbCommandBase Class Methods

Devart.Common Namespace : DbCommandBase Class

For a list of all members of this type, see DbCommandBase members.

Public Methods

Public Method BeginExecuteNonQuery | Overloaded. Starts an asynchronous invocation of an ExecuteNonQuery method.
Public Method BeginExecuteReader | Overloaded. Starts an asynchronous invocation of an ExecuteReader method.
Public Method Cancel | Overridden. Attempts to cancel the execution of a query currently running.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method CreateParameter (Inherited from System.Data.Common.DbCommand) | Creates a new instance of a DbParameter object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndExecuteNonQuery | Ends an asynchronous invocation of the ExecuteNonQuery method.
Public Method EndExecuteReader | Ends an asynchronous invocation of the ExecuteReader method.
Public Method ExecuteNonQuery | Overridden. Executes SQL statement against the Connection and returns the number of rows affected.
Public Method ExecutePageReader | Returns a specific subset of rows when paging through the results of a query.
Public Method ExecuteReader (Inherited from System.Data.Common.DbCommand) | Overloaded. Executes the CommandText against the Connection, and returns an DbDataReader.
Public Method ExecuteScalar | Overridden. Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRecordCount | Returns count of records in the resultset.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Prepare | Overridden. Creates a prepared (or compiled) version of the command on the server.
Public Method ResetCommandTimeout | Resets CommandTimeout to its default value, which is taken from DefaultCommandTimeout.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbCommandBase Class | Devart.Common Namespace | DbCommand


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginExecuteNonQuery Method

Devart.Common Namespace > DbCommandBase Class : BeginExecuteNonQuery Method

Starts an asynchronous invocation of an ExecuteNonQuery method.

Overload List

Starts an asynchronous invocation of an ExecuteNonQuery method.

[Visual Basic] Overloads Public Function BeginExecuteNonQuery() As IAsyncResult

[C#] public IAsyncResult BeginExecuteNonQuery();

Starts an asynchronous invocation of an ExecuteNonQuery method with information for callback function.

[Visual Basic] Overloads Public Function BeginExecuteNonQuery(AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginExecuteNonQuery(AsyncCallback,object);

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginExecuteNonQuery() Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteNonQuery Method : BeginExecuteNonQuery() Method

Starts an asynchronous invocation of an ExecuteNonQuery method.

[Visual Basic]
Overloads Public Function BeginExecuteNonQuery() As IAsyncResult
[C#]
public IAsyncResult BeginExecuteNonQuery();

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

This method is a simplified overload of the BeginExecuteNonQuery method.

Refer to "Asynchronous Query Execution" article for detailed information.

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginExecuteNonQuery(AsyncCallback,Object) Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteNonQuery Method : BeginExecuteNonQuery(AsyncCallback,Object) Method

Starts an asynchronous invocation of an ExecuteNonQuery method with information for callback function.

[Visual Basic]
Overloads Public Function BeginExecuteNonQuery( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginExecuteNonQuery(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginExecuteNonQuery method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on PostgreSQL so you do not have to wait for it.

To start running a query, you have to call BeginExecuteNonQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to IAsyncResult object. After executing this method program flow continues.

When you are ready to accept query results, call EndExecuteNonQuery. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns number of rows affected by the query.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

In the example below an easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a query execution is started. The operation state (done or in progress) is checked and a report is written to the console. At last query result is rendered.

[C#]

static void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')";
  Console.WriteLine("Starting asynchronous query execution...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteNonQuery(null, null);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  try
  {
    int RowsAffected = myCommand.EndExecuteNonQuery(cres);
    Console.WriteLine("Done. Rows affected: " + RowsAffected.ToString());
  }
  catch (Exception e)
  {
    Console.WriteLine("An exception has occurred: " + e.Message);
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"
  Console.WriteLine("Starting asynchronous query execution...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteNonQuery(Nothing, Nothing)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Try
    Dim RowsAffected As Integer = myCommand.EndExecuteNonQuery(cres)
    Console.WriteLine(String.Concat("Rows affected: ", RowsAffected.ToString()))
  Catch e As Exception
    Console.WriteLine(String.Concat("An exception has occurred: ", e.Message))
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginExecuteReader Method

Devart.Common Namespace > DbCommandBase Class : BeginExecuteReader Method

Starts an asynchronous invocation of an ExecuteReader method.

Overload List

Starts an asynchronous invocation of an ExecuteReader method.

[Visual Basic] Overloads Public Function BeginExecuteReader() As IAsyncResult

[C#] public IAsyncResult BeginExecuteReader();

Starts an asynchronous invocation of an ExecuteReader method.

[Visual Basic] Overloads Public Function BeginExecuteReader(CommandBehavior) As IAsyncResult

[C#] public IAsyncResult BeginExecuteReader(CommandBehavior);

Starts an asynchronous invocation of an ExecuteReader method with information for callback function.

[Visual Basic] Overloads Public Function BeginExecuteReader(AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginExecuteReader(AsyncCallback,object);

Starts an asynchronous invocation of an ExecuteReader method with information for callback function.

[Visual Basic] Overloads Public Function BeginExecuteReader(AsyncCallback,Object,CommandBehavior) As IAsyncResult

[C#] public IAsyncResult BeginExecuteReader(AsyncCallback,object,CommandBehavior);

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginExecuteReader() Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteReader Method : BeginExecuteReader() Method

Starts an asynchronous invocation of an ExecuteReader method.

[Visual Basic]
Overloads Public Function BeginExecuteReader() As IAsyncResult
[C#]
public IAsyncResult BeginExecuteReader();

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginExecuteReader method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on PostgreSQL so you do not have to wait for it.

Refer to "Asynchronous Query Execution" article for detailed information.

To start running a query, you have to call BeginExecuteReader method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to accept query results, call EndExecuteReader. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns. Then you can treat a DbDataReader in a common way.

Example

In the example below the easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to DbDataReader and rendered to the console.

[C#]

public void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
  Console.WriteLine("Starting asynchronous retrieval of data...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteReader();
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  DbDataReader myReader = myCommand.EndExecuteReader(cres);
  try
  {
    while (myReader.Read())
    {
      Console.WriteLine(myReader.GetInt32(0).ToString() + " " + myReader.GetString(1) + " " + myReader.GetString(2));
    }
  }
  finally
  {
    myReader.Close();
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
  Console.WriteLine("Starting asynchronous retrieval of data...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteReader()
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim myReader As DbDataReader = myCommand.EndExecuteReader(cres)
  Try
    While myReader.Read()
      Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", myReader.GetString(1), " ", myReader.GetString(2)))
    End While
  Finally
    myReader.Close()
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

behavior
One of the CommandBehavior values.
See Also Languages Devart.Data Send comments on this topic.

BeginExecuteReader(CommandBehavior) Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteReader Method : BeginExecuteReader(CommandBehavior) Method

Starts an asynchronous invocation of an ExecuteReader method.

[Visual Basic]
Overloads Public Function BeginExecuteReader( _
   ByVal behavior As CommandBehavior _
) As IAsyncResult
[C#]
public IAsyncResult BeginExecuteReader(
   CommandBehavior behavior
);

Parameters

behavior
One of the CommandBehavior values.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginExecuteReader method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on PostgreSQL so you do not have to wait for it.

Refer to "Asynchronous Query Execution" article for detailed information.

To start running a query, you have to call BeginExecuteReader method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to accept query results, call EndExecuteReader. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns. Then you can treat a DbDataReader in a common way.

Example

In the example below the easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to DbDataReader and rendered to the console.

[C#]

public void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
  Console.WriteLine("Starting asynchronous retrieval of data...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteReader(CommandBehavior.Default);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  DbDataReader myReader = myCommand.EndExecuteReader(cres);
  try
  {
    while (myReader.Read())
    {
      Console.WriteLine(myReader.GetInt32(0).ToString() + " " + myReader.GetString(1) + " " + myReader.GetString(2));
    }
  }
  finally
  {
    myReader.Close();
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
  Console.WriteLine("Starting asynchronous retrieval of data...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteReader(CommandBehavior.Default)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim myReader As DbDataReader = myCommand.EndExecuteReader(cres)
  Try
    While myReader.Read()
      Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", myReader.GetString(1), " ", myReader.GetString(2)))
    End While
  Finally
    myReader.Close()
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginExecuteReader(AsyncCallback,Object) Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteReader Method : BeginExecuteReader(AsyncCallback,Object) Method

Starts an asynchronous invocation of an ExecuteReader method with information for callback function.

[Visual Basic]
Overloads Public Function BeginExecuteReader( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginExecuteReader(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginExecuteReader method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on PostgreSQL so you do not have to wait for it.

Refer to "Asynchronous Query Execution" article for detailed information.

To start running a query, you have to call BeginExecuteReader method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to accept query results, call EndExecuteReader. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns. Then you can treat a DbDataReader in a common way.

Example

In the example below the easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to DbDataReader and rendered to the console.

[C#]

public void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
  Console.WriteLine("Starting asynchronous retrieval of data...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteReader(null, null);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  DbDataReader myReader = myCommand.EndExecuteReader(cres);
  try
  {
    while (myReader.Read())
    {
      Console.WriteLine(myReader.GetInt32(0).ToString() + " " + myReader.GetString(1) + " " + myReader.GetString(2));
    }
  }
  finally
  {
    myReader.Close();
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
  Console.WriteLine("Starting asynchronous retrieval of data...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteReader(Nothing, Nothing)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim myReader As DbDataReader = myCommand.EndExecuteReader(cres)
  Try
    While myReader.Read()
      Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", myReader.GetString(1), " ", myReader.GetString(2)))
    End While
  Finally
    myReader.Close()
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members | Overload List

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
behavior
One of the CommandBehavior values.
See Also Languages Devart.Data Send comments on this topic.

BeginExecuteReader(AsyncCallback,Object,CommandBehavior) Method

Devart.Common Namespace > DbCommandBase Class > BeginExecuteReader Method : BeginExecuteReader(AsyncCallback,Object,CommandBehavior) Method

Starts an asynchronous invocation of an ExecuteReader method with information for callback function.

[Visual Basic]
Overloads Public Function BeginExecuteReader( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object, _
   ByVal behavior As CommandBehavior _
) As IAsyncResult
[C#]
public IAsyncResult BeginExecuteReader(
   AsyncCallback callback,
   object stateObject,
   CommandBehavior behavior
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
behavior
One of the CommandBehavior values.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginExecuteReader method enables you to execute a query on a server without having current thread blocked. In other words, your program can continue execution while the query runs on PostgreSQL so you do not have to wait for it.

Refer to "Asynchronous Query Execution" article for detailed information.

To start running a query, you have to call BeginExecuteReader method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to accept query results, call EndExecuteReader. If at the moment you call this function the query execution has not yet been finished, application stops and waits till the function returns. Then you can treat a DbDataReader in a common way.

Example

In the example below the easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to DbDataReader and rendered to the console.

[C#]

public void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
  Console.WriteLine("Starting asynchronous retrieval of data...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteReader(null, null, CommandBehavior.Default);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  DbDataReader myReader = myCommand.EndExecuteReader(cres);
  try
  {
    while (myReader.Read())
    {
      Console.WriteLine(myReader.GetInt32(0).ToString() + " " + myReader.GetString(1) + " " + myReader.GetString(2));
    }
  }
  finally
  {
    myReader.Close();
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
  Console.WriteLine("Starting asynchronous retrieval of data...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteReader(Nothing, Nothing, CommandBehavior.Default)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim myReader As DbDataReader = myCommand.EndExecuteReader(cres)
  Try
    While myReader.Read()
      Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", myReader.GetString(1), " ", myReader.GetString(2)))
    End While
  Finally
    myReader.Close()
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members | Overload List


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Cancel Method

Devart.Common Namespace > DbCommandBase Class : Cancel Method (DbCommandBase)

Attempts to cancel the execution of a query currently running.

[Visual Basic]
Overrides Public Sub Cancel()
[C#]
public override void Cancel();

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned by BeginExecuteNonQuery.
See Also Languages Devart.Data Send comments on this topic.

EndExecuteNonQuery Method

Devart.Common Namespace > DbCommandBase Class : EndExecuteNonQuery Method

Ends an asynchronous invocation of the ExecuteNonQuery method.

[Visual Basic]
Public Function EndExecuteNonQuery( _
   ByVal result As IAsyncResult _
) As Integer
[C#]
public int EndExecuteNonQuery(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned by BeginExecuteNonQuery.

Return Type

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.

Remarks

The function ends an asynchronous execution of a query that is started with BeginExecuteNonQuery. A pair of asynchronous functions (BeginExecuteNonQuery and EndExecuteNonQuery) can be used instead of the synchronous function ExecuteNonQuery to gain more performance and flexibility in your application.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

In the example below an easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a query execution is started. The operation state (done or in progress) is checked and a report is written to the console. At last query result is rendered.

[C#]

static void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')";
  Console.WriteLine("Starting asynchronous query execution...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteNonQuery(null, null);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  try
  {
    int RowsAffected = myCommand.EndExecuteNonQuery(cres);
    Console.WriteLine("Done. Rows affected: " + RowsAffected.ToString());
  }
  catch (Exception e)
  {
    Console.WriteLine("An exception has occurred: " + e.Message);
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"
  Console.WriteLine("Starting asynchronous query execution...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteNonQuery(Nothing, Nothing)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Try
    Dim RowsAffected As Integer = myCommand.EndExecuteNonQuery(cres)
    Console.WriteLine(String.Concat("Rows affected: ", RowsAffected.ToString()))
  Catch e As Exception
    Console.WriteLine(String.Concat("An exception has occurred: ", e.Message))
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned by BeginExecuteReader.
See Also Languages Devart.Data Send comments on this topic.

EndExecuteReader Method

Devart.Common Namespace > DbCommandBase Class : EndExecuteReader Method (DbCommandBase)

Ends an asynchronous invocation of the ExecuteReader method.

[Visual Basic]
Public Function EndExecuteReader( _
   ByVal result As IAsyncResult _
) As DbDataReader
[C#]
public DbDataReader EndExecuteReader(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned by BeginExecuteReader.

Return Type

A DbDataReader object.

Remarks

The function ends an asynchronous execution of a query that is started with BeginExecuteReader. A pair of asynchronous functions (BeginExecuteReader and EndExecuteReader) can be used instead of the synchronous function ExecuteReader to gain more performance and flexibility in your application.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

In the example below an easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to DbDataReader and rendered to the console.

[C#]

public void Async_Exec(DbConnectionBase myConnection)
{
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
  Console.WriteLine("Starting asynchronous retrieval of data...");
  myConnection.Open();
  IAsyncResult cres = myCommand.BeginExecuteReader(null, null, CommandBehavior.Default);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  DbDataReader myReader = myCommand.EndExecuteReader(cres);
  try
  {
    while (myReader.Read())
    {
      Console.WriteLine(myReader.GetInt32(0).ToString() + " " + myReader.GetString(1) + " " + myReader.GetString(2));
    }
  }
  finally
  {
    myReader.Close();
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal myConnection As DbConnectionBase)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
  Console.WriteLine("Starting asynchronous retrieval of data...")
  myConnection.Open()
  Dim cres As IAsyncResult = myCommand.BeginExecuteReader(Nothing, Nothing, CommandBehavior.Default)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim myReader As DbDataReader = myCommand.EndExecuteReader(cres)
  Try
    While myReader.Read()
      Console.WriteLine(String.Concat(myReader.GetInt32(0).ToString(), " ", myReader.GetString(1), " ", myReader.GetString(2)))
    End While
  Finally
    myReader.Close()
    myConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ExecuteNonQuery Method

Devart.Common Namespace > DbCommandBase Class : ExecuteNonQuery Method (DbCommandBase)

Executes SQL statement against the Connection and returns the number of rows affected.

[Visual Basic]
Overrides Public Function ExecuteNonQuery() As Integer
[C#]
public override int ExecuteNonQuery();

Return Type

For UPDATE, INSERT, and DELETE statements, the return value is the number of rows affected by the command. For all other types of statements, the return value is -1.

Remarks

You can use ExecuteNonQuery method to perform catalog operations (for example, querying the structure of a database or creating database objects such as tables); or to change the data in a data source, without using a DataSet, by executing UPDATE, INSERT, or DELETE statements.

Although ExecuteNonQuery does not return any rows, any output parameters or return values mapped to parameters are populated with data.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

behavior
One of the CommandBehavior values.
startRecord
Zero-based ordinal of row that result set starts with.
maxRecords
Quantity of rows in result set.
See Also Languages Devart.Data Send comments on this topic.

ExecutePageReader Method

Devart.Common Namespace > DbCommandBase Class : ExecutePageReader Method (DbCommandBase)

Returns a specific subset of rows when paging through the results of a query.

[Visual Basic]
Public Function ExecutePageReader( _
   ByVal behavior As CommandBehavior, _
   ByVal startRecord As Integer, _
   ByVal maxRecords As Integer _
) As DbDataReader
[C#]
public DbDataReader ExecutePageReader(
   CommandBehavior behavior,
   int startRecord,
   int maxRecords
);

Parameters

behavior
One of the CommandBehavior values.
startRecord
Zero-based ordinal of row that result set starts with.
maxRecords
Quantity of rows in result set.

Return Type

A DbDataReader object.

Remarks

Use method ExecutePageReader when you want to retrieve not the whole dataset but some part of it that begins with given row number and has certain quantity of rows. This is especially useful when working with large amounts of data.

If you want to retrieve all data in a dataset, use ExecuteReader instead.

Example

The example below shows how to retrieve a part of a table. If this function is called with parameters startRecord=2 and maxRecords=3, it returns 3 rows: second, third, and fourth.

[C#]

public void ExecutePaged(PgSqlConnection pgConnection, int StartRow, int PageLength)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT DeptNo, DName, Loc FROM Test.Dept", pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecutePageReader(System.Data.CommandBehavior.Default,StartRow,PageLength);
  try
  {
    while (pgReader.Read())
    {
    Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " + pgReader.GetString(1) + ", " + pgReader.GetString(2));
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub ExecutePaged(ByVal pgConnection As PgSqlConnection, ByVal StartRow As Integer, ByVal PageLength As Integer)
  Dim pgCommand As New PgSqlCommand("SELECT DeptNo, DName, Loc FROM Test.Dept", pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecutePageReader(System.Data.CommandBehavior.Default, StartRow, PageLength)
  Try
    While pgReader.Read()
      Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
      + pgReader.GetString(1) + ", " _
      + pgReader.GetString(2))
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ExecuteScalar Method

Devart.Common Namespace > DbCommandBase Class : ExecuteScalar Method

Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.

[Visual Basic]
Overrides Public Function ExecuteScalar() As Object
[C#]
public override object ExecuteScalar();

Return Type

The first column of the first row in the result set.

Remarks

Use the ExecuteScalar method to retrieve a single value (for example, an aggregate value) from a data source. This requires less code than using the ExecuteReader method, and then performing the operations necessary to generate the single value from the data returned by a DbDataReader.

Example

This example shows typical usage of ExecuteScalar method

[C#]

using(PgSqlConnection conn = new PgSqlConnection(connectionString)) {
  conn.Open();
  PgSqlCommand cmd = conn.CreateCommand();
  cmd.CommandText = "SELECT count(*) as NumberOfRegions FROM regions";
  Int64 count = Convert.ToInt64(cmd.ExecuteScalar());
}

[Visual Basic]

Dim conn As New PgSqlConnection(connectionString)
conn.Open()
Dim cmd As PgSqlCommand = conn.CreateCommand()
cmd.CommandText = "SELECT count(*) as NumberOfRegions FROM regions"
Dim count As Int64 = Convert.ToInt64(cmd.ExecuteScalar());
conn.Close()

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetRecordCount Method

Devart.Common Namespace > DbCommandBase Class : GetRecordCount Method

Returns count of records in the resultset.

[Visual Basic]
Public Function GetRecordCount() As Integer
[C#]
public int GetRecordCount();

Return Type

The count of records.

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Prepare Method

Devart.Common Namespace > DbCommandBase Class : Prepare Method (DbCommandBase)

Creates a prepared (or compiled) version of the command on the server.

[Visual Basic]
Overrides Public Sub Prepare()
[C#]
public override void Prepare();

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBase Class | DbCommandBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ResetCommandTimeout Method

Devart.Common Namespace > DbCommandBase Class : ResetCommandTimeout Method

Resets CommandTimeout to its default value, which is taken from DefaultCommandTimeout.

[Visual Basic]
Public Overridable Sub ResetCommandTimeout()
[C#]
public virtual void ResetCommandTimeout();

See Also

DbCommandBase Class | DbCommandBase Members


%%PageItemTitle%%

DbCommandBuilder Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbCommandBuilder Class

Devart.Common Namespace : DbCommandBuilder Class

Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.

For a list of all members of this type, see DbCommandBuilder members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommandBuilder
Devart.Common.DbCommandBuilderBase
Devart.Common.DbCommandBuilder
Devart.Data.PostgreSql.PgSqlCommandBuilder

Syntax

[Visual Basic]
Public MustInherit Class DbCommandBuilder
   Inherits DbCommandBuilderBase
   Implements IComponent, IDisposable
[C#]
public abstract class DbCommandBuilder : DbCommandBuilderBase, IComponent, IDisposable

Remarks

This is an abstract class implemented by Devart data providers.

See Also

DbCommandBuilder Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbCommandBuilder Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilder Class Members

Devart.Common Namespace : DbCommandBuilder Class

DbCommandBuilder overview

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property CatalogSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets a DbDataAdapter object for which Transact-SQL statements are automatically generated.
Public Property KeyFields (Inherited from DbCommandBuilderBase) | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted (Inherited from DbCommandBuilderBase) | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property RefreshingFields (Inherited from DbCommandBuilderBase) | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode (Inherited from DbCommandBuilderBase) | Gets or sets a value that indicates whether and how the DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingFields | Gets or sets the list of the fields, separated with ';' (semicolon), that should be updated with the update commands in the DbCommandBuilder. If the field is not included in the list, it will not be updated.
Public Property UpdatingTable (Inherited from DbCommandBuilderBase) | Gets or sets table name to generate update statements for.
Public Property UseCatalog (Inherited from DbCommandBuilderBase) | Specifies whether the catalog identifier is included in data source object names.
Public Property UseSchema (Inherited from DbCommandBuilderBase) | Specifies whether the schema identifier is included in data source object names.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand | Overloaded. Gets the automatically generated SQL statement required to perform deletions.
Public Method GetInsertCommand | Overloaded. Gets the automatically generated SQL statement required to perform inserts.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand | Overloaded. Gets the automatically generated SQL statement required to perform updates on the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier | Overridden. Returns the string passed as the parameter enclosed in quotes.
Public Method RefreshSchema (Inherited from DbCommandBuilderBase) | Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBuilder Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbCommandBuilder Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilder Class Properties

Devart.Common Namespace : DbCommandBuilder Class

For a list of all members of this type, see DbCommandBuilder members.

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property CatalogSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets a DbDataAdapter object for which Transact-SQL statements are automatically generated.
Public Property KeyFields (Inherited from DbCommandBuilderBase) | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted (Inherited from DbCommandBuilderBase) | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property RefreshingFields (Inherited from DbCommandBuilderBase) | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode (Inherited from DbCommandBuilderBase) | Gets or sets a value that indicates whether and how the DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingFields | Gets or sets the list of the fields, separated with ';' (semicolon), that should be updated with the update commands in the DbCommandBuilder. If the field is not included in the list, it will not be updated.
Public Property UpdatingTable (Inherited from DbCommandBuilderBase) | Gets or sets table name to generate update statements for.
Public Property UseCatalog (Inherited from DbCommandBuilderBase) | Specifies whether the catalog identifier is included in data source object names.
Public Property UseSchema (Inherited from DbCommandBuilderBase) | Specifies whether the schema identifier is included in data source object names.

See Also

DbCommandBuilder Class | Devart.Common Namespace


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatingFields Property

Devart.Common Namespace > DbCommandBuilder Class : UpdatingFields Property (DbCommandBuilder)

Gets or sets the list of the fields, separated with ';' (semicolon), that should be updated with the update commands in the DbCommandBuilder. If the field is not included in the list, it will not be updated.

[Visual Basic]
Public MustOverride Property UpdatingFields As String
[C#]
public abstract string UpdatingFields {get; set;}

Return Type

The list of the fields, separated with ';' (semicolon), that should be updated with the update commands in the DbCommandBuilder.

Remarks

If the property contains an empty string, all fields will be updated.

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%% $$Methods$$

DbCommandBuilder Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilder Class Methods

Devart.Common Namespace : DbCommandBuilder Class

For a list of all members of this type, see DbCommandBuilder members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand | Overloaded. Gets the automatically generated SQL statement required to perform deletions.
Public Method GetInsertCommand | Overloaded. Gets the automatically generated SQL statement required to perform inserts.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand | Overloaded. Gets the automatically generated SQL statement required to perform updates on the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier | Overridden. Returns the string passed as the parameter enclosed in quotes.
Public Method RefreshSchema (Inherited from DbCommandBuilderBase) | Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.

See Also

DbCommandBuilder Class | Devart.Common Namespace


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDeleteCommand Method

Devart.Common Namespace > DbCommandBuilder Class : GetDeleteCommand Method (DbCommandBuilder)

Gets the automatically generated SQL statement required to perform deletions.

Overload List

Gets the automatically generated SQL statement required to perform deletions when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetDeleteCommand() As DbCommand

[C#] public DbCommand GetDeleteCommand();

Gets the automatically generated SQL statement required to perform deletions when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetDeleteCommand(Boolean) As DbCommand

[C#] public DbCommand GetDeleteCommand(bool);

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDeleteCommand() Method

Devart.Common Namespace > DbCommandBuilder Class > GetDeleteCommand Method : GetDeleteCommand() Method

Gets the automatically generated SQL statement required to perform deletions when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetDeleteCommand() As DbCommand
[C#]
public DbCommand GetDeleteCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetDeleteCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetDeleteCommand as the basis of a modified command. For example, you might call GetDeleteCommand and modify the CommandTimeout value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetDeleteCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetDeleteCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetDeleteCommand(Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetDeleteCommand Method : GetDeleteCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform deletions when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetDeleteCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetDeleteCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetDeleteCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetDeleteCommand as the basis of a modified command. For example, you might call GetDeleteCommand and modify the CommandTimeout value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetDeleteCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetDeleteCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetInsertCommand Method

Devart.Common Namespace > DbCommandBuilder Class : GetInsertCommand Method (DbCommandBuilder)

Gets the automatically generated SQL statement required to perform inserts.

Overload List

Gets the automatically generated SQL statement required to perform inserts when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand() As DbCommand

[C#] public DbCommand GetInsertCommand();

Gets the automatically generated SQL statement required to perform inserts when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand(Boolean) As DbCommand

[C#] public DbCommand GetInsertCommand(bool);

Gets the automatically generated SQL statement required to perform inserts for the specified fields when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand(String(),Boolean) As DbCommand

[C#] public DbCommand GetInsertCommand(string[],bool);

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetInsertCommand() Method

Devart.Common Namespace > DbCommandBuilder Class > GetInsertCommand Method : GetInsertCommand() Method

Gets the automatically generated SQL statement required to perform inserts when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand() As DbCommand
[C#]
public DbCommand GetInsertCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetInsertCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetInsertCommand as the basis of a modified command. For example, you might call GetInsertCommand and modify the CommandTimeout value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetInsertCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetInsertCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetInsertCommand(Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetInsertCommand Method : GetInsertCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform inserts when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetInsertCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetInsertCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetInsertCommand as the basis of a modified command. For example, you might call GetInsertCommand and modify the CommandTimeout value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetInsertCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetInsertCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetInsertCommand(String[],Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetInsertCommand Method : GetInsertCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to perform inserts for the specified fields when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetInsertCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

This overload of the method allows you to restrict list of columns that are included in the generated statement.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand Method

Devart.Common Namespace > DbCommandBuilder Class : GetRefreshCommand Method (DbCommandBuilder)

Gets the automatically generated SQL statement required to refresh values from the data source.

Overload List

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand() As DbCommand

[C#] public DbCommand GetRefreshCommand();

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(Boolean) As DbCommand

[C#] public DbCommand GetRefreshCommand(bool);

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(String(),Boolean) As DbCommand

[C#] public DbCommand GetRefreshCommand(string[],bool);

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand() Method

Devart.Common Namespace > DbCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand() Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand() As DbCommand
[C#]
public DbCommand GetRefreshCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand(Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand(Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetRefreshCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand(String[],Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetRefreshCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetUpdateCommand Method

Devart.Common Namespace > DbCommandBuilder Class : GetUpdateCommand Method (DbCommandBuilder)

Gets the automatically generated SQL statement required to perform updates on the data source.

Overload List

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand() As DbCommand

[C#] public DbCommand GetUpdateCommand();

Gets the automatically generated SQL statement required to perform updates when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand(Boolean) As DbCommand

[C#] public DbCommand GetUpdateCommand(bool);

Gets the automatically generated SQL statement required to perform updates for the specified fields when an application calls Update on the IDbDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand(String(),Boolean) As DbCommand

[C#] public DbCommand GetUpdateCommand(string[],bool);

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetUpdateCommand() Method

Devart.Common Namespace > DbCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand() Method

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand() As DbCommand
[C#]
public DbCommand GetUpdateCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand and modify the CommandText value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetUpdateCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetUpdateCommand(Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform updates when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetUpdateCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

You can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the DbCommand object to be executed.

You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand and modify the CommandText value, and then explicitly set that on the DbDataAdapter.

After the SQL statement is first generated, you must explicitly call DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetUpdateCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetUpdateCommand(String[],Boolean) Method

Devart.Common Namespace > DbCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to perform updates for the specified fields when an application calls Update on the IDbDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As DbCommand
[C#]
public DbCommand GetUpdateCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

Remarks

This overload of the method allows to restrict list of columns that are included in the generated statement.

See Also

DbCommandBuilder Class | DbCommandBuilder Members | Overload List


%%PageItemTitle%%

DbCommandBuilder Class | DbCommandBuilder Members

Language

Visual Basic

C#

Show All

unquotedIdentifier
Identifier to be placed inside the quotes.
See Also Languages Devart.Data Send comments on this topic.

QuoteIdentifier Method

Devart.Common Namespace > DbCommandBuilder Class : QuoteIdentifier Method (DbCommandBuilder)

Returns the string passed as the parameter enclosed in quotes.

[Visual Basic]
Overrides Public Function QuoteIdentifier( _
   ByVal unquotedIdentifier As String _
) As String
[C#]
public override string QuoteIdentifier(
   string unquotedIdentifier
);

Parameters

unquotedIdentifier
Identifier to be placed inside the quotes.

Return Type

The identifier enclosed in quotes.

Remarks

This method constructs a quoted identifier by concatenating QuotePrefix, unquotedIdentifier, and QuoteSuffix.

See Also

DbCommandBuilder Class | DbCommandBuilder Members


%%PageItemTitle%%

DbCommandBuilderBase Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbCommandBuilderBase Class

Devart.Common Namespace : DbCommandBuilderBase Class

Allows to automatically generate single-table commands used to reconcile changes made to a DataSet with the associated data source.

For a list of all members of this type, see DbCommandBuilderBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommandBuilder
Devart.Common.DbCommandBuilderBase
Devart.Common.DbCommandBuilder

Syntax

[Visual Basic]
Public MustInherit Class DbCommandBuilderBase
   Inherits DbCommandBuilder
   Implements IComponent, IDisposable
[C#]
public abstract class DbCommandBuilderBase : DbCommandBuilder, IComponent, IDisposable

Remarks

This is an abstract class implemented by Devart data providers.

See Also

DbCommandBuilderBase Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbCommandBuilderBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilderBase Class Members

Devart.Common Namespace : DbCommandBuilderBase Class

DbCommandBuilderBase overview

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property CatalogSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets a DbDataAdapter object for which Transact-SQL statements are automatically generated.
Public Property KeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property QuotePrefix (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
Public Property QuoteSuffix (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.
Public Property UseCatalog | Specifies whether the catalog identifier is included in data source object names.
Public Property UseSchema | Specifies whether the schema identifier is included in data source object names.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform deletions at the data source.
Public Method GetInsertCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform insertions at the data source.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform updates at the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier.
Public Method RefreshSchema | Overridden. Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBuilderBase Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbCommandBuilderBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilderBase Class Properties

Devart.Common Namespace : DbCommandBuilderBase Class

For a list of all members of this type, see DbCommandBuilderBase members.

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property CatalogSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets a string used as the catalog separator for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets a DbDataAdapter object for which Transact-SQL statements are automatically generated.
Public Property KeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property QuotePrefix (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the beginning character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
Public Property QuoteSuffix (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the ending character or characters to use when specifying database objects (for example, tables or columns) whose names contain characters such as spaces or reserved tokens.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.
Public Property UseCatalog | Specifies whether the catalog identifier is included in data source object names.
Public Property UseSchema | Specifies whether the schema identifier is included in data source object names.

See Also

DbCommandBuilderBase Class | Devart.Common Namespace


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

KeyFields Property

Devart.Common Namespace > DbCommandBuilderBase Class : KeyFields Property (DbCommandBuilderBase)

Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.

[Visual Basic]
Public Property KeyFields As String
[C#]
public string KeyFields {get; set;}

Return Type

The string containing list of key field names separated by semicolon.

Remarks

This property is used when the ConflictOption property is set to OverwriteChanges, otherwise all columns will be used in the WHERE clause.

If KeyFields is nonempty, its value is used as list of columns for the WHERE clause. If KeyFields is empty, the primary key columns are used.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Quoted Property

Devart.Common Namespace > DbCommandBuilderBase Class : Quoted Property (DbCommandBuilderBase)

Gets or sets whether the command builder quotes all the names of data source objects.

[Visual Basic]
Public Overridable Property Quoted As Boolean
[C#]
public virtual bool Quoted {get; set;}

Return Type

true if the command builder will quote all the names of data source objects; otherwise, false. The default value is false.

Remarks

Names of data source objects can contain any characters, including spaces, commas, national or lowercase characters. To accommodate this, use the Quoted property that allows enclosing of all objects names by quotation mark in generated SQL statement.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshingFields Property

Devart.Common Namespace > DbCommandBuilderBase Class : RefreshingFields Property (DbCommandBuilderBase)

Gets or sets list of fields whose values should be retrieved after a DML statement execution.

[Visual Basic]
Public Overridable Property RefreshingFields As String
[C#]
public virtual string RefreshingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Remarks

This property is used in conjunction with RefreshMode.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members | RefreshingFields Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshMode Property

Devart.Common Namespace > DbCommandBuilderBase Class : RefreshMode Property (DbCommandBuilderBase)

Gets or sets a value that indicates whether and how the DbCommandBuilderBase should retrieve field values adjusted by server after an update.

[Visual Basic]
Public Property RefreshMode As RefreshRowMode
[C#]
public RefreshRowMode RefreshMode {get; set;}

Return Type

One of the RefreshRowMode values.

Remarks

This feature is supported for PostgreSQL server versions 8.2 and higher.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members | RefreshingFields Property


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatingTable Property

Devart.Common Namespace > DbCommandBuilderBase Class : UpdatingTable Property (DbCommandBuilderBase)

Gets or sets table name to generate update statements for.

[Visual Basic]
Public Property UpdatingTable As String
[C#]
public string UpdatingTable {get; set;}

Return Type

The name of the table.

Remarks

Use the UpdatingTable property to generate SQL statements for specific table in a complicated query.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UseCatalog Property

Devart.Common Namespace > DbCommandBuilderBase Class : UseCatalog Property (DbCommandBuilderBase)

Specifies whether the catalog identifier is included in data source object names.

[Visual Basic]
Public Overridable Property UseCatalog As Boolean
[C#]
public virtual bool UseCatalog {get; set;}

Return Type

true if the catalog identifier is included in data source object names; otherwise, false. The default value is false.

Remarks

If true, data source object names in the generated CUD statements will contain the catalog identifier.

Catalog is a second-level data container. This property is only reasonable with UseSchema being true.

For example, if this property is true, the generated INSERT statement will look like the following:

INSERT INTO mycatalog.myschema.mytable ...

And if this property is false, the generated INSERT statement will look like the following:

INSERT INTO myschema.mytable ...

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UseSchema Property

Devart.Common Namespace > DbCommandBuilderBase Class : UseSchema Property

Specifies whether the schema identifier is included in data source object names.

[Visual Basic]
Public Overridable Property UseSchema As Boolean
[C#]
public virtual bool UseSchema {get; set;}

Return Type

true if the schema identifier is included in data source object names; otherwise, false. The default value is true.

Remarks

If true, data source object names in the generated CUD statements will contain the schema identifier.

schema is a first-level data container.

For example, if this property is true, the generated INSERT statement will look like the following:

INSERT INTO myschema.mytable ...

And if this property is false, the generated INSERT statement will look like the following:

INSERT INTO mytable ...

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%% $$Methods$$

DbCommandBuilderBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilderBase Class Methods

Devart.Common Namespace : DbCommandBuilderBase Class

For a list of all members of this type, see DbCommandBuilderBase members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform deletions at the data source.
Public Method GetInsertCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform insertions at the data source.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand (Inherited from System.Data.Common.DbCommandBuilder) | Overloaded. Gets the automatically generated DbCommand object required to perform updates at the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given an unquoted identifier in the correct catalog case, returns the correct quoted form of that identifier, including properly escaping any embedded quotes in the identifier.
Public Method RefreshSchema | Overridden. Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier (Inherited from System.Data.Common.DbCommandBuilder) | Given a quoted identifier, returns the correct unquoted form of that identifier, including properly un-escaping any embedded quotes in the identifier.

See Also

DbCommandBuilderBase Class | Devart.Common Namespace


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand Method

Devart.Common Namespace > DbCommandBuilderBase Class : GetRefreshCommand Method (DbCommandBuilderBase)

Gets the automatically generated SQL statement required to refresh values from the data source.

Overload List

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand() As IDbCommand

[C#] public IDbCommand GetRefreshCommand();

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(Boolean) As IDbCommand

[C#] public IDbCommand GetRefreshCommand(bool);

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(String(),Boolean) As IDbCommand

[C#] public IDbCommand GetRefreshCommand(string[],bool);

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand() Method

Devart.Common Namespace > DbCommandBuilderBase Class > GetRefreshCommand Method : GetRefreshCommand() Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand() As IDbCommand
[C#]
public IDbCommand GetRefreshCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand(Boolean) Method

Devart.Common Namespace > DbCommandBuilderBase Class > GetRefreshCommand Method : GetRefreshCommand(Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As IDbCommand
[C#]
public IDbCommand GetRefreshCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List

Language

Visual Basic

C#

Show All

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data Send comments on this topic.

GetRefreshCommand(String[],Boolean) Method

Devart.Common Namespace > DbCommandBuilderBase Class > GetRefreshCommand Method : GetRefreshCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As IDbCommand
[C#]
public IDbCommand GetRefreshCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members | Overload List


%%PageItemTitle%%

DbCommandBuilderBase Class | DbCommandBuilderBase Members | RefreshMode Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshSchema Method

Devart.Common Namespace > DbCommandBuilderBase Class : RefreshSchema Method

Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.

[Visual Basic]
Overrides Public Sub RefreshSchema()
[C#]
public override void RefreshSchema();

Remarks

You can call this method to ensure that changes made to the schema are up-to-date.

See Also

DbCommandBuilderBase Class | DbCommandBuilderBase Members | RefreshMode Property


%%PageItemTitle%%

DbConnectionStringBuilder Members | Devart.Common Namespace | PgSqlConnectionStringBuilder Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbConnectionStringBuilder Class

Devart.Common Namespace : DbConnectionStringBuilder Class

Generates automatically connection strings used to connect to a data source.

For a list of all members of this type, see DbConnectionStringBuilder members.

Inheritance Hierarchy

System.Object
System.Data.Common.DbConnectionStringBuilder
Devart.Common.DbConnectionStringBuilder
Devart.Data.PostgreSql.PgSqlConnectionStringBuilder

Syntax

[Visual Basic]
Public Class DbConnectionStringBuilder
   Inherits DbConnectionStringBuilder
   Implements ICollection, IDictionary, IEnumerable, ICustomTypeDescriptor
[C#]
public class DbConnectionStringBuilder : DbConnectionStringBuilder, ICollection, IDictionary, IEnumerable, ICustomTypeDescriptor

Remarks

The DbConnectionStringBuilder class provides the base class from which the strongly typed connection string builders (Devart.Data.PostgreSql.PgSqlConnectionStringBuilder) are derived. The connection string builders let developers programmatically create syntactically correct connection strings, and parse and rebuild existing connection strings. The DbConnectionStringBuilder has been defined in a data source-agnostic manner. Because of the addition of the Devart.Common namespace, developers require a base class against which they can program in order to build connection strings that can work against an arbitrary database. But it is possible using this class to create invalid connection strings. It is recommended to use the strongly typed connection string builders (Devart.Data.PostgreSql.PgSqlConnectionStringBuilder and so on) because they support only key/value pairs that are supported by particular data source; trying to add invalid pairs will throw an exception. For more information, refer to the description of the DbConnectionStringBuilder class in MSDN.

Example

[C#]

Devart.Common.DbConnectionStringBuilder csb = new Devart.Common.DbConnectionStringBuilder();
csb["Host"] = "server";
csb["Port"] = 3306;
csb["User Id"] = "postgres";
csb["Password"] = "postgres";
csb["Database"] = "test";
csb["Max Pool Size"] = 150;
csb["Connection Timeout"] = 30;
Devart.Data.PostgreSql.PgSqlConnection myConnection = new Devart.Data.PostgreSql.PgSqlConnection(csb.ConnectionString);

[Visual Basic]

Dim csb As Devart.Common.DbConnectionStringBuilder = New Devart.Common.DbConnectionStringBuilder
csb("Host") = "server"
csb("Port") = 3306
csb("User Id") = "postgres"
csb("Password") = "postgres"
csb("Database") = "test"
csb("Max Pool Size") = 150
csb("Connection Timeout") = 30
Dim myConnection As Devart.Data.PostgreSql.PgSqlConnection = New Devart.Data.PostgreSql.PgSqlConnection(csb.ConnectionString)

See Also

DbConnectionStringBuilder Members | Devart.Common Namespace | PgSqlConnectionStringBuilder Class


%%PageItemTitle%% $$Members$$

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class

See Also Devart.Data Send comments on this topic.

DbConnectionStringBuilder Class Members

Devart.Common Namespace : DbConnectionStringBuilder Class

DbConnectionStringBuilder overview

Public Constructors

Public Constructor DbConnectionStringBuilder Constructor Initializes a new instance of the DbConnectionStringBuilder class.

Public Properties

Public Property ConnectionString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets or sets the connection string associated with the DbConnectionStringBuilder.
Public Property Count (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets the current number of keys that are contained within the ConnectionString property.
Public Property InitializationCommand | Specifies a data source-specific command that should be executed immediately after establishing the connection.
Public Property IsFixedSize (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.
Public Property IsReadOnly (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder is read-only.
Public Property Item | Overridden. Gets or sets the value associated with the specified key.
Public Property Keys (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets an ICollection that contains the keys in the DbConnectionStringBuilder.
Public Property Values (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets an ICollection that contains the values in the DbConnectionStringBuilder.

Public Methods

Public Method Add (Inherited from System.Data.Common.DbConnectionStringBuilder) | Adds an entry with the specified key and value into the DbConnectionStringBuilder.
Public Method Clear (Inherited from System.Data.Common.DbConnectionStringBuilder) | Clears the contents of the DbConnectionStringBuilder instance.
Public Method ContainsKey (Inherited from System.Data.Common.DbConnectionStringBuilder) | Determines whether the DbConnectionStringBuilder contains a specific key.
Public Method EquivalentTo | Overloaded. Compares the specified connection information in this DbConnectionStringBuilder object with the specified connection information in the supplied DbConnectionStringBuilder object.
Public Method Remove (Inherited from System.Data.Common.DbConnectionStringBuilder) | Removes the entry with the specified key from the DbConnectionStringBuilder instance.
Public Method ShouldSerialize (Inherited from System.Data.Common.DbConnectionStringBuilder) | Indicates whether the specified key exists in this DbConnectionStringBuilder instance.
Public Method ToString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Returns the connection string associated with this DbConnectionStringBuilder.
Public Method TryGetValue (Inherited from System.Data.Common.DbConnectionStringBuilder) | Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder.

See Also

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class


%%PageItemTitle%%

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbConnectionStringBuilder Constructor

Devart.Common Namespace > DbConnectionStringBuilder Class : DbConnectionStringBuilder Constructor (DbConnectionStringBuilder)

Initializes a new instance of the DbConnectionStringBuilder class.

[Visual Basic]
Public Function New()
[C#]
public DbConnectionStringBuilder();

See Also

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members


%%PageItemTitle%% $$Properties$$

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class

See Also Devart.Data Send comments on this topic.

DbConnectionStringBuilder Class Properties

Devart.Common Namespace : DbConnectionStringBuilder Class

For a list of all members of this type, see DbConnectionStringBuilder members.

Public Properties

Public Property ConnectionString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets or sets the connection string associated with the DbConnectionStringBuilder.
Public Property Count (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets the current number of keys that are contained within the ConnectionString property.
Public Property InitializationCommand | Specifies a data source-specific command that should be executed immediately after establishing the connection.
Public Property IsFixedSize (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder has a fixed size.
Public Property IsReadOnly (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder is read-only.
Public Property Item | Overridden. Gets or sets the value associated with the specified key.
Public Property Keys (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets an ICollection that contains the keys in the DbConnectionStringBuilder.
Public Property Values (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets an ICollection that contains the values in the DbConnectionStringBuilder.

See Also

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class


%%PageItemTitle%%

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

InitializationCommand Property

Devart.Common Namespace > DbConnectionStringBuilder Class : InitializationCommand Property

Specifies a data source-specific command that should be executed immediately after establishing the connection.

[Visual Basic]
Public Property InitializationCommand As String
[C#]
public string InitializationCommand {get; set;}

Return Type

A data source-specific command that should be executed immediately after establishing the connection.

Remarks

If this command fails, the connection is not established. Devart.Data.PostgreSql.PgSqlConnection throws an exception with the error returned by PostgreSQL.

See Also

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members


%%PageItemTitle%%

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
The key of the item to get or set.
See Also Languages Devart.Data Send comments on this topic.

Item Property

Devart.Common Namespace > DbConnectionStringBuilder Class : Item Property (DbConnectionStringBuilder)

Gets or sets the value associated with the specified key.

[Visual Basic]
Overrides Public Default Property Item( _
   ByVal keyword As String _
) As Object
[C#]
public override object this[
   string keyword
]; {get; set;}

Parameters

keyword
The key of the item to get or set.

Return Type

Value associated with the specified key.

Remarks

If the specified key is not found, trying to get it returns null, and trying to set it creates a new element using the specified key. Assigning a null value removes the key/value pair.

See Also

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members


%%PageItemTitle%% $$Methods$$

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class

See Also Devart.Data Send comments on this topic.

DbConnectionStringBuilder Class Methods

Devart.Common Namespace : DbConnectionStringBuilder Class

For a list of all members of this type, see DbConnectionStringBuilder members.

Public Methods

Public Method Add (Inherited from System.Data.Common.DbConnectionStringBuilder) | Adds an entry with the specified key and value into the DbConnectionStringBuilder.
Public Method Clear (Inherited from System.Data.Common.DbConnectionStringBuilder) | Clears the contents of the DbConnectionStringBuilder instance.
Public Method ContainsKey (Inherited from System.Data.Common.DbConnectionStringBuilder) | Determines whether the DbConnectionStringBuilder contains a specific key.
Public Method EquivalentTo | Overloaded. Compares the specified connection information in this DbConnectionStringBuilder object with the specified connection information in the supplied DbConnectionStringBuilder object.
Public Method Remove (Inherited from System.Data.Common.DbConnectionStringBuilder) | Removes the entry with the specified key from the DbConnectionStringBuilder instance.
Public Method ShouldSerialize (Inherited from System.Data.Common.DbConnectionStringBuilder) | Indicates whether the specified key exists in this DbConnectionStringBuilder instance.
Public Method ToString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Returns the connection string associated with this DbConnectionStringBuilder.
Public Method TryGetValue (Inherited from System.Data.Common.DbConnectionStringBuilder) | Retrieves a value corresponding to the supplied key from this DbConnectionStringBuilder.

See Also

DbConnectionStringBuilder Class | Devart.Common Namespace | PgSqlConnectionStringBuilder Class


%%PageItemTitle%%

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

EquivalentTo Method

Devart.Common Namespace > DbConnectionStringBuilder Class : EquivalentTo Method (DbConnectionStringBuilder)

Compares the specified connection information in this DbConnectionStringBuilder object with the specified connection information in the supplied DbConnectionStringBuilder object.

Overload List

Compares the specified connection information in this DbConnectionStringBuilder object with the specified connection information in the supplied DbConnectionStringBuilder object.

[Visual Basic] Overloads Public Overridable Function EquivalentTo(DbConnectionStringBuilder,Boolean) As Boolean

[C#] public virtual bool EquivalentTo(DbConnectionStringBuilder,bool);

Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.

[Visual Basic] Overloads Public Overridable Function EquivalentTo(DbConnectionStringBuilder) As Boolean

[C#] public virtual bool EquivalentTo(DbConnectionStringBuilder);

See Also

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members


%%PageItemTitle%%

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members | Overload List

Language

Visual Basic

C#

Show All

connectionStringBuilder
The DbConnectionStringBuilder to be compared with this DbConnectionStringBuilder object.
loginOnly
If this parameter is true, only the following DbConnectionStringBuilder properties are compared:
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Password
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.UserId
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Host
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Port
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Database
If this parameter is false, all the DbConnectionStringBuilder properties are compared.
See Also Languages Devart.Data Send comments on this topic.

EquivalentTo(DbConnectionStringBuilder,Boolean) Method

Devart.Common Namespace > DbConnectionStringBuilder Class > EquivalentTo Method : EquivalentTo(DbConnectionStringBuilder,Boolean) Method

Compares the specified connection information in this DbConnectionStringBuilder object with the specified connection information in the supplied DbConnectionStringBuilder object.

[Visual Basic]
Overloads Public Overridable Function EquivalentTo( _
   ByVal connectionStringBuilder As DbConnectionStringBuilder, _
   ByVal loginOnly As Boolean _
) As Boolean
[C#]
public virtual bool EquivalentTo(
   DbConnectionStringBuilder connectionStringBuilder,
   bool loginOnly
);

Parameters

connectionStringBuilder
The DbConnectionStringBuilder to be compared with this DbConnectionStringBuilder object.
loginOnly
If this parameter is true, only the following DbConnectionStringBuilder properties are compared:
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Password
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.UserId
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Host
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Port
  • Devart.Data.PostgreSql.PgSqlConnectionStringBuilder.Database
If this parameter is false, all the DbConnectionStringBuilder properties are compared.

Return Type

trueif the specified connection information in both of the DbConnectionStringBuilder objects is equal; otherwise, false.

See Also

DbConnectionStringBuilder Class | DbConnectionStringBuilder Members | Overload List


%%PageItemTitle%%

DbDataAdapter Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDataAdapter Class

Devart.Common Namespace : DbDataAdapter Class

Represents a set of data commands and a data source connection that are used to fill the DataSet and update a data source.

For a list of all members of this type, see DbDataAdapter members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
Devart.Common.DbDataAdapter
Devart.Data.PostgreSql.PgSqlDataAdapter

Syntax

[Visual Basic]
Public MustInherit Class DbDataAdapter
   Inherits DbDataAdapter
   Implements IComponent, IDataAdapter, IDbDataAdapter, ICloneable, IDisposable
[C#]
public abstract class DbDataAdapter : DbDataAdapter, IComponent, IDataAdapter, IDbDataAdapter, ICloneable, IDisposable

Remarks

This is an abstract class implemented by Devart data providers.

See Also

DbDataAdapter Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbDataAdapter Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataAdapter Class Members

Devart.Common Namespace : DbDataAdapter Class

DbDataAdapter overview

Public Properties

Public Property AcceptChangesDuringFill (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations.
Public Property AcceptChangesDuringUpdate (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether AcceptChanges is called during a Update.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property ContinueUpdateOnError (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.
Public Property DeleteCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command for deleting records from the data set.
Public Property FillLoadOption (Inherited from System.Data.Common.DataAdapter) | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.
Public Property InsertCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to insert new records into the data source.
Public Property MissingMappingAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when incoming data does not have a matching table or column.
Public Property MissingSchemaAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property ReturnProviderSpecificTypes (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.
Public Property SelectCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to select records in the data source.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableMappings (Inherited from System.Data.Common.DataAdapter) | Gets a collection that provides the master mapping between a source table and a DataTable.
Public Property UpdateBatchSize (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to update records in the data source.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Fill (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Adds or refreshes rows in the DataSet.
Public Method FillPage | Fills associated DataSet with specified range of rows.
Public Method FillSchema (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Configures the schema of the specified DataTable based on the specified SchemaType.
Public Method GetFillParameters (Inherited from System.Data.Common.DbDataAdapter) | Gets the parameters set by the user when executing an SQL SELECT statement.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event FillError (Inherited from System.Data.Common.DataAdapter) | Returned when an error occurs during a fill operation.

See Also

DbDataAdapter Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

DbDataAdapter Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataAdapter Class Methods

Devart.Common Namespace : DbDataAdapter Class

For a list of all members of this type, see DbDataAdapter members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Fill (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Adds or refreshes rows in the DataSet.
Public Method FillPage | Fills associated DataSet with specified range of rows.
Public Method FillSchema (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Configures the schema of the specified DataTable based on the specified SchemaType.
Public Method GetFillParameters (Inherited from System.Data.Common.DbDataAdapter) | Gets the parameters set by the user when executing an SQL SELECT statement.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.

See Also

DbDataAdapter Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataAdapter Class | DbDataAdapter Members

Language

Visual Basic

C#

Show All

dataTable
A DataTable to fill.
startRecord
Ordinal of row that result set starts with.
maxRecords
Quantity of rows to fill.
See Also Languages Devart.Data Send comments on this topic.

FillPage Method

Devart.Common Namespace > DbDataAdapter Class : FillPage Method (DbDataAdapter)

Fills associated DataSet with specified range of rows.

[Visual Basic]
Public Function FillPage( _
   ByVal dataTable As DataTable, _
   ByVal startRecord As Integer, _
   ByVal maxRecords As Integer _
) As Integer
[C#]
public int FillPage(
   DataTable dataTable,
   int startRecord,
   int maxRecords
);

Parameters

dataTable
A DataTable to fill.
startRecord
Ordinal of row that result set starts with.
maxRecords
Quantity of rows to fill.

Return Type

Number of rows filled.

See Also

DbDataAdapter Class | DbDataAdapter Members


%%PageItemTitle%%

DbDataReaderBase Members | Devart.Common Namespace | DbDataReader

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDataReaderBase Class

Devart.Common Namespace : DbDataReaderBase Class

Allows to read a forward-only stream of rows from a data source.

For a list of all members of this type, see DbDataReaderBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbDataReader
Devart.Common.DbDataReaderBase
Devart.Data.PostgreSql.PgSqlDataReader

Syntax

[Visual Basic]
Public MustInherit Class DbDataReaderBase
   Inherits DbDataReader
   Implements IEnumerable, IDataReader, IDataRecord, IDisposable
[C#]
public abstract class DbDataReaderBase : DbDataReader, IEnumerable, IDataReader, IDataRecord, IDisposable

Remarks

Abstract DbDataReaderBase class implements some of DbDataReader functionality that is DBMS-independent.

See Also

DbDataReaderBase Members | Devart.Common Namespace | DbDataReader


%%PageItemTitle%% $$Members$$

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader

See Also Devart.Data Send comments on this topic.

DbDataReaderBase Class Members

Devart.Common Namespace : DbDataReaderBase Class

DbDataReaderBase overview

Public Properties

Public Property Depth | Overridden. Gets a value indicating the depth of nesting for the current row.
Public Property EndOfData | Indicates whether the DbDataReaderBase has been read completely.
Public Property FieldCount | Overridden. Gets the number of columns in the current row.
Public Property HasRows | Overridden. Gets a value indicating whether the DbDataReader contains one or more rows.
Public Property IsClosed | Overridden. Gets a value indicating whether the data reader is closed.
Public Property Item | Overloaded. Overridden. Gets the value of the specified column in its native format given the column name.
Public Property RecordsAffected | Overridden. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property VisibleFieldCount (Inherited from System.Data.Common.DbDataReader) | Gets the number of fields in the DbDataReader that are not hidden.

Public Methods

Public Method Close | Overridden. Closes the DbDataReaderBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetBoolean | Overloaded. Gets the value of the specified column as a Boolean.
Public Method GetByte | Overloaded. Gets the value of the specified column as a byte.
Public Method GetBytes | Overloaded. Overridden. Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetChar | Overloaded. Gets the value of the specified column as a single character.
Public Method GetChars | Overloaded. Overridden. Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetDataTypeName | Overloaded. Overridden. Gets the name of the source data type.
Public Method GetDateTime | Overloaded. Gets the value of the specified column as a DateTime object.
Public Method GetDateTimeOffset | Overloaded. Gets the value of the specified column as a DateTimeOffset object.
Public Method GetDecimal | Overloaded. Gets the value of the specified column as a DateTime object.
Public Method GetDouble | Overloaded. Gets the value of the specified column as a double-precision floating point number.
Public Method GetEnumerator | Overridden. Fills IEnumerator object with data from DbDataReaderBase.
Public Method GetFieldType | Overloaded. Overridden. Gets the Type that is the data type of the object.
Public Method GetFloat | Overloaded. Gets the value of the specified column as a single-precision floating point number.
Public Method GetGuid | Overloaded. Gets the value of the specified column as a globally-unique identifier (GUID).
Public Method GetInt16 | Overloaded. Gets the value of the specified column as a 16-bit signed integer.
Public Method GetInt32 | Overloaded. Gets the value of the specified column as a 32-bit signed integer.
Public Method GetInt64 | Overloaded. Gets the value of the specified column as a 64-bit signed integer.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetName | Overridden. Gets the name of the specified column.
Public Method GetOrdinal | Overridden. Gets the column ordinal, given the name of the column.
Public Method GetProviderSpecificFieldType | Overloaded. Returns the provider-specific field type of the specified column.
Public Method GetProviderSpecificValue | Overloaded. Gets the value of the specified column as an instance of Object
Public Method GetSchemaTable | Overridden. Returns a DataTable that describes the column metadata of the DbDataReaderBase.
Public Method GetString | Overloaded. Gets the value of the specified column as an instance of String
Public Method GetValue | Overloaded. Overridden. Gets the value of the specified column in its native format.
Public Method GetValues | Overridden. Gets all attribute columns in the collection for the current row.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method IsDBNull | Overloaded. Gets a value indicating whether the column contains non-existent or missing values.
Public Method NextResult | Overridden. Advances the data reader to the next result, when reading the results of batch SQL statements.
Public Method Read | Overridden. Advances the DbDataReaderBase to the next record.

See Also

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader


%%PageItemTitle%% $$Properties$$

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader

See Also Devart.Data Send comments on this topic.

DbDataReaderBase Class Properties

Devart.Common Namespace : DbDataReaderBase Class

For a list of all members of this type, see DbDataReaderBase members.

Public Properties

Public Property Depth | Overridden. Gets a value indicating the depth of nesting for the current row.
Public Property EndOfData | Indicates whether the DbDataReaderBase has been read completely.
Public Property FieldCount | Overridden. Gets the number of columns in the current row.
Public Property HasRows | Overridden. Gets a value indicating whether the DbDataReader contains one or more rows.
Public Property IsClosed | Overridden. Gets a value indicating whether the data reader is closed.
Public Property Item | Overloaded. Overridden. Gets the value of the specified column in its native format given the column name.
Public Property RecordsAffected | Overridden. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property VisibleFieldCount (Inherited from System.Data.Common.DbDataReader) | Gets the number of fields in the DbDataReader that are not hidden.

See Also

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Depth Property

Devart.Common Namespace > DbDataReaderBase Class : Depth Property

Gets a value indicating the depth of nesting for the current row.

[Visual Basic]
Overrides Public ReadOnly Property Depth As Integer
[C#]
public override int Depth {get;}

Return Type

The depth of nesting for the current row.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

EndOfData Property

Devart.Common Namespace > DbDataReaderBase Class : EndOfData Property (DbDataReaderBase)

Indicates whether the DbDataReaderBase has been read completely.

[Visual Basic]
Public MustOverride ReadOnly Property EndOfData As Boolean
[C#]
public abstract bool EndOfData {get;}

Return Type

true if there is no more data in DbDataReaderBase. This property is false if there is more data to read, or there were no data at all.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FieldCount Property

Devart.Common Namespace > DbDataReaderBase Class : FieldCount Property (DbDataReaderBase)

Gets the number of columns in the current row.

[Visual Basic]
Overrides Public ReadOnly Property FieldCount As Integer
[C#]
public override int FieldCount {get;}

Return Type

When not positioned in a valid record set, 0; otherwise the number of columns in the current record. The default value is -1.

Remarks

After executing a query that does not return rows, FieldCount returns 0.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

HasRows Property

Devart.Common Namespace > DbDataReaderBase Class : HasRows Property (DbDataReaderBase)

Gets a value indicating whether the DbDataReader contains one or more rows.

[Visual Basic]
Overrides Public ReadOnly Property HasRows As Boolean
[C#]
public override bool HasRows {get;}

Return Type

true if the DbDataReaderBase contains one or more rows; otherwise, false.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsClosed Property

Devart.Common Namespace > DbDataReaderBase Class : IsClosed Property

Gets a value indicating whether the data reader is closed.

[Visual Basic]
Overrides Public ReadOnly Property IsClosed As Boolean
[C#]
public override bool IsClosed {get;}

Return Type

true if the DbDataReaderBase is closed; otherwise, false.

Remarks

IsClosed and RecordsAffected are the only properties that you can call after the DbDataReader is closed.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Item Property

Devart.Common Namespace > DbDataReaderBase Class : Item Property (DbDataReaderBase)

Gets the value of the specified column in its native format given the column name.

Overload List

Gets the value of the specified column in its native format given the column name.

[Visual Basic] Overloads Overrides Public Item(String) As Object

[C#] public override object Item(string);

Gets the value of the specified column in its native format given the column ordinal.

[Visual Basic] Overloads Overrides Public Item(Integer) As Object

[C#] public override object Item(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The column name.
See Also Languages Devart.Data Send comments on this topic.

Item(String) Property

Devart.Common Namespace > DbDataReaderBase Class > Item Property : Item(String) Property

Gets the value of the specified column in its native format given the column name.

[Visual Basic]
Overloads Overrides Public ReadOnly Property Item( _
   ByVal name As String _
) As Object
[C#]
public override object Item(
   string name
); {get;}

Parameters

name
The column name.

Return Type

The value of the specified column in its native format.

Remarks

You can omit the property name.

Example

[C#]

static void GetHireDate(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.emp");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    DateTime recievedTime = (DateTime)reader["hiredate"];
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetHireDate(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.emp")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedTime As DateTime = CDate(reader("hiredate"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

Item(Int32) Property

Devart.Common Namespace > DbDataReaderBase Class > Item Property : Item(Int32) Property

Gets the value of the specified column in its native format given the column ordinal.

[Visual Basic]
Overloads Overrides Public ReadOnly Property Item( _
   ByVal ordinal As Integer _
) As Object
[C#]
public override object Item(
   int ordinal
); {get;}

Parameters

ordinal
The zero-based column ordinal.

Return Type

The value of the specified column in its native format.

Remarks

You can omit the property name.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RecordsAffected Property

Devart.Common Namespace > DbDataReaderBase Class : RecordsAffected Property (DbDataReaderBase)

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

[Visual Basic]
Overrides Public ReadOnly Property RecordsAffected As Integer
[C#]
public override int RecordsAffected {get;}

Return Type

The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected, or the statement failed.

Remarks

The value of this property is not cumulative. For example, if two records are inserted in the first statement in batch mode, and the second statement affected 3 records, the value of RecordsAffected will be 3.

IsClosed and RecordsAffected are the only properties that you can call after the DbDataReader is closed.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%% $$Methods$$

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader

See Also Devart.Data Send comments on this topic.

DbDataReaderBase Class Methods

Devart.Common Namespace : DbDataReaderBase Class

For a list of all members of this type, see DbDataReaderBase members.

Public Methods

Public Method Close | Overridden. Closes the DbDataReaderBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetBoolean | Overloaded. Gets the value of the specified column as a Boolean.
Public Method GetByte | Overloaded. Gets the value of the specified column as a byte.
Public Method GetBytes | Overloaded. Overridden. Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetChar | Overloaded. Gets the value of the specified column as a single character.
Public Method GetChars | Overloaded. Overridden. Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetDataTypeName | Overloaded. Overridden. Gets the name of the source data type.
Public Method GetDateTime | Overloaded. Gets the value of the specified column as a DateTime object.
Public Method GetDateTimeOffset | Overloaded. Gets the value of the specified column as a DateTimeOffset object.
Public Method GetDecimal | Overloaded. Gets the value of the specified column as a DateTime object.
Public Method GetDouble | Overloaded. Gets the value of the specified column as a double-precision floating point number.
Public Method GetEnumerator | Overridden. Fills IEnumerator object with data from DbDataReaderBase.
Public Method GetFieldType | Overloaded. Overridden. Gets the Type that is the data type of the object.
Public Method GetFloat | Overloaded. Gets the value of the specified column as a single-precision floating point number.
Public Method GetGuid | Overloaded. Gets the value of the specified column as a globally-unique identifier (GUID).
Public Method GetInt16 | Overloaded. Gets the value of the specified column as a 16-bit signed integer.
Public Method GetInt32 | Overloaded. Gets the value of the specified column as a 32-bit signed integer.
Public Method GetInt64 | Overloaded. Gets the value of the specified column as a 64-bit signed integer.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetName | Overridden. Gets the name of the specified column.
Public Method GetOrdinal | Overridden. Gets the column ordinal, given the name of the column.
Public Method GetProviderSpecificFieldType | Overloaded. Returns the provider-specific field type of the specified column.
Public Method GetProviderSpecificValue | Overloaded. Gets the value of the specified column as an instance of Object
Public Method GetSchemaTable | Overridden. Returns a DataTable that describes the column metadata of the DbDataReaderBase.
Public Method GetString | Overloaded. Gets the value of the specified column as an instance of String
Public Method GetValue | Overloaded. Overridden. Gets the value of the specified column in its native format.
Public Method GetValues | Overridden. Gets all attribute columns in the collection for the current row.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method IsDBNull | Overloaded. Gets a value indicating whether the column contains non-existent or missing values.
Public Method NextResult | Overridden. Advances the data reader to the next result, when reading the results of batch SQL statements.
Public Method Read | Overridden. Advances the DbDataReaderBase to the next record.

See Also

DbDataReaderBase Class | Devart.Common Namespace | DbDataReader


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Close Method

Devart.Common Namespace > DbDataReaderBase Class : Close Method (DbDataReaderBase)

Closes the DbDataReaderBase object.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

Remarks

You must explicitly call the Close method when you are finished using the DbDataReaderBase to use the associated DbConnectionBase for any other purpose.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetBoolean Method

Devart.Common Namespace > DbDataReaderBase Class : GetBoolean Method (DbDataReaderBase)

Gets the value of the specified column as a Boolean.

Overload List

Gets the value of the specified column as a Boolean.

[Visual Basic] Overloads Public Function GetBoolean(String) As Boolean

[C#] public bool GetBoolean(string);

Gets the value of the specified column as a Boolean.

[Visual Basic] Overloads Public MustOverride Function GetBoolean(Integer) As Boolean

[C#] public abstract bool GetBoolean(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetBoolean(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetBoolean Method : GetBoolean(String) Method

Gets the value of the specified column as a Boolean.

[Visual Basic]
Overloads Public Function GetBoolean( _
   ByVal name As String _
) As Boolean
[C#]
public bool GetBoolean(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetByte Method

Devart.Common Namespace > DbDataReaderBase Class : GetByte Method (DbDataReaderBase)

Gets the value of the specified column as a byte.

Overload List

Gets the value of the specified column as a byte.

[Visual Basic] Overloads Public Function GetByte(String) As Byte

[C#] public byte GetByte(string);

Gets the value of the specified column as a byte.

[Visual Basic] Overloads Public MustOverride Function GetByte(Integer) As Byte

[C#] public abstract byte GetByte(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetByte(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetByte Method : GetByte(String) Method

Gets the value of the specified column as a byte.

[Visual Basic]
Overloads Public Function GetByte( _
   ByVal name As String _
) As Byte
[C#]
public byte GetByte(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetBytes Method

Devart.Common Namespace > DbDataReaderBase Class : GetBytes Method (DbDataReaderBase)

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

Overload List

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Overrides Public Function GetBytes(Integer,Long,Byte(),Integer,Integer) As Long

[C#] public override long GetBytes(int,long,byte[],int,int);

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Public Function GetBytes(String,Long,Byte(),Integer,Integer) As Long

[C#] public long GetBytes(string,long,byte[],int,int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum length to copy into the buffer.
See Also Languages Devart.Data Send comments on this topic.

GetBytes(Int32,Int64,Byte[],Int32,Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetBytes Method : GetBytes(Int32,Int64,Byte[],Int32,Int32) Method

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Overrides Public Function GetBytes( _
   ByVal ordinal As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Byte, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public override long GetBytes(
   int ordinal,
   long fieldOffset,
   byte[] buffer,
   int bufferOffset,
   int length
);

Parameters

ordinal
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum length to copy into the buffer.

Return Type

The actual number of bytes read.

Remarks

GetBytes returns the number of available bytes in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, if the DbDataReaderBase is reading a large data structure into a buffer.

If you pass a buffer that is a null value, GetBytes returns the length of the field in bytes.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum length to copy into the buffer.
See Also Languages Devart.Data Send comments on this topic.

GetBytes(String,Int64,Byte[],Int32,Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetBytes Method : GetBytes(String,Int64,Byte[],Int32,Int32) Method

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Public Function GetBytes( _
   ByVal name As String, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Byte, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public long GetBytes(
   string name,
   long fieldOffset,
   byte[] buffer,
   int bufferOffset,
   int length
);

Parameters

name
The name of the column.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum length to copy into the buffer.

Return Type

The actual number of bytes read.

Remarks

GetBytes returns the number of available bytes in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, if the DbDataReaderBase is reading a large data structure into a buffer.

If you pass a buffer that is a null value, GetBytes returns the length of the field in bytes.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetChar Method

Devart.Common Namespace > DbDataReaderBase Class : GetChar Method (DbDataReaderBase)

Gets the value of the specified column as a single character.

Overload List

Gets the value of the specified column as a single character.

[Visual Basic] Overloads Public Function GetChar(String) As Char

[C#] public char GetChar(string);

Gets the value of the specified column as a single character.

[Visual Basic] Overloads Public MustOverride Function GetChar(Integer) As Char

[C#] public abstract char GetChar(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetChar(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetChar Method : GetChar(String) Method

Gets the value of the specified column as a single character.

[Visual Basic]
Overloads Public Function GetChar( _
   ByVal name As String _
) As Char
[C#]
public char GetChar(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetChars Method

Devart.Common Namespace > DbDataReaderBase Class : GetChars Method (DbDataReaderBase)

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

Overload List

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Overrides Public Function GetChars(Integer,Long,Char(),Integer,Integer) As Long

[C#] public override long GetChars(int,long,char[],int,int);

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Public Function GetChars(String,Long,Char(),Integer,Integer) As Long

[C#] public long GetChars(string,long,char[],int,int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
fieldOffset
The index within the row where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum number of characters to read.
See Also Languages Devart.Data Send comments on this topic.

GetChars(Int32,Int64,Char[],Int32,Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetChars Method : GetChars(Int32,Int64,Char[],Int32,Int32) Method

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Overrides Public Function GetChars( _
   ByVal ordinal As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Char, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public override long GetChars(
   int ordinal,
   long fieldOffset,
   char[] buffer,
   int bufferOffset,
   int length
);

Parameters

ordinal
The zero-based column ordinal.
fieldOffset
The index within the row where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum number of characters to read.

Return Type

The actual number of characters read.

Remarks

GetChars returns the number of available characters in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetChars has already been used to obtain characters from the field. This may be the case, for example, if the DbDataReaderBase is reading a large data structure into a buffer.

If you pass a buffer that is a null value. GetChars returns the length of the field in characters.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
fieldOffset
The index within the row where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum number of characters to read.
See Also Languages Devart.Data Send comments on this topic.

GetChars(String,Int64,Char[],Int32,Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetChars Method : GetChars(String,Int64,Char[],Int32,Int32) Method

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Public Function GetChars( _
   ByVal name As String, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Char, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public long GetChars(
   string name,
   long fieldOffset,
   char[] buffer,
   int bufferOffset,
   int length
);

Parameters

name
The name of the column.
fieldOffset
The index within the row where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index where buffer is to begin the write operation.
length
The maximum number of characters to read.

Return Type

The actual number of characters read.

Remarks

GetChars returns the number of available characters in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetChars has already been used to obtain characters from the field. This may be the case, for example, if the DbDataReaderBase is reading a large data structure into a buffer.

If you pass a buffer that is a null value. GetChars returns the length of the field in characters.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDataTypeName Method

Devart.Common Namespace > DbDataReaderBase Class : GetDataTypeName Method (DbDataReaderBase)

Gets the name of the source data type.

Overload List

Gets the name of the source data type.

[Visual Basic] Overloads Overrides Public Function GetDataTypeName(Integer) As String

[C#] public override string GetDataTypeName(int);

Gets the name of the source data type.

[Visual Basic] Overloads Public Function GetDataTypeName(String) As String

[C#] public string GetDataTypeName(string);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

GetDataTypeName(Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDataTypeName Method : GetDataTypeName(Int32) Method

Gets the name of the source data type.

[Visual Basic]
Overloads Overrides Public Function GetDataTypeName( _
   ByVal ordinal As Integer _
) As String
[C#]
public override string GetDataTypeName(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

The name of the back-end data type.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetDataTypeName(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDataTypeName Method : GetDataTypeName(String) Method

Gets the name of the source data type.

[Visual Basic]
Overloads Public Function GetDataTypeName( _
   ByVal name As String _
) As String
[C#]
public string GetDataTypeName(
   string name
);

Parameters

name
The name of the column.

Return Type

The name of the back-end data type.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDateTime Method

Devart.Common Namespace > DbDataReaderBase Class : GetDateTime Method (DbDataReaderBase)

Gets the value of the specified column as a DateTime object.

Overload List

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Public Function GetDateTime(String) As Date

[C#] public DateTime GetDateTime(string);

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Public MustOverride Function GetDateTime(Integer) As Date

[C#] public abstract DateTime GetDateTime(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetDateTime(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDateTime Method : GetDateTime(String) Method

Gets the value of the specified column as a DateTime object.

[Visual Basic]
Overloads Public Function GetDateTime( _
   ByVal name As String _
) As Date
[C#]
public DateTime GetDateTime(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDateTimeOffset Method

Devart.Common Namespace > DbDataReaderBase Class : GetDateTimeOffset Method (DbDataReaderBase)

Gets the value of the specified column as a DateTimeOffset object.

Overload List

Gets the value of the specified column as a DateTimeOffset object.

[Visual Basic] Overloads Public Function GetDateTimeOffset(String) As DateTimeOffset

[C#] public DateTimeOffset GetDateTimeOffset(string);

Gets the value of the specified column as a DateTimeOffset object.

[Visual Basic] Overloads Public Overridable Function GetDateTimeOffset(Integer) As DateTimeOffset

[C#] public virtual DateTimeOffset GetDateTimeOffset(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetDateTimeOffset(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDateTimeOffset Method : GetDateTimeOffset(String) Method

Gets the value of the specified column as a DateTimeOffset object.

[Visual Basic]
Overloads Public Function GetDateTimeOffset( _
   ByVal name As String _
) As DateTimeOffset
[C#]
public DateTimeOffset GetDateTimeOffset(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

GetDateTimeOffset(Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDateTimeOffset Method : GetDateTimeOffset(Int32) Method

Gets the value of the specified column as a DateTimeOffset object.

[Visual Basic]
Overloads Public Overridable Function GetDateTimeOffset( _
   ByVal ordinal As Integer _
) As DateTimeOffset
[C#]
public virtual DateTimeOffset GetDateTimeOffset(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDecimal Method

Devart.Common Namespace > DbDataReaderBase Class : GetDecimal Method (DbDataReaderBase)

Gets the value of the specified column as a DateTime object.

Overload List

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Public Function GetDecimal(String) As Decimal

[C#] public decimal GetDecimal(string);

Gets the value of the specified column as a Decimal object.

[Visual Basic] Overloads Public MustOverride Function GetDecimal(Integer) As Decimal

[C#] public abstract decimal GetDecimal(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetDecimal(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDecimal Method : GetDecimal(String) Method

Gets the value of the specified column as a DateTime object.

[Visual Basic]
Overloads Public Function GetDecimal( _
   ByVal name As String _
) As Decimal
[C#]
public decimal GetDecimal(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDouble Method

Devart.Common Namespace > DbDataReaderBase Class : GetDouble Method (DbDataReaderBase)

Gets the value of the specified column as a double-precision floating point number.

Overload List

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic] Overloads Public Function GetDouble(String) As Double

[C#] public double GetDouble(string);

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic] Overloads Public MustOverride Function GetDouble(Integer) As Double

[C#] public abstract double GetDouble(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetDouble(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetDouble Method : GetDouble(String) Method

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic]
Overloads Public Function GetDouble( _
   ByVal name As String _
) As Double
[C#]
public double GetDouble(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetEnumerator Method

Devart.Common Namespace > DbDataReaderBase Class : GetEnumerator Method (DbDataReaderBase)

Fills IEnumerator object with data from DbDataReaderBase.

[Visual Basic]
Overrides Public Function GetEnumerator() As IEnumerator
[C#]
public override IEnumerator GetEnumerator();

Return Type

IEnumerator object to be populated with data.

Example

[C#]

static void UseEnumerator(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT comm FROM Test.emp");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    IEnumerator enumerator = reader.GetEnumerator();

    while (enumerator.MoveNext()) {
      if (((IDataRecord)enumerator.Current).IsDBNull(0)) {
        Console.WriteLine("Null value found");
      }
    }
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub UseEnumerator(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT comm FROM Test.emp")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    Dim enumerator As IEnumerator = reader.GetEnumerator
    Do While enumerator.MoveNext
      If DirectCast(enumerator.Current, IDataRecord).IsDBNull(0) Then
        Console.WriteLine("Null value found")
      End If
    Loop
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetFieldType Method

Devart.Common Namespace > DbDataReaderBase Class : GetFieldType Method (DbDataReaderBase)

Gets the Type that is the data type of the object.

Overload List

Gets the Type that is the data type of the object.

[Visual Basic] Overloads Overrides Public Function GetFieldType(Integer) As Type

[C#] public override Type GetFieldType(int);

Gets the Type that is the data type of the object.

[Visual Basic] Overloads Public Function GetFieldType(String) As Type

[C#] public Type GetFieldType(string);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

GetFieldType(Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetFieldType Method : GetFieldType(Int32) Method

Gets the Type that is the data type of the object.

[Visual Basic]
Overloads Overrides Public Function GetFieldType( _
   ByVal ordinal As Integer _
) As Type
[C#]
public override Type GetFieldType(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

The Type that is the data type of the object.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetFieldType(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetFieldType Method : GetFieldType(String) Method

Gets the Type that is the data type of the object.

[Visual Basic]
Overloads Public Function GetFieldType( _
   ByVal name As String _
) As Type
[C#]
public Type GetFieldType(
   string name
);

Parameters

name
The name of the column.

Return Type

The Type that is the data type of the object.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetFloat Method

Devart.Common Namespace > DbDataReaderBase Class : GetFloat Method (DbDataReaderBase)

Gets the value of the specified column as a single-precision floating point number.

Overload List

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic] Overloads Public Function GetFloat(String) As Single

[C#] public float GetFloat(string);

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic] Overloads Public MustOverride Function GetFloat(Integer) As Single

[C#] public abstract float GetFloat(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetFloat(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetFloat Method : GetFloat(String) Method

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic]
Overloads Public Function GetFloat( _
   ByVal name As String _
) As Single
[C#]
public float GetFloat(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetGuid Method

Devart.Common Namespace > DbDataReaderBase Class : GetGuid Method (DbDataReaderBase)

Gets the value of the specified column as a globally-unique identifier (GUID).

Overload List

Gets the value of the specified column as a globally-unique identifier (GUID).

[Visual Basic] Overloads Public Function GetGuid(String) As Guid

[C#] public Guid GetGuid(string);

Gets the value of the specified column as a globally-unique identifier (GUID).

[Visual Basic] Overloads Public MustOverride Function GetGuid(Integer) As Guid

[C#] public abstract Guid GetGuid(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetGuid(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetGuid Method : GetGuid(String) Method

Gets the value of the specified column as a globally-unique identifier (GUID).

[Visual Basic]
Overloads Public Function GetGuid( _
   ByVal name As String _
) As Guid
[C#]
public Guid GetGuid(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetInt16 Method

Devart.Common Namespace > DbDataReaderBase Class : GetInt16 Method (DbDataReaderBase)

Gets the value of the specified column as a 16-bit signed integer.

Overload List

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic] Overloads Public Function GetInt16(String) As Short

[C#] public short GetInt16(string);

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic] Overloads Public MustOverride Function GetInt16(Integer) As Short

[C#] public abstract short GetInt16(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetInt16(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetInt16 Method : GetInt16(String) Method

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic]
Overloads Public Function GetInt16( _
   ByVal name As String _
) As Short
[C#]
public short GetInt16(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetInt32 Method

Devart.Common Namespace > DbDataReaderBase Class : GetInt32 Method (DbDataReaderBase)

Gets the value of the specified column as a 32-bit signed integer.

Overload List

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic] Overloads Public Function GetInt32(String) As Integer

[C#] public int GetInt32(string);

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic] Overloads Public MustOverride Function GetInt32(Integer) As Integer

[C#] public abstract int GetInt32(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetInt32(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetInt32 Method : GetInt32(String) Method

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic]
Overloads Public Function GetInt32( _
   ByVal name As String _
) As Integer
[C#]
public int GetInt32(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetInt64 Method

Devart.Common Namespace > DbDataReaderBase Class : GetInt64 Method (DbDataReaderBase)

Gets the value of the specified column as a 64-bit signed integer.

Overload List

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic] Overloads Public Function GetInt64(String) As Long

[C#] public long GetInt64(string);

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic] Overloads Public MustOverride Function GetInt64(Integer) As Long

[C#] public abstract long GetInt64(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetInt64(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetInt64 Method : GetInt64(String) Method

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic]
Overloads Public Function GetInt64( _
   ByVal name As String _
) As Long
[C#]
public long GetInt64(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

GetName Method

Devart.Common Namespace > DbDataReaderBase Class : GetName Method (DbDataReaderBase)

Gets the name of the specified column.

[Visual Basic]
Overrides Public Function GetName( _
   ByVal ordinal As Integer _
) As String
[C#]
public override string GetName(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

A string that is the name of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetOrdinal Method

Devart.Common Namespace > DbDataReaderBase Class : GetOrdinal Method

Gets the column ordinal, given the name of the column.

[Visual Basic]
Overrides Public Function GetOrdinal( _
   ByVal name As String _
) As Integer
[C#]
public override int GetOrdinal(
   string name
);

Parameters

name
The name of the column.

Return Type

The zero-based column ordinal.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetProviderSpecificFieldType Method

Devart.Common Namespace > DbDataReaderBase Class : GetProviderSpecificFieldType Method (DbDataReaderBase)

Returns the provider-specific field type of the specified column.

Overload List

Returns the provider-specific field type of the specified column.

[Visual Basic] Overloads Public Function GetProviderSpecificFieldType(String) As Type

[C#] public Type GetProviderSpecificFieldType(string);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetProviderSpecificFieldType(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetProviderSpecificFieldType Method : GetProviderSpecificFieldType(String) Method

Returns the provider-specific field type of the specified column.

[Visual Basic]
Overloads Public Function GetProviderSpecificFieldType( _
   ByVal name As String _
) As Type
[C#]
public Type GetProviderSpecificFieldType(
   string name
);

Parameters

name
The name of the column.

Return Type

The provider-specific field type of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetProviderSpecificValue Method

Devart.Common Namespace > DbDataReaderBase Class : GetProviderSpecificValue Method (DbDataReaderBase)

Gets the value of the specified column as an instance of Object

Overload List

Gets the value of the specified column as an instance of Object

[Visual Basic] Overloads Public Function GetProviderSpecificValue(String) As Object

[C#] public object GetProviderSpecificValue(string);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetProviderSpecificValue(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetProviderSpecificValue Method : GetProviderSpecificValue(String) Method

Gets the value of the specified column as an instance of Object

[Visual Basic]
Overloads Public Function GetProviderSpecificValue( _
   ByVal name As String _
) As Object
[C#]
public object GetProviderSpecificValue(
   string name
);

Parameters

name
The name of the column.

Return Type

The provider-specific field type of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetSchemaTable Method

Devart.Common Namespace > DbDataReaderBase Class : GetSchemaTable Method (DbDataReaderBase)

Returns a DataTable that describes the column metadata of the DbDataReaderBase.

[Visual Basic]
Overrides Public Function GetSchemaTable() As DataTable
[C#]
public override DataTable GetSchemaTable();

Return Type

A DataTable that describes the column metadata.

Remarks

The GetSchemaTable method returns metadata about each column in the following order:
DataReader Column | Description
ColumnName | The name of the column; this might not be unique. If the column name cannot be determined, a null value is returned. This name always reflects the most recent naming of the column in the current view or command text.
ColumnOrdinal | The ordinal of the column. This is zero for the bookmark column of the row, if any. Other columns are numbered starting with 1. This column cannot contain a null value.
ColumnSize | The maximum possible length of a value in the column. For columns that use a fixed-length data type, this is the size of the data type.
NumericPrecision | If DbType is a numeric data type, this is the maximum precision of the column. The precision depends on the definition of the column. If DbType is not a numeric data type, this is a null value.
NumericScale | If DbType is Decimal, the number of digits to the right of the decimal point. Otherwise, this is a null value.
DataType | Maps to the .Net Framework type of the column.
ProviderType | The indicator of the column's data type.
IsLong | true if the column contains a BLOB that contains very long data.
AllowDBNull | true if the consumer can set the column to a null value. Otherwise, false. A column may contain null values, even if it cannot be set to a null value.
IsReadOnly | true if the column can not be modified; otherwise, false.
IsRowVersion | Set if the column contains a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.
IsUnique | true: No two rows in the base table-the table returned in BaseTableName-can have the same value in this column. IsUnique is guaranteed to be true if the column constitutes a key by itself or if there is a constraint of type UNIQUE that applies only to this column. false: The column can contain duplicate values in the base table.The default for this column is false.
IsKey | true: The column is one of a set of columns in the rowset that, taken together, uniquely identify the row. The set of columns with IsKey set to true must uniquely identify a row in the rowset. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a base table primary key, a unique constraint or a unique index. false: The column is not required to uniquely identify the row. To get the primary key information, including whether a field is part of a primary key and whether it is an AutoIncrement field, you should set the CommandBehavior.KeyInfo parameter of the PgSqlCommand.ExecuteReader() method when getting your data reader.
IsAutoIncrement | true if the column assigns values to new rows in fixed increments; otherwise, false. The default value for this column is false.
BaseSchemaName | The name of the schema in the database that contains the column. NULL if the base catalog name cannot be determined. The default for this column is a null value.
BaseCatalogName | The name of the catalog in the data store that contains the column. NULL if the base catalog name cannot be determined. The default value for this column is a null value.
BaseTableName | The name of the table or view in the data store that contains the column. A null value if the base table name cannot be determined. The default value of this column is a null value.
BaseColumnName | The name of the column in the data store. This might be different than the column name returned in the ColumnName column if an alias was used. A null value if the base column name cannot be determined or if the rowset column is derived, but not identical to, a column in the data store. The default value for this column is a null value.
IsAliased | true if the column name is an alias; otherwise, false.
IsExpression | true if the column is an expression; otherwise, false.

Note: if you want metadata columns to return the correct information, you must call the Command.ExecuteReader(CommandBehavior) method with the behavior parameter set to KeyInfo. Otherwise, some of the schema table columns may return null, default, or incorrect data.

Example

[C#]

static void GetSchemaFromReader(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.emp, Test.Dept");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader(CommandBehavior.KeyInfo);

    DataTable dt = reader.GetSchemaTable();
    //...

    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetSchemaFromReader(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.emp, Test.Dept")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader(CommandBehavior.KeyInfo)
    Dim dt As DataTable = reader.GetSchemaTable
    '...

    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetString Method

Devart.Common Namespace > DbDataReaderBase Class : GetString Method (DbDataReaderBase)

Gets the value of the specified column as an instance of String

Overload List

Gets the value of the specified column as an instance of String

[Visual Basic] Overloads Public Function GetString(String) As String

[C#] public string GetString(string);

Gets the value of the specified column as an instance of String.

[Visual Basic] Overloads Public MustOverride Function GetString(Integer) As String

[C#] public abstract string GetString(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

GetString(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetString Method : GetString(String) Method

Gets the value of the specified column as an instance of String

[Visual Basic]
Overloads Public Function GetString( _
   ByVal name As String _
) As String
[C#]
public string GetString(
   string name
);

Parameters

name
The name of the column.

Return Type

The value of the specified column.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetValue Method

Devart.Common Namespace > DbDataReaderBase Class : GetValue Method (DbDataReaderBase)

Gets the value of the specified column in its native format.

Overload List

Gets the value of the specified column in its native format.

[Visual Basic] Overloads Overrides Public Function GetValue(Integer) As Object

[C#] public override object GetValue(int);

Gets the value of the specified column in its native format.

[Visual Basic] Overloads Public Function GetValue(String) As Object

[C#] public object GetValue(string);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

GetValue(Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > GetValue Method : GetValue(Int32) Method

Gets the value of the specified column in its native format.

[Visual Basic]
Overloads Overrides Public Function GetValue( _
   ByVal ordinal As Integer _
) As Object
[C#]
public override object GetValue(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

The value to return.

Remarks

This method returns DBNull for null columns.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The value of the specified column.
See Also Languages Devart.Data Send comments on this topic.

GetValue(String) Method

Devart.Common Namespace > DbDataReaderBase Class > GetValue Method : GetValue(String) Method

Gets the value of the specified column in its native format.

[Visual Basic]
Overloads Public Function GetValue( _
   ByVal name As String _
) As Object
[C#]
public object GetValue(
   string name
);

Parameters

name
The value of the specified column.

Return Type

The value to return.

Remarks

This method returns DBNull for null columns.

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

values
An array of Object into which to copy the attribute columns.
See Also Languages Devart.Data Send comments on this topic.

GetValues Method

Devart.Common Namespace > DbDataReaderBase Class : GetValues Method (DbDataReaderBase)

Gets all attribute columns in the collection for the current row.

[Visual Basic]
Overrides Public Function GetValues( _
   ByVal values() As Object _
) As Integer
[C#]
public override int GetValues(
   object[] values
);

Parameters

values
An array of Object into which to copy the attribute columns.

Return Type

The number of instances of Object in the array.

Remarks

For most applications, the GetValues method provides an efficient means for retrieving all columns, rather than retrieving each column individually.

You can pass an Object array that contains fewer than the number of columns contained in the resulting row. Only the amount of data the Object array holds is copied to the array. You can also pass an Object array whose length is more than the number of columns contained in the resulting row.

This method returns DBNull for null columns.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsDBNull Method

Devart.Common Namespace > DbDataReaderBase Class : IsDBNull Method (DbDataReaderBase)

Gets a value indicating whether the column contains non-existent or missing values.

Overload List

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic] Overloads Public Function IsDBNull(String) As Boolean

[C#] public bool IsDBNull(string);

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic] Overloads Overrides Public Function IsDBNull(Integer) As Boolean

[C#] public override bool IsDBNull(int);

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

name
The value of the specified column.
See Also Languages Devart.Data Send comments on this topic.

IsDBNull(String) Method

Devart.Common Namespace > DbDataReaderBase Class > IsDBNull Method : IsDBNull(String) Method

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic]
Overloads Public Function IsDBNull( _
   ByVal name As String _
) As Boolean
[C#]
public bool IsDBNull(
   string name
);

Parameters

name
The value of the specified column.

Return Type

true if the specified column value is equivalent to DBNull; otherwise, false.

Remarks

To avoid raising an error, call this method to check for null column values before calling the typed Get methods (for example, GetBytes, GetChars, and so on).

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
The zero-based column ordinal.
See Also Languages Devart.Data Send comments on this topic.

IsDBNull(Int32) Method

Devart.Common Namespace > DbDataReaderBase Class > IsDBNull Method : IsDBNull(Int32) Method

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic]
Overloads Overrides Public Function IsDBNull( _
   ByVal ordinal As Integer _
) As Boolean
[C#]
public override bool IsDBNull(
   int ordinal
);

Parameters

ordinal
The zero-based column ordinal.

Return Type

true if the specified column value is equivalent to DBNull; otherwise, false.

Remarks

To avoid raising an error, call this method to check for null column values before calling the typed Get methods (for example, GetBytes, GetChars, and so on).

See Also

DbDataReaderBase Class | DbDataReaderBase Members | Overload List


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

NextResult Method

Devart.Common Namespace > DbDataReaderBase Class : NextResult Method (DbDataReaderBase)

Advances the data reader to the next result, when reading the results of batch SQL statements.

[Visual Basic]
Overrides Public Function NextResult() As Boolean
[C#]
public override bool NextResult();

Return Type

true if there are more result sets; otherwise, false.

Remarks

Used to process multiple results, which can be generated by executing batch SQL statements.

By default, the DbDataReaderBase is positioned on the first result.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataReaderBase Class | DbDataReaderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Read Method

Devart.Common Namespace > DbDataReaderBase Class : Read Method (DbDataReaderBase)

Advances the DbDataReaderBase to the next record.

[Visual Basic]
Overrides Public Function Read() As Boolean
[C#]
public override bool Read();

Return Type

true if there are more rows; otherwise, false.

Remarks

The default position of the DbDataReaderBase is prior to the first record. Therefore, you must call Read to begin accessing any data.

See Also

DbDataReaderBase Class | DbDataReaderBase Members


%%PageItemTitle%%

DbDataSet Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDataSet Class

Devart.Common Namespace : DbDataSet Class

Represents an in-memory cache of data with connected model support.

For a list of all members of this type, see DbDataSet members.

Inheritance Hierarchy

System.Object
System.ComponentModel.MarshalByValueComponent
System.Data.DataSet
Devart.Common.DbDataSet
Devart.Data.PostgreSql.PgSqlDataSet

Syntax

[Visual Basic]
Public MustInherit Class DbDataSet
   Inherits DataSet
   Implements IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable
[C#]
public abstract class DbDataSet : DataSet, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable

Remarks

Base class for provider-specific DataSet components.

Example

This sample shows how to use DbDataSet. The routine accepts DbDataSet-compatible object and connection string. After Devart.Data.PostgreSql.PgSqlDataTables were created and populated, they were added to DataTableCollection of DbDataSet, and DataRelation was created to link tables.

[C#]

pubic void FillDataSet(DbDataSet dataSet, string connStr) {
    // retrieving data from DEPT table
    PgSqlDataTable dept = new PgSqlDataTable("select * from dept", connStr);
    dept.FetchAll = true;
    dept.Active = true;

    // retrieving data from EMP table
    PgSqlDataTable emp = new PgSqlDataTable("select * from emp", connStr);
    emp.FetchAll = true;
    emp.Active = true;

    // adding data tables to PgSqlDataSet
    dataSet.Tables.Add(dept);
    dataSet.Tables.Add(emp);

    // linking tables to allow navigation from parent table rows
    // to corresponding child table rows
    DataColumn parentColumn = dataSet.Tables["DEPT"].Columns["DEPTNO"];
    DataColumn childColumn = dataSet.Tables["EMP"].Columns["DEPTNO"];
    DataRelation relation =    new System.Data.DataRelation("DeptsEmps",
        parentColumn, childColumn);
    dataSet.Relations.Add(relation);
}

[Visual Basic]

Public Sub FillDataSet(ByRef dataSet As DbDataSet, ByVal connStr As String)
    ' retrieving data from DEPT table
    Dim dept As New PgSqlDataTable("select * from dept", connStr)
    dept.FetchAll = True
    dept.Active = True

    ' retrieving data from EMP table
    Dim emp As New PgSqlDataTable("select * from emp", connStr)
    emp.FetchAll = True
    emp.Active = True

    ' adding data tables to PgSqlDataSet
    dataSet.Tables.Add(dept)
    dataSet.Tables.Add(emp)

    ' linking tables to allow navigation from parent table rows
    ' to corresponding child table rows
    Dim parentColumn As DataColumn = dataSet.Tables("DEPT").Columns("DEPTNO")
    Dim childColumn As DataColumn = dataSet.Tables("EMP").Columns("DEPTNO")
    Dim relation As New System.Data.DataRelation("DeptsEmps", parentColumn, childColumn)
    dataSet.Relations.Add(relation)
End Sub

See Also

DbDataSet Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbDataSet Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSet Class Members

Devart.Common Namespace : DbDataSet Class

DbDataSet overview

Public Properties

Public Property CaseSensitive (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.
Public Property Connection | Gets or sets DbConnection used by the DbDataSet.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSetName (Inherited from System.Data.DataSet) | Gets or sets the name of the current DataSet.
Public Property DefaultViewManager (Inherited from System.Data.DataSet) | Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property EnforceConstraints (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether constraint rules are followed when attempting any update operation.
Public Property ExtendedProperties (Inherited from System.Data.DataSet) | Gets the collection of customized user information associated with the DataSet.
Public Property HasErrors (Inherited from System.Data.DataSet) | Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet.
Public Property IsInitialized (Inherited from System.Data.DataSet) | Gets a value that indicates whether the DataSet is initialized.
Public Property Locale (Inherited from System.Data.DataSet) | Gets or sets the locale information used to compare strings within the table.
Public Property Name | Gets or sets name of the DbDataSet.
Public Property Namespace (Inherited from System.Data.DataSet) | Gets or sets the namespace of the DataSet.
Public Property Owner | Gets or sets a form or other container that the DbDataSet instance belongs to.
Public Property Prefix (Inherited from System.Data.DataSet) | Gets or sets an XML prefix that aliases the namespace of the DataSet.
Public Property Relations (Inherited from System.Data.DataSet) | Get the collection of relations that link tables and allow navigation from parent tables to child tables.
Public Property RemotingFormat | Gets or sets a SerializationFormat for the DbDataSet used during remoting.
Public Property SchemaSerializationMode (Inherited from System.Data.DataSet) | Gets or sets a SchemaSerializationMode for a DataSet.
Public Property Site (Inherited from System.Data.DataSet) | Gets or sets an ISite for the DataSet.
Public Property Tables (Inherited from System.Data.DataSet) | Gets the collection of tables contained in the DataSet.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataSet) | Commits all the changes made to this DataSet since it was loaded or since the last time AcceptChanges was called.
Public Method BeginInit (Inherited from System.Data.DataSet) | Begins the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Clear | Clears the DbDataSet of any data by removing all rows in all tables.
Public Method Clone | Overridden. Copies the structure of the DbDataSet, including all DbDataTable schemas, relations, and constraints. Does not copy any data.
Public Method Copy (Inherited from System.Data.DataSet) | Copies both the structure and data for this DataSet.
Public Method CreateDataReader (Inherited from System.Data.DataSet) | Overloaded. Returns a DataTableReader with one result set per DataTable, in the same sequence as the tables appear in the Tables collection.
Public Method CreateDataTable | Creates new table in the DbDataSet.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndInit (Inherited from System.Data.DataSet) | Ends the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Fill | Fills the Rows collection of the DbDataSet with rows from the data source.
Public Method GetChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges was last called.
Public Method GetObjectData (Inherited from System.Data.DataSet) | Populates a serialization information object with the data needed to serialize the DataSet.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method GetXml (Inherited from System.Data.DataSet) | Returns the XML representation of the data stored in the DataSet.
Public Method GetXmlSchema (Inherited from System.Data.DataSet) | Returns the XML Schema for the XML representation of the data stored in the DataSet.
Public Method HasChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows.
Public Method InferXmlSchema (Inherited from System.Data.DataSet) | Overloaded.
Public Method Load (Inherited from System.Data.DataSet) | Overloaded.
Public Method Merge (Inherited from System.Data.DataSet) | Overloaded. Merges a specified DataSet and its schema into the current DataSet.
Public Method ReadXml | Overloaded. Reads XML schema and data into the DbDataSet.
Public Method ReadXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Reads the XML schema from the specified Stream into the DataSet.
Public Method RejectChanges (Inherited from System.Data.DataSet) | Rolls back all the changes made to the DataSet since it was created, or since the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataSet) | Resets the DataSet to its original state. Subclasses should override Reset to restore a DataSet to its original state.
Public Method ToString (Inherited from System.ComponentModel.MarshalByValueComponent) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataSet) | Overloaded. Writes the current data for the DataSet using the specified Stream.
Public Method WriteXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Writes the DataSet structure as an XML schema to the specified Stream object.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.MarshalByValueComponent) | Adds an event handler to listen to the Disposed event on the component.
Public Event Initialized (Inherited from System.Data.DataSet) | Occurs after the DataSet is initialized.
Public Event MergeFailed (Inherited from System.Data.DataSet) | Occurs when a target and source DataRow have the same primary key value, and EnforceConstraints is set to true.

See Also

DbDataSet Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbDataSet Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSet Class Properties

Devart.Common Namespace : DbDataSet Class

For a list of all members of this type, see DbDataSet members.

Public Properties

Public Property CaseSensitive (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.
Public Property Connection | Gets or sets DbConnection used by the DbDataSet.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSetName (Inherited from System.Data.DataSet) | Gets or sets the name of the current DataSet.
Public Property DefaultViewManager (Inherited from System.Data.DataSet) | Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property EnforceConstraints (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether constraint rules are followed when attempting any update operation.
Public Property ExtendedProperties (Inherited from System.Data.DataSet) | Gets the collection of customized user information associated with the DataSet.
Public Property HasErrors (Inherited from System.Data.DataSet) | Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet.
Public Property IsInitialized (Inherited from System.Data.DataSet) | Gets a value that indicates whether the DataSet is initialized.
Public Property Locale (Inherited from System.Data.DataSet) | Gets or sets the locale information used to compare strings within the table.
Public Property Name | Gets or sets name of the DbDataSet.
Public Property Namespace (Inherited from System.Data.DataSet) | Gets or sets the namespace of the DataSet.
Public Property Owner | Gets or sets a form or other container that the DbDataSet instance belongs to.
Public Property Prefix (Inherited from System.Data.DataSet) | Gets or sets an XML prefix that aliases the namespace of the DataSet.
Public Property Relations (Inherited from System.Data.DataSet) | Get the collection of relations that link tables and allow navigation from parent tables to child tables.
Public Property RemotingFormat | Gets or sets a SerializationFormat for the DbDataSet used during remoting.
Public Property SchemaSerializationMode (Inherited from System.Data.DataSet) | Gets or sets a SchemaSerializationMode for a DataSet.
Public Property Site (Inherited from System.Data.DataSet) | Gets or sets an ISite for the DataSet.
Public Property Tables (Inherited from System.Data.DataSet) | Gets the collection of tables contained in the DataSet.

See Also

DbDataSet Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Connection Property

Devart.Common Namespace > DbDataSet Class : Connection Property (DbDataSet)

Gets or sets DbConnection used by the DbDataSet.

[Visual Basic]
Public Property Connection As DbConnection
[C#]
public DbConnection Connection {get; set;}

Return Type

A DbDataSet object.

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Name Property

Devart.Common Namespace > DbDataSet Class : Name Property (DbDataSet)

Gets or sets name of the DbDataSet.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the DbDataSet.

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Owner Property

Devart.Common Namespace > DbDataSet Class : Owner Property (DbDataSet)

Gets or sets a form or other container that the DbDataSet instance belongs to.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

A form or other container that the object belongs to.

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RemotingFormat Property

Devart.Common Namespace > DbDataSet Class : RemotingFormat Property (DbDataSet)

Gets or sets a SerializationFormat for the DbDataSet used during remoting.

[Visual Basic]
Public Property RemotingFormat As SerializationFormat
[C#]
public SerializationFormat RemotingFormat {get; set;}

Return Type

A SerializationFormat object.

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%% $$Methods$$

DbDataSet Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSet Class Methods

Devart.Common Namespace : DbDataSet Class

For a list of all members of this type, see DbDataSet members.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataSet) | Commits all the changes made to this DataSet since it was loaded or since the last time AcceptChanges was called.
Public Method BeginInit (Inherited from System.Data.DataSet) | Begins the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Clear | Clears the DbDataSet of any data by removing all rows in all tables.
Public Method Clone | Overridden. Copies the structure of the DbDataSet, including all DbDataTable schemas, relations, and constraints. Does not copy any data.
Public Method Copy (Inherited from System.Data.DataSet) | Copies both the structure and data for this DataSet.
Public Method CreateDataReader (Inherited from System.Data.DataSet) | Overloaded. Returns a DataTableReader with one result set per DataTable, in the same sequence as the tables appear in the Tables collection.
Public Method CreateDataTable | Creates new table in the DbDataSet.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndInit (Inherited from System.Data.DataSet) | Ends the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Fill | Fills the Rows collection of the DbDataSet with rows from the data source.
Public Method GetChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges was last called.
Public Method GetObjectData (Inherited from System.Data.DataSet) | Populates a serialization information object with the data needed to serialize the DataSet.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method GetXml (Inherited from System.Data.DataSet) | Returns the XML representation of the data stored in the DataSet.
Public Method GetXmlSchema (Inherited from System.Data.DataSet) | Returns the XML Schema for the XML representation of the data stored in the DataSet.
Public Method HasChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows.
Public Method InferXmlSchema (Inherited from System.Data.DataSet) | Overloaded.
Public Method Load (Inherited from System.Data.DataSet) | Overloaded.
Public Method Merge (Inherited from System.Data.DataSet) | Overloaded. Merges a specified DataSet and its schema into the current DataSet.
Public Method ReadXml | Overloaded. Reads XML schema and data into the DbDataSet.
Public Method ReadXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Reads the XML schema from the specified Stream into the DataSet.
Public Method RejectChanges (Inherited from System.Data.DataSet) | Rolls back all the changes made to the DataSet since it was created, or since the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataSet) | Resets the DataSet to its original state. Subclasses should override Reset to restore a DataSet to its original state.
Public Method ToString (Inherited from System.ComponentModel.MarshalByValueComponent) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataSet) | Overloaded. Writes the current data for the DataSet using the specified Stream.
Public Method WriteXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Writes the DataSet structure as an XML schema to the specified Stream object.

See Also

DbDataSet Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Clear Method

Devart.Common Namespace > DbDataSet Class : Clear Method (DbDataSet)

Clears the DbDataSet of any data by removing all rows in all tables.

[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Clone Method

Devart.Common Namespace > DbDataSet Class : Clone Method (DbDataSet)

Copies the structure of the DbDataSet, including all DbDataTable schemas, relations, and constraints. Does not copy any data.

[Visual Basic]
Overrides Public Function Clone() As DataSet
[C#]
public override DataSet Clone();

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CreateDataTable Method

Devart.Common Namespace > DbDataSet Class : CreateDataTable Method (DbDataSet)

Creates new table in the DbDataSet.

[Visual Basic]
Public Overridable Function CreateDataTable() As DbDataTable
[C#]
public virtual DbDataTable CreateDataTable();

Return Type

A new table object.

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Fill Method

Devart.Common Namespace > DbDataSet Class : Fill Method (DbDataSet)

Fills the Rows collection of the DbDataSet with rows from the data source.

[Visual Basic]
Public Sub Fill()
[C#]
public void Fill();

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ReadXml Method

Devart.Common Namespace > DbDataSet Class : ReadXml Method

Reads XML schema and data into the DbDataSet.

Overload List

Reads XML schema and data into the DbDataSet using the specified Stream.

[Visual Basic] Overloads Public Function ReadXml(Stream) As XmlReadMode

[C#] public XmlReadMode ReadXml(Stream);

Reads XML schema and data into the DbDataSet using the specified file.

[Visual Basic] Overloads Public Function ReadXml(String) As XmlReadMode

[C#] public XmlReadMode ReadXml(string);

Reads XML schema and data into the DbDataSet using the specified TextReader.

[Visual Basic] Overloads Public Function ReadXml(TextReader) As XmlReadMode

[C#] public XmlReadMode ReadXml(TextReader);

Reads XML schema and data into the DbDataSet using the specified XmlReader.

[Visual Basic] Overloads Public Function ReadXml(XmlReader) As XmlReadMode

[C#] public XmlReadMode ReadXml(XmlReader);

Reads XML schema and data into the DbDataSet using the specified Stream.

[Visual Basic] Overloads Public Function ReadXml(Stream,XmlReadMode) As XmlReadMode

[C#] public XmlReadMode ReadXml(Stream,XmlReadMode);

Reads XML schema and data into the DbDataSet using the specified file and XmlReadMode.

[Visual Basic] Overloads Public Function ReadXml(String,XmlReadMode) As XmlReadMode

[C#] public XmlReadMode ReadXml(string,XmlReadMode);

Reads XML schema and data into the DbDataSet using the specified TextReader.

[Visual Basic] Overloads Public Function ReadXml(TextReader,XmlReadMode) As XmlReadMode

[C#] public XmlReadMode ReadXml(TextReader,XmlReadMode);

Reads XML schema and data into the DbDataSet using the specified XmlReader.

[Visual Basic] Overloads Public Function ReadXml(XmlReader,XmlReadMode) As XmlReadMode

[C#] public XmlReadMode ReadXml(XmlReader,XmlReadMode);

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

stream
An object that derives from Stream.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(Stream) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(Stream) Method

Reads XML schema and data into the DbDataSet using the specified Stream.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal stream As Stream _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   Stream stream
);

Parameters

stream
An object that derives from Stream.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The filename (including the path) from which to read.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(String) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(String) Method

Reads XML schema and data into the DbDataSet using the specified file.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal fileName As String _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   string fileName
);

Parameters

fileName
The filename (including the path) from which to read.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

reader
The TextReader from which to read the schema and data.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(TextReader) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(TextReader) Method

Reads XML schema and data into the DbDataSet using the specified TextReader.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal reader As TextReader _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   TextReader reader
);

Parameters

reader
The TextReader from which to read the schema and data.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

reader
The XmlReader from which to read the schema and data.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(XmlReader) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(XmlReader) Method

Reads XML schema and data into the DbDataSet using the specified XmlReader.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal reader As XmlReader _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   XmlReader reader
);

Parameters

reader
The XmlReader from which to read the schema and data.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

stream
An object that derives from Stream.
mode
One of the XmlReadMode values.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(Stream,XmlReadMode) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(Stream,XmlReadMode) Method

Reads XML schema and data into the DbDataSet using the specified Stream.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal stream As Stream, _
   ByVal mode As XmlReadMode _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   Stream stream,
   XmlReadMode mode
);

Parameters

stream
An object that derives from Stream.
mode
One of the XmlReadMode values.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The filename (including the path) from which to read.
mode
One of the XmlReadMode values.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(String,XmlReadMode) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(String,XmlReadMode) Method

Reads XML schema and data into the DbDataSet using the specified file and XmlReadMode.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal fileName As String, _
   ByVal mode As XmlReadMode _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   string fileName,
   XmlReadMode mode
);

Parameters

fileName
The filename (including the path) from which to read.
mode
One of the XmlReadMode values.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

reader
The TextReader from which to read the schema and data.
mode
One of the XmlReadMode values.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(TextReader,XmlReadMode) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(TextReader,XmlReadMode) Method

Reads XML schema and data into the DbDataSet using the specified TextReader.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal reader As TextReader, _
   ByVal mode As XmlReadMode _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   TextReader reader,
   XmlReadMode mode
);

Parameters

reader
The TextReader from which to read the schema and data.
mode
One of the XmlReadMode values.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members | Overload List

Language

Visual Basic

C#

Show All

reader
The XmlReader from which to read the schema and data.
mode
One of the XmlReadMode values.
See Also Languages Devart.Data Send comments on this topic.

ReadXml(XmlReader,XmlReadMode) Method

Devart.Common Namespace > DbDataSet Class > ReadXml Method : ReadXml(XmlReader,XmlReadMode) Method

Reads XML schema and data into the DbDataSet using the specified XmlReader.

[Visual Basic]
Overloads Public Function ReadXml( _
   ByVal reader As XmlReader, _
   ByVal mode As XmlReadMode _
) As XmlReadMode
[C#]
public XmlReadMode ReadXml(
   XmlReader reader,
   XmlReadMode mode
);

Parameters

reader
The XmlReader from which to read the schema and data.
mode
One of the XmlReadMode values.

Return Type

The XmlReadMode used to read the data.

See Also

DbDataSet Class | DbDataSet Members | Overload List


%%PageItemTitle%%

DbDataSet Class | DbDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Update Method

Devart.Common Namespace > DbDataSet Class : Update Method (DbDataSet)

Executes the appropriate commands to delete, insert, or update rows in the data source.

[Visual Basic]
Public Sub Update()
[C#]
public void Update();

See Also

DbDataSet Class | DbDataSet Members


%%PageItemTitle%%

DbDataSourceEnumerator Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDataSourceEnumerator Class

Devart.Common Namespace : DbDataSourceEnumerator Class

Retrieves list of available servers in the network.

For a list of all members of this type, see DbDataSourceEnumerator members.

Inheritance Hierarchy

System.Object
System.Data.Common.DbDataSourceEnumerator
Devart.Common.DbDataSourceEnumerator
Devart.Data.PostgreSql.PgSqlDataSourceEnumerator

Syntax

[Visual Basic]
Public MustInherit Class DbDataSourceEnumerator
   Inherits DbDataSourceEnumerator
[C#]
public abstract class DbDataSourceEnumerator : DbDataSourceEnumerator

Remarks

The feature finds PostgreSQL servers that use the default port 5432.

See Also

DbDataSourceEnumerator Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbDataSourceEnumerator Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSourceEnumerator Class Members

Devart.Common Namespace : DbDataSourceEnumerator Class

DbDataSourceEnumerator overview

Public Methods

Public Method GetDataSources Overridden. Retrieves a DataTable containing information about all visible instances of the server.

See Also

DbDataSourceEnumerator Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

DbDataSourceEnumerator Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSourceEnumerator Class Methods

Devart.Common Namespace : DbDataSourceEnumerator Class

For a list of all members of this type, see DbDataSourceEnumerator members.

Public Methods

Public Method GetDataSources Overridden. Retrieves a DataTable containing information about all visible instances of the server.

See Also

DbDataSourceEnumerator Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataSourceEnumerator Class | DbDataSourceEnumerator Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetDataSources Method

Devart.Common Namespace > DbDataSourceEnumerator Class : GetDataSources Method

Retrieves a DataTable containing information about all visible instances of the server.

[Visual Basic]
Overrides Public Function GetDataSources() As DataTable
[C#]
public override DataTable GetDataSources();

Return Type

A DataTable containing information about the visible instances of the associated data source.

See Also

DbDataSourceEnumerator Class | DbDataSourceEnumerator Members


%%PageItemTitle%%

DbDataTable Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDataTable Class

Devart.Common Namespace : DbDataTable Class

The DbDataTable class represents a single object that provides all of the functionality needed to retrieve and manipulate data from a data source. The DbDataTable class is built using existing ADO.NET components.

For a list of all members of this type, see DbDataTable members.

Inheritance Hierarchy

System.Object
System.ComponentModel.MarshalByValueComponent
System.Data.DataTable
Devart.Common.DbDataTable
Devart.Data.PostgreSql.PgSqlDataTable

Syntax

[Visual Basic]
Public MustInherit Class DbDataTable
   Inherits DataTable
   Implements IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable
[C#]
public abstract class DbDataTable : DataTable, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable

Remarks

The DbDataTable class extends the DataTable class to provide a single object that can be used to access and update data from a data source. When a DbDataTable is created, the default values of its constituent parts are set to reasonable defaults, meaning that the programmer can create a single object and immediately use it to retrieve and manipulate data from a data source. It allows to cut down the size of the written code.

The DbDataTable class is designed to employ both connected and disconnected data access models. It also provides functionality for asynchronous fill operations.

The DbDataTable class can be fully adjusted at design-time. You may retrieve data at design-time from a data source if you set Active property to true.

For more information on advanced features of DbDataTable please refer to topic DataTable Advanced Features.

Example

This sample shows how to use DbDataTable. The routine accepts DbTable-compatible object and IDbConnection implementor object as parameters. After SQL query text has been set, the data is retrieved from the table.

[C#]

static void UseDataTable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";
  try
  {
    myDataTable.Fill();
    myDataTable.Rows[1].Delete();
    myDataTable.Update();
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol] + "\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Try
    myDataTable.Fill()
    myDataTable.Rows(1).Delete()
    myDataTable.Update()
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Clear()
  End Try
End Sub

See Also

DbDataTable Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbDataTable Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataTable Class Members

Devart.Common Namespace : DbDataTable Class

DbDataTable overview

Public Properties

Public Property Active | Gets or sets whether a DbDataTable is filled with data from a data source.
Public Property CachedUpdates | Enables or disables cached updates mode.
Public Property CaseSensitive (Inherited from System.Data.DataTable) | Indicates whether string comparisons within the table are case-sensitive.
Public Property ChildRelations (Inherited from System.Data.DataTable) | Gets the collection of child relations for this DataTable.
Public Property Columns | Gets the collection of columns that belong to this table.
Public Property ConflictOption | Specifies which ConflictOption is to be used by the DbDataTable.
Public Property Connection | Gets or sets the IDbConnection used to connect to the data source.
Public Property Constraints | Gets the collection of constraints maintained by this table.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSet (Inherited from System.Data.DataTable) | Gets the DataSet to which this table belongs.
Public Property DefaultView (Inherited from System.Data.DataTable) | Gets a customized view of the table that may include a filtered view, or a cursor position.
Public Property DeleteCommand | Gets or sets a SQL statement to delete records from the data set.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property static (Shared in Visual Basic) DisableListChangedEvents | Disables some of the events, which occurs when DbDataTable content is changed.
Public Property DisplayExpression (Inherited from System.Data.DataTable) | Gets or sets the expression that returns a value used to represent this table in the user interface. The DisplayExpression property lets you display the name of this table in a user interface.
Public Property ExtendedProperties (Inherited from System.Data.DataTable) | Gets the collection of customized user information.
Public Property FetchAll | Determines whether data is requested from server entirely or partially.
Public Property HasErrors (Inherited from System.Data.DataTable) | Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
Public Property InsertCommand | Gets or sets a SQL statement to insert new records into the data source.
Public Property IsInitialized (Inherited from System.Data.DataTable) | Gets a value that indicates whether the DataTable is initialized.
Public Property Locale (Inherited from System.Data.DataTable) | Gets or sets the locale information used to compare strings within the table.
Public Property MaxRecords | Gets or sets max number of records to fetch starting from StartRecord.
Public Property MinimumCapacity (Inherited from System.Data.DataTable) | Gets or sets the initial starting size for this table.
Public Property MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property Name | Gets or sets name of the component.
Public Property Namespace (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property NonBlocking | Gets or sets data request mode.
Public Property Owner | Gets or sets form that the component resides on.
Public Property ParentRelation | Gets or sets a ParentDataRelation object that is used for server side master-detail relation.
Public Property ParentRelations (Inherited from System.Data.DataTable) | Gets the collection of parent relations for this DataTable.
Public Property Prefix (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property PrimaryKey | Gets or sets an array of columns that function as primary keys for the data table.
Public Property QueryRecordCount | Determines whether DbDataTable should perfrom additional request to determine quantity of records in the result set.
Public Property Quoted | Gets or sets whether the DbDataTable quotes all the names of data source objects.
Public Property RecordCount | Gets number of rows in the result set.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the DbDataTable should retrieve field values adjusted by server after an update.
Public Property RemotingFormat | Gets or sets a SerializationFormat for the DbDataTable used during remoting.
Public Property ReturnProviderSpecificTypes | Determines whether to use provider-specific types whenever possible.
Public Property Rows (Inherited from System.Data.DataTable) | Gets the collection of rows that belong to this table.
Public Property SchemaTable | Gets the schema table corresponding to the SelectCommand query.
Public Property SelectCommand | Gets or sets a SQL statement used to select records in the data source.
Public Property Site (Inherited from System.Data.DataTable) | Gets or sets an ISite for the DataTable.
Public Property StartRecord | Gets or sets record number to start.
Public Property SyncRoot | Gets an object that can be used to synchronize access to the Rows collection.
Public Property TableMapping | Gets a DataTableMapping that provides the master mapping between a source table and a DbDataTable.
Public Property TableName (Inherited from System.Data.DataTable) | Gets or sets the name of the DataTable.
Public Property UpdateBatchSize | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand | Gets or sets a SQL statement used to update records in the data source.
Public Property UpdatingFields | Gets or sets string containing list of field names used to generate update commands.
Public Property UpdatingKeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataTable) | Commits all the changes made to this table since the last time AcceptChanges was called.
Public Method BeginFill | Starts an asynchronous invocation of the Fill method.
Public Method BeginInit (Inherited from System.Data.DataTable) | Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method BeginLoadData (Inherited from System.Data.DataTable) | Turns off notifications, index maintenance, and constraints while loading data.
Public Method CancelFetch | Stops asynchronous fill operation.
Public Method Clear | Clears DbDataTable and stops Fill operation.
Public Method Clone | Overridden. Clones the structure of the DbDataTable, including all DataTable schemes and constraints.
Public Method Close | Disconnects DbDataTable from the data source and frees server resources allocated for the query.
Public Method Compute (Inherited from System.Data.DataTable) | Computes the given expression on the current rows that pass the filter criteria.
Public Method Copy (Inherited from System.Data.DataTable) | Copies both the structure and data for this DataTable.
Public Method CreateDataReader (Inherited from System.Data.DataTable) | Returns a DataTableReader corresponding to the data within this DataTable.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndFill | Ends an asynchronous invocation of the Fill method.
Public Method EndInit | Overridden. Ends the initialization of a DbDataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method EndLoadData (Inherited from System.Data.DataTable) | Turns on notifications, index maintenance, and constraints after loading data.
Public Method Fill | Overloaded. Fills the Rows collection of the DbDataTable with rows from the data source.
Public Method FillPage | Overloaded. Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by StartRecord and including up to the number of rows indicated by MaxRecords.
Public Method FillSchema | Configures the schema to match that in the data source.
Public Method GetChanges (Inherited from System.Data.DataTable) | Overloaded. Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges was last called.
Public Method GetErrors (Inherited from System.Data.DataTable) | Gets an array of DataRow objects that contain errors.
Public Method GetObjectData (Inherited from System.Data.DataTable) | Populates a serialization information object with the data needed to serialize the DataTable.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method ImportRow (Inherited from System.Data.DataTable) | Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.
Public Method Load (Inherited from System.Data.DataTable) | Overloaded. Fills a DataTable with values from a data source using the supplied IDataReader. If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows.
Public Method LoadDataRow (Inherited from System.Data.DataTable) | Overloaded.
Public Method Merge (Inherited from System.Data.DataTable) | Overloaded. Merge the specified DataTable with the current DataTable.
Public Method NewRow (Inherited from System.Data.DataTable) | Creates a new DataRow with the same schema as the table.
Public Method Open | Fetches data and sets the Active property to true.
Public Method Read | Reads the next data row when DbDataTable operates in connected model.
Public Method ReadComplete | Fills a row with data not fetched in the initial fill operation.
Public Method ReadXml (Inherited from System.Data.DataTable) | Overloaded. Reads XML schema and data into the DataTable using the specified Stream.
Public Method ReadXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Reads an XML schema into the DataTable using the specified stream.
Public Method RefreshRow | Refreshes the specified row with values from server.
Public Method RejectChanges (Inherited from System.Data.DataTable) | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataTable) | Resets the DataTable to its original state.
Public Method Select | Overloaded. Gets an array of DataRow objects.
Public Method SuspendFill | Overloaded. Suspends asynchronous fill operation.
Public Method ToString (Inherited from System.Data.DataTable) | Gets the TableName and DisplayExpression, if there is one as a concatenated string.
Public Method Update | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method UpdateRows | Executes the appropriate commands to delete, insert, or update the specified rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataTable) | Overloaded. Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. To write the schema, set the value for the mode parameter to WriteSchema.
Public Method WriteXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Writes the current data structure of the DataTable as an XML schema to the specified stream.

Public Events

Public Event ColumnChanged (Inherited from System.Data.DataTable) | Occurs after a value has been changed for the specified DataColumn in a DataRow.
Public Event ColumnChanging (Inherited from System.Data.DataTable) | Occurs when a value is being changed for the specified DataColumn in a DataRow.
Public Event Disposed | Adds an event handler to listen to the Disposed event on the component.
Public Event FetchFinished | Occurs when a result set is completely fetched.
Public Event FillError | Occurs when an error is raised during a fill operation.
Public Event Initialized (Inherited from System.Data.DataTable) | Occurs after the DataTable is initialized.
Public Event RowChanged (Inherited from System.Data.DataTable) | Occurs after a DataRow has been changed successfully.
Public Event RowChanging (Inherited from System.Data.DataTable) | Occurs when a DataRow is changing.
Public Event RowDeleted (Inherited from System.Data.DataTable) | Occurs after a row in the table has been deleted.
Public Event RowDeleting (Inherited from System.Data.DataTable) | Occurs before a row in the table is about to be deleted.
Public Event RowFetched | Occurs when another row is completely fetched.
Public Event TableCleared (Inherited from System.Data.DataTable) | Occurs after a DataTable is cleared.
Public Event TableClearing (Inherited from System.Data.DataTable) | Occurs when a DataTable is cleared.
Public Event TableNewRow (Inherited from System.Data.DataTable) | Occurs when a new DataRow is inserted.

See Also

DbDataTable Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbDataTable Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataTable Class Properties

Devart.Common Namespace : DbDataTable Class

For a list of all members of this type, see DbDataTable members.

Public Properties

Public Property Active | Gets or sets whether a DbDataTable is filled with data from a data source.
Public Property CachedUpdates | Enables or disables cached updates mode.
Public Property CaseSensitive (Inherited from System.Data.DataTable) | Indicates whether string comparisons within the table are case-sensitive.
Public Property ChildRelations (Inherited from System.Data.DataTable) | Gets the collection of child relations for this DataTable.
Public Property Columns | Gets the collection of columns that belong to this table.
Public Property ConflictOption | Specifies which ConflictOption is to be used by the DbDataTable.
Public Property Connection | Gets or sets the IDbConnection used to connect to the data source.
Public Property Constraints | Gets the collection of constraints maintained by this table.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSet (Inherited from System.Data.DataTable) | Gets the DataSet to which this table belongs.
Public Property DefaultView (Inherited from System.Data.DataTable) | Gets a customized view of the table that may include a filtered view, or a cursor position.
Public Property DeleteCommand | Gets or sets a SQL statement to delete records from the data set.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property static (Shared in Visual Basic) DisableListChangedEvents | Disables some of the events, which occurs when DbDataTable content is changed.
Public Property DisplayExpression (Inherited from System.Data.DataTable) | Gets or sets the expression that returns a value used to represent this table in the user interface. The DisplayExpression property lets you display the name of this table in a user interface.
Public Property ExtendedProperties (Inherited from System.Data.DataTable) | Gets the collection of customized user information.
Public Property FetchAll | Determines whether data is requested from server entirely or partially.
Public Property HasErrors (Inherited from System.Data.DataTable) | Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
Public Property InsertCommand | Gets or sets a SQL statement to insert new records into the data source.
Public Property IsInitialized (Inherited from System.Data.DataTable) | Gets a value that indicates whether the DataTable is initialized.
Public Property Locale (Inherited from System.Data.DataTable) | Gets or sets the locale information used to compare strings within the table.
Public Property MaxRecords | Gets or sets max number of records to fetch starting from StartRecord.
Public Property MinimumCapacity (Inherited from System.Data.DataTable) | Gets or sets the initial starting size for this table.
Public Property MissingSchemaAction | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property Name | Gets or sets name of the component.
Public Property Namespace (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property NonBlocking | Gets or sets data request mode.
Public Property Owner | Gets or sets form that the component resides on.
Public Property ParentRelation | Gets or sets a ParentDataRelation object that is used for server side master-detail relation.
Public Property ParentRelations (Inherited from System.Data.DataTable) | Gets the collection of parent relations for this DataTable.
Public Property Prefix (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property PrimaryKey | Gets or sets an array of columns that function as primary keys for the data table.
Public Property QueryRecordCount | Determines whether DbDataTable should perfrom additional request to determine quantity of records in the result set.
Public Property Quoted | Gets or sets whether the DbDataTable quotes all the names of data source objects.
Public Property RecordCount | Gets number of rows in the result set.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the DbDataTable should retrieve field values adjusted by server after an update.
Public Property RemotingFormat | Gets or sets a SerializationFormat for the DbDataTable used during remoting.
Public Property ReturnProviderSpecificTypes | Determines whether to use provider-specific types whenever possible.
Public Property Rows (Inherited from System.Data.DataTable) | Gets the collection of rows that belong to this table.
Public Property SchemaTable | Gets the schema table corresponding to the SelectCommand query.
Public Property SelectCommand | Gets or sets a SQL statement used to select records in the data source.
Public Property Site (Inherited from System.Data.DataTable) | Gets or sets an ISite for the DataTable.
Public Property StartRecord | Gets or sets record number to start.
Public Property SyncRoot | Gets an object that can be used to synchronize access to the Rows collection.
Public Property TableMapping | Gets a DataTableMapping that provides the master mapping between a source table and a DbDataTable.
Public Property TableName (Inherited from System.Data.DataTable) | Gets or sets the name of the DataTable.
Public Property UpdateBatchSize | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand | Gets or sets a SQL statement used to update records in the data source.
Public Property UpdatingFields | Gets or sets string containing list of field names used to generate update commands.
Public Property UpdatingKeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.

See Also

DbDataTable Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | SelectCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Active Property

Devart.Common Namespace > DbDataTable Class : Active Property (DbDataTable)

Gets or sets whether a DbDataTable is filled with data from a data source.

[Visual Basic]
Public Property Active As Boolean
[C#]
public bool Active {get; set;}

Return Type

true if a DbDataTable is populated with data from a data source; otherwise, false. The default value is false.

Remarks

Set Active property to true to populate the DbDataTable with the data returned from executing SelectCommand. Setting the property to false clears the data and frees the resources allocated on the server, if any.

Example

This sample shows how to use DbDataTable. The routine accepts DbTable-compatible object and IDbCommand implementor object as parameters. After SQL query text has been set the data is retrieved from the table.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbCommand myCommand)
{
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  try
  {
    myDataTable.FetchAll = true;
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myCommand As DbCommand)
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  Try
    myDataTable.FetchAll = True
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | SelectCommand Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CachedUpdates Property

Devart.Common Namespace > DbDataTable Class : CachedUpdates Property

Enables or disables cached updates mode.

[Visual Basic]
Public Property CachedUpdates As Boolean
[C#]
public bool CachedUpdates {get; set;}

Return Type

If true, the changes made to DbDataTable are not sent to server until the Update method is invoked. If false, the Update method is automatically called once a row finishes editing in a visual component.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Columns Property

Devart.Common Namespace > DbDataTable Class : Columns Property (DbDataTable)

Gets the collection of columns that belong to this table.

[Visual Basic]
Public ReadOnly Property Columns As DataColumnCollection
[C#]
public DataColumnCollection Columns {get;}

Return Type

A DataColumnCollection that contains the collection of DataColumn objects for the table; otherwise, a null value if no DataColumn objects exist.

This property is read-only.

Remarks

The DataColumnCollection determines the schema of a table by defining the data type of each column.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ConflictOption Property

Devart.Common Namespace > DbDataTable Class : ConflictOption Property

Specifies which ConflictOption is to be used by the DbDataTable.

[Visual Basic]
Public Overridable Property ConflictOption As ConflictOption
[C#]
public virtual ConflictOption ConflictOption {get; set;}

Return Type

One of the ConflictOption values describing the behavior of this DbDataTable.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Connection Property

Devart.Common Namespace > DbDataTable Class : Connection Property (DbDataTable)

Gets or sets the IDbConnection used to connect to the data source.

[Visual Basic]
Public Property Connection As DbConnection
[C#]
public DbConnection Connection {get; set;}

Return Type

An IDbConnection object which provides a connection to the data source.

Remarks

This property is used by DeleteCommand, InsertCommand, SelectCommand, and UpdateCommand, in case when these properties do not have own created connection.

Example

This sample shows how to use DbDataTable. The routine accepts DbTable-compatible object, IDbCommand implementor object, and IDbConnection implementor object as parameters. After SQL query text has been set the data is retrieved from the table.

[C#]

public void UseDataTable(DbDataTable myDataTable, DbCommand myCommand, DbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myCommand As DbCommand, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Constraints Property

Devart.Common Namespace > DbDataTable Class : Constraints Property

Gets the collection of constraints maintained by this table.

[Visual Basic]
Public ReadOnly Property Constraints As ConstraintCollection
[C#]
public ConstraintCollection Constraints {get;}

Return Type

A ConstraintCollection that contains the collection of Constraint objects for the table; otherwise, a null value if no Constraint objects exist.

This property is read-only.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DeleteCommand Property

Devart.Common Namespace > DbDataTable Class : DeleteCommand Property (DbDataTable)

Gets or sets a SQL statement to delete records from the data set.

[Visual Basic]
Public Property DeleteCommand As DbCommand
[C#]
public DbCommand DeleteCommand {get; set;}

Return Type

An IDbCommand used during an update operation to delete records in the data source that correspond to deleted rows in the DataSet.

Remarks

DeleteCommand uses its own Connection if it is created. Otherwise DeleteCommand uses Connection property.

If the DeleteCommand property is not set, DbDataTable generates necessary SQL statements automatically.

Example

Refer to help on types that derive from DbDataTable for samples on usage of this property.

See Also

DbDataTable Class | DbDataTable Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DisableListChangedEvents Property

Devart.Common Namespace > DbDataTable Class : DisableListChangedEvents Property

Disables some of the events, which occurs when DbDataTable content is changed.

[Visual Basic]
Public Shared Property DisableListChangedEvents As Boolean
[C#]
public static bool DisableListChangedEvents {get; set;}

Remarks

It is not recommended to set this property to true when using DbDataTable with DataGridView control, but it can improve data fetching performance for some third-party components, such as DevExpress grid control.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | NonBlocking Property | QueryRecordCount Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FetchAll Property

Devart.Common Namespace > DbDataTable Class : FetchAll Property (DbDataTable)

Determines whether data is requested from server entirely or partially.

[Visual Basic]
Public Overridable Property FetchAll As Boolean
[C#]
public virtual bool FetchAll {get; set;}

Return Type

If true, the data is requested when the DbDataTable is opened, otherwise records are fetched only when necessary.

Remarks

The FetchAll property allows you to optimize application behavior depending on circumstances. For example, consider a situation when user requests large amount of data to be displayed in a grid. When FetchAll is true, the whole dataset is retrieved from server at once, and while navigating through the dataset no server roundtrips are necessary. Thus application less depends on network speed and stability. When FetchAll is false, only minimal quantity of rows is requested at once, which leads to better initial response time and less network traffic.

Note that when FetchAll is true, fill operations can be asynchronous. Refer to NonBlocking property for more information.

When FetchAll is false, it could be useful to determine rows quantity with the QueryRecordCount property.

Example

The following example demonstrates how to use the FetchAll property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection, DataGrid dataGrid) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.FetchAll = true;
  myDataTable.CachedUpdates = false;
  myDataTable.Active = true;
  dataGrid.DataSource = myDataTable;
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection, ByVal dataGrid As DataGrid)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.FetchAll = True
  myDataTable.CachedUpdates = False
  myDataTable.Active = True
  dataGrid.DataSource = myDataTable
End Sub

See Also

DbDataTable Class | DbDataTable Members | NonBlocking Property | QueryRecordCount Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

InsertCommand Property

Devart.Common Namespace > DbDataTable Class : InsertCommand Property (DbDataTable)

Gets or sets a SQL statement to insert new records into the data source.

[Visual Basic]
Public Property InsertCommand As DbCommand
[C#]
public DbCommand InsertCommand {get; set;}

Return Type

An IDbCommand used during an update operation to insert records in the data source that correspond to new rows in the DataTable.

Remarks

InsertCommand uses its own Connection if it is created. Otherwise InsertCommand uses Connection property.

If the InsertCommand property is not set, DbDataTable generates necessary SQL statements automatically.

Example

Refer to help on types that derive from DbDataTable for samples on usage of this property.

See Also

DbDataTable Class | DbDataTable Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | StartRecord Property | Active Property | FillPage Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

MaxRecords Property

Devart.Common Namespace > DbDataTable Class : MaxRecords Property

Gets or sets max number of records to fetch starting from StartRecord.

[Visual Basic]
Public Property MaxRecords As Integer
[C#]
public int MaxRecords {get; set;}

Return Type

Max number of records to fetch starting from StartRecord.

Remarks

StartRecord and MaxRecords take effect only when DbDataTable is opened using the Active property or the Open method.

Another way to access only a subset of rows is to use FillPage method.

Assigning a value to this property invokes the fill operation.

Example

This sample shows how to access only a part of dataset returned by a query.

[C#]

static void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp";
  myDataTable.StartRecord = 0;
  myDataTable.MaxRecords = 10;
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  Try
    myDataTable.Connection = myConnection
    myDataTable.SelectCommand = myConnection.CreateCommand()
    myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp"
    myDataTable.StartRecord = 0
    myDataTable.MaxRecords = 10
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Clear()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | StartRecord Property | Active Property | FillPage Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

MissingSchemaAction Property

Devart.Common Namespace > DbDataTable Class : MissingSchemaAction Property

Determines the action to take when existing DataSet schema does not match incoming data.

[Visual Basic]
Public Property MissingSchemaAction As MissingSchemaAction
[C#]
public MissingSchemaAction MissingSchemaAction {get; set;}

Return Type

One of the MissingSchemaAction values.

Remarks

The default value is AddWithKey.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Name Property

Devart.Common Namespace > DbDataTable Class : Name Property (DbDataTable)

Gets or sets name of the component.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

Name of the component

Remarks

This name is used for cross-form referencing the component.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | FetchAll Property | SuspendFill Method | EndFill Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

NonBlocking Property

Devart.Common Namespace > DbDataTable Class : NonBlocking Property

Gets or sets data request mode.

[Visual Basic]
Public Property NonBlocking As Boolean
[C#]
public bool NonBlocking {get; set;}

Return Type

If this property is true, true, and the FetchAll property is true also, the data is requested asynchronously.

Remarks

When FetchAll property is false, the NonBlocking property is ignored. When both FetchAll and NonBlocking properties are true, the fill operation is performed asynchronously, and you can use SuspendFill, EndFill, and other asynchronous methods.

Example

The following example demonstrates how to use the NonBlocking property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.NonBlocking = true;
  myDataTable.Active = true;

  while ( true ) {
    Thread.Sleep(100);
    bool isFetching = !System.Threading.Monitor.TryEnter(myDataTable.SyncRoot, 0);
    if (!isFetching)
      System.Threading.Monitor.Exit(myDataTable.SyncRoot);
    else
      break;
    Console.Write("Fetch in process");
  }
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.NonBlocking = True
  myDataTable.Active = True
  Do While True
    Thread.Sleep(100)
    If Not Monitor.TryEnter(myDataTable.SyncRoot, 0) Then
      Console.Write("All records are fetched")
      Return
    End If
    Monitor.Exit(myDataTable.SyncRoot)
    Console.Write("Fetch in process")
  Loop
End Sub

See Also

DbDataTable Class | DbDataTable Members | FetchAll Property | SuspendFill Method | EndFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Owner Property

Devart.Common Namespace > DbDataTable Class : Owner Property (DbDataTable)

Gets or sets form that the component resides on.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

The form that the component resides on.

Remarks

This property is used for cross-form referencing and server side master-detail relationship.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParentRelation Property

Devart.Common Namespace > DbDataTable Class : ParentRelation Property

Gets or sets a ParentDataRelation object that is used for server side master-detail relation.

[Visual Basic]
Public Property ParentRelation As ParentDataRelation
[C#]
public ParentDataRelation ParentRelation {get; set;}

Return Type

A ParentDataRelation object.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

PrimaryKey Property

Devart.Common Namespace > DbDataTable Class : PrimaryKey Property

Gets or sets an array of columns that function as primary keys for the data table.

[Visual Basic]
Public Property PrimaryKey As DataColumn()
[C#]
public DataColumn[] PrimaryKey {get; set;}

Return Type

An array of DataColumn objects.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | RecordCount Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

QueryRecordCount Property

Devart.Common Namespace > DbDataTable Class : QueryRecordCount Property

Determines whether DbDataTable should perfrom additional request to determine quantity of records in the result set.

[Visual Basic]
Public Property QueryRecordCount As Boolean
[C#]
public bool QueryRecordCount {get; set;}

Return Type

If true, an additional request to server is executed, and the RecordCount is updated.

Remarks

The SQL statement for obtaining the record count is generated basing on the SelectCommand object. This property can be used when FetchAll is false, otherwise it is useless.

Example

The following example demonstrates how to use the QueryRecordCount property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  myDataTable.QueryRecordCount = false;
  myDataTable.Active = true;
  int count = myDataTable.RecordCount; //the number of currently fetched rows
  myDataTable.Active = false;

  myDataTable.QueryRecordCount = true;
  myDataTable.Active = true;
  count = myDataTable.RecordCount; //the real number of rows in the table
  myDataTable.Active = false;
}

[Visual Basic]

Private Shared Sub UseDataTable5(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.QueryRecordCount = False

  myDataTable.Active = True
  Dim num1 As Integer = myDataTable.RecordCount 'the number of currently fetched rows

  myDataTable.Active = False
  myDataTable.QueryRecordCount = True

  myDataTable.Active = True
  num1 = myDataTable.RecordCount 'the real number of rows in the table

  myDataTable.Active = False
End Sub

See Also

DbDataTable Class | DbDataTable Members | RecordCount Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Quoted Property

Devart.Common Namespace > DbDataTable Class : Quoted Property (DbDataTable)

Gets or sets whether the DbDataTable quotes all the names of data source objects.

[Visual Basic]
Public Property Quoted As Boolean
[C#]
public bool Quoted {get; set;}

Return Type

true if the DbDataTable will quote all the names of data source objects; otherwise, false. The default value is false.

Remarks

Names of data source objects can contain any characters, including spaces, commas, national or lowercase characters. To accommodate this, use the Quoted property that allows enclosing of all objects names by quotation mark in generated SQL statements.

Example

The following example demonstrates how to use the Quoted property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM \"DeptMixedCase\"";
  myDataTable.Quoted = true;
  myDataTable.FetchAll = true;
  myDataTable.CachedUpdates = false;
  myDataTable.Open();
  DataRow row = myDataTable.Rows[0];
  row[myDataTable.Columns["DNAME"]] = "Departament1";
  myDataTable.Update();
  myDataTable.Close();
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM ""DeptMixedCase"""
  myDataTable.Quoted = True
  myDataTable.FetchAll = True
  myDataTable.CachedUpdates = False
  myDataTable.Open()
  Dim row1 As DataRow = myDataTable.Rows.Item(0)
  row1.Item(myDataTable.Columns.Item("DNAME")) = "Departament1"
  myDataTable.Update()
  myDataTable.Close()
End Sub

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | QueryRecordCount Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RecordCount Property

Devart.Common Namespace > DbDataTable Class : RecordCount Property

Gets number of rows in the result set.

[Visual Basic]
Public ReadOnly Property RecordCount As Integer
[C#]
public int RecordCount {get;}

Return Type

Number of rows in the result set. Meaning of this value depends on the QueryRecordCount property.

Remarks

If the QueryRecordCount property is true, the RecordCount property represents number of rows in the current result set. If the QueryRecordCount property is false, it is number of fetched rows.

Example

The following example demonstrates how to use the RecordCount property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  myDataTable.QueryRecordCount = false;
  myDataTable.Active = true;
  int count = myDataTable.RecordCount; //the number of currently fetched rows
  myDataTable.Active = false;

  myDataTable.QueryRecordCount = true;
  myDataTable.Active = true;
  count = myDataTable.RecordCount; //the real number of rows in the table
  myDataTable.Active = false;
}

[Visual Basic]

Private Shared Sub UseDataTable5(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.QueryRecordCount = False

  myDataTable.Active = True
  Dim num1 As Integer = myDataTable.RecordCount 'the number of currently fetched rows

  myDataTable.Active = False
  myDataTable.QueryRecordCount = True

  myDataTable.Active = True
  num1 = myDataTable.RecordCount 'the real number of rows in the table

  myDataTable.Active = False
End Sub

See Also

DbDataTable Class | DbDataTable Members | QueryRecordCount Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | RefreshRow Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshingFields Property

Devart.Common Namespace > DbDataTable Class : RefreshingFields Property (DbDataTable)

Gets or sets list of fields whose values should be retrieved after a DML statement execution.

[Visual Basic]
Public Property RefreshingFields As String
[C#]
public string RefreshingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Remarks

This property is used in conjunction with RefreshMode.

See Also

DbDataTable Class | DbDataTable Members | RefreshRow Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | RefreshingFields Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshMode Property

Devart.Common Namespace > DbDataTable Class : RefreshMode Property (DbDataTable)

Gets or sets a value that indicates whether and how the DbDataTable should retrieve field values adjusted by server after an update.

[Visual Basic]
Public Property RefreshMode As RefreshRowMode
[C#]
public RefreshRowMode RefreshMode {get; set;}

Return Type

One of the RefreshRowMode values.

See Also

DbDataTable Class | DbDataTable Members | RefreshingFields Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RemotingFormat Property

Devart.Common Namespace > DbDataTable Class : RemotingFormat Property (DbDataTable)

Gets or sets a SerializationFormat for the DbDataTable used during remoting.

[Visual Basic]
Public Property RemotingFormat As SerializationFormat
[C#]
public SerializationFormat RemotingFormat {get; set;}

Return Type

A SerializationFormat object.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ReturnProviderSpecificTypes Property

Devart.Common Namespace > DbDataTable Class : ReturnProviderSpecificTypes Property

Determines whether to use provider-specific types whenever possible.

[Visual Basic]
Public Property ReturnProviderSpecificTypes As Boolean
[C#]
public bool ReturnProviderSpecificTypes {get; set;}

Return Type

If true, DbDataTable uses the GetProviderSpecificFieldType and GetProviderSpecificValue methods to retrieve data from server.

Remarks

The default value is false.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SchemaTable Property

Devart.Common Namespace > DbDataTable Class : SchemaTable Property

Gets the schema table corresponding to the SelectCommand query.

[Visual Basic]
Public ReadOnly Property SchemaTable As DataTable
[C#]
public DataTable SchemaTable {get;}

Return Type

The schema table corresponding to the SelectCommand query.

Remarks

This property is available after executing Open, Fill, or FillPage.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property | QueryRecordCount Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SelectCommand Property

Devart.Common Namespace > DbDataTable Class : SelectCommand Property (DbDataTable)

Gets or sets a SQL statement used to select records in the data source.

[Visual Basic]
Public Property SelectCommand As DbCommand
[C#]
public DbCommand SelectCommand {get; set;}

Return Type

An IDbCommand that is used during a fill operation to select records from the data source for placement in the DbDataTable.

Remarks

SelectCommand uses its own Connection if it is created. Otherwise SelectCommand uses Connection property.

If the SelectCommand property is not set, DbDataTable generates necessary SQL statements automatically.

Example

This sample shows how to use DbDataTable. The routine accepts DbDataTable-compatible object, IDbCommand implementor object, and IDbConnection implementor object as parameters. After SQL query text has been set the data is retrieved from the table.

[C#]

public void UseDataTable(DbDataTable myDataTable, DbCommand myCommand, DbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myCommand As DbCommand, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property | QueryRecordCount Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | MaxRecords Property | Active Property | FillPage Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StartRecord Property

Devart.Common Namespace > DbDataTable Class : StartRecord Property

Gets or sets record number to start.

[Visual Basic]
Public Property StartRecord As Integer
[C#]
public int StartRecord {get; set;}

Return Type

Record number to start. Value 0 means the first row, 1 means the second, and so on.

Remarks

StartRecord and MaxRecords take effect only when DbDataTable is opened using the Active property or the Open method.

Another way to access only a subset of rows is to use FillPage method.

Assigning a value to this property invokes the fill operation.

Example

This sample shows how to access only a part of dataset returned by a query.

[C#]

static void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp";
  myDataTable.StartRecord = 0;
  myDataTable.MaxRecords = 10;
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  Try
    myDataTable.Connection = myConnection
    myDataTable.SelectCommand = myConnection.CreateCommand()
    myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp"
    myDataTable.StartRecord = 0
    myDataTable.MaxRecords = 10
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Clear()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | MaxRecords Property | Active Property | FillPage Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SyncRoot Property

Devart.Common Namespace > DbDataTable Class : SyncRoot Property (DbDataTable)

Gets an object that can be used to synchronize access to the Rows collection.

[Visual Basic]
Public ReadOnly Property SyncRoot As Object
[C#]
public object SyncRoot {get;}

Return Type

A synchronization object.

Remarks

DbDataTable uses the SyncRoot object during some fill operations. You can use this object to check if the operation is still in progress.

Example

The following example demonstrates how to use the SyncRoot property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept";
  myDataTable.NonBlocking = true;
  myDataTable.Active = true;

  while ( true ) {
    Thread.Sleep(100);
    bool isFetching = !System.Threading.Monitor.TryEnter(myDataTable.SyncRoot, 0);
    if (!isFetching)
      System.Threading.Monitor.Exit(myDataTable.SyncRoot);
    else
      break;
    Console.Write("Fetch in process");
  }
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Dept"
  myDataTable.NonBlocking = True
  myDataTable.Active = True
  Do While True
    Thread.Sleep(100)
    If Not Monitor.TryEnter(myDataTable.SyncRoot, 0) Then
      Console.Write("All records are fetched")
      Return
    End If
    Monitor.Exit(myDataTable.SyncRoot)
    Console.Write("Fetch in process")
  Loop
End Sub

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TableMapping Property

Devart.Common Namespace > DbDataTable Class : TableMapping Property (DbDataTable)

Gets a DataTableMapping that provides the master mapping between a source table and a DbDataTable.

[Visual Basic]
Public ReadOnly Property TableMapping As DataTableMapping
[C#]
public DataTableMapping TableMapping {get;}

Return Type

A DataTableMapping that provides the master mapping between a source table and a DbDataTable.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdateBatchSize Property

Devart.Common Namespace > DbDataTable Class : UpdateBatchSize Property (DbDataTable)

Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

[Visual Basic]
Public Property UpdateBatchSize As Integer
[C#]
public int UpdateBatchSize {get; set;}

Return Type

The number of rows to process per batch. If 0, there is no limit on the batch size. If 1, batch updating is disabled. If more than 1, determines the amount of operations sent at once.

Remarks

Use the UpdateBatchSize property to update a data source with changes from a DbDataSet. This can increase application performance by reducing the number of round-trips to the server. However, executing an extremely large batch could decrease performance. You should test for the optimum batch size setting before implementing your application.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdateCommand Property

Devart.Common Namespace > DbDataTable Class : UpdateCommand Property (DbDataTable)

Gets or sets a SQL statement used to update records in the data source.

[Visual Basic]
Public Property UpdateCommand As DbCommand
[C#]
public DbCommand UpdateCommand {get; set;}

Return Type

An IDbCommand used during an update operation to update records in the data source that correspond to modified rows in the DbDataTable.

Remarks

UpdateCommand uses its own Connection if it is created. Otherwise UpdateCommand uses Connection property.

If the UpdateCommand property is not set, DbDataTable generates necessary SQL statements automatically.

See Also

DbDataTable Class | DbDataTable Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | UpdatingTable Property | UpdatingKeyFields Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatingFields Property

Devart.Common Namespace > DbDataTable Class : UpdatingFields Property (DbDataTable)

Gets or sets string containing list of field names used to generate update commands.

[Visual Basic]
Public Property UpdatingFields As String
[C#]
public string UpdatingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Example

The following example demonstrates how to use the UpdatingFields property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT e.EMPNO, e.ENAME, e.JOB, d.DNAME
    FROM Test.Dept d, Test.Emp e
    where d.Deptno = e.Deptno";

  myDataTable.FetchAll = true;
  myDataTable.CachedUpdates = false;
  myDataTable.UpdatingTable = "Test.Emp";
  myDataTable.UpdatingKeyFields = "EMPNO";
  myDataTable.UpdatingFields = "EMPNO;ENAME;JOB";

  myDataTable.Open();

  DataRow row = myDataTable.Rows[0];
  row[myDataTable.Columns["ENAME"]] = "John Smith";

  myDataTable.Update();
  myDataTable.Close();
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT e.EMPNO, e.ENAME, e.JOB, d.DNAME" + _
    "FROM Test.Dept d, Test.Emp e " + _
    "where d.Deptno = e.Deptno"
  myDataTable.FetchAll = True
  myDataTable.CachedUpdates = False
  myDataTable.UpdatingTable = "Test.Emp"
  myDataTable.UpdatingKeyFields = "EMPNO"
  myDataTable.UpdatingFields = "EMPNO;ENAME;JOB"
  myDataTable.Open()
  Dim row1 As DataRow = myDataTable.Rows.Item(0)
  row1.Item(myDataTable.Columns.Item("ENAME")) = "John Smith"
  myDataTable.Update()
  myDataTable.Close()
End Sub

See Also

DbDataTable Class | DbDataTable Members | UpdatingTable Property | UpdatingKeyFields Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | UpdatingTable Property | UpdatingFields Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatingKeyFields Property

Devart.Common Namespace > DbDataTable Class : UpdatingKeyFields Property (DbDataTable)

Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.

[Visual Basic]
Public Property UpdatingKeyFields As String
[C#]
public string UpdatingKeyFields {get; set;}

Return Type

The string containing list of key field names separated by semicolon.

Example

The following example demonstrates how to use the UpdatingKeyFields property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT e.EMPNO, e.ENAME, e.JOB, d.DNAME FROM Test.Dept d, Test.Emp e where d.Deptno = e.Deptno";

  myDataTable.FetchAll = true;
  myDataTable.CachedUpdates = false;
  myDataTable.UpdatingTable = "Test.Emp";
  myDataTable.UpdatingKeyFields = "EMPNO";
  myDataTable.UpdatingFields = "EMPNO;ENAME;JOB";

  myDataTable.Open();

  DataRow row = myDataTable.Rows[0];
  row[myDataTable.Columns["ENAME"]] = "John Smith";

  myDataTable.Update();
  myDataTable.Close();
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT e.EMPNO, e.ENAME, e.JOB, d.DNAME FROM Test.Dept d, Test.Emp e where d.Deptno = e.Deptno"
  myDataTable.FetchAll = True
  myDataTable.CachedUpdates = False
  myDataTable.UpdatingTable = "Test.Emp"
  myDataTable.UpdatingKeyFields = "EMPNO"
  myDataTable.UpdatingFields = "EMPNO;ENAME;JOB"
  myDataTable.Open()
  Dim row1 As DataRow = myDataTable.Rows.Item(0)
  row1.Item(myDataTable.Columns.Item("ENAME")) = "John Smith"
  myDataTable.Update()
  myDataTable.Close()
End Sub

See Also

DbDataTable Class | DbDataTable Members | UpdatingTable Property | UpdatingFields Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | UpdatingFields Property | UpdatingKeyFields Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UpdatingTable Property

Devart.Common Namespace > DbDataTable Class : UpdatingTable Property (DbDataTable)

Gets or sets table name to generate update statements for.

[Visual Basic]
Public Property UpdatingTable As String
[C#]
public string UpdatingTable {get; set;}

Return Type

The name of the table.

Remarks

Use the UpdatingTable property to generate SQL statements for specific table in a complicated query.

See Also

DbDataTable Class | DbDataTable Members | UpdatingFields Property | UpdatingKeyFields Property


%%PageItemTitle%% $$Methods$$

DbDataTable Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataTable Class Methods

Devart.Common Namespace : DbDataTable Class

For a list of all members of this type, see DbDataTable members.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataTable) | Commits all the changes made to this table since the last time AcceptChanges was called.
Public Method BeginFill | Starts an asynchronous invocation of the Fill method.
Public Method BeginInit (Inherited from System.Data.DataTable) | Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method BeginLoadData (Inherited from System.Data.DataTable) | Turns off notifications, index maintenance, and constraints while loading data.
Public Method CancelFetch | Stops asynchronous fill operation.
Public Method Clear | Clears DbDataTable and stops Fill operation.
Public Method Clone | Overridden. Clones the structure of the DbDataTable, including all DataTable schemes and constraints.
Public Method Close | Disconnects DbDataTable from the data source and frees server resources allocated for the query.
Public Method Compute (Inherited from System.Data.DataTable) | Computes the given expression on the current rows that pass the filter criteria.
Public Method Copy (Inherited from System.Data.DataTable) | Copies both the structure and data for this DataTable.
Public Method CreateDataReader (Inherited from System.Data.DataTable) | Returns a DataTableReader corresponding to the data within this DataTable.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndFill | Ends an asynchronous invocation of the Fill method.
Public Method EndInit | Overridden. Ends the initialization of a DbDataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method EndLoadData (Inherited from System.Data.DataTable) | Turns on notifications, index maintenance, and constraints after loading data.
Public Method Fill | Overloaded. Fills the Rows collection of the DbDataTable with rows from the data source.
Public Method FillPage | Overloaded. Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by StartRecord and including up to the number of rows indicated by MaxRecords.
Public Method FillSchema | Configures the schema to match that in the data source.
Public Method GetChanges (Inherited from System.Data.DataTable) | Overloaded. Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges was last called.
Public Method GetErrors (Inherited from System.Data.DataTable) | Gets an array of DataRow objects that contain errors.
Public Method GetObjectData (Inherited from System.Data.DataTable) | Populates a serialization information object with the data needed to serialize the DataTable.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method ImportRow (Inherited from System.Data.DataTable) | Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.
Public Method Load (Inherited from System.Data.DataTable) | Overloaded. Fills a DataTable with values from a data source using the supplied IDataReader. If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows.
Public Method LoadDataRow (Inherited from System.Data.DataTable) | Overloaded.
Public Method Merge (Inherited from System.Data.DataTable) | Overloaded. Merge the specified DataTable with the current DataTable.
Public Method NewRow (Inherited from System.Data.DataTable) | Creates a new DataRow with the same schema as the table.
Public Method Open | Fetches data and sets the Active property to true.
Public Method Read | Reads the next data row when DbDataTable operates in connected model.
Public Method ReadComplete | Fills a row with data not fetched in the initial fill operation.
Public Method ReadXml (Inherited from System.Data.DataTable) | Overloaded. Reads XML schema and data into the DataTable using the specified Stream.
Public Method ReadXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Reads an XML schema into the DataTable using the specified stream.
Public Method RefreshRow | Refreshes the specified row with values from server.
Public Method RejectChanges (Inherited from System.Data.DataTable) | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataTable) | Resets the DataTable to its original state.
Public Method Select | Overloaded. Gets an array of DataRow objects.
Public Method SuspendFill | Overloaded. Suspends asynchronous fill operation.
Public Method ToString (Inherited from System.Data.DataTable) | Gets the TableName and DisplayExpression, if there is one as a concatenated string.
Public Method Update | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method UpdateRows | Executes the appropriate commands to delete, insert, or update the specified rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataTable) | Overloaded. Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. To write the schema, set the value for the mode parameter to WriteSchema.
Public Method WriteXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Writes the current data structure of the DataTable as an XML schema to the specified stream.

See Also

DbDataTable Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | EndFill Method | SuspendFill Method

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginFill Method

Devart.Common Namespace > DbDataTable Class : BeginFill Method

Starts an asynchronous invocation of the Fill method.

[Visual Basic]
Public Function BeginFill( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginFill(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

Refer to "Asynchronous Query Execution" topic for detailed information.

If the suspended fetch is stopped with EndFill method, the BeginFill method will start the fetch from the point where the fetch was stopped. To make BeginFill starting the query from the beginning, use the CancelFetch method.

Example

The following example demonstrates how to use the BeginFill method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  IAsyncResult aRes = myDataTable.BeginFill(null, null);

  Console.Write("Fetch in process");

  Thread.Sleep(100);
  myDataTable.SuspendFill(true);
  Console.Write("Fetch is stopped");

  myDataTable.EndFill(aRes);
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable3(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
  Console.Write("Fetch in process")
  Thread.Sleep(100)
  myDataTable.SuspendFill(True)
  Console.Write("Fetch is stopped")
  myDataTable.EndFill(result1)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members | EndFill Method | SuspendFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | BeginFill Method | SuspendFill Method | EndFill Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CancelFetch Method

Devart.Common Namespace > DbDataTable Class : CancelFetch Method

Stops asynchronous fill operation.

[Visual Basic]
Public Sub CancelFetch()
[C#]
public void CancelFetch();

Remarks

This method cancels an asynchronous fill operation. Unlike SuspendFill, after you call this method there will be no way to read out the dataset.

See Also

DbDataTable Class | DbDataTable Members | BeginFill Method | SuspendFill Method | EndFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Clear Method

Devart.Common Namespace > DbDataTable Class : Clear Method (DbDataTable)

Clears DbDataTable and stops Fill operation.

[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

Remarks

This method clears all information except table schema and sets Active property to false.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Clone Method

Devart.Common Namespace > DbDataTable Class : Clone Method (DbDataTable)

Clones the structure of the DbDataTable, including all DataTable schemes and constraints.

[Visual Basic]
Overrides Public Function Clone() As DataTable
[C#]
public override DataTable Clone();

Return Type

A new DbDataTable with the same schema as the current DbDataTable.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Active Property | Open Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Close Method

Devart.Common Namespace > DbDataTable Class : Close Method (DbDataTable)

Disconnects DbDataTable from the data source and frees server resources allocated for the query.

[Visual Basic]
Public Sub Close()
[C#]
public void Close();

Remarks

This method does not clear the data. To close the DbDataTable and free resources use the Clear method.

Example

The following example demonstrates how to use the Close method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbCommand myCommand)
{
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  try
  {
    myDataTable.Open();
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Close();
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myCommand As DbCommand)
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  Try
    myDataTable.Open()
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Close()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Active Property | Open Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | BeginFill Method | SuspendFill Method

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned from BeginFill.
See Also Languages Devart.Data Send comments on this topic.

EndFill Method

Devart.Common Namespace > DbDataTable Class : EndFill Method

Ends an asynchronous invocation of the Fill method.

[Visual Basic]
Public Sub EndFill( _
   ByVal result As IAsyncResult _
)
[C#]
public void EndFill(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned from BeginFill.

Remarks

This method returns when the asynchronous fill operation is complete.

Refer to "Asynchronous Query Execution" topic for detailed information.

If the fetch is suspended by the SuspendFill method and then stopped by the EndFill method, the BeginFill method will start the fetch from the point where the fetch was stopped. To make BeginFill starting the query from the beginning, use the CancelFetch method.

Example

The following example demonstrates how to use the EndFill method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  IAsyncResult aRes = myDataTable.BeginFill(null, null);

  Console.Write("Fetch in process");

  Thread.Sleep(100);
  myDataTable.SuspendFill(true);
  Console.Write("Fetch is stopped");

  myDataTable.EndFill(aRes);
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable3(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
  Console.Write("Fetch in process")
  Thread.Sleep(100)
  myDataTable.SuspendFill(True)
  Console.Write("Fetch is stopped")
  myDataTable.EndFill(result1)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members | BeginFill Method | SuspendFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

EndInit Method

Devart.Common Namespace > DbDataTable Class : EndInit Method

Ends the initialization of a DbDataTable that is used on a form or used by another component. The initialization occurs at run time.

[Visual Basic]
Overrides Public Sub EndInit()
[C#]
public override void EndInit();

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Fill Method

Devart.Common Namespace > DbDataTable Class : Fill Method (DbDataTable)

Fills the Rows collection of the DbDataTable with rows from the data source.

Overload List

Fills the Rows collection of the DbDataTable with rows from the data source using the parameter values passed in parameterValues.

[Visual Basic] Overloads Public Function Fill(Object()) As Integer

[C#] public int Fill(object[]);

Fills the Rows collection of the DbDataTable with rows from the data source.

[Visual Basic] Overloads Public Function Fill() As Integer

[C#] public int Fill();

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

parameterValues
Used to fill the Devart.Data.PostgreSql.PgSqlCommand.Parameters collection of the SelectCommand property.
See Also Languages Devart.Data Send comments on this topic.

Fill(Object[]) Method

Devart.Common Namespace > DbDataTable Class > Fill Method : Fill(Object[]) Method

Fills the Rows collection of the DbDataTable with rows from the data source using the parameter values passed in parameterValues.

[Visual Basic]
Overloads Public Function Fill( _
   ByVal parameterValues() As Object _
) As Integer
[C#]
public int Fill(
   object[] parameterValues
);

Parameters

parameterValues
Used to fill the Devart.Data.PostgreSql.PgSqlCommand.Parameters collection of the SelectCommand property.

Return Type

The number of rows successfully added to or refreshed in the DbDataTable. This does not include rows affected by statements that do not return rows.

Example

The following sample shows how to get data from a data source using Fill method with condition parameter value passed.

[C#]

public void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection, IDbDataParameter myParameter)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp WHERE DeptNo=:DeptNo";
  myParameter.ParameterName = "DeptNo";
  myDataTable.SelectCommand.Parameters.Add(myParameter);
  object[] myParamValue = new object[1];
  myParamValue[0] = 10;
  try
  {
    myDataTable.Fill(myParamValue);
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection, ByVal myParameter As IDbDataParameter)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp WHERE DeptNo=:DeptNo"
  myParameter.ParameterName = "DeptNo"
  myDataTable.SelectCommand.Parameters.Add(myParameter)
  Dim myParamValue() As Object = {10}
  Try
    myDataTable.Fill(myParamValue)
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Fill() Method

Devart.Common Namespace > DbDataTable Class > Fill Method : Fill() Method

Fills the Rows collection of the DbDataTable with rows from the data source.

[Visual Basic]
Overloads Public Function Fill() As Integer
[C#]
public int Fill();

Return Type

The number of rows successfully added to or refreshed in the DbDataTable. This does not include rows affected by statements that do not return rows.

Example

The following sample shows how to get data from a data source using Fill method.

[C#]

static void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";
  try
  {
    myDataTable.Fill();
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear;
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Try
    myDataTable.Fill()
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Clear()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FillPage Method

Devart.Common Namespace > DbDataTable Class : FillPage Method (DbDataTable)

Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by StartRecord and including up to the number of rows indicated by MaxRecords.

Overload List

Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by startRecord and including up to the number of rows indicated by maxRecords.

[Visual Basic] Overloads Public Function FillPage(Integer,Integer) As Integer

[C#] public int FillPage(int,int);

Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by startRecord and including up to the number of rows indicated by maxRecords using the parameter values passed in parameterValues.

[Visual Basic] Overloads Public Function FillPage(Integer,Integer,Object()) As Integer

[C#] public int FillPage(int,int,object[]);

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

startRecord
The number of the first row to retrieve. Value 0 means the first row, 1 means the second, and so on.
maxRecords
The maximum number of records to retrieve.
See Also Languages Devart.Data Send comments on this topic.

FillPage(Int32,Int32) Method

Devart.Common Namespace > DbDataTable Class > FillPage Method : FillPage(Int32,Int32) Method

Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by startRecord and including up to the number of rows indicated by maxRecords.

[Visual Basic]
Overloads Public Function FillPage( _
   ByVal startRecord As Integer, _
   ByVal maxRecords As Integer _
) As Integer
[C#]
public int FillPage(
   int startRecord,
   int maxRecords
);

Parameters

startRecord
The number of the first row to retrieve. Value 0 means the first row, 1 means the second, and so on.
maxRecords
The maximum number of records to retrieve.

Return Type

The number of rows successfully added to or refreshed in the DbDataTable. This does not include rows affected by statements that do not return rows.

Remarks

This method clears any exisiting rows in the DbDataTable.

Example

This sample shows how to use paged access to data. It attempts to read rows 11 through 20 from the table and to display them. However, if quantity of records in the table is less than 20, only available rows will be filled into DbDataTable. Number of rows actually added is rendered to console.

[C#]

public void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp";
  try
  {
    Console.WriteLine(myDataTable.FillPage(10,10) + " rows filled.");
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp"
  Try
    Console.WriteLine(myDataTable.FillPage(10, 10) & " rows filled.")
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Clear()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

startRecord
The number of the first row to retrieve. Value 0 means the first row, 1 means the second, and so on.
maxRecords
The maximum number of records to retrieve.
parameterValues
Used to fill the Parameters collection of the SelectCommand property.
See Also Languages Devart.Data Send comments on this topic.

FillPage(Int32,Int32,Object[]) Method

Devart.Common Namespace > DbDataTable Class > FillPage Method : FillPage(Int32,Int32,Object[]) Method

Fills the Rows collection of the DbDataTable with rows from the data source starting at the row indicated by startRecord and including up to the number of rows indicated by maxRecords using the parameter values passed in parameterValues.

[Visual Basic]
Overloads Public Function FillPage( _
   ByVal startRecord As Integer, _
   ByVal maxRecords As Integer, _
   ByVal parameterValues() As Object _
) As Integer
[C#]
public int FillPage(
   int startRecord,
   int maxRecords,
   object[] parameterValues
);

Parameters

startRecord
The number of the first row to retrieve. Value 0 means the first row, 1 means the second, and so on.
maxRecords
The maximum number of records to retrieve.
parameterValues
Used to fill the Parameters collection of the SelectCommand property.

Return Type

The number of rows successfully added to or refreshed in the DbDataTable. This does not include rows affected by statements that do not return rows.

Remarks

This method clears any exisiting rows in the DbDataTable.

Example

This sample shows how to use paged access to data. It attempts to read rows 3 through 12 from the table and to display them. However, if quantity of records that match condition in the table is less than 12, only available rows will be filled into DbDataTable. Number of rows actually added is rendered to console.

[C#]

public void FillDataTable(DbDataTable myDataTable, IDbConnection myConnection, IDbDataParameter myParameter)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp WHERE DeptNo=:DeptNo";
  myParameter.ParameterName = "DeptNo";
  myDataTable.SelectCommand.Parameters.Add(myParameter);
  object[] myParamValue = new object[1];
  myParamValue[0] = 10;
  try
  {
    myDataTable.FillPage(2,10,myParamValue);
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Clear();
  }
}

[Visual Basic]

Public Sub FillDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection, ByVal myParameter As IDbDataParameter)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp WHERE DeptNo=:DeptNo"
  myParameter.ParameterName = "DeptNo"
  myDataTable.SelectCommand.Parameters.Add(myParameter)
  Dim myParamValue() As Object = {10}
  Try
    myDataTable.FillPage(2, 10, myParamValue)
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Fill Method | Open Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FillSchema Method

Devart.Common Namespace > DbDataTable Class : FillSchema Method

Configures the schema to match that in the data source.

[Visual Basic]
Public Sub FillSchema()
[C#]
public void FillSchema();

Remarks

Use this method when you need to retrieve structure of a table only, not the data.

The FillSchema method retrieves the schema from the data source using the SelectCommand. The connection object associated with the SelectCommand must be valid, but it does not need to be open. If the connection is closed before FillSchema is called, it is opened to retrieve data, then closed. If the connection is open before FillSchema is called, it remains open.

A FillSchema operation adds columns to the Columns collection of the DbDataTable, and configures DataColumn properties if they exist at the data source. FillSchema also configures the Constraints property.

FillSchema does not return any rows. Use the Fill, FillPage, or Open methods to add rows to a DbDataTable.

For more detailed information, refer to topic FillSchema.

Example

The following example demonstrates how to use the FillSchema property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  myDataTable.FillSchema();
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.FillSchema()
End Sub

See Also

DbDataTable Class | DbDataTable Members | Fill Method | Open Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Active Property | Fill Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Open Method

Devart.Common Namespace > DbDataTable Class : Open Method (DbDataTable)

Fetches data and sets the Active property to true.

[Visual Basic]
Public Sub Open()
[C#]
public void Open();

Remarks

The Open method executes the SelectCommand, creates columns and fills rows with data. Depending on values of miscellaneous properties, DbDataTable fetches either all data or some subset. For example, when DbDataTable is connected to a grid, it requests only data required for rendering (FetchAll=false mode), or the whole recordset (FetchAll=true mode).

For more information about DbDataTable fill capabilities please refer to descriptions of the following properties: FetchAll, MaxRecords, NonBlocking, QueryRecordCount, ReturnProviderSpecificTypes, StartRecord. The following methods also provide additional features: BeginFill, FillPage, FillSchema.

Example

The following example demonstrates how to use the Open method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbCommand myCommand)
{
  myCommand.CommandText = "SELECT * FROM Test.Dept";
  myDataTable.SelectCommand = myCommand;
  try
  {
    myDataTable.FetchAll=true;
    myDataTable.Open();
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Close();
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myCommand As DbCommand)
  myCommand.CommandText = "SELECT * FROM Test.Dept"
  myDataTable.SelectCommand = myCommand
  Try
    myDataTable.FetchAll=True
    myDataTable.Open()
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Close()
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Active Property | Fill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | FetchAll Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Read Method

Devart.Common Namespace > DbDataTable Class : Read Method (DbDataTable)

Reads the next data row when DbDataTable operates in connected model.

[Visual Basic]
Public Function Read() As Boolean
[C#]
public bool Read();

Return Type

true if there are more rows; otherwise, false.

See Also

DbDataTable Class | DbDataTable Members | FetchAll Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

row
Row to read out.
See Also Languages Devart.Data Send comments on this topic.

ReadComplete Method

Devart.Common Namespace > DbDataTable Class : ReadComplete Method

Fills a row with data not fetched in the initial fill operation.

[Visual Basic]
Public Sub ReadComplete( _
   ByVal row As DataRow _
)
[C#]
public void ReadComplete(
   DataRow row
);

Parameters

row
Row to read out.

Remarks

This method is designed to optimize working with LOBs and other big-size server types. It allows you to execute initial fill with only a subset of fields (e.g. all except LOBs). Then you can can create missing columns manually and call ReadComplete for the row you want to get data for.

Example

The following example demonstrates how to use the ReadComplete property.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT DEPTNO FROM Test.Dept";

  System.Data.DataColumn column_DEPTNO = new System.Data.DataColumn();
  System.Data.DataColumn column_DNAME = new System.Data.DataColumn();
  System.Data.DataColumn column_LOC = new System.Data.DataColumn();
  column_DEPTNO.ColumnName = "DEPTNO";
  column_DEPTNO.DataType = typeof(int);
  column_LOC.ColumnName = "LOC";
  column_DEPTNO.DataType = typeof(string);
  myDataTable.Columns.AddRange(new System.Data.DataColumn[] {column_DEPTNO, column_DNAME, column_LOC});

  myDataTable.FetchAll = true;
  myDataTable.Open();

  Console.Write("DEPTNO column is loaded");

  myDataTable.ReadComplete(myDataTable.Rows[0]);

  Console.Write("DEPTNO and LOC columns are loaded");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT DEPTNO FROM Test.Dept"
  Dim column1 As New DataColumn
  Dim column2 As New DataColumn
  Dim column3 As New DataColumn
  column1.ColumnName = "DEPTNO"
  column1.DataType = GetType(Integer)
  column3.ColumnName = "LOC"
  column1.DataType = GetType(String)
  myDataTable.Columns.AddRange(New DataColumn() {column1, column2, column3})
  myDataTable.FetchAll = True
  myDataTable.Open()
  Console.Write("DEPTNO column is loaded")
  myDataTable.ReadComplete(myDataTable.Rows.Item(0))
  Console.Write("DEPTNO and LOC columns are loaded")
End Sub

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | PrimaryKey Property | RefreshMode Property

Language

Visual Basic

C#

Show All

row
The row to refresh.
See Also Languages Devart.Data Send comments on this topic.

RefreshRow Method

Devart.Common Namespace > DbDataTable Class : RefreshRow Method

Refreshes the specified row with values from server.

[Visual Basic]
Public Sub RefreshRow( _
   ByVal row As DataRow _
)
[C#]
public void RefreshRow(
   DataRow row
);

Parameters

row
The row to refresh.

Remarks

DbDataTable uses primary key fields to find the row on the server.

See Also

DbDataTable Class | DbDataTable Members | PrimaryKey Property | RefreshMode Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Select Method

Devart.Common Namespace > DbDataTable Class : Select Method

Gets an array of DataRow objects.

Overload List

Gets an array of all DataRow objects.

[Visual Basic] Overloads Public Function Select() As DataRow()

[C#] public DataRow[] Select();

Gets an array of all DataRow objects that match the filter criteria.

[Visual Basic] Overloads Public Function Select(String) As DataRow()

[C#] public DataRow[] Select(string);

Gets an array of all DataRow objects that match the filter criteria, in the specified sort order.

[Visual Basic] Overloads Public Function Select(String,String) As DataRow()

[C#] public DataRow[] Select(string,string);

Gets an array of all DataRow objects that match the filter in the order of the sort that match the specified state.

[Visual Basic] Overloads Public Function Select(String,String,DataViewRowState) As DataRow()

[C#] public DataRow[] Select(string,string,DataViewRowState);

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Select() Method

Devart.Common Namespace > DbDataTable Class > Select Method : Select() Method

Gets an array of all DataRow objects.

[Visual Basic]
Overloads Public Function Select() As DataRow()
[C#]
public DataRow[] Select();

Return Type

An array of DataRow objects.

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

filterExpression
The criteria to use to filter the rows.
See Also Languages Devart.Data Send comments on this topic.

Select(String) Method

Devart.Common Namespace > DbDataTable Class > Select Method : Select(String) Method

Gets an array of all DataRow objects that match the filter criteria.

[Visual Basic]
Overloads Public Function Select( _
   ByVal filterExpression As String _
) As DataRow()
[C#]
public DataRow[] Select(
   string filterExpression
);

Parameters

filterExpression
The criteria to use to filter the rows.

Return Type

An array of DataRow objects.

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

filterExpression
The criteria to use to filter the rows.
sort
A string specifying the column and sort direction.
See Also Languages Devart.Data Send comments on this topic.

Select(String,String) Method

Devart.Common Namespace > DbDataTable Class > Select Method : Select(String,String) Method

Gets an array of all DataRow objects that match the filter criteria, in the specified sort order.

[Visual Basic]
Overloads Public Function Select( _
   ByVal filterExpression As String, _
   ByVal sort As String _
) As DataRow()
[C#]
public DataRow[] Select(
   string filterExpression,
   string sort
);

Parameters

filterExpression
The criteria to use to filter the rows.
sort
A string specifying the column and sort direction.

Return Type

An array of DataRow objects matching the filter expression.

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List

Language

Visual Basic

C#

Show All

filterExpression
The criteria to use to filter the rows.
sort
A string specifying the column and sort direction.
recordStates
One of the DataViewRowState values.
See Also Languages Devart.Data Send comments on this topic.

Select(String,String,DataViewRowState) Method

Devart.Common Namespace > DbDataTable Class > Select Method : Select(String,String,DataViewRowState) Method

Gets an array of all DataRow objects that match the filter in the order of the sort that match the specified state.

[Visual Basic]
Overloads Public Function Select( _
   ByVal filterExpression As String, _
   ByVal sort As String, _
   ByVal recordStates As DataViewRowState _
) As DataRow()
[C#]
public DataRow[] Select(
   string filterExpression,
   string sort,
   DataViewRowState recordStates
);

Parameters

filterExpression
The criteria to use to filter the rows.
sort
A string specifying the column and sort direction.
recordStates
One of the DataViewRowState values.

Return Type

An array of DataRow objects matching the filter expression.

See Also

DbDataTable Class | DbDataTable Members | Overload List


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SuspendFill Method

Devart.Common Namespace > DbDataTable Class : SuspendFill Method

Suspends asynchronous fill operation.

Overload List

Suspends asynchronous fill operation.

[Visual Basic] Overloads Public Sub SuspendFill()

[C#] public void SuspendFill();

Suspends asynchronous fill operation.

[Visual Basic] Overloads Public Sub SuspendFill(Boolean)

[C#] public void SuspendFill(bool);

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List | BeginFill Method | EndFill Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SuspendFill() Method

Devart.Common Namespace > DbDataTable Class > SuspendFill Method : SuspendFill() Method

Suspends asynchronous fill operation.

[Visual Basic]
Overloads Public Sub SuspendFill()
[C#]
public void SuspendFill();

Remarks

The fill operation can be resumed later with BeginFill and EndFill methods.

Example

The following example demonstrates how to use the SuspendFill method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  IAsyncResult aRes = myDataTable.BeginFill(null, null);

  Console.Write("Fetch in process");

  Thread.Sleep(100);
  myDataTable.SuspendFill(true);
  Console.Write("Fetch is stopped");

  myDataTable.EndFill(aRes);
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable3(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
  Console.Write("Fetch in process")
  Thread.Sleep(100)
  myDataTable.SuspendFill(True)
  Console.Write("Fetch is stopped")
  myDataTable.EndFill(result1)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List | BeginFill Method | EndFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Overload List | BeginFill Method | EndFill Method

Language

Visual Basic

C#

Show All

wait
Determines whether to wait for break operation. If false, the method returns before the fill operation is actually suspended.
See Also Languages Devart.Data Send comments on this topic.

SuspendFill(Boolean) Method

Devart.Common Namespace > DbDataTable Class > SuspendFill Method : SuspendFill(Boolean) Method

Suspends asynchronous fill operation.

[Visual Basic]
Overloads Public Sub SuspendFill( _
   ByVal wait As Boolean _
)
[C#]
public void SuspendFill(
   bool wait
);

Parameters

wait
Determines whether to wait for break operation. If false, the method returns before the fill operation is actually suspended.

Remarks

The fill operation can be resumed later with BeginFill and EndFill methods.

Example

The following example demonstrates how to use the SuspendFill method.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  IAsyncResult aRes = myDataTable.BeginFill(null, null);

  Console.Write("Fetch in process");

  Thread.Sleep(100);
  myDataTable.SuspendFill(true);
  Console.Write("Fetch is stopped");

  myDataTable.EndFill(aRes);
  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable3(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  Dim result1 As IAsyncResult = myDataTable.BeginFill(Nothing, Nothing)
  Console.Write("Fetch in process")
  Thread.Sleep(100)
  myDataTable.SuspendFill(True)
  Console.Write("Fetch is stopped")
  myDataTable.EndFill(result1)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members | Overload List | BeginFill Method | EndFill Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | UpdateRows Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Update Method

Devart.Common Namespace > DbDataTable Class : Update Method (DbDataTable)

Executes the appropriate commands to delete, insert, or update rows in the data source.

[Visual Basic]
Public Overridable Function Update() As Integer
[C#]
public virtual int Update();

Return Type

The number of rows successfully updated from the DbDataTable.

Remarks

If the CachedUpdates property is true, this method applies all updates made to the DbDataTable. If the CachedUpdates property is false, the method does nothing, because changes are applied instantly.

See Also

DbDataTable Class | DbDataTable Members | UpdateRows Method


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | Update Method

Language

Visual Basic

C#

Show All

datarows
An array of DataRow objects containing the rows to be updated.
See Also Languages Devart.Data Send comments on this topic.

UpdateRows Method

Devart.Common Namespace > DbDataTable Class : UpdateRows Method

Executes the appropriate commands to delete, insert, or update the specified rows in the data source.

[Visual Basic]
Public Function UpdateRows( _
   ByVal datarows() As DataRow _
) As Integer
[C#]
public int UpdateRows(
   DataRow[] datarows
);

Parameters

datarows
An array of DataRow objects containing the rows to be updated.

Return Type

The number of rows successfully updated from the DbDataTable.

Remarks

Using this method may result in performance gains, for example, on very big tables. If the CachedUpdates property is false, the method does nothing, because changes are applied instantly.

Example

The following code adds two records to a table and updates them. The table is rendered then to console.

[C#]

static void UpdateATable(DbDataTable myDataTable, IDbConnection myConnection)
{
  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp";
  try
  {
    myDataTable.Active = true;
    DataRow[] newRows = new DataRow[2];
    newRows[0] = myDataTable.Rows.Add(new object[] {20000,"Jefferson"});
    newRows[1] = myDataTable.Rows.Add(new object[] {20001,"Jameson"});
    myDataTable.UpdateRows(newRows);

    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UpdateATable(ByVal myDataTable As DbDataTable, ByVal myConnection As IDbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand()
  myDataTable.SelectCommand.CommandText = "SELECT EmpNo, EName FROM Test.Emp"
  Try
    myDataTable.Active = True
    Dim newVal1() As Object = {20000, "Jefferson"}
    Dim newVal2() As Object = {20001, "Jameson"}
    Dim newRows(1) As DataRow
    newRows(0) = myDataTable.Rows.Add(newVal1)
    newRows(1) = myDataTable.Rows.Add(newVal2)
    myDataTable.UpdateRows(newRows)

    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

DbDataTable Class | DbDataTable Members | Update Method


%%PageItemTitle%% $$Events$$

DbDataTable Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataTable Class Events

Devart.Common Namespace : DbDataTable Class

For a list of all members of this type, see DbDataTable members.

Public Events

Public Event ColumnChanged (Inherited from System.Data.DataTable) | Occurs after a value has been changed for the specified DataColumn in a DataRow.
Public Event ColumnChanging (Inherited from System.Data.DataTable) | Occurs when a value is being changed for the specified DataColumn in a DataRow.
Public Event Disposed | Adds an event handler to listen to the Disposed event on the component.
Public Event FetchFinished | Occurs when a result set is completely fetched.
Public Event FillError | Occurs when an error is raised during a fill operation.
Public Event Initialized (Inherited from System.Data.DataTable) | Occurs after the DataTable is initialized.
Public Event RowChanged (Inherited from System.Data.DataTable) | Occurs after a DataRow has been changed successfully.
Public Event RowChanging (Inherited from System.Data.DataTable) | Occurs when a DataRow is changing.
Public Event RowDeleted (Inherited from System.Data.DataTable) | Occurs after a row in the table has been deleted.
Public Event RowDeleting (Inherited from System.Data.DataTable) | Occurs before a row in the table is about to be deleted.
Public Event RowFetched | Occurs when another row is completely fetched.
Public Event TableCleared (Inherited from System.Data.DataTable) | Occurs after a DataTable is cleared.
Public Event TableClearing (Inherited from System.Data.DataTable) | Occurs when a DataTable is cleared.
Public Event TableNewRow (Inherited from System.Data.DataTable) | Occurs when a new DataRow is inserted.

See Also

DbDataTable Class | Devart.Common Namespace


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Disposed Event

Devart.Common Namespace > DbDataTable Class : Disposed Event

Adds an event handler to listen to the Disposed event on the component.

[Visual Basic]
Public Event Disposed() As EventHandler
[C#]
public event EventHandler Disposed();

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members | EndFill Method | Fill Method | FillPage Method | Active Property | Open Method | MaxRecords Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FetchFinished Event

Devart.Common Namespace > DbDataTable Class : FetchFinished Event

Occurs when a result set is completely fetched.

[Visual Basic]
Public Event FetchFinished() As EventHandler
[C#]
public event EventHandler FetchFinished();

Remarks

This event is fired every time a fill operation is finished, regardless of the property or method that invoked the fetch process.

Example

The following example demonstrates how to use the FetchFinished event.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  myDataTable.RowFetched += new EventHandler(myDataTable_RowFetched);
  myDataTable.FetchFinished += new EventHandler(myDataTable_FetchFinished);
  myDataTable.Open();
}

static void myDataTable_RowFetched(object sender, EventArgs e) {

  Console.Write(string.Format("{0} rows are fetched", ((DbDataTable)sender).RecordCount));
}

static void myDataTable_FetchFinished(object sender, EventArgs e) {

  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  AddHandler myDataTable.RowFetched, New EventHandler(AddressOf Form1.myDataTable_RowFetched)
  AddHandler myDataTable.FetchFinished, New EventHandler(AddressOf Form1.myDataTable_FetchFinished)
  myDataTable.Open()
End Sub

Private Shared Sub myDataTable_RowFetched(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write(String.Format("{0} rows are fetched", DirectCast(sender, DbDataTable).RecordCount))
End Sub

Private Shared Sub myDataTable_FetchFinished(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members | EndFill Method | Fill Method | FillPage Method | Active Property | Open Method | MaxRecords Property


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

FillError Event

Devart.Common Namespace > DbDataTable Class : FillError Event

Occurs when an error is raised during a fill operation.

[Visual Basic]
Public Event FillError() As FillErrorEventHandler
[C#]
public event FillErrorEventHandler FillError();

Remarks

A FillErrorEventArgs object is passed to delegate, so you can determine what DbDataTable object has raised an error, what errors are being handled, what are the values for the row being updated when the error occurred, and whether to continue the execution. For more information refer to MSDN topic FillErrorEventArgs.

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDataTable Class | DbDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RowFetched Event

Devart.Common Namespace > DbDataTable Class : RowFetched Event

Occurs when another row is completely fetched.

[Visual Basic]
Public Event RowFetched() As EventHandler
[C#]
public event EventHandler RowFetched();

Example

The following example demonstrates how to use the RowFetched event.

[C#]

static void UseDataTable(DbDataTable myDataTable, DbConnection myConnection) {

  myDataTable.Connection = myConnection;
  myDataTable.SelectCommand = myConnection.CreateCommand();
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept";

  myDataTable.RowFetched += new EventHandler(myDataTable_RowFetched);
  myDataTable.FetchFinished += new EventHandler(myDataTable_FetchFinished);
  myDataTable.Open();
}

static void myDataTable_RowFetched(object sender, EventArgs e) {

  Console.Write(string.Format("{0} rows are fetched", ((DbDataTable)sender).RecordCount));
}

static void myDataTable_FetchFinished(object sender, EventArgs e) {

  Console.Write("All records are fetched");
}

[Visual Basic]

Private Shared Sub UseDataTable(ByVal myDataTable As DbDataTable, ByVal myConnection As DbConnection)
  myDataTable.Connection = myConnection
  myDataTable.SelectCommand = myConnection.CreateCommand
  myDataTable.SelectCommand.CommandText = "SELECT * FROM Test.Dept"
  AddHandler myDataTable.RowFetched, New EventHandler(AddressOf Form1.myDataTable_RowFetched)
  AddHandler myDataTable.FetchFinished, New EventHandler(AddressOf Form1.myDataTable_FetchFinished)
  myDataTable.Open()
End Sub

Private Shared Sub myDataTable_RowFetched(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write(String.Format("{0} rows are fetched", DirectCast(sender, DbDataTable).RecordCount))
End Sub

Private Shared Sub myDataTable_FetchFinished(ByVal sender As Object, ByVal e As EventArgs)
  Console.Write("All records are fetched")
End Sub

See Also

DbDataTable Class | DbDataTable Members


%%PageItemTitle%%

DbDump Members | Devart.Common Namespace | PgSqlDump Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbDump Class

Devart.Common Namespace : DbDump Class

Serves to store a database or its parts as a script and also to restore database from the received script.

For a list of all members of this type, see DbDump members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbDump
Devart.Data.PostgreSql.PgSqlDump

Syntax

[Visual Basic]
Public MustInherit Class DbDump
   Inherits Component
   Implements IComponent, IDisposable
[C#]
public abstract class DbDump : Component, IComponent, IDisposable

Remarks

Abstract DbDump class implements some of DbDump functionality that is DBMS-independent.

See Also

DbDump Members | Devart.Common Namespace | PgSqlDump Class


%%PageItemTitle%% $$Members$$

DbDump Class | Devart.Common Namespace | PgSqlDump Class

See Also Devart.Data Send comments on this topic.

DbDump Class Members

Devart.Common Namespace : DbDump Class

DbDump overview

Public Properties

Public Property Connection | Gets or sets the DbConnection used by this instance of the DbDump.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DumpText | Gets as a result of Backup execution, or sets data needed to execute Restore method.
Public Property GenerateHeader | Gets or sets a value that determines whether to add some extra information in the script header.
Public Property IncludeDrop | Determines whether to recreate database objects.
Public Property Mode | Determines whether to include data from tables into the dump text, script to create database objects or both.
Public Property QuoteIdentifier | Determines whether to quote all identifiers present in the database.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Tables | Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.

Public Methods

Public Method Backup | Overloaded. Generates a script for further restoring with the Restore method.
Public Method BackupQuery | Overloaded. Generates a script with a backup of the data, returned by the specified query, for further restoring with the Restore method.
Public Method BeginBackup | Overloaded. Starts an asynchronous invocation of a Backup method.
Public Method BeginBackupQuery | Overloaded. Starts an asynchronous invocation of a BackupQuery method.
Public Method BeginRestore | Overloaded. Starts an asynchronous invocation of a Restore method.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndBackup | Ends an asynchronous invocation of the Backup method.
Public Method EndBackupQuery | Ends an asynchronous invocation of the BackupQuery method.
Public Method EndRestore | Ends an asynchronous invocation of the Restore method.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Restore | Overloaded. Executes the previously dumped script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbDump Class | Devart.Common Namespace | PgSqlDump Class


%%PageItemTitle%% $$Properties$$

DbDump Class | Devart.Common Namespace | PgSqlDump Class

See Also Devart.Data Send comments on this topic.

DbDump Class Properties

Devart.Common Namespace : DbDump Class

For a list of all members of this type, see DbDump members.

Public Properties

Public Property Connection | Gets or sets the DbConnection used by this instance of the DbDump.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DumpText | Gets as a result of Backup execution, or sets data needed to execute Restore method.
Public Property GenerateHeader | Gets or sets a value that determines whether to add some extra information in the script header.
Public Property IncludeDrop | Determines whether to recreate database objects.
Public Property Mode | Determines whether to include data from tables into the dump text, script to create database objects or both.
Public Property QuoteIdentifier | Determines whether to quote all identifiers present in the database.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Tables | Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.

See Also

DbDump Class | Devart.Common Namespace | PgSqlDump Class


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Connection Property

Devart.Common Namespace > DbDump Class : Connection Property (DbDump)

Gets or sets the DbConnection used by this instance of the DbDump.

[Visual Basic]
Public Property Connection As DbConnection
[C#]
public DbConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Backup Method | Restore Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DumpText Property

Devart.Common Namespace > DbDump Class : DumpText Property (DbDump)

Gets as a result of Backup execution, or sets data needed to execute Restore method.

[Visual Basic]
Public Overridable Property DumpText As String
[C#]
public virtual string DumpText {get; set;}

Return Type

SQL commands separated by ';' symbols.

Remarks

Use DumpText property to store generated by Backup script. Also use this property as a source on execution Restore operation.

See Also

DbDump Class | DbDump Members | Backup Method | Restore Method


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GenerateHeader Property

Devart.Common Namespace > DbDump Class : GenerateHeader Property

Gets or sets a value that determines whether to add some extra information in the script header.

[Visual Basic]
Public Property GenerateHeader As Boolean
[C#]
public bool GenerateHeader {get; set;}

Return Type

If true, Devart.Data.PostgreSql.PgSqlDump adds comments with information about server version, script generation date, and so on.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IncludeDrop Property

Devart.Common Namespace > DbDump Class : IncludeDrop Property

Determines whether to recreate database objects.

[Visual Basic]
Public Property IncludeDrop As Boolean
[C#]
public bool IncludeDrop {get; set;}

Return Type

true, if database objects must be recreated; otherwise, false. The default value is false.

Remarks

For example, before "CREATE TABLE" "DROP TABLE" will be added, if IncludeDrop property is set to true.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Mode Property

Devart.Common Namespace > DbDump Class : Mode Property (DbDump)

Determines whether to include data from tables into the dump text, script to create database objects or both.

[Visual Basic]
Public Property Mode As DumpMode
[C#]
public DumpMode Mode {get; set;}

Return Type

One of DumpMode values.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

QuoteIdentifier Property

Devart.Common Namespace > DbDump Class : QuoteIdentifier Property (DbDump)

Determines whether to quote all identifiers present in the database.

[Visual Basic]
Public Property QuoteIdentifier As Boolean
[C#]
public bool QuoteIdentifier {get; set;}

Return Type

true, if database identifiers must be quoted; otherwise, false. The default value is false.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Tables Property

Devart.Common Namespace > DbDump Class : Tables Property (DbDump)

Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.

[Visual Basic]
Public Overridable Property Tables As String
[C#]
public virtual string Tables {get; set;}

Return Type

String containing a list of the tables separated by semicolon.

Remarks

If an empty value, all the tables present in the database will be processed.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%% $$Methods$$

DbDump Class | Devart.Common Namespace | PgSqlDump Class

See Also Devart.Data Send comments on this topic.

DbDump Class Methods

Devart.Common Namespace : DbDump Class

For a list of all members of this type, see DbDump members.

Public Methods

Public Method Backup | Overloaded. Generates a script for further restoring with the Restore method.
Public Method BackupQuery | Overloaded. Generates a script with a backup of the data, returned by the specified query, for further restoring with the Restore method.
Public Method BeginBackup | Overloaded. Starts an asynchronous invocation of a Backup method.
Public Method BeginBackupQuery | Overloaded. Starts an asynchronous invocation of a BackupQuery method.
Public Method BeginRestore | Overloaded. Starts an asynchronous invocation of a Restore method.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndBackup | Ends an asynchronous invocation of the Backup method.
Public Method EndBackupQuery | Ends an asynchronous invocation of the BackupQuery method.
Public Method EndRestore | Ends an asynchronous invocation of the Restore method.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Restore | Overloaded. Executes the previously dumped script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbDump Class | Devart.Common Namespace | PgSqlDump Class


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Backup Method

Devart.Common Namespace > DbDump Class : Backup Method

Generates a script for further restoring with the Restore method.

Overload List

Generates a script and writes it to the DumpText property.

[Visual Basic] Overloads Public Sub Backup()

[C#] public void Backup();

Generates a script and writes it to the specified file.

[Visual Basic] Overloads Public Sub Backup(String)

[C#] public void Backup(string);

Generates a script and writes it to the specified Stream.

[Visual Basic] Overloads Public Sub Backup(Stream)

[C#] public void Backup(Stream);

Generates a script and writes it to the specified TextWriter.

[Visual Basic] Overloads Public Sub Backup(TextWriter)

[C#] public void Backup(TextWriter);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Backup() Method

Devart.Common Namespace > DbDump Class > Backup Method : Backup() Method

Generates a script and writes it to the DumpText property.

[Visual Basic]
Overloads Public Sub Backup()
[C#]
public void Backup();

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to write the script to.
See Also Languages Devart.Data Send comments on this topic.

Backup(String) Method

Devart.Common Namespace > DbDump Class > Backup Method : Backup(String) Method

Generates a script and writes it to the specified file.

[Visual Basic]
Overloads Public Sub Backup( _
   ByVal fileName As String _
)
[C#]
public void Backup(
   string fileName
);

Parameters

fileName
The name of the file to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream to write the script to.
See Also Languages Devart.Data Send comments on this topic.

Backup(Stream) Method

Devart.Common Namespace > DbDump Class > Backup Method : Backup(Stream) Method

Generates a script and writes it to the specified Stream.

[Visual Basic]
Overloads Public Sub Backup( _
   ByVal stream As Stream _
)
[C#]
public void Backup(
   Stream stream
);

Parameters

stream
The Stream to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

writer
The TextWriter to write the script to.
See Also Languages Devart.Data Send comments on this topic.

Backup(TextWriter) Method

Devart.Common Namespace > DbDump Class > Backup Method : Backup(TextWriter) Method

Generates a script and writes it to the specified TextWriter.

[Visual Basic]
Overloads Public Sub Backup( _
   ByVal writer As TextWriter _
)
[C#]
public void Backup(
   TextWriter writer
);

Parameters

writer
The TextWriter to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BackupQuery Method

Devart.Common Namespace > DbDump Class : BackupQuery Method

Generates a script with a backup of the data, returned by the specified query, for further restoring with the Restore method.

Overload List

Generates a script with a backup of the data, returned by the specified query, and writes it to the DumpText property.

[Visual Basic] Overloads Public Sub BackupQuery(String)

[C#] public void BackupQuery(string);

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified file.

[Visual Basic] Overloads Public Sub BackupQuery(String,String)

[C#] public void BackupQuery(string,string);

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified Stream.

[Visual Basic] Overloads Public Sub BackupQuery(String,Stream)

[C#] public void BackupQuery(string,Stream);

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified TextWriter.

[Visual Basic] Overloads Public Sub BackupQuery(String,TextWriter)

[C#] public void BackupQuery(string,TextWriter);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
See Also Languages Devart.Data Send comments on this topic.

BackupQuery(String) Method

Devart.Common Namespace > DbDump Class > BackupQuery Method : BackupQuery(String) Method

Generates a script with a backup of the data, returned by the specified query, and writes it to the DumpText property.

[Visual Basic]
Overloads Public Sub BackupQuery( _
   ByVal query As String _
)
[C#]
public void BackupQuery(
   string query
);

Parameters

query
The query, returning data for backup.

Example

The following example dumps the query data to the DumpText property.

[C#]

dump.BackupQuery("SELECT * FROM DEPT WHERE Deptno > 50");

[Visual Basic]

dump.BackupQuery('SELECT * FROM DEPT WHERE Deptno > 50')

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
fileName
Name of the file to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BackupQuery(String,String) Method

Devart.Common Namespace > DbDump Class > BackupQuery Method : BackupQuery(String,String) Method

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified file.

[Visual Basic]
Overloads Public Sub BackupQuery( _
   ByVal query As String, _
   ByVal fileName As String _
)
[C#]
public void BackupQuery(
   string query,
   string fileName
);

Parameters

query
The query, returning data for backup.
fileName
Name of the file to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
stream
The Stream to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BackupQuery(String,Stream) Method

Devart.Common Namespace > DbDump Class > BackupQuery Method : BackupQuery(String,Stream) Method

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified Stream.

[Visual Basic]
Overloads Public Sub BackupQuery( _
   ByVal query As String, _
   ByVal stream As Stream _
)
[C#]
public void BackupQuery(
   string query,
   Stream stream
);

Parameters

query
The query, returning data for backup.
stream
The Stream to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
writer
The TextWriter to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BackupQuery(String,TextWriter) Method

Devart.Common Namespace > DbDump Class > BackupQuery Method : BackupQuery(String,TextWriter) Method

Generates a script with a backup of the data, returned by the specified query, and writes it to the specified TextWriter.

[Visual Basic]
Overloads Public Sub BackupQuery( _
   ByVal query As String, _
   ByVal writer As TextWriter _
)
[C#]
public void BackupQuery(
   string query,
   TextWriter writer
);

Parameters

query
The query, returning data for backup.
writer
The TextWriter to write the script to.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginBackup Method

Devart.Common Namespace > DbDump Class : BeginBackup Method

Starts an asynchronous invocation of a Backup method.

Overload List

Starts an asynchronous invocation of a Backup method.

[Visual Basic] Overloads Public Function BeginBackup() As IAsyncResult

[C#] public IAsyncResult BeginBackup();

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackup(AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackup(AsyncCallback,object);

Starts an asynchronous invocation of a Backup method.

[Visual Basic] Overloads Public Function BeginBackup(String) As IAsyncResult

[C#] public IAsyncResult BeginBackup(string);

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackup(String,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackup(string,AsyncCallback,object);

Starts an asynchronous invocation of a Backup method.

[Visual Basic] Overloads Public Function BeginBackup(Stream) As IAsyncResult

[C#] public IAsyncResult BeginBackup(Stream);

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackup(Stream,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackup(Stream,AsyncCallback,object);

Starts an asynchronous invocation of a Backup method.

[Visual Basic] Overloads Public Function BeginBackup(TextWriter) As IAsyncResult

[C#] public IAsyncResult BeginBackup(TextWriter);

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackup(TextWriter,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackup(TextWriter,AsyncCallback,object);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginBackup() Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup() Method

Starts an asynchronous invocation of a Backup method.

[Visual Basic]
Overloads Public Function BeginBackup() As IAsyncResult
[C#]
public IAsyncResult BeginBackup();

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(AsyncCallback,Object) Method

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(String) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(String) Method

Starts an asynchronous invocation of a Backup method.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal fileName As String _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   string fileName
);

Parameters

fileName
The name of the file to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

Example

This sample demonstrates performing async backup and restore operations.

[C#]

public void DumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    pgSqlDump.Schema = "public";
    pgSqlDump.Tables = "dept;emp";
    pgSqlDump.IncludeDrop = true;
    IAsyncResult Result = pgSqlDump.BeginBackup("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndBackup(Result);
    Console.WriteLine("Dumped.");
    conn.Close();
}

public void UnDumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    IAsyncResult Result = pgSqlDump.BeginRestore("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndRestore(Result);
    Console.WriteLine("Restored.");
    conn.Close();
}

[Visual Basic]

Public Sub DumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    pgSqlDump.Schema = "public"
    pgSqlDump.Tables = "dept;emp"
    pgSqlDump.IncludeDrop = True
    Dim Result As IAsyncResult = pgSqlDump.BeginBackup("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndBackup(Result)
    Console.WriteLine("Dumped.")
    conn.Close()
End Sub

Public Sub UnDumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    Dim Result As IAsyncResult = pgSqlDump.BeginRestore("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndRestore(Result)
    Console.WriteLine("Restored.")
    conn.Close()
End Sub

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(String,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(String,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal fileName As String, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   string fileName,
   AsyncCallback callback,
   object stateObject
);

Parameters

fileName
The name of the file to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(Stream) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(Stream) Method

Starts an asynchronous invocation of a Backup method.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal stream As Stream _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   Stream stream
);

Parameters

stream
The Stream to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(Stream,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(Stream,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal stream As Stream, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   Stream stream,
   AsyncCallback callback,
   object stateObject
);

Parameters

stream
The Stream to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

writer
The TextWriter to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(TextWriter) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(TextWriter) Method

Starts an asynchronous invocation of a Backup method.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal writer As TextWriter _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   TextWriter writer
);

Parameters

writer
The TextWriter to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

writer
The TextWriter to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackup(TextWriter,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackup Method : BeginBackup(TextWriter,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Backup method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackup( _
   ByVal writer As TextWriter, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackup(
   TextWriter writer,
   AsyncCallback callback,
   object stateObject
);

Parameters

writer
The TextWriter to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackup method enables you to perform a backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the backup operation, you have to call BeginBackup method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndBackup. If at the moment you call this function the backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery Method

Devart.Common Namespace > DbDump Class : BeginBackupQuery Method

Starts an asynchronous invocation of a BackupQuery method.

Overload List

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic] Overloads Public Function BeginBackupQuery(String) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string);

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,AsyncCallback,object);

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,String) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,string);

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,String,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,string,AsyncCallback,object);

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,Stream) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,Stream);

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,Stream,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,Stream,AsyncCallback,object);

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,TextWriter) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,TextWriter);

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic] Overloads Public Function BeginBackupQuery(String,TextWriter,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginBackupQuery(string,TextWriter,AsyncCallback,object);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String) Method

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query
);

Parameters

query
The query, returning data for backup.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,AsyncCallback,Object) Method

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   AsyncCallback callback,
   object stateObject
);

Parameters

query
The query, returning data for backup.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
fileName
The name of the file to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,String) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,String) Method

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal fileName As String _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   string fileName
);

Parameters

query
The query, returning data for backup.
fileName
The name of the file to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
fileName
The name of the file to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,String,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,String,AsyncCallback,Object) Method

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal fileName As String, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   string fileName,
   AsyncCallback callback,
   object stateObject
);

Parameters

query
The query, returning data for backup.
fileName
The name of the file to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
stream
The Stream to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,Stream) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,Stream) Method

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal stream As Stream _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   Stream stream
);

Parameters

query
The query, returning data for backup.
stream
The Stream to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
stream
The Stream to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,Stream,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,Stream,AsyncCallback,Object) Method

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal stream As Stream, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   Stream stream,
   AsyncCallback callback,
   object stateObject
);

Parameters

query
The query, returning data for backup.
stream
The Stream to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
writer
The TextWriter to write the script to.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,TextWriter) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,TextWriter) Method

Starts an asynchronous invocation of a BackupQuery method.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal writer As TextWriter _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   TextWriter writer
);

Parameters

query
The query, returning data for backup.
writer
The TextWriter to write the script to.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

query
The query, returning data for backup.
writer
The TextWriter to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginBackupQuery(String,TextWriter,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginBackupQuery Method : BeginBackupQuery(String,TextWriter,AsyncCallback,Object) Method

Starts an asynchronous invocation of a BackupQuery method with information for callback function.

[Visual Basic]
Overloads Public Function BeginBackupQuery( _
   ByVal query As String, _
   ByVal writer As TextWriter, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginBackupQuery(
   string query,
   TextWriter writer,
   AsyncCallback callback,
   object stateObject
);

Parameters

query
The query, returning data for backup.
writer
The TextWriter to write the script to.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginBackupQuery method enables you to perform a query backup operation without having current thread blocked. In other words, your program can continue execution while the backup runs in background so you do not have to wait for it.

To start the query backup operation, you have to call BeginBackupQuery method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the query backup operation, call EndBackupQuery. If at the moment you call this function the query backup has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginRestore Method

Devart.Common Namespace > DbDump Class : BeginRestore Method

Starts an asynchronous invocation of a Restore method.

Overload List

Starts an asynchronous invocation of a Restore method.

[Visual Basic] Overloads Public Function BeginRestore() As IAsyncResult

[C#] public IAsyncResult BeginRestore();

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic] Overloads Public Function BeginRestore(AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginRestore(AsyncCallback,object);

Starts an asynchronous invocation of a Restore method.

[Visual Basic] Overloads Public Function BeginRestore(String) As IAsyncResult

[C#] public IAsyncResult BeginRestore(string);

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic] Overloads Public Function BeginRestore(String,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginRestore(string,AsyncCallback,object);

Starts an asynchronous invocation of a Restore method.

[Visual Basic] Overloads Public Function BeginRestore(Stream) As IAsyncResult

[C#] public IAsyncResult BeginRestore(Stream);

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic] Overloads Public Function BeginRestore(Stream,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginRestore(Stream,AsyncCallback,object);

Starts an asynchronous invocation of a Restore method.

[Visual Basic] Overloads Public Function BeginRestore(TextReader) As IAsyncResult

[C#] public IAsyncResult BeginRestore(TextReader);

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic] Overloads Public Function BeginRestore(TextReader,AsyncCallback,Object) As IAsyncResult

[C#] public IAsyncResult BeginRestore(TextReader,AsyncCallback,object);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BeginRestore() Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore() Method

Starts an asynchronous invocation of a Restore method.

[Visual Basic]
Overloads Public Function BeginRestore() As IAsyncResult
[C#]
public IAsyncResult BeginRestore();

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(AsyncCallback,Object) Method

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to load the script from.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(String) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(String) Method

Starts an asynchronous invocation of a Restore method.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal fileName As String _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   string fileName
);

Parameters

fileName
The name of the file to load the script from.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

Example

This sample demonstrates performing async backup and restore operations.

[C#]

public void DumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    pgSqlDump.Schema = "public";
    pgSqlDump.Tables = "dept;emp";
    pgSqlDump.IncludeDrop = true;
    IAsyncResult Result = pgSqlDump.BeginBackup("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndBackup(Result);
    Console.WriteLine("Dumped.");
    conn.Close();
}

public void UnDumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    IAsyncResult Result = pgSqlDump.BeginRestore("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndRestore(Result);
    Console.WriteLine("Restored.");
    conn.Close();
}

[Visual Basic]

Public Sub DumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    pgSqlDump.Schema = "public"
    pgSqlDump.Tables = "dept;emp"
    pgSqlDump.IncludeDrop = True
    Dim Result As IAsyncResult = pgSqlDump.BeginBackup("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndBackup(Result)
    Console.WriteLine("Dumped.")
    conn.Close()
End Sub

Public Sub UnDumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    Dim Result As IAsyncResult = pgSqlDump.BeginRestore("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndRestore(Result)
    Console.WriteLine("Restored.")
    conn.Close()
End Sub

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to load the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(String,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(String,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal fileName As String, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   string fileName,
   AsyncCallback callback,
   object stateObject
);

Parameters

fileName
The name of the file to load the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream object to read the script from.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(Stream) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(Stream) Method

Starts an asynchronous invocation of a Restore method.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal stream As Stream _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   Stream stream
);

Parameters

stream
The Stream object to read the script from.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream object to read the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(Stream,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(Stream,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal stream As Stream, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   Stream stream,
   AsyncCallback callback,
   object stateObject
);

Parameters

stream
The Stream object to read the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

reader
The TextReader object to read the script from.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(TextReader) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(TextReader) Method

Starts an asynchronous invocation of a Restore method.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal reader As TextReader _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   TextReader reader
);

Parameters

reader
The TextReader object to read the script from.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

reader
The TextReader object to read the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data Send comments on this topic.

BeginRestore(TextReader,AsyncCallback,Object) Method

Devart.Common Namespace > DbDump Class > BeginRestore Method : BeginRestore(TextReader,AsyncCallback,Object) Method

Starts an asynchronous invocation of a Restore method with information for callback function.

[Visual Basic]
Overloads Public Function BeginRestore( _
   ByVal reader As TextReader, _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginRestore(
   TextReader reader,
   AsyncCallback callback,
   object stateObject
);

Parameters

reader
The TextReader object to read the script from.
callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginRestore method enables you to perform a restore operation without having current thread blocked. In other words, your program can continue execution while the restore operation runs in background so you do not have to wait for it.

To start the restore operation, you have to call BeginRestore method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to an IAsyncResult object. After executing this method, the program flow continues.

When you are ready to finish the backup operation, call EndRestore. If at the moment you call this function the restore operation has not yet been finished, application stops and waits till the function returns.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned by BeginBackup.
See Also Languages Devart.Data Send comments on this topic.

EndBackup Method

Devart.Common Namespace > DbDump Class : EndBackup Method

Ends an asynchronous invocation of the Backup method.

[Visual Basic]
Public Sub EndBackup( _
   ByVal result As IAsyncResult _
)
[C#]
public void EndBackup(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned by BeginBackup.

Remarks

The function ends an asynchronous backup that is started with BeginBackup. A pair of asynchronous functions (BeginBackup and EndBackup) can be used instead of the synchronous function Backup to gain more performance and flexibility in your application.

Example

This sample demonstrates performing async backup and restore operations.

[C#]

public void DumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    pgSqlDump.Schema = "public";
    pgSqlDump.Tables = "dept;emp";
    pgSqlDump.IncludeDrop = true;
    IAsyncResult Result = pgSqlDump.BeginBackup("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndBackup(Result);
    Console.WriteLine("Dumped.");
    conn.Close();
}

public void UnDumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    IAsyncResult Result = pgSqlDump.BeginRestore("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndRestore(Result);
    Console.WriteLine("Restored.");
    conn.Close();
}

[Visual Basic]

Public Sub DumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    pgSqlDump.Schema = "public"
    pgSqlDump.Tables = "dept;emp"
    pgSqlDump.IncludeDrop = True
    Dim Result As IAsyncResult = pgSqlDump.BeginBackup("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndBackup(Result)
    Console.WriteLine("Dumped.")
    conn.Close()
End Sub

Public Sub UnDumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    Dim Result As IAsyncResult = pgSqlDump.BeginRestore("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndRestore(Result)
    Console.WriteLine("Restored.")
    conn.Close()
End Sub

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned by BeginBackupQuery.
See Also Languages Devart.Data Send comments on this topic.

EndBackupQuery Method

Devart.Common Namespace > DbDump Class : EndBackupQuery Method

Ends an asynchronous invocation of the BackupQuery method.

[Visual Basic]
Public Sub EndBackupQuery( _
   ByVal result As IAsyncResult _
)
[C#]
public void EndBackupQuery(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned by BeginBackupQuery.

Remarks

The function ends an asynchronous query backup that is started with BeginBackupQuery. A pair of asynchronous functions (BeginBackupQuery and EndBackupQuery) can be used instead of the synchronous function BackupQuery to gain more performance and flexibility in your application.

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned by BeginRestore.
See Also Languages Devart.Data Send comments on this topic.

EndRestore Method

Devart.Common Namespace > DbDump Class : EndRestore Method

Ends an asynchronous invocation of the Restore method.

[Visual Basic]
Public Sub EndRestore( _
   ByVal result As IAsyncResult _
)
[C#]
public void EndRestore(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned by BeginRestore.

Remarks

The function ends an asynchronous backup that is started with BeginRestore. A pair of asynchronous functions (BeginRestore and EndRestore) can be used instead of the synchronous function Restore to gain more performance and flexibility in your application.

Example

This sample demonstrates performing async backup and restore operations.

[C#]

public void DumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    pgSqlDump.Schema = "public";
    pgSqlDump.Tables = "dept;emp";
    pgSqlDump.IncludeDrop = true;
    IAsyncResult Result = pgSqlDump.BeginBackup("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndBackup(Result);
    Console.WriteLine("Dumped.");
    conn.Close();
}

public void UnDumpIt(PgSqlConnection conn)
{
    conn.Open();
    PgSqlDump pgSqlDump = new PgSqlDump();
    pgSqlDump.Connection = conn;
    IAsyncResult Result = pgSqlDump.BeginRestore("d:\\dump.dmp");
    while (!Result.IsCompleted)
    {
        Console.Write(".");
        //Perform here any operation you need
    }
    pgSqlDump.EndRestore(Result);
    Console.WriteLine("Restored.");
    conn.Close();
}

[Visual Basic]

Public Sub DumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    pgSqlDump.Schema = "public"
    pgSqlDump.Tables = "dept;emp"
    pgSqlDump.IncludeDrop = True
    Dim Result As IAsyncResult = pgSqlDump.BeginBackup("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndBackup(Result)
    Console.WriteLine("Dumped.")
    conn.Close()
End Sub

Public Sub UnDumpIt(conn As PgSqlConnection)
    conn.Open()
    Dim pgSqlDump As New PgSqlDump()
    pgSqlDump.Connection = conn
    Dim Result As IAsyncResult = pgSqlDump.BeginRestore("d:\dump.dmp")
    While Not Result.IsCompleted
        'Perform here any operation you need
        Console.Write(".")
    End While
    pgSqlDump.EndRestore(Result)
    Console.WriteLine("Restored.")
    conn.Close()
End Sub

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Restore Method

Devart.Common Namespace > DbDump Class : Restore Method

Executes the previously dumped script.

Overload List

Executes script specified in the DbDump descendant property.

[Visual Basic] Overloads Public Sub Restore()

[C#] public void Restore();

Executes script from the specified file.

[Visual Basic] Overloads Public Sub Restore(String)

[C#] public void Restore(string);

Executes script from the specified Stream object.

[Visual Basic] Overloads Public Sub Restore(Stream)

[C#] public void Restore(Stream);

Executes script from the specified TextReader object.

[Visual Basic] Overloads Public Sub Restore(TextReader)

[C#] public void Restore(TextReader);

See Also

DbDump Class | DbDump Members


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Restore() Method

Devart.Common Namespace > DbDump Class > Restore Method : Restore() Method

Executes script specified in the DbDump descendant property.

[Visual Basic]
Overloads Public Sub Restore()
[C#]
public void Restore();

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

fileName
The name of the file to load the script from.
See Also Languages Devart.Data Send comments on this topic.

Restore(String) Method

Devart.Common Namespace > DbDump Class > Restore Method : Restore(String) Method

Executes script from the specified file.

[Visual Basic]
Overloads Public Sub Restore( _
   ByVal fileName As String _
)
[C#]
public void Restore(
   string fileName
);

Parameters

fileName
The name of the file to load the script from.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

stream
The Stream object to read the script from.
See Also Languages Devart.Data Send comments on this topic.

Restore(Stream) Method

Devart.Common Namespace > DbDump Class > Restore Method : Restore(Stream) Method

Executes script from the specified Stream object.

[Visual Basic]
Overloads Public Sub Restore( _
   ByVal stream As Stream _
)
[C#]
public void Restore(
   Stream stream
);

Parameters

stream
The Stream object to read the script from.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbDump Class | DbDump Members | Overload List

Language

Visual Basic

C#

Show All

reader
The TextReader object to read the script from.
See Also Languages Devart.Data Send comments on this topic.

Restore(TextReader) Method

Devart.Common Namespace > DbDump Class > Restore Method : Restore(TextReader) Method

Executes script from the specified TextReader object.

[Visual Basic]
Overloads Public Sub Restore( _
   ByVal reader As TextReader _
)
[C#]
public void Restore(
   TextReader reader
);

Parameters

reader
The TextReader object to read the script from.

See Also

DbDump Class | DbDump Members | Overload List


%%PageItemTitle%%

DbLoader Members | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoader Class

Devart.Common Namespace : DbLoader Class

Serves to load external data into the data source.

For a list of all members of this type, see DbLoader members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbLoader
Devart.Data.PostgreSql.PgSqlLoader

Syntax

[Visual Basic]
Public MustInherit Class DbLoader
   Inherits Component
   Implements IComponent, IDisposable
[C#]
public abstract class DbLoader : Component, IComponent, IDisposable

Remarks

Abstract DbLoader class implements some of DbLoader functionality that is DBMS-independent.

See Also

DbLoader Members | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class


%%PageItemTitle%% $$Members$$

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class

See Also Devart.Data Send comments on this topic.

DbLoader Class Members

Devart.Common Namespace : DbLoader Class

DbLoader overview

Public Properties

Public Property BufferSize | Gets or sets a size of data packet loaded to the server.
Public Property Columns | Gets the DbLoaderColumnCollection collection.
Public Property Connection | Gets or sets the DbConnection used by this instance of the DbLoader.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Item | Overloaded. Sets the value of the column with the specified name for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableName | Gets or sets table name that will be loaded.

Public Methods

Public Method Close | Closes loading session and flushes remaining rows to the table.
Public Method CreateColumns | Retrieves table columns information from the table specified in the TableName property and populates columns collection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method LoadTable | Overloaded. Loads data into the table from the specified DataTable.
Public Method NextRow | Advances DbLoader to the next row.
Public Method Open | Prepares DbLoader for the loading.
Public Method SetNull | Overloaded. Sets the value of the column with the specified name or ordinal to NULL.
Public Method SetValue | Overloaded. Sets the value of the column with the specified name or ordinal.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class


%%PageItemTitle%% $$Properties$$

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class

See Also Devart.Data Send comments on this topic.

DbLoader Class Properties

Devart.Common Namespace : DbLoader Class

For a list of all members of this type, see DbLoader members.

Public Properties

Public Property BufferSize | Gets or sets a size of data packet loaded to the server.
Public Property Columns | Gets the DbLoaderColumnCollection collection.
Public Property Connection | Gets or sets the DbConnection used by this instance of the DbLoader.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Item | Overloaded. Sets the value of the column with the specified name for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableName | Gets or sets table name that will be loaded.

See Also

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

BufferSize Property

Devart.Common Namespace > DbLoader Class : BufferSize Property

Gets or sets a size of data packet loaded to the server.

[Visual Basic]
Public Property BufferSize As Integer
[C#]
public int BufferSize {get; set;}

Return Type

Size of the data packet in bytes.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Columns Property

Devart.Common Namespace > DbLoader Class : Columns Property (DbLoader)

Gets the DbLoaderColumnCollection collection.

[Visual Basic]
Public ReadOnly Property Columns As DbLoaderColumnCollection
[C#]
public DbLoaderColumnCollection Columns {get;}

Return Type

Columns which loaded table consist of.

Remarks

You may manually add columns to the DbLoaderColumnCollection or call CreateColumns method to populate columns collection from the table description.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Connection Property

Devart.Common Namespace > DbLoader Class : Connection Property (DbLoader)

Gets or sets the DbConnection used by this instance of the DbLoader.

[Visual Basic]
Public Property Connection As DbConnection
[C#]
public DbConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

Remarks

DbLoader instance uses DbConnection during loading and for populating columns collection when CreateColumns method is called. For these operations DbLoader requires open connection.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Item Property

Devart.Common Namespace > DbLoader Class : Item Property (DbLoader)

Sets the value of the column with the specified name for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.

Overload List

Sets the value of the column with the specified name for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.

[Visual Basic] Overloads Public Item(String) As Object

[C#] public object Item(string);

Sets the value of the column at the specified index for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.

[Visual Basic] Overloads Public Item(Integer) As Object

[C#] public object Item(int);

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List

Language

Visual Basic

C#

Show All

columnName
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

Item(String,Object) Property

Devart.Common Namespace > DbLoader Class > Item Property : Item(String,Object) Property

Sets the value of the column with the specified name for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.

[Visual Basic]
Overloads Public WriteOnly Property Item( _
   ByVal columnName As String _
) As Object
[C#]
public object Item(
   string columnName
); {set;}

Parameters

columnName
The name of the column.

See Also

DbLoader Class | DbLoader Members | Overload List


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List

Language

Visual Basic

C#

Show All

columnIndex
The zero-based index.
See Also Languages Devart.Data Send comments on this topic.

Item(Int32,Object) Property

Devart.Common Namespace > DbLoader Class > Item Property : Item(Int32,Object) Property

Sets the value of the column at the specified index for Devart.Data.PostgreSql.PgSqlLoaderColumnCollection.

[Visual Basic]
Overloads Public WriteOnly Property Item( _
   ByVal columnIndex As Integer _
) As Object
[C#]
public object Item(
   int columnIndex
); {set;}

Parameters

columnIndex
The zero-based index.

See Also

DbLoader Class | DbLoader Members | Overload List


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TableName Property

Devart.Common Namespace > DbLoader Class : TableName Property (DbLoader)

Gets or sets table name that will be loaded.

[Visual Basic]
Public Overridable Property TableName As String
[C#]
public virtual string TableName {get; set;}

Return Type

Name of the table that will be loaded.

Remarks

TableName property must be specified before beginning of loading data.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%% $$Methods$$

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class

See Also Devart.Data Send comments on this topic.

DbLoader Class Methods

Devart.Common Namespace : DbLoader Class

For a list of all members of this type, see DbLoader members.

Public Methods

Public Method Close | Closes loading session and flushes remaining rows to the table.
Public Method CreateColumns | Retrieves table columns information from the table specified in the TableName property and populates columns collection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method LoadTable | Overloaded. Loads data into the table from the specified DataTable.
Public Method NextRow | Advances DbLoader to the next row.
Public Method Open | Prepares DbLoader for the loading.
Public Method SetNull | Overloaded. Sets the value of the column with the specified name or ordinal to NULL.
Public Method SetValue | Overloaded. Sets the value of the column with the specified name or ordinal.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Close Method

Devart.Common Namespace > DbLoader Class : Close Method (DbLoader)

Closes loading session and flushes remaining rows to the table.

[Visual Basic]
Public MustOverride Sub Close()
[C#]
public abstract void Close();

Remarks

You must call Close method after finishing of loading session. If rows exist in the loader internal buffer, they will be flushed to the table.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CreateColumns Method

Devart.Common Namespace > DbLoader Class : CreateColumns Method (DbLoader)

Retrieves table columns information from the table specified in the TableName property and populates columns collection.

[Visual Basic]
Public MustOverride Sub CreateColumns()
[C#]
public abstract void CreateColumns();

Remarks

If Columns property consists of some columns they will be deleted before calling CreateColumns method. TableName property must be set before calling this method.

CreateColumns retrieves all columns from the table. It means that when inserting the data, SQL INSERT statement is generated for all of the columns, regardless of how many you have assigned with SetValue method. The columns you have omitted are considered to be of NULL value. If you want to generate the statements for chosen columns only, you have to manually edit the collection.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LoadTable Method

Devart.Common Namespace > DbLoader Class : LoadTable Method

Loads data into the table from the specified DataTable.

Overload List

Loads data into the table from the specified DataTable.

[Visual Basic] Overloads Public Sub LoadTable(DataTable)

[C#] public void LoadTable(DataTable);

Loads data into the table from the specified DataTable.

[Visual Basic] Overloads Public Sub LoadTable(DataTable,IColumnMappingCollection)

[C#] public void LoadTable(DataTable,IColumnMappingCollection);

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List

Language

Visual Basic

C#

Show All

table
The DataTable object to obtain data from.
See Also Languages Devart.Data Send comments on this topic.

LoadTable(DataTable) Method

Devart.Common Namespace > DbLoader Class > LoadTable Method : LoadTable(DataTable) Method

Loads data into the table from the specified DataTable.

[Visual Basic]
Overloads Public Sub LoadTable( _
   ByVal table As DataTable _
)
[C#]
public void LoadTable(
   DataTable table
);

Parameters

table
The DataTable object to obtain data from.

Remarks

Loader can be in either opened or closed state. This method closes the loading session, so all rows are flushed to the table.

See Also

DbLoader Class | DbLoader Members | Overload List


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List

Language

Visual Basic

C#

Show All

table
The DataTable object to obtain data from.
columnMappings
Column mappings used to match table columns to data source table columns. If this argument is null, the DataTable columns names are used.
See Also Languages Devart.Data Send comments on this topic.

LoadTable(DataTable,IColumnMappingCollection) Method

Devart.Common Namespace > DbLoader Class > LoadTable Method : LoadTable(DataTable,IColumnMappingCollection) Method

Loads data into the table from the specified DataTable.

[Visual Basic]
Overloads Public Sub LoadTable( _
   ByVal table As DataTable, _
   ByVal columnMappings As IColumnMappingCollection _
)
[C#]
public void LoadTable(
   DataTable table,
   IColumnMappingCollection columnMappings
);

Parameters

table
The DataTable object to obtain data from.
columnMappings
Column mappings used to match table columns to data source table columns. If this argument is null, the DataTable columns names are used.

Remarks

Loader can be in either opened or closed state. This method closes the loading session, so all rows are flushed to the table.

See Also

DbLoader Class | DbLoader Members | Overload List


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

NextRow Method

Devart.Common Namespace > DbLoader Class : NextRow Method (DbLoader)

Advances DbLoader to the next row.

[Visual Basic]
Public MustOverride Sub NextRow()
[C#]
public abstract void NextRow();

Remarks

Call this method after you put the row to the DbLoader internal buffer. If DbLoader rows buffer is full NextRow method flushes rows buffer to the loading table.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Open Method

Devart.Common Namespace > DbLoader Class : Open Method (DbLoader)

Prepares DbLoader for the loading.

[Visual Basic]
Public MustOverride Sub Open()
[C#]
public abstract void Open();

Remarks

Use Open method to prepare internal DbLoader structures for loading. If you do not call this method explicitly it will be called automatically.

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SetNull Method

Devart.Common Namespace > DbLoader Class : SetNull Method

Sets the value of the column with the specified name or ordinal to NULL.

Overload List

Sets the value of the column with the specified index to NULL.

[Visual Basic] Overloads Public Sub SetNull(Integer)

[C#] public void SetNull(int);

Sets the value of the column with the specified name to NULL.

[Visual Basic] Overloads Public Sub SetNull(String)

[C#] public void SetNull(string);

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List | SetValue Method

Language

Visual Basic

C#

Show All

i
Zero-based index of the column.
See Also Languages Devart.Data Send comments on this topic.

SetNull(Int32) Method

Devart.Common Namespace > DbLoader Class > SetNull Method : SetNull(Int32) Method

Sets the value of the column with the specified index to NULL.

[Visual Basic]
Overloads Public Sub SetNull( _
   ByVal i As Integer _
)
[C#]
public void SetNull(
   int i
);

Parameters

i
Zero-based index of the column.

Remarks

Use SetNull method to set column with specific index in the current row to a NULL value.

See Also

DbLoader Class | DbLoader Members | Overload List | SetValue Method


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List | SetValue Method

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

SetNull(String) Method

Devart.Common Namespace > DbLoader Class > SetNull Method : SetNull(String) Method

Sets the value of the column with the specified name to NULL.

[Visual Basic]
Overloads Public Sub SetNull( _
   ByVal name As String _
)
[C#]
public void SetNull(
   string name
);

Parameters

name
The name of the column.

Remarks

Use SetNull method to set column with specific name in the current row to a NULL value.

See Also

DbLoader Class | DbLoader Members | Overload List | SetValue Method


%%PageItemTitle%%

DbLoader Class | DbLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SetValue Method

Devart.Common Namespace > DbLoader Class : SetValue Method (DbLoader)

Sets the value of the column with the specified name or ordinal.

Overload List

Sets the value of the column with the specified name.

[Visual Basic] Overloads Public Sub SetValue(String,Object)

[C#] public void SetValue(string,object);

Sets the value of the column at the specified ordinal.

[Visual Basic] Overloads Public MustOverride Sub SetValue(Integer,Object)

[C#] public abstract void SetValue(int,object);

See Also

DbLoader Class | DbLoader Members


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List | SetNull(String) Method

Language

Visual Basic

C#

Show All

name
The name of the column.
value
Column value.
See Also Languages Devart.Data Send comments on this topic.

SetValue(String,Object) Method

Devart.Common Namespace > DbLoader Class > SetValue Method : SetValue(String,Object) Method

Sets the value of the column with the specified name.

[Visual Basic]
Overloads Public Sub SetValue( _
   ByVal name As String, _
   ByVal value As Object _
)
[C#]
public void SetValue(
   string name,
   object value
);

Parameters

name
The name of the column.
value
Column value.

Remarks

Use SetValue method to set column with specific name in the current row to the value. To assign a column NULL value use SetNull method instead.

The columns that you did not explicitly assign a value are considered to be NULL.

See Also

DbLoader Class | DbLoader Members | Overload List | SetNull(String) Method


%%PageItemTitle%%

DbLoader Class | DbLoader Members | Overload List | SetNull(Int32) Method

Language

Visual Basic

C#

Show All

i
Zero-based index of the column.
value
Column value.
See Also Languages Devart.Data Send comments on this topic.

SetValue(Int32,Object) Method

Devart.Common Namespace > DbLoader Class > SetValue Method : SetValue(Int32,Object) Method

Sets the value of the column at the specified ordinal.

[Visual Basic]
Overloads Public MustOverride Sub SetValue( _
   ByVal i As Integer, _
   ByVal value As Object _
)
[C#]
public abstract void SetValue(
   int i,
   object value
);

Parameters

i
Zero-based index of the column.
value
Column value.

Remarks

Use SetValue method to set column with specific index in the current row to the value. To assign a column NULL value use SetNull method instead.

The columns that you did not explicitly assign a value are considered to be NULL.

See Also

DbLoader Class | DbLoader Members | Overload List | SetNull(Int32) Method


%%PageItemTitle%%

DbLoaderColumn Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumn Class

Devart.Common Namespace : DbLoaderColumn Class

Represents the attributes for column loading.

For a list of all members of this type, see DbLoaderColumn members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
Devart.Common.DbLoaderColumn
Devart.Data.PostgreSql.PgSqlLoaderColumn

Syntax

[Visual Basic]
Public Class DbLoaderColumn
   Inherits MarshalByRefObject
[C#]
public class DbLoaderColumn : MarshalByRefObject

Remarks

Each DbLoader uses Columns to maintain a collection of DbLoaderColumn objects. The DbLoaderColumn object represents the attributes for column loading. Every DbLoaderColumn object corresponds to one of the table fields with the same name as its Name property.

You can manually make changes to the Columns collection to exclude some columns from INSERT statement generated by DbLoader object.

See Also

DbLoaderColumn Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbLoaderColumn Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbLoaderColumn Class Members

Devart.Common Namespace : DbLoaderColumn Class

DbLoaderColumn overview

Public Constructors

Public Constructor DbLoaderColumn Constructor Overloaded. Initializes a new instance of the DbLoaderColumn class.

Public Properties

Public Property Name | Gets or sets the name of the DbLoaderColumn.
Public Property Precision | Gets or sets the maximum number of digits used to represent the column value.
Public Property Scale | Gets or sets the number of decimal places to which column value is resolved.
Public Property Size | Gets or sets the maximum size, in bytes, of the data within the column.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString | Overridden. Returns the name of the DbLoaderColumn.

See Also

DbLoaderColumn Class | Devart.Common Namespace


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumn Constructor

Devart.Common Namespace > DbLoaderColumn Class : DbLoaderColumn Constructor (DbLoaderColumn)

Initializes a new instance of the DbLoaderColumn class.

Overload List

Initializes a new instance of the DbLoaderColumn class.

[Visual Basic] Public Sub New()

[C#] public DbLoaderColumn();

Initializes a new instance of the DbLoaderColumn class with the column name, size, precision and scale.

[Visual Basic] Public Sub New(String,Integer,Integer,Integer)

[C#] public DbLoaderColumn(string,int,int,int);

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumn Constructor()

Devart.Common Namespace > DbLoaderColumn Class > DbLoaderColumn Constructor : DbLoaderColumn Constructor()

Initializes a new instance of the DbLoaderColumn class.

[Visual Basic]
Public Function New()
[C#]
public DbLoaderColumn();

See Also

DbLoaderColumn Class | DbLoaderColumn Members | Overload List


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
size
Maximum size of column data.
precision
The precision of the column.
scale
The scale of the column.
See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumn Constructor(String,Int32,Int32,Int32)

Devart.Common Namespace > DbLoaderColumn Class > DbLoaderColumn Constructor : DbLoaderColumn Constructor(String,Int32,Int32,Int32)

Initializes a new instance of the DbLoaderColumn class with the column name, size, precision and scale.

[Visual Basic]
Public Function New( _
   ByVal name As String, _
   ByVal size As Integer, _
   ByVal precision As Integer, _
   ByVal scale As Integer _
)
[C#]
public DbLoaderColumn(
   string name,
   int size,
   int precision,
   int scale
);

Parameters

name
The name of the column.
size
Maximum size of column data.
precision
The precision of the column.
scale
The scale of the column.

Remarks

Use this constructor to create a DbLoaderColumn instance with custom column name, data size, precision and scale.

See Also

DbLoaderColumn Class | DbLoaderColumn Members | Overload List


%%PageItemTitle%% $$Properties$$

DbLoaderColumn Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbLoaderColumn Class Properties

Devart.Common Namespace : DbLoaderColumn Class

For a list of all members of this type, see DbLoaderColumn members.

Public Properties

Public Property Name | Gets or sets the name of the DbLoaderColumn.
Public Property Precision | Gets or sets the maximum number of digits used to represent the column value.
Public Property Scale | Gets or sets the number of decimal places to which column value is resolved.
Public Property Size | Gets or sets the maximum size, in bytes, of the data within the column.

See Also

DbLoaderColumn Class | Devart.Common Namespace


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Name Property

Devart.Common Namespace > DbLoaderColumn Class : Name Property (DbLoaderColumn)

Gets or sets the name of the DbLoaderColumn.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the DbLoaderColumn. The default value is an empty string ("").

Remarks

Every DbLoaderColumn object corresponds to one of the table fields with the same name as its Name property.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Precision Property

Devart.Common Namespace > DbLoaderColumn Class : Precision Property (DbLoaderColumn)

Gets or sets the maximum number of digits used to represent the column value.

[Visual Basic]
Public Overridable Property Precision As Integer
[C#]
public virtual int Precision {get; set;}

Return Type

The maximum number of digits used to represent the column value. The default value is 0.

Remarks

Use Precision property to set the precision of number columns.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetDataColumns(ByVal pgConnection As PgSqlConnection)
  pgConnection.Open()
  Dim loader As PgSqlLoader
  loader = New PgSqlLoader
  loader.Connection = pgConnection
  loader.TableName = "load_table"
  Dim myColumn As PgSqlLoaderColumn
  Try
    loader.CreateColumns()
    Dim i As Integer
    For i = 0 To loader.Columns.Count - 1
      myColumn = loader.Columns(i)
      Console.WriteLine(myColumn.Name)
      Console.WriteLine(myColumn.PgSqlType.ToString())
      Console.WriteLine(myColumn.Size)
      Console.WriteLine(myColumn.Scale)
      Console.WriteLine(myColumn.Precision)
      Console.WriteLine()
    Next i
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Scale Property

Devart.Common Namespace > DbLoaderColumn Class : Scale Property (DbLoaderColumn)

Gets or sets the number of decimal places to which column value is resolved.

[Visual Basic]
Public Property Scale As Integer
[C#]
public int Scale {get; set;}

Return Type

The number of decimal places to which column value is resolved. The default value is 0.

Remarks

Use Scale property to set the scale of number columns.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Size Property

Devart.Common Namespace > DbLoaderColumn Class : Size Property (DbLoaderColumn)

Gets or sets the maximum size, in bytes, of the data within the column.

[Visual Basic]
Public Overridable Property Size As Integer
[C#]
public virtual int Size {get; set;}

Return Type

The maximum size, in bytes, of the data within the column.

Remarks

Use Size property to set maximum size in bytes of data for the column. Size is used only for string columns.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%% $$Methods$$

DbLoaderColumn Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbLoaderColumn Class Methods

Devart.Common Namespace : DbLoaderColumn Class

For a list of all members of this type, see DbLoaderColumn members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString | Overridden. Returns the name of the DbLoaderColumn.

See Also

DbLoaderColumn Class | Devart.Common Namespace


%%PageItemTitle%%

DbLoaderColumn Class | DbLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ToString Method

Devart.Common Namespace > DbLoaderColumn Class : ToString Method (DbLoaderColumn)

Returns the name of the DbLoaderColumn.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

The name of the DbLoaderColumn.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

public void GetDataColumns(PgSqlConnection pgConnection)
{

  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

See Also

DbLoaderColumn Class | DbLoaderColumn Members


%%PageItemTitle%%

DbLoaderColumnCollection Members | Devart.Common Namespace | DbLoader Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumnCollection Class

Devart.Common Namespace : DbLoaderColumnCollection Class

Represents a collection of columns relevant to a DbLoader.

For a list of all members of this type, see DbLoaderColumnCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Common.DbLoaderColumnCollection
Devart.Data.PostgreSql.PgSqlLoaderColumnCollection

Syntax

[Visual Basic]
Public Class DbLoaderColumnCollection
   Inherits CollectionBase
   Implements ICollection, IEnumerable, IList
[C#]
public class DbLoaderColumnCollection : CollectionBase, ICollection, IEnumerable, IList

Remarks

Use DbLoaderColumnCollection class to add or remove columns that will be loaded. Order and number of columns in the collection must be equal to the order and number of columns in the loaded table.

Example

Following example displays all loader columns.

[C#]

public void DisplayColumns(string tableName, PgSqlConnection conn) {

  // Create loader instance
  PgSqlLoader loader = new PgSqlLoader();

  // Set up working connection
  // Connection must be opened
  loader.Connection = conn;

  // Set up table name for loading
  loader.TableName = tableName;

  // Create column collection for loading table
  loader.CreateColumns();

  // Iterate through column collection
  foreach (PgSqlLoaderColumn column in loader.Columns)
    Console.WriteLine(column.Name);
}

[Visual Basic]

Public Sub DisplayColumns(tableName as string, conn as PgSqlConnection)

  ' Create loader instance
  Dim loader as PgSqlLoader = new PgSqlLoader()

  ' Set up working connection
  ' Connection must be opened
  loader.Connection = conn

  ' Set up table name for loading
  loader.TableName = tableName

  ' Create column collection for loading table
  loader.CreateColumns()

  ' Iterate through column collection
  Dim column as PgSqlLoaderColumn
  For Each column in loader.Columns
    Console.WriteLine(column.Name)
  Next
End Sub

See Also

DbLoaderColumnCollection Members | Devart.Common Namespace | DbLoader Class


%%PageItemTitle%% $$Members$$

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class

See Also Devart.Data Send comments on this topic.

DbLoaderColumnCollection Class Members

Devart.Common Namespace : DbLoaderColumnCollection Class

DbLoaderColumnCollection overview

Public Constructors

Public Constructor DbLoaderColumnCollection Constructor Initializes a new instance of the DbLoaderColumnCollection class.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets or sets the DbLoaderColumn at the specified index.

Public Methods

Public Method Add | Adds the specified DbLoaderColumn to the DbLoaderColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Overloaded. Gets a value indicating whether a DbLoaderColumn object exists in the collection.
Public Method CopyTo | Copies DbLoaderColumn objects from the DbLoaderColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Overloaded. Gets the location in the collection of the DbLoaderColumn object.
Public Method Insert | Inserts a DbLoaderColumn into the collection at the specified index.
Public Method Remove | Removes the specified DbLoaderColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbLoaderColumnCollection Constructor

Devart.Common Namespace > DbLoaderColumnCollection Class : DbLoaderColumnCollection Constructor (DbLoaderColumnCollection)

Initializes a new instance of the DbLoaderColumnCollection class.

[Visual Basic]
Public Function New()
[C#]
public DbLoaderColumnCollection();

Remarks

The base constructor initializes all fields to their default values.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%% $$Properties$$

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class

See Also Devart.Data Send comments on this topic.

DbLoaderColumnCollection Class Properties

Devart.Common Namespace : DbLoaderColumnCollection Class

For a list of all members of this type, see DbLoaderColumnCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets or sets the DbLoaderColumn at the specified index.

See Also

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Item Property

Devart.Common Namespace > DbLoaderColumnCollection Class : Item Property (DbLoaderColumnCollection)

Gets or sets the DbLoaderColumn at the specified index.

Overload List

Gets or sets the DbLoaderColumn at the specified index.

[Visual Basic] Overloads Public Item(Integer) As DbLoaderColumn

[C#] public DbLoaderColumn Item(int);

Gets or sets the DbLoaderColumn with the specified name.

[Visual Basic] Overloads Public Item(String) As DbLoaderColumn

[C#] public DbLoaderColumn Item(string);

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

index
The zero-based index of the column.
See Also Languages Devart.Data Send comments on this topic.

Item(Int32) Property

Devart.Common Namespace > DbLoaderColumnCollection Class > Item Property : Item(Int32) Property

Gets or sets the DbLoaderColumn at the specified index.

[Visual Basic]
Overloads Public Property Item( _
   ByVal index As Integer _
) As DbLoaderColumn
[C#]
public DbLoaderColumn Item(
   int index
); {get; set;}

Parameters

index
The zero-based index of the column.

Return Type

The DbLoaderColumn at the specified index.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data Send comments on this topic.

Item(String) Property

Devart.Common Namespace > DbLoaderColumnCollection Class > Item Property : Item(String) Property

Gets or sets the DbLoaderColumn with the specified name.

[Visual Basic]
Overloads Public Property Item( _
   ByVal name As String _
) As DbLoaderColumn
[C#]
public DbLoaderColumn Item(
   string name
); {get; set;}

Parameters

name
The name of the column.

Return Type

The DbLoaderColumn with the specified name.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List


%%PageItemTitle%% $$Methods$$

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class

See Also Devart.Data Send comments on this topic.

DbLoaderColumnCollection Class Methods

Devart.Common Namespace : DbLoaderColumnCollection Class

For a list of all members of this type, see DbLoaderColumnCollection members.

Public Methods

Public Method Add | Adds the specified DbLoaderColumn to the DbLoaderColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Overloaded. Gets a value indicating whether a DbLoaderColumn object exists in the collection.
Public Method CopyTo | Copies DbLoaderColumn objects from the DbLoaderColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Overloaded. Gets the location in the collection of the DbLoaderColumn object.
Public Method Insert | Inserts a DbLoaderColumn into the collection at the specified index.
Public Method Remove | Removes the specified DbLoaderColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

DbLoaderColumnCollection Class | Devart.Common Namespace | DbLoader Class


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | DbLoaderColumn Class

Language

Visual Basic

C#

Show All

value
The DbLoaderColumn to add to the collection.
See Also Languages Devart.Data Send comments on this topic.

Add Method

Devart.Common Namespace > DbLoaderColumnCollection Class : Add Method (DbLoaderColumnCollection)

Adds the specified DbLoaderColumn to the DbLoaderColumnCollection.

[Visual Basic]
Public Function Add( _
   ByVal value As DbLoaderColumn _
) As Integer
[C#]
public int Add(
   DbLoaderColumn value
);

Parameters

value
The DbLoaderColumn to add to the collection.

Return Type

Index of the new DbLoaderColumn object.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | DbLoaderColumn Class


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Contains Method

Devart.Common Namespace > DbLoaderColumnCollection Class : Contains Method (DbLoaderColumnCollection)

Gets a value indicating whether a DbLoaderColumn object exists in the collection.

Overload List

Gets a value indicating whether a DbLoaderColumn object exists in the collection.

[Visual Basic] Overloads Public Function Contains(DbLoaderColumn) As Boolean

[C#] public bool Contains(DbLoaderColumn);

Gets a value indicating whether a DbLoaderColumn object with the specified name exists in the collection.

[Visual Basic] Overloads Public Function Contains(String) As Boolean

[C#] public bool Contains(string);

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The value of the DbLoaderColumn object to find.
See Also Languages Devart.Data Send comments on this topic.

Contains(DbLoaderColumn) Method

Devart.Common Namespace > DbLoaderColumnCollection Class > Contains Method : Contains(DbLoaderColumn) Method

Gets a value indicating whether a DbLoaderColumn object exists in the collection.

[Visual Basic]
Overloads Public Function Contains( _
   ByVal value As DbLoaderColumn _
) As Boolean
[C#]
public bool Contains(
   DbLoaderColumn value
);

Parameters

value
The value of the DbLoaderColumn object to find.

Return Type

true if the collection contains the DbLoaderColumn; otherwise, false.

Example

The following example searches for a DbLoaderColumn within a DbLoaderColumnCollection. If the column exists, the example displays the index of the column. If the column does not exist, the example displays an error. This example assumes that a DbLoaderColumnCollection has already been created.

[C#]

public void SearchMyColumns() {
  // ...
  // create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  // ...
  if (!myColumns.Contains((Object) myNewColumn))
    MessageBox.Show("ERROR: no such column in the collection");
  else
    MessageBox.Show("match on column #" +
      myColumns.IndexOf((Object) myNewColumn).ToString());
}

[Visual Basic]

Public Sub SearchMyColumns()
  ' ...
  ' create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  ' ...
  If Not myColumns.Contains(CType(myNewColumn, Object)) Then
    MessageBox.Show("ERROR: no such column in the collection")
  Else
    MessageBox.Show("match on column #" & myColumns.IndexOf(CType(myNewColumn, Object)).ToString())
  End If
End Sub 'SearchMyColumns

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to find.
See Also Languages Devart.Data Send comments on this topic.

Contains(String) Method

Devart.Common Namespace > DbLoaderColumnCollection Class > Contains Method : Contains(String) Method

Gets a value indicating whether a DbLoaderColumn object with the specified name exists in the collection.

[Visual Basic]
Overloads Public Function Contains( _
   ByVal name As String _
) As Boolean
[C#]
public bool Contains(
   string name
);

Parameters

name
The name of the column to find.

Return Type

true if the collection contains the DbLoaderColumn; otherwise, false.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

array
The array into which to copy the DbLoaderColumn objects.
index
The zero-based index of the array.
See Also Languages Devart.Data Send comments on this topic.

CopyTo Method

Devart.Common Namespace > DbLoaderColumnCollection Class : CopyTo Method (DbLoaderColumnCollection)

Copies DbLoaderColumn objects from the DbLoaderColumnCollection to the specified array.

[Visual Basic]
Public Sub CopyTo( _
   ByVal array() As DbLoaderColumn, _
   ByVal index As Integer _
)
[C#]
public void CopyTo(
   DbLoaderColumn[] array,
   int index
);

Parameters

array
The array into which to copy the DbLoaderColumn objects.
index
The zero-based index of the array.

Example

The following example exports the DbLoaderColumnCollection to an array of Devart.Data.PostgreSql.PgSqlLoaderColumn objects, doubles the size of the array by using CopyTo and returns the collection. It then clears the collection, and returns true if the columns are no longer persisting. This example assumes that a DbLoaderColumnCollection has already been created.

[C#]

public bool DoubleYourColumns() {
  // ...
  // create PgSqlLoaderColumnCollection myColumns
  // ...
  PgSqlLoaderColumn[] myColumnArray = new PgSqlLoaderColumn[(2*myColumns.Count) - 1];
  myColumns.CopyTo(myColumnArray, 0);
  myColumns.CopyTo(myColumnArray, myColumns.Count);
  myColumns.Clear();
  return true;
}

[Visual Basic]

Public Function DoubleYourColumns() As Boolean
  ' ...
  ' create PgSqlLoaderColumnCollection myColumns
  ' ...
  Dim myColumnArray(2 * myColumns.Count - 1) As PgSqlLoaderColumn
  myColumns.CopyTo(myColumnArray, 0)
  myColumns.CopyTo(myColumnArray, myColumns.Count)
  myColumns.Clear()
  Return True
End Function 'DoubleYourColumns

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IndexOf Method

Devart.Common Namespace > DbLoaderColumnCollection Class : IndexOf Method (DbLoaderColumnCollection)

Gets the location in the collection of the DbLoaderColumn object.

Overload List

Gets the location in the collection of the DbLoaderColumn object.

[Visual Basic] Overloads Public Function IndexOf(DbLoaderColumn) As Integer

[C#] public int IndexOf(DbLoaderColumn);

Gets the location in the collection of the DbLoaderColumn object by the specified name.

[Visual Basic] Overloads Public Function IndexOf(String) As Integer

[C#] public int IndexOf(string);

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List | Contains Method

Language

Visual Basic

C#

Show All

value
The DbLoaderColumn object to find.
See Also Languages Devart.Data Send comments on this topic.

IndexOf(DbLoaderColumn) Method

Devart.Common Namespace > DbLoaderColumnCollection Class > IndexOf Method : IndexOf(DbLoaderColumn) Method

Gets the location in the collection of the DbLoaderColumn object.

[Visual Basic]
Overloads Public Function IndexOf( _
   ByVal value As DbLoaderColumn _
) As Integer
[C#]
public int IndexOf(
   DbLoaderColumn value
);

Parameters

value
The DbLoaderColumn object to find.

Return Type

The zero-based location of the DbLoaderColumn in the collection.

Example

The following example searches for a DbLoaderColumn within a DbLoaderColumnCollection. If the column exists, the example displays the index of the column. If the column does not exist, the example displays an error. This example assumes that a DbLoaderColumnCollection has already been created.

[C#]

public void SearchMyColumns() {
  // ...
  // create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  // ...
  if (!myColumns.Contains((Object) myNewColumn))
    MessageBox.Show("ERROR: no such column in the collection");
  else
    MessageBox.Show("match on column #" +
      myColumns.IndexOf((Object) myNewColumn).ToString());
}

[Visual Basic]

Public Sub SearchMyColumns()
  ' ...
  ' create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  ' ...
  If Not myColumns.Contains(CType(myNewColumn, Object)) Then
    MessageBox.Show("ERROR: no such column in the collection")
  Else
    MessageBox.Show("match on column #" & myColumns.IndexOf(CType(myNewColumn, Object)).ToString())
  End If
End Sub 'SearchMyColumns

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List | Contains Method


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List | Contains Method

Language

Visual Basic

C#

Show All

name
The name of the column to find.
See Also Languages Devart.Data Send comments on this topic.

IndexOf(String) Method

Devart.Common Namespace > DbLoaderColumnCollection Class > IndexOf Method : IndexOf(String) Method

Gets the location in the collection of the DbLoaderColumn object by the specified name.

[Visual Basic]
Overloads Public Function IndexOf( _
   ByVal name As String _
) As Integer
[C#]
public int IndexOf(
   string name
);

Parameters

name
The name of the column to find.

Return Type

The zero-based location of the DbLoaderColumn in the collection.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members | Overload List | Contains Method


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index where the column is to be inserted within the collection.
value
The DbLoaderColumn to add to the collection.
See Also Languages Devart.Data Send comments on this topic.

Insert Method

Devart.Common Namespace > DbLoaderColumnCollection Class : Insert Method (DbLoaderColumnCollection)

Inserts a DbLoaderColumn into the collection at the specified index.

[Visual Basic]
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As DbLoaderColumn _
)
[C#]
public void Insert(
   int index,
   DbLoaderColumn value
);

Parameters

index
The zero-based index where the column is to be inserted within the collection.
value
The DbLoaderColumn to add to the collection.

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

value
The DbLoaderColumn object to remove from the collection.
See Also Languages Devart.Data Send comments on this topic.

Remove Method

Devart.Common Namespace > DbLoaderColumnCollection Class : Remove Method (DbLoaderColumnCollection)

Removes the specified DbLoaderColumn object from the collection.

[Visual Basic]
Public Sub Remove( _
   ByVal value As DbLoaderColumn _
)
[C#]
public void Remove(
   DbLoaderColumn value
);

Parameters

value
The DbLoaderColumn object to remove from the collection.

Example

The following example searches for a Devart.Data.PostgreSql.PgSqlLoaderColumn object in a Devart.Data.PostgreSql.PgSqlLoaderColumnCollection. If the column exists, it is removed. This example assumes that a Devart.Data.PostgreSql.PgSqlLoaderColumnCollection has already been created.

[C#]

public void SearchMyColumns() {
  // ...
  // create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  // ...
  if (myColumns.Contains((Object) myNewColumn))
    myColumns.Remove(((Object) myNewColumn).ToString());
}

[Visual Basic]

Public Sub SearchMyColumns()
  ' ...
  ' create PgSqlLoaderColumnCollection myColumns and PgSqlLoaderColumn myNewColumn
  ' ...
  If myColumns.Contains(CType(myNewColumn, Object)) Then
    myColumns.Remove(CType(myNewColumn, Object).ToString())
  End If
End Sub 'SearchMyColumns

See Also

DbLoaderColumnCollection Class | DbLoaderColumnCollection Members


%%PageItemTitle%%

DbMonitor Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbMonitor Class

Devart.Common Namespace : DbMonitor Class

Allows to monitor dynamic SQL execution in applications that use .NET data providers.

For a list of all members of this type, see DbMonitor members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbMonitor

Syntax

[Visual Basic]
Public MustInherit Class DbMonitor
   Inherits Component
   Implements IComponent, IDisposable
[C#]
public abstract class DbMonitor : Component, IComponent, IDisposable

Remarks

You can survey what happens in data provider components in two ways. First, you can handle DbMonitor.TraceEvent and perform necessary actions in the event handler. Second, if dbMonitor application is running and your edition of provider supports it, you will see execution logs in dbMonitor.

To enable monitoring just drop DbMonitor component to the form and set IsActive property to true. If dbMonitor application has already been started you can see messages and SQL statements that your application executes. For monitoring you need only one DbMonitor component on any of the forms your application consists of.

See Also

DbMonitor Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbMonitor Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbMonitor Class Members

Devart.Common Namespace : DbMonitor Class

DbMonitor overview

Public Properties

Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property EventQueueLimit | Gets or sets the maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.
Public Property Host | Gets or sets the host where the dbMonitor application is running, 'localhost' by default.
Public Property IsActive | Enables or disables monitoring applications.
Public Property Port | Gets or sets the port of the dbMonitor application to which to connect, 1000 by default.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UseApp | Disables or enables sending database interaction events to dbMonitor application.
Public Property UseIdeOutput | Enables or disables writing log messages to the IDE output window.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event TraceEvent | Occurs when DbMonitor object signals about some database activity.

See Also

DbMonitor Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbMonitor Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbMonitor Class Properties

Devart.Common Namespace : DbMonitor Class

For a list of all members of this type, see DbMonitor members.

Public Properties

Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property EventQueueLimit | Gets or sets the maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.
Public Property Host | Gets or sets the host where the dbMonitor application is running, 'localhost' by default.
Public Property IsActive | Enables or disables monitoring applications.
Public Property Port | Gets or sets the port of the dbMonitor application to which to connect, 1000 by default.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UseApp | Disables or enables sending database interaction events to dbMonitor application.
Public Property UseIdeOutput | Enables or disables writing log messages to the IDE output window.

See Also

DbMonitor Class | Devart.Common Namespace


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

EventQueueLimit Property

Devart.Common Namespace > DbMonitor Class : EventQueueLimit Property

Gets or sets the maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.

[Visual Basic]
Public Property EventQueueLimit As Integer
[C#]
public int EventQueueLimit {get; set;}

Return Type

The maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.

Remarks

Default value is 1000. Zero means no limit for queue size. If the number of unprocessed events exceeds EventQueueLimit, extra events are discarded.

This property is designed for monitoring applications that generate events at a high rate: if no queue limit is set, storing all unprocessed events may cause memory leaks for such applications.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Host Property

Devart.Common Namespace > DbMonitor Class : Host Property (DbMonitor)

Gets or sets the host where the dbMonitor application is running, 'localhost' by default.

[Visual Basic]
Public Property Host As String
[C#]
public string Host {get; set;}

Return Type

The host where the dbMonitor application is running, 'localhost' by default.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsActive Property

Devart.Common Namespace > DbMonitor Class : IsActive Property (DbMonitor)

Enables or disables monitoring applications.

[Visual Basic]
Public MustOverride Property IsActive As Boolean
[C#]
public abstract bool IsActive {get; set;}

Return Type

true if monitoring the application is enabled; otherwise, false.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Port Property

Devart.Common Namespace > DbMonitor Class : Port Property (DbMonitor)

Gets or sets the port of the dbMonitor application to which to connect, 1000 by default.

[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}

Return Type

Port of the dbMonitor application to which to connect, 1000 by default.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UseApp Property

Devart.Common Namespace > DbMonitor Class : UseApp Property

Disables or enables sending database interaction events to dbMonitor application.

[Visual Basic]
Public Property UseApp As Boolean
[C#]
public bool UseApp {get; set;}

Return Type

true if sending database interaction events to dbMonitor application is enabled; otherwise, false.

Remarks

If you don't use dbMonitor application, set this property to false to avoid spending resources to send database interaction events.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

UseIdeOutput Property

Devart.Common Namespace > DbMonitor Class : UseIdeOutput Property

Enables or disables writing log messages to the IDE output window.

[Visual Basic]
Public Property UseIdeOutput As Boolean
[C#]
public bool UseIdeOutput {get; set;}

Return Type

If true, the DbMonitor object writes its information to the Output window (Visual Studio) or Messages window (Delphi).

Remarks

This property is applicable when you debug your projects.

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%% $$Events$$

DbMonitor Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbMonitor Class Events

Devart.Common Namespace : DbMonitor Class

For a list of all members of this type, see DbMonitor members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event TraceEvent | Occurs when DbMonitor object signals about some database activity.

See Also

DbMonitor Class | Devart.Common Namespace


%%PageItemTitle%%

DbMonitor Class | DbMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TraceEvent Event

Devart.Common Namespace > DbMonitor Class : TraceEvent Event

Occurs when DbMonitor object signals about some database activity.

[Visual Basic]
Public Event TraceEvent() As MonitorEventHandler
[C#]
public event MonitorEventHandler TraceEvent();

Event Data

The event handler receives an argument of type MonitorEventArgs containing data related to this event. The following MonitorEventArgs properties provide information specific to this event.

Property | Description
CallStack | Gets the call stack of the monitor event.
Description | Gets the description of a DbMonitor event.
Duration | The time between the start and the end of the event.
EventType | Gets DbMonitor event type.
ExtraInfo | Gets the additional information for a DbMonitor event.
TracePoint | Determines whether DbMonitor.TraceEvent event occurs before or after the operation takes place.

Example

The following sample shows how to enable and disable monitoring of database activity in your application.

[C#]

static void OnEvent(object sender, MonitorEventArgs e)
{
  if (e.TracePoint==MonitorTracePoint.BeforeEvent)
  {
    Console.WriteLine("Description: " + e.Description);
    Console.WriteLine(" Extra info: " + e.ExtraInfo);
  }
}

[MTAThread]
static void Main(string[] args)
{
  PgSqlConnection pgConn = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  PgSqlMonitor pgMonitor = new PgSqlMonitor();
  pgMonitor.TraceEvent += new MonitorEventHandler(OnEvent);
  pgMonitor.IsActive = true;
  PgSqlCommand pgCommand = new PgSqlCommand("select count(*) from Dept",pgConn);
  pgConn.Open();
  Console.WriteLine(pgCommand.ExecuteScalar());
  pgConn.Close();
  pgMonitor.TraceEvent -= new MonitorEventHandler(OnEvent);
  Console.ReadLine();
}

[Visual Basic]

Sub OnEvent(ByVal sender As Object, ByVal e As MonitorEventArgs)
  If e.TracePoint = MonitorTracePoint.BeforeEvent Then
    Console.WriteLine("Description: " & e.Description)
    Console.WriteLine(" Extra info: " & e.ExtraInfo)
  End If
End Sub

<MTAThread()> _
Sub Main()
  Dim pgConn As PgSqlConnection = New PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  Dim pgMonitor As PgSqlMonitor = New PgSqlMonitor
  AddHandler pgMonitor.TraceEvent, AddressOf OnEvent
  pgMonitor.IsActive = True
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("select count(*) from Dept", pgConn)
  pgConn.Open()
  Console.WriteLine(pgCommand.ExecuteScalar())
  pgConn.Close()
  RemoveHandler pgMonitor.TraceEvent, AddressOf OnEvent
  Console.ReadLine()
End Sub

See Also

DbMonitor Class | DbMonitor Members


%%PageItemTitle%%

DbParameterBase Members | Devart.Common Namespace | DbParameter

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbParameterBase Class

Devart.Common Namespace : DbParameterBase Class

Represents a parameter to a DbCommand, and optionally, its mapping to DataSet columns.

For a list of all members of this type, see DbParameterBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameter
Devart.Common.DbParameterBase
Devart.Data.PostgreSql.PgSqlParameter

Syntax

[Visual Basic]
Public MustInherit Class DbParameterBase
   Inherits DbParameter
   Implements IDataParameter, IDbDataParameter
[C#]
public abstract class DbParameterBase : DbParameter, IDataParameter, IDbDataParameter

Remarks

Abstract DbParameterBase class implements some of DbParameter functionality that is data source-independent.

See Also

DbParameterBase Members | Devart.Common Namespace | DbParameter


%%PageItemTitle%% $$Members$$

DbParameterBase Class | Devart.Common Namespace | DbParameter

See Also Devart.Data Send comments on this topic.

DbParameterBase Class Members

Devart.Common Namespace : DbParameterBase Class

DbParameterBase overview

Public Properties

Public Property DbType (Inherited from System.Data.Common.DbParameter) | Gets or sets the DbType of the parameter.
Public Property Direction | Overridden. Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.
Public Property IsNullable | Overridden. Gets or sets a value indicating whether the parameter accepts null values.
Public Property ParameterName | Overridden. Gets or sets the name of the DbParameterBase.
Public Property Size | Overridden. Gets or sets the maximum size, in bytes, of the data within the column.
Public Property SourceColumn | Overridden. Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value. For internal use.
Public Property SourceColumnNullMapping | Overridden. Sets or gets a value which indicates whether the source column is nullable.
Public Property SourceVersion | Overridden. Gets or sets the DataRowVersion to use when loading Value.
Public Property Value | Overridden. Gets or sets the value of the parameter.

Public Methods

Public Method CopyTo | Copies all properties of a DbParameterBase object to another DbParameterBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ResetDbType (Inherited from System.Data.Common.DbParameter) | Resets the DbType property to its original settings.
Public Method ToString | Overridden. Gets the name of the DbParameterBase.

See Also

DbParameterBase Class | Devart.Common Namespace | DbParameter


%%PageItemTitle%% $$Properties$$

DbParameterBase Class | Devart.Common Namespace | DbParameter

See Also Devart.Data Send comments on this topic.

DbParameterBase Class Properties

Devart.Common Namespace : DbParameterBase Class

For a list of all members of this type, see DbParameterBase members.

Public Properties

Public Property DbType (Inherited from System.Data.Common.DbParameter) | Gets or sets the DbType of the parameter.
Public Property Direction | Overridden. Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.
Public Property IsNullable | Overridden. Gets or sets a value indicating whether the parameter accepts null values.
Public Property ParameterName | Overridden. Gets or sets the name of the DbParameterBase.
Public Property Size | Overridden. Gets or sets the maximum size, in bytes, of the data within the column.
Public Property SourceColumn | Overridden. Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value. For internal use.
Public Property SourceColumnNullMapping | Overridden. Sets or gets a value which indicates whether the source column is nullable.
Public Property SourceVersion | Overridden. Gets or sets the DataRowVersion to use when loading Value.
Public Property Value | Overridden. Gets or sets the value of the parameter.

See Also

DbParameterBase Class | Devart.Common Namespace | DbParameter


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Direction Property

Devart.Common Namespace > DbParameterBase Class : Direction Property (DbParameterBase)

Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.

[Visual Basic]
Overrides Public Property Direction As ParameterDirection
[C#]
public override ParameterDirection Direction {get; set;}

Return Type

One of the ParameterDirection values. The default value is Input.

Remarks

If the ParameterDirection is Output, and execution of the associated DbCommand does not return a value, the DbParameterBase will contain a null value. Null values are handled using the DBNull class.

After the last row from the last result set is read, the Output, InputOut, and ReturnValue parameters are updated.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsNullable Property

Devart.Common Namespace > DbParameterBase Class : IsNullable Property

Gets or sets a value indicating whether the parameter accepts null values.

[Visual Basic]
Overrides Public Property IsNullable As Boolean
[C#]
public override bool IsNullable {get; set;}

Return Type

true if null values are accepted; otherwise, false. The default value is false.

Remarks

Null values are handled using the DBNull class.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParameterName Property

Devart.Common Namespace > DbParameterBase Class : ParameterName Property (DbParameterBase)

Gets or sets the name of the DbParameterBase.

[Visual Basic]
Overrides Public Property ParameterName As String
[C#]
public override string ParameterName {get; set;}

Return Type

The name of the DbParameterBase. The default value is an empty string ("").

Remarks

You must set ParameterName before executing a DbCommandBase that relies on parameters.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Size Property

Devart.Common Namespace > DbParameterBase Class : Size Property (DbParameterBase)

Gets or sets the maximum size, in bytes, of the data within the column.

[Visual Basic]
Overrides Public Property Size As Integer
[C#]
public override int Size {get; set;}

Return Type

The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.

Remarks

The Size property is used for binary and string types.

For variable-length data types, the Size property describes the maximum amount of data to transmit to the server. For example, for a string value, the Size property could be used to limit the amount of data sent to the server to the first one hundred bytes.

For nonstring data types and ANSI string data, the Size property refers to the number of bytes. For Unicode string data, the Size property refers to the number of characters. The count for strings does not include the terminating character.

If not explicitly set, the value of Size is inferred from the actual size of the specified parameter value.

For fixed-width data types, the value of Size is ignored. It can be retrieved for informational purposes, and returns the maximum amount of bytes the provider uses when transmitting the value of the parameter to the server.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SourceColumn Property

Devart.Common Namespace > DbParameterBase Class : SourceColumn Property

Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Value. For internal use.

[Visual Basic]
Overrides Public Property SourceColumn As String
[C#]
public override string SourceColumn {get; set;}

Return Type

The name of the source column that will be used to set the value of this parameter. The default value is an empty string ("").

Remarks

When SourceColumn property is set to anything other than an empty string, the value of the parameter is retrieved from the column with the SourceColumn name. If Direction is set to Input, the value is taken from the DataSet. If Direction is set to Output, the value is taken from the data source. A Direction of InputOutput is a combination of both.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SourceColumnNullMapping Property

Devart.Common Namespace > DbParameterBase Class : SourceColumnNullMapping Property

Sets or gets a value which indicates whether the source column is nullable.

[Visual Basic]
Overrides Public Property SourceColumnNullMapping As Boolean
[C#]
public override bool SourceColumnNullMapping {get; set;}

Return Type

true if source column is nullable; otherwise, false. The default value is false.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SourceVersion Property

Devart.Common Namespace > DbParameterBase Class : SourceVersion Property

Gets or sets the DataRowVersion to use when loading Value.

[Visual Basic]
Overrides Public Property SourceVersion As DataRowVersion
[C#]
public override DataRowVersion SourceVersion {get; set;}

Return Type

One of the DataRowVersion values. The default value is Current.

Remarks

The SourceVersion is used by DbDataAdapter.UpdateCommand during an Update operation to determine whether the parameter value is set to Current or Original. This allows primary keys to be updated. This property is ignored by DbDataAdapter.InsertCommand and DbDataAdapter.DeleteCommand.

This property is set to the version of the DataRow used by either the Item property (DataRow indexer), or the GetChildRows method of the DataRow object.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Value Property

Devart.Common Namespace > DbParameterBase Class : Value Property (DbParameterBase)

Gets or sets the value of the parameter.

[Visual Basic]
Overrides Public Property Value As Object
[C#]
public override object Value {get; set;}

Return Type

An Object that is the value of the parameter. The default value is null.

Remarks

For input parameters, the value is bound to the DbCommand that is sent to the server. For output and return-value parameters, the value is set on completion of the DbCommand and after the DbDataReader is closed.

When sending a null parameter value to the server, the user must specify DBNull, not null. A null value in the system is an empty object that has no value. DBNull is used to represent null values.

If the application specifies the data type, the bound value is converted to that type when the provider sends the data to the server. The provider attempts to convert any type of value if it supports the IConvertible interface. Conversion errors may result if the specified type is not compatible with the value.

The DbType property can be inferred by setting Value. If applicable, the size, precision, and scale will also be inferred from Value.

The Value property is overwritten by the Update method.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%% $$Methods$$

DbParameterBase Class | Devart.Common Namespace | DbParameter

See Also Devart.Data Send comments on this topic.

DbParameterBase Class Methods

Devart.Common Namespace : DbParameterBase Class

For a list of all members of this type, see DbParameterBase members.

Public Methods

Public Method CopyTo | Copies all properties of a DbParameterBase object to another DbParameterBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ResetDbType (Inherited from System.Data.Common.DbParameter) | Resets the DbType property to its original settings.
Public Method ToString | Overridden. Gets the name of the DbParameterBase.

See Also

DbParameterBase Class | Devart.Common Namespace | DbParameter


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

destination
The DbParameter object to copy properties to.
See Also Languages Devart.Data Send comments on this topic.

CopyTo Method

Devart.Common Namespace > DbParameterBase Class : CopyTo Method (DbParameterBase)

Copies all properties of a DbParameterBase object to another DbParameterBase object.

[Visual Basic]
Public Sub CopyTo( _
   ByVal destination As DbParameter _
)
[C#]
public void CopyTo(
   DbParameter destination
);

Parameters

destination
The DbParameter object to copy properties to.

Remarks

This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBase Class | DbParameterBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ToString Method

Devart.Common Namespace > DbParameterBase Class : ToString Method (DbParameterBase)

Gets the name of the DbParameterBase.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

The name of the DbParameterBase.

See Also

DbParameterBase Class | DbParameterBase Members


%%PageItemTitle%%

DbParameterBaseCollection Members | Devart.Common Namespace | DbParameterCollection

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbParameterBaseCollection Class

Devart.Common Namespace : DbParameterBaseCollection Class

Collects all parameters relevant to a DbCommand as well as their respective mappings to DataSet columns.

For a list of all members of this type, see DbParameterBaseCollection members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
Devart.Common.DbParameterBaseCollection
Devart.Data.PostgreSql.PgSqlParameterCollection

Syntax

[Visual Basic]
Public MustInherit Class DbParameterBaseCollection
   Inherits DbParameterCollection
   Implements ICollection, IEnumerable, IList, IDataParameterCollection
[C#]
public abstract class DbParameterBaseCollection : DbParameterCollection, ICollection, IEnumerable, IList, IDataParameterCollection

Remarks

Abstract DbParameterBaseCollection class implements some of DbParameterCollection functionality that is DBMS-independent.

See Also

DbParameterBaseCollection Members | Devart.Common Namespace | DbParameterCollection


%%PageItemTitle%% $$Members$$

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection

See Also Devart.Data Send comments on this topic.

DbParameterBaseCollection Class Members

Devart.Common Namespace : DbParameterBaseCollection Class

DbParameterBaseCollection overview

Public Properties

Public Property Count | Overridden. Gets the number of DbParameterBase objects in the collection.
Public Property IsFixedSize | Overridden. Indicating whether the collection has a fixed size.
Public Property IsReadOnly | Overridden. Indicates whether the collection is read-only.
Public Property IsSynchronized | Overridden. Indicates whether access to the collection is synchronized (thread-safe).
Public Property Item (Inherited from System.Data.Common.DbParameterCollection) | Overloaded. Gets and sets the DbParameter at the specified index.
Public Property SyncRoot | Overridden. Gets an object that can be used to synchronize access to the DbParameterBaseCollection.

Public Methods

Public Method AddRange | Overridden. Adds the specified array of DbParameterBase objects to the DbParameterBaseCollection.
Public Method Clear | Overridden. Removes all items from the collection.
Public Method Contains | Overloaded. Overridden. Gets a value indicating whether a DbParameterBase object exists in the collection.
Public Method CopyTo | Overridden. Copies a DbParameterBase objects from the DbParameterBaseCollection to the specified array.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetEnumerator | Overridden. Returns an enumerator for the DbParameterBaseCollection.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method IndexOf | Overloaded. Overridden. Gets the location in the collection of the DbParameterBase objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert | Overridden. Inserts a DbParameterBase into the collection at the specified index.
Public Method Remove | Overridden. Removes the specified DbParameterBase from the collection.
Public Method RemoveAt | Overloaded. Overridden. Removes the specified DbParameterBase from the collection.

See Also

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection


%%PageItemTitle%% $$Properties$$

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection

See Also Devart.Data Send comments on this topic.

DbParameterBaseCollection Class Properties

Devart.Common Namespace : DbParameterBaseCollection Class

For a list of all members of this type, see DbParameterBaseCollection members.

Public Properties

Public Property Count | Overridden. Gets the number of DbParameterBase objects in the collection.
Public Property IsFixedSize | Overridden. Indicating whether the collection has a fixed size.
Public Property IsReadOnly | Overridden. Indicates whether the collection is read-only.
Public Property IsSynchronized | Overridden. Indicates whether access to the collection is synchronized (thread-safe).
Public Property Item (Inherited from System.Data.Common.DbParameterCollection) | Overloaded. Gets and sets the DbParameter at the specified index.
Public Property SyncRoot | Overridden. Gets an object that can be used to synchronize access to the DbParameterBaseCollection.

See Also

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Count Property

Devart.Common Namespace > DbParameterBaseCollection Class : Count Property (DbParameterBaseCollection)

Gets the number of DbParameterBase objects in the collection.

[Visual Basic]
Overrides Public ReadOnly Property Count As Integer
[C#]
public override int Count {get;}

Return Type

The number of DbParameterBase objects in the collection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsFixedSize Property

Devart.Common Namespace > DbParameterBaseCollection Class : IsFixedSize Property (DbParameterBaseCollection)

Indicating whether the collection has a fixed size.

[Visual Basic]
Overrides Public ReadOnly Property IsFixedSize As Boolean
[C#]
public override bool IsFixedSize {get;}

Return Type

true if the collection has a fixed size; otherwise, false.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsReadOnly Property

Devart.Common Namespace > DbParameterBaseCollection Class : IsReadOnly Property

Indicates whether the collection is read-only.

[Visual Basic]
Overrides Public ReadOnly Property IsReadOnly As Boolean
[C#]
public override bool IsReadOnly {get;}

Return Type

true if the collection is read-only; otherwise, false.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsSynchronized Property

Devart.Common Namespace > DbParameterBaseCollection Class : IsSynchronized Property

Indicates whether access to the collection is synchronized (thread-safe).

[Visual Basic]
Overrides Public ReadOnly Property IsSynchronized As Boolean
[C#]
public override bool IsSynchronized {get;}

Return Type

true if access to the collection is synchronized (thread-safe); otherwise, false.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SyncRoot Property

Devart.Common Namespace > DbParameterBaseCollection Class : SyncRoot Property (DbParameterBaseCollection)

Gets an object that can be used to synchronize access to the DbParameterBaseCollection.

[Visual Basic]
Overrides Public ReadOnly Property SyncRoot As Object
[C#]
public override object SyncRoot {get;}

Return Type

An object that can be used to synchronize access to the DbParameterBaseCollection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%% $$Methods$$

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection

See Also Devart.Data Send comments on this topic.

DbParameterBaseCollection Class Methods

Devart.Common Namespace : DbParameterBaseCollection Class

For a list of all members of this type, see DbParameterBaseCollection members.

Public Methods

Public Method AddRange | Overridden. Adds the specified array of DbParameterBase objects to the DbParameterBaseCollection.
Public Method Clear | Overridden. Removes all items from the collection.
Public Method Contains | Overloaded. Overridden. Gets a value indicating whether a DbParameterBase object exists in the collection.
Public Method CopyTo | Overridden. Copies a DbParameterBase objects from the DbParameterBaseCollection to the specified array.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetEnumerator | Overridden. Returns an enumerator for the DbParameterBaseCollection.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method IndexOf | Overloaded. Overridden. Gets the location in the collection of the DbParameterBase objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert | Overridden. Inserts a DbParameterBase into the collection at the specified index.
Public Method Remove | Overridden. Removes the specified DbParameterBase from the collection.
Public Method RemoveAt | Overloaded. Overridden. Removes the specified DbParameterBase from the collection.

See Also

DbParameterBaseCollection Class | Devart.Common Namespace | DbParameterCollection


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

values
Array of DbParameterBase objects to be added to the DbParameterBaseCollection.
See Also Languages Devart.Data Send comments on this topic.

AddRange Method

Devart.Common Namespace > DbParameterBaseCollection Class : AddRange Method (DbParameterBaseCollection)

Adds the specified array of DbParameterBase objects to the DbParameterBaseCollection.

[Visual Basic]
Overrides Public Sub AddRange( _
   ByVal values As Array _
)
[C#]
public override void AddRange(
   Array values
);

Parameters

values
Array of DbParameterBase objects to be added to the DbParameterBaseCollection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Clear Method

Devart.Common Namespace > DbParameterBaseCollection Class : Clear Method (DbParameterBaseCollection)

Removes all items from the collection.

[Visual Basic]
Overrides Public Sub Clear()
[C#]
public override void Clear();

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Contains Method

Devart.Common Namespace > DbParameterBaseCollection Class : Contains Method (DbParameterBaseCollection)

Gets a value indicating whether a DbParameterBase object exists in the collection.

Overload List

Gets a value indicating whether a DbParameterBase object exists in the collection.

[Visual Basic] Overloads Overrides Public Function Contains(Object) As Boolean

[C#] public override bool Contains(object);

Gets a value indicating whether a DbParameterBase object with the specified parameter name exists in the collection.

[Visual Basic] Overloads Overrides Public Function Contains(String) As Boolean

[C#] public override bool Contains(string);

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The value of the DbParameterBase object to find.
See Also Languages Devart.Data Send comments on this topic.

Contains(Object) Method

Devart.Common Namespace > DbParameterBaseCollection Class > Contains Method : Contains(Object) Method

Gets a value indicating whether a DbParameterBase object exists in the collection.

[Visual Basic]
Overloads Overrides Public Function Contains( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Contains(
   object value
);

Parameters

value
The value of the DbParameterBase object to find.

Return Type

true if the collection contains the DbParameterBase; otherwise, false.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The name of the DbParameterBase object to find.
See Also Languages Devart.Data Send comments on this topic.

Contains(String) Method

Devart.Common Namespace > DbParameterBaseCollection Class > Contains Method : Contains(String) Method

Gets a value indicating whether a DbParameterBase object with the specified parameter name exists in the collection.

[Visual Basic]
Overloads Overrides Public Function Contains( _
   ByVal value As String _
) As Boolean
[C#]
public override bool Contains(
   string value
);

Parameters

value
The name of the DbParameterBase object to find.

Return Type

true if the collection contains the DbParameterBase; otherwise, false.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

array
The array into which to copy the DbParameterBase objects.
index
The zero-based index of the array.
See Also Languages Devart.Data Send comments on this topic.

CopyTo Method

Devart.Common Namespace > DbParameterBaseCollection Class : CopyTo Method (DbParameterBaseCollection)

Copies a DbParameterBase objects from the DbParameterBaseCollection to the specified array.

[Visual Basic]
Overrides Public Sub CopyTo( _
   ByVal array As Array, _
   ByVal index As Integer _
)
[C#]
public override void CopyTo(
   Array array,
   int index
);

Parameters

array
The array into which to copy the DbParameterBase objects.
index
The zero-based index of the array.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

GetEnumerator Method

Devart.Common Namespace > DbParameterBaseCollection Class : GetEnumerator Method (DbParameterBaseCollection)

Returns an enumerator for the DbParameterBaseCollection.

[Visual Basic]
Overrides Public Function GetEnumerator() As IEnumerator
[C#]
public override IEnumerator GetEnumerator();

Return Type

An enumerator for the DbParameterBaseCollection.

Remarks

Enumerators allow only reading the data in the collection and cannot be used to modify it.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IndexOf Method

Devart.Common Namespace > DbParameterBaseCollection Class : IndexOf Method (DbParameterBaseCollection)

Gets the location in the collection of the DbParameterBase objects.

Overload List

Gets the location in the collection of the DbParameterBase objects.

[Visual Basic] Overloads Overrides Public Function IndexOf(Object) As Integer

[C#] public override int IndexOf(object);

Gets the location in the collection of the DbParameterBase object with a specific parameter name.

[Visual Basic] Overloads Overrides Public Function IndexOf(String) As Integer

[C#] public override int IndexOf(string);

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The DbParameterBase object to find.
See Also Languages Devart.Data Send comments on this topic.

IndexOf(Object) Method

Devart.Common Namespace > DbParameterBaseCollection Class > IndexOf Method : IndexOf(Object) Method

Gets the location in the collection of the DbParameterBase objects.

[Visual Basic]
Overloads Overrides Public Function IndexOf( _
   ByVal value As Object _
) As Integer
[C#]
public override int IndexOf(
   object value
);

Parameters

value
The DbParameterBase object to find.

Return Type

The zero-based location of the DbParameterBase in the collection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter to retrieve.
See Also Languages Devart.Data Send comments on this topic.

IndexOf(String) Method

Devart.Common Namespace > DbParameterBaseCollection Class > IndexOf Method : IndexOf(String) Method

Gets the location in the collection of the DbParameterBase object with a specific parameter name.

[Visual Basic]
Overloads Overrides Public Function IndexOf( _
   ByVal parameterName As String _
) As Integer
[C#]
public override int IndexOf(
   string parameterName
);

Parameters

parameterName
The name of the parameter to retrieve.

Return Type

The zero-based location of the DbParameterBase in the collection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index where the parameter is to be inserted within the collection.
value
The DbParameterBase object to add to the collection.
See Also Languages Devart.Data Send comments on this topic.

Insert Method

Devart.Common Namespace > DbParameterBaseCollection Class : Insert Method (DbParameterBaseCollection)

Inserts a DbParameterBase into the collection at the specified index.

[Visual Basic]
Overrides Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As Object _
)
[C#]
public override void Insert(
   int index,
   object value
);

Parameters

index
The zero-based index where the parameter is to be inserted within the collection.
value
The DbParameterBase object to add to the collection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

value
The DbParameterBase object to remove from the collection.
See Also Languages Devart.Data Send comments on this topic.

Remove Method

Devart.Common Namespace > DbParameterBaseCollection Class : Remove Method (DbParameterBaseCollection)

Removes the specified DbParameterBase from the collection.

[Visual Basic]
Overrides Public Sub Remove( _
   ByVal value As Object _
)
[C#]
public override void Remove(
   object value
);

Parameters

value
The DbParameterBase object to remove from the collection.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RemoveAt Method

Devart.Common Namespace > DbParameterBaseCollection Class : RemoveAt Method (DbParameterBaseCollection)

Removes the specified DbParameterBase from the collection.

Overload List

Removes the DbParameterBase at the specified index from the collection.

[Visual Basic] Overloads Overrides Public Sub RemoveAt(Integer)

[C#] public override void RemoveAt(int);

Removes the DbParameterBase with the specified name from the collection.

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

[C#] public override void RemoveAt(string);

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

index
The zero-based index of the parameter to remove.
See Also Languages Devart.Data Send comments on this topic.

RemoveAt(Int32) Method

Devart.Common Namespace > DbParameterBaseCollection Class > RemoveAt Method : RemoveAt(Int32) Method

Removes the DbParameterBase at the specified index from the collection.

[Visual Basic]
Overloads Overrides Public Sub RemoveAt( _
   ByVal index As Integer _
)
[C#]
public override void RemoveAt(
   int index
);

Parameters

index
The zero-based index of the parameter to remove.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter to remove.
See Also Languages Devart.Data Send comments on this topic.

RemoveAt(String) Method

Devart.Common Namespace > DbParameterBaseCollection Class > RemoveAt Method : RemoveAt(String) Method

Removes the DbParameterBase with the specified name from the collection.

[Visual Basic]
Overloads Overrides Public Sub RemoveAt( _
   ByVal parameterName As String _
)
[C#]
public override void RemoveAt(
   string parameterName
);

Parameters

parameterName
The name of the parameter to remove.

See Also

DbParameterBaseCollection Class | DbParameterBaseCollection Members | Overload List


%%PageItemTitle%%

DbProviderException Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbProviderException Class

Devart.Common Namespace : DbProviderException Class

The base class for all exceptions thrown on data provider side. This does not include data source exceptions.

For a list of all members of this type, see DbProviderException members.

Inheritance Hierarchy

System.Object
System.Exception
Devart.Common.DbProviderException

Syntax

[Visual Basic]
Public Class DbProviderException
   Inherits Exception
   Implements _Exception, ISerializable
[C#]
public class DbProviderException : Exception, _Exception, ISerializable

Remarks

The DbProviderException class is also used as the base class for provider-specific exception class implementations.

See Also

DbProviderException Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbProviderException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbProviderException Class Members

Devart.Common Namespace : DbProviderException Class

DbProviderException overview

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString | Overridden. Gets the exception text.

See Also

DbProviderException Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

DbProviderException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbProviderException Class Methods

Devart.Common Namespace : DbProviderException Class

For a list of all members of this type, see DbProviderException members.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString | Overridden. Gets the exception text.

See Also

DbProviderException Class | Devart.Common Namespace


%%PageItemTitle%%

DbProviderException Class | DbProviderException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ToString Method

Devart.Common Namespace > DbProviderException Class : ToString Method (DbProviderException)

Gets the exception text.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

The exception text.

See Also

DbProviderException Class | DbProviderException Members


%%PageItemTitle%%

DbScript Members | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbScript Class

Devart.Common Namespace : DbScript Class

Serves to execute series of SQL statements separated by special symbols.

For a list of all members of this type, see DbScript members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbScript
Devart.Data.PostgreSql.PgSqlScript

Syntax

[Visual Basic]
Public MustInherit Class DbScript
   Inherits Component
   Implements IComponent, IDisposable
[C#]
public abstract class DbScript : Component, IComponent, IDisposable

Remarks

Use DbScript to consecutively execute several SQL statements stored in ScriptText property. DbScript allows to execute them all at once or one by one. You can use Progress event to monitor execution flow and Error to catch errors.

There are three ways to execute a script:

- using Execute method;

- using ExecuteNext method;

- using SqlStatement.SqlStatement.Execute method.

For more information refer to corresponding method.

Example

This sample demonstrates how to execute script and retrieve information about execution flow using Progress and Error events.

[C#]

[STAThread]
static void Main(string[] args)
{
string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
      PgSqlConnection pgConn = new PgSqlConnection(
          "host=server;database=test;user id=postgres;");
      PgSqlScript pgScript = new PgSqlScript(script,pgConn);
      pgScript.Progress += new Devart.Common.ScriptProgressEventHandler(OnProgress);
      pgScript.Error += new Devart.Common.ScriptErrorEventHandler(OnError);
      pgConn.Open();
      pgScript.Execute();
      pgConn.Close();
    }

static void OnProgress(object sender, Devart.Common.ScriptProgressEventArgs e)
{
  Console.WriteLine(e.Text);
  Console.WriteLine("  Successfully executed.");
}

static void OnError(object sender, Devart.Common.ScriptErrorEventArgs e)
{
  e.Ignore = true;
  Console.WriteLine(e.Text);
  Console.WriteLine("  Failed.");
}

[Visual Basic]

Module Module1

  Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript

  Sub Main()
    Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
  "SELECT * FROM DEPT"
    Dim pgConn As PgSqlConnection = New PgSqlConnection( _
        "host=server;database=test;user id=postgres;")
    pgScript = New PgSqlScript(script, pgConn)
    pgConn.Open()
    pgScript.Execute()
    pgConn.Close()
    Console.ReadLine()
  End Sub

  Sub OnProgress(ByVal sender As Object, ByVal e As Devart.Common.ScriptProgressEventArgs) Handles pgScript.Progress
    Console.WriteLine(e.Text)
    Console.WriteLine(" Successfully executed.")
  End Sub

  Sub OnError(ByVal sender As Object, ByVal e As Devart.Common.ScriptErrorEventArgs) Handles pgScript.Error
    e.Ignore = True
    Console.WriteLine(e.Text)
    Console.WriteLine(" Failed.")
  End Sub

End Module

See Also

DbScript Members | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class


%%PageItemTitle%% $$Members$$

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

DbScript Class Members

Devart.Common Namespace : DbScript Class

DbScript overview

Public Properties

Public Property CommandTimeout | Gets or sets the wait time before terminating an attempt to execute a script and generating an error.
Public Property Connection | Gets or sets the IDbConnection used by this instance of the DbScript.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Name | Gets or sets the name of component that will be displayed in dbMonitor application.
Public Property ScriptText | Gets or sets script text.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Statements | Gets the collection of statements that make up the script.

Public Methods

Public Method Cancel | Tries to cancel the execution of a DbScript descendant.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Execute | Executes the script specified in ScriptText property.
Public Method ExecuteNext | Executes the next statement from the script.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overloaded. Prepares a stream to be executed as SQL script.
Public Method Reset | Positions ExecuteNext method on the first statement in the script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when a SQL statement within script has produced an error.
Public Event Progress | Occurs when a SQL statement within script has successfully executed.

See Also

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class


%%PageItemTitle%% $$Properties$$

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

DbScript Class Properties

Devart.Common Namespace : DbScript Class

For a list of all members of this type, see DbScript members.

Public Properties

Public Property CommandTimeout | Gets or sets the wait time before terminating an attempt to execute a script and generating an error.
Public Property Connection | Gets or sets the IDbConnection used by this instance of the DbScript.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Name | Gets or sets the name of component that will be displayed in dbMonitor application.
Public Property ScriptText | Gets or sets script text.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Statements | Gets the collection of statements that make up the script.

See Also

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CommandTimeout Property

Devart.Common Namespace > DbScript Class : CommandTimeout Property (DbScript)

Gets or sets the wait time before terminating an attempt to execute a script and generating an error.

[Visual Basic]
Public Property CommandTimeout As Integer
[C#]
public int CommandTimeout {get; set;}

Return Type

The time to wait while server responds when executing the command. The default value is 30 seconds.

Remarks

This property does not set the timeout for command execution, only the period of time for which to wait for response. I.e., if intervals between server responses are less than CommandTimeout, there is no time limit for command execution.

Zero value specifies that the wait time is unlimited.

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Connection Property

Devart.Common Namespace > DbScript Class : Connection Property (DbScript)

Gets or sets the IDbConnection used by this instance of the DbScript.

[Visual Basic]
Public Property Connection As IDbConnection
[C#]
public IDbConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Name Property

Devart.Common Namespace > DbScript Class : Name Property (DbScript)

Gets or sets the name of component that will be displayed in dbMonitor application.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the component.

Remarks

This property value assigned automatically with the name of the component at design-time. If the component was created at run-time and property value was not set then the component will be displayed in dbMonitor application with object type name followed by unique number in parentheses.

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ScriptText Property

Devart.Common Namespace > DbScript Class : ScriptText Property (DbScript)

Gets or sets script text.

[Visual Basic]
Public Overridable Property ScriptText As String
[C#]
public virtual string ScriptText {get; set;}

Return Type

The text of the script. The default value is an empty string ("").

Remarks

When you assign value to ScriptText the following actions take place. First, if Statements property had been used before to obtain a SqlStatementCollection object, this collection gets cleared and no SqlStatement objects associated with obsolete script can be used. Second, DbScript positions itself on the first statement in the script, thus next invocation of ExecuteNext method will execute the first SQL statement regardless of whether it had been called before.

Note that large scripts a better handled with Open method.

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members | SqlStatementCollection Class | ScriptText Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Statements Property

Devart.Common Namespace > DbScript Class : Statements Property

Gets the collection of statements that make up the script.

[Visual Basic]
Public ReadOnly Property Statements As SqlStatementCollection
[C#]
public SqlStatementCollection Statements {get;}

Return Type

Collection of statements.

Remarks

Use Statements to obtain SqlStatementCollection which allows to access individual statements of the script and execute them manually. The collection is read-only so you can not modify it in any way. It is also bound to originating DbScript object, which means that if you have altered ScriptText, previously obtained collection will be cleared.

Example

This sample shows how to retrieve collection of statements that make up the script and execute them one by one.

[C#]

string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
PgSqlConnection pgConn = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
PgSqlScript pgScript = new PgSqlScript(script,pgConn);
SqlStatementCollection pgColl = pgScript.Statements;
IDataReader pgReader;
pgConn.Open();
foreach (SqlStatement pgStatement in pgColl)
{
  Console.WriteLine(pgStatement.Text);
  try
  {
    pgReader = pgStatement.Execute();
    Console.WriteLine("  Records affected " + pgReader.RecordsAffected);
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetString(0));
    }
    pgReader.Close();
    Console.WriteLine();
  }
  catch
  {
    Console.WriteLine("  Failed");
  }
}
pgConn.Close();

[Visual Basic]

Dim script As String = _
  "DROP TABLE DEPT;" + _
  "CREATE TABLE DEPT (" + _
  " DEPTNO INT PRIMARY KEY," + _
  " DNAME VARCHAR(14)," + _
  " LOC VARCHAR(13)" + _
  ")WITH OIDS;" + _
    "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" + _
    "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" + _
    "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" + _
    "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" + _
    "SELECT * FROM DEPT"
Dim pgConn As PgSqlConnection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
Dim pgScript As PgSqlScript = New PgSqlScript(script, pgConn)
Dim pgColl As SqlStatementCollection = pgScript.Statements
Dim pgReader As IDataReader
pgConn.Open()
For Each pgStatement As SqlStatement In pgColl
  Console.WriteLine(pgStatement.Text)
  Try
    pgReader = pgStatement.Execute()
    Console.WriteLine(" Records affected " & pgReader.RecordsAffected)
    While pgReader.Read()
      Console.WriteLine(pgReader.GetString(0))
    End While
    pgReader.Close()
    Console.WriteLine()
  Catch ex As Exception
    Console.WriteLine(" Failed")
  End Try
Next pgStatement
pgConn.Close()

See Also

DbScript Class | DbScript Members | SqlStatementCollection Class | ScriptText Property


%%PageItemTitle%% $$Methods$$

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

DbScript Class Methods

Devart.Common Namespace : DbScript Class

For a list of all members of this type, see DbScript members.

Public Methods

Public Method Cancel | Tries to cancel the execution of a DbScript descendant.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Execute | Executes the script specified in ScriptText property.
Public Method ExecuteNext | Executes the next statement from the script.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overloaded. Prepares a stream to be executed as SQL script.
Public Method Reset | Positions ExecuteNext method on the first statement in the script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Cancel Method

Devart.Common Namespace > DbScript Class : Cancel Method (DbScript)

Tries to cancel the execution of a DbScript descendant.

[Visual Basic]
Public Overridable Sub Cancel()
[C#]
public virtual void Cancel();

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members | ScriptText Property | ExecuteNext Method | Progress Event | Error Event

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Execute Method

Devart.Common Namespace > DbScript Class : Execute Method (DbScript)

Executes the script specified in ScriptText property.

[Visual Basic]
Public Sub Execute()
[C#]
public void Execute();

Remarks

Use Execute method to execute the script. Text of the script should be specified by ScriptText property.

After execution of each individual statement the Progress event fires. If the statement has produced an error, event Error fires.

Example

This sample demonstrates how to execute script and retrieve information about execution flow using Progress and Error events.

[C#]

[STAThread]
static void Main(string[] args)
{
string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
      PgSqlConnection pgConn = new PgSqlConnection(
          "host=server;database=test;user id=postgres;");
      PgSqlScript pgScript = new PgSqlScript(script,pgConn);
      pgScript.Progress += new Devart.Common.ScriptProgressEventHandler(OnProgress);
      pgScript.Error += new Devart.Common.ScriptErrorEventHandler(OnError);
      pgConn.Open();
      pgScript.Execute();
      pgConn.Close();
    }

static void OnProgress(object sender, Devart.Common.ScriptProgressEventArgs e)
{
  Console.WriteLine(e.Text);
  Console.WriteLine("  Successfully executed.");
}

static void OnError(object sender, Devart.Common.ScriptErrorEventArgs e)
{
  e.Ignore = true;
  Console.WriteLine(e.Text);
  Console.WriteLine("  Failed.");
}

[Visual Basic]

Module Module1

  Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript

  Sub Main()
    Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
  "SELECT * FROM DEPT"
    Dim pgConn As PgSqlConnection = New PgSqlConnection( _
        "host=server;database=test;user id=postgres;")
    pgScript = New PgSqlScript(script, pgConn)
    pgConn.Open()
    pgScript.Execute()
    pgConn.Close()
    Console.ReadLine()
  End Sub

  Sub OnProgress(ByVal sender As Object, ByVal e As Devart.Common.ScriptProgressEventArgs) Handles pgScript.Progress
    Console.WriteLine(e.Text)
    Console.WriteLine(" Successfully executed.")
  End Sub

  Sub OnError(ByVal sender As Object, ByVal e As Devart.Common.ScriptErrorEventArgs) Handles pgScript.Error
    e.Ignore = True
    Console.WriteLine(e.Text)
    Console.WriteLine(" Failed.")
  End Sub

End Module

See Also

DbScript Class | DbScript Members | ScriptText Property | ExecuteNext Method | Progress Event | Error Event


%%PageItemTitle%%

DbScript Class | DbScript Members | ScriptText Property | Execute Method | Progress Event | Error Event

Language

Visual Basic

C#

Show All

reader
DbDataReader to store result set.
See Also Languages Devart.Data Send comments on this topic.

ExecuteNext Method

Devart.Common Namespace > DbScript Class : ExecuteNext Method

Executes the next statement from the script.

[Visual Basic]
Public Function ExecuteNext( _
   ByRef reader As IDataReader _
) As Boolean
[C#]
public bool ExecuteNext(
   out IDataReader reader
);

Parameters

reader
DbDataReader to store result set.

Return Type

true if there are more statements to execute; otherwise, false.

Remarks

Use ExecuteNext method to execute the statements from the script one by one. Text of the script should be specified by ScriptText property.

After the method has executed the Progress event fires where you can obtain statement text and process query results. If the statement has produced an error, event Error fires.

To restart execution from the beginning of the script call Reset method. When ScriptText property is modified DbScript automatically positions on the first statement.

Example

This sample demonstrates how to execute script and retrieve information about how many records were affected by a statement. For statements that return a result set the first column is written to console.

[C#]

string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
PgSqlConnection pgConn = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
PgSqlScript pgScript = new PgSqlScript(script,pgConn);
IDataReader pgReader;
pgConn.Open();
while (pgScript.ExecuteNext(out pgReader))
{
  Console.WriteLine("Records affected " + pgReader.RecordsAffected);
  while (pgReader.Read())
  {
    Console.WriteLine(pgReader.GetString(0));
  }
  pgReader.Close();
}
pgConn.Close();

[Visual Basic]

Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
  "SELECT * FROM DEPT"
Dim pgConn As PgSqlConnection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
Dim pgScript As PgSqlScript = New PgSqlScript(script, pgConn)
Dim pgReader As IDataReader
pgConn.Open()
While (pgScript.ExecuteNext(pgReader))
  Console.WriteLine("Records affected " & pgReader.RecordsAffected)
  While pgReader.Read()
    Console.WriteLine(pgReader.GetString(0))
  End While
  pgReader.Close()
End While
pgConn.Close()

See Also

DbScript Class | DbScript Members | ScriptText Property | Execute Method | Progress Event | Error Event


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Open Method

Devart.Common Namespace > DbScript Class : Open Method (DbScript)

Prepares a stream to be executed as SQL script.

Overload List

Prepares a stream to be executed as SQL script.

[Visual Basic] Overloads Public Sub Open(Stream)

[C#] public void Open(Stream);

Prepares a file stream to be executed as SQL script.

[Visual Basic] Overloads Public Sub Open(String)

[C#] public void Open(string);

Prepares a StreamReader to be executed as SQL script.

[Visual Basic] Overloads Public Sub Open(TextReader)

[C#] public void Open(TextReader);

See Also

DbScript Class | DbScript Members


%%PageItemTitle%%

DbScript Class | DbScript Members | Overload List

Language

Visual Basic

C#

Show All

stream
Stream to read SQL statements from.
See Also Languages Devart.Data Send comments on this topic.

Open(Stream) Method

Devart.Common Namespace > DbScript Class > Open Method : Open(Stream) Method

Prepares a stream to be executed as SQL script.

[Visual Basic]
Overloads Public Sub Open( _
   ByVal stream As Stream _
)
[C#]
public void Open(
   Stream stream
);

Parameters

stream
Stream to read SQL statements from.

Remarks

Call to this method makes consequent invocation of Execute read SQL script from specified stream.

This Open method, as well as its overloads, does not load the text into memory or populate the Statements collection. So it is much more efficient to use Open methods from performance and memory consumption points of view.

Open does not change current position in the stream.

See Also

DbScript Class | DbScript Members | Overload List


%%PageItemTitle%%

DbScript Class | DbScript Members | Overload List

Language

Visual Basic

C#

Show All

fileName
Name of file to open.
See Also Languages Devart.Data Send comments on this topic.

Open(String) Method

Devart.Common Namespace > DbScript Class > Open Method : Open(String) Method

Prepares a file stream to be executed as SQL script.

[Visual Basic]
Overloads Public Sub Open( _
   ByVal fileName As String _
)
[C#]
public void Open(
   string fileName
);

Parameters

fileName
Name of file to open.

Remarks

Call to this method makes consequent invocation of Execute read SQL script from specified file.

This Open method, as well as its overloads, does not load the text into memory or populate the Statements collection. So it is much more efficient to use Open methods from performance and memory consumption points of view.

See Also

DbScript Class | DbScript Members | Overload List


%%PageItemTitle%%

DbScript Class | DbScript Members | Overload List

Language

Visual Basic

C#

Show All

reader
TextReader to read SQL statements from.
See Also Languages Devart.Data Send comments on this topic.

Open(TextReader) Method

Devart.Common Namespace > DbScript Class > Open Method : Open(TextReader) Method

Prepares a StreamReader to be executed as SQL script.

[Visual Basic]
Overloads Public Sub Open( _
   ByVal reader As TextReader _
)
[C#]
public void Open(
   TextReader reader
);

Parameters

reader
TextReader to read SQL statements from.

Remarks

Call to this method makes consequent invocation of Execute read SQL script from specified TextReader.

This Open method, as well as its overloads, does not load the text into memory or populate the Statements collection. So it is much more efficient to use Open methods from performance and memory consumption points of view.

See Also

DbScript Class | DbScript Members | Overload List


%%PageItemTitle%%

DbScript Class | DbScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Reset Method

Devart.Common Namespace > DbScript Class : Reset Method

Positions ExecuteNext method on the first statement in the script.

[Visual Basic]
Public Overridable Sub Reset()
[C#]
public virtual void Reset();

Remarks

Use this method to restart execution of a script. This also happens when ScriptText property is modified.

See Also

DbScript Class | DbScript Members


%%PageItemTitle%% $$Events$$

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

DbScript Class Events

Devart.Common Namespace : DbScript Class

For a list of all members of this type, see DbScript members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when a SQL statement within script has produced an error.
Public Event Progress | Occurs when a SQL statement within script has successfully executed.

See Also

DbScript Class | Devart.Common Namespace | SqlStatement Class | SqlStatementCollection Class


%%PageItemTitle%%

DbScript Class | DbScript Members | Progress Event | Execute Method | ExecuteNext Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Error Event

Devart.Common Namespace > DbScript Class : Error Event (DbScript)

Occurs when a SQL statement within script has produced an error.

[Visual Basic]
Public Event Error() As ScriptErrorEventHandler
[C#]
public event ScriptErrorEventHandler Error();

Event Data

The event handler receives an argument of type ScriptErrorEventArgs containing data related to this event. The following ScriptErrorEventArgs properties provide information specific to this event.

Property | Description
Exception | Gets the Exception instance that DbScript throws.
Ignore | Gets or sets whether the current error will be ignored or not.
Length | Gets length of statement where an error occurred.
LineNumber | Gets number of the line where an error occurred.
LinePosition | Gets position in the line where an error occurred.
Offset | Gets offset of statement where an error occurred.
StatementType | Gets type of the statement that caused an error.
Text | Gets SQL statement where an error occurred.

Remarks

This event can be generated by Execute and ExecuteNext methods when an error happens.

By default, Execute method stops and returns immediately after event handler finishes. If you want to ignore the error and continue execution of the script, set ScriptErrorEventArgs.Ignore property to true.

Example

This sample demonstrates how to execute script and retrieve information about execution flow using Progress and Error events.

[C#]

[STAThread]
static void Main(string[] args)
{
string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
      PgSqlConnection pgConn = new PgSqlConnection(
          "host=server;database=test;user id=postgres;");
      PgSqlScript pgScript = new PgSqlScript(script,pgConn);
      pgScript.Progress += new Devart.Common.ScriptProgressEventHandler(OnProgress);
      pgScript.Error += new Devart.Common.ScriptErrorEventHandler(OnError);
      pgConn.Open();
      pgScript.Execute();
      pgConn.Close();
    }

static void OnProgress(object sender, Devart.Common.ScriptProgressEventArgs e)
{
  Console.WriteLine(e.Text);
  Console.WriteLine("  Successfully executed.");
}

static void OnError(object sender, Devart.Common.ScriptErrorEventArgs e)
{
  e.Ignore = true;
  Console.WriteLine(e.Text);
  Console.WriteLine("  Failed.");
}

[Visual Basic]

Module Module1

  Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript

  Sub Main()
    Dim script As String = _
  "DROP TABLE DEPT;" + _
  "CREATE TABLE DEPT (" + _
  " DEPTNO INT PRIMARY KEY," + _
  " DNAME VARCHAR(14)," + _
  " LOC VARCHAR(13)" + _
  ")WITH OIDS;" + _
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" + _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" + _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" + _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" + _
  "SELECT * FROM DEPT"
    Dim pgConn As PgSqlConnection = New PgSqlConnection( _
        "host=server;database=test;user id=postgres;")
    pgScript = New PgSqlScript(script, pgConn)
    pgConn.Open()
    pgScript.Execute()
    pgConn.Close()
    Console.ReadLine()
  End Sub

  Sub OnProgress(ByVal sender As Object, ByVal e As Devart.Common.ScriptProgressEventArgs) Handles pgScript.Progress
    Console.WriteLine(e.Text)
    Console.WriteLine(" Successfully executed.")
  End Sub

  Sub OnError(ByVal sender As Object, ByVal e As Devart.Common.ScriptErrorEventArgs) Handles pgScript.Error
    e.Ignore = True
    Console.WriteLine(e.Text)
    Console.WriteLine(" Failed.")
  End Sub

End Module

See Also

DbScript Class | DbScript Members | Progress Event | Execute Method | ExecuteNext Method


%%PageItemTitle%%

DbScript Class | DbScript Members | Error Event | Execute Method | ExecuteNext Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Progress Event

Devart.Common Namespace > DbScript Class : Progress Event

Occurs when a SQL statement within script has successfully executed.

[Visual Basic]
Public Event Progress() As ScriptProgressEventHandler
[C#]
public event ScriptProgressEventHandler Progress();

Event Data

The event handler receives an argument of type ScriptProgressEventArgs containing data related to this event. The following ScriptProgressEventArgs properties provide information specific to this event.

Property | Description
Length | Gets length of the statement in symbols.
LineNumber | Gets number of line in the whole script where the statement can be located.
LinePosition | Gets position of the statement in its line.
Offset | Gets offset of the statement in the whole script text.
StatementType | Gets type of the statement that is executed.
Text | Gets SQL statement that has been executed.

Remarks

This event can be generated by Execute and ExecuteNext methods in case of successfull execution of a statement in a script.

If you want to stop script execution from the event handler, you can raise an exception.

Example

This sample demonstrates how to execute script and retrieve information about execution flow using Progress and Error events.

[C#]

[STAThread]
static void Main(string[] args)
{
string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
      PgSqlConnection pgConn = new PgSqlConnection(
          "host=server;database=test;user id=postgres;");
      PgSqlScript pgScript = new PgSqlScript(script,pgConn);
      pgScript.Progress += new Devart.Common.ScriptProgressEventHandler(OnProgress);
      pgScript.Error += new Devart.Common.ScriptErrorEventHandler(OnError);
      pgConn.Open();
      pgScript.Execute();
      pgConn.Close();
    }

static void OnProgress(object sender, Devart.Common.ScriptProgressEventArgs e)
{
  Console.WriteLine(e.Text);
  Console.WriteLine("  Successfully executed.");
}

static void OnError(object sender, Devart.Common.ScriptErrorEventArgs e)
{
  e.Ignore = true;
  Console.WriteLine(e.Text);
  Console.WriteLine("  Failed.");
}

[Visual Basic]

Module Module1

  Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript

  Sub Main()
    Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
  "SELECT * FROM DEPT"
    Dim pgConn As PgSqlConnection = New PgSqlConnection( _
        "host=server;database=test;user id=postgres;")
    pgScript = New PgSqlScript(script, pgConn)
    pgConn.Open()
    pgScript.Execute()
    pgConn.Close()
    Console.ReadLine()
  End Sub

  Sub OnProgress(ByVal sender As Object, ByVal e As Devart.Common.ScriptProgressEventArgs) Handles pgScript.Progress
    Console.WriteLine(e.Text)
    Console.WriteLine(" Successfully executed.")
  End Sub

  Sub OnError(ByVal sender As Object, ByVal e As Devart.Common.ScriptErrorEventArgs) Handles pgScript.Error
    e.Ignore = True
    Console.WriteLine(e.Text)
    Console.WriteLine(" Failed.")
  End Sub

End Module

See Also

DbScript Class | DbScript Members | Error Event | Execute Method | ExecuteNext Method


%%PageItemTitle%%

DbTransactionBase Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DbTransactionBase Class

Devart.Common Namespace : DbTransactionBase Class

Base class for the dotConnect for PostgreSQL transaction class Devart.Data.PostgreSql.PgSqlTransaction

For a list of all members of this type, see DbTransactionBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbTransaction
Devart.Common.DbTransactionBase
Devart.Data.PostgreSql.PgSqlTransaction

Syntax

[Visual Basic]
Public MustInherit Class DbTransactionBase
   Inherits DbTransaction
   Implements IDbTransaction, IDisposable
[C#]
public abstract class DbTransactionBase : DbTransaction, IDbTransaction, IDisposable

See Also

DbTransactionBase Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbTransactionBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbTransactionBase Class Members

Devart.Common Namespace : DbTransactionBase Class

DbTransactionBase overview

Public Properties

Public Property Connection (Inherited from System.Data.Common.DbTransaction) | Specifies the DbConnection object associated with the transaction.
Public Property IsolationLevel | Overridden. Specifies the IsolationLevel for the transaction.

Public Methods

Public Method Commit (Inherited from System.Data.Common.DbTransaction) | Commits the database transaction.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.Data.Common.DbTransaction) | Releases the unmanaged resources used by the DbTransaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Rollback (Inherited from System.Data.Common.DbTransaction) | Rolls back a transaction from a pending state.

Public Events

Public Event StateChanged | Occurs when the state of the transaction is changed.
Public Event StateChanging | Occurs when the state of the transaction is changing.

See Also

DbTransactionBase Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbTransactionBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbTransactionBase Class Properties

Devart.Common Namespace : DbTransactionBase Class

For a list of all members of this type, see DbTransactionBase members.

Public Properties

Public Property Connection (Inherited from System.Data.Common.DbTransaction) | Specifies the DbConnection object associated with the transaction.
Public Property IsolationLevel | Overridden. Specifies the IsolationLevel for the transaction.

See Also

DbTransactionBase Class | Devart.Common Namespace


%%PageItemTitle%%

DbTransactionBase Class | DbTransactionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

IsolationLevel Property

Devart.Common Namespace > DbTransactionBase Class : IsolationLevel Property (DbTransactionBase)

Specifies the IsolationLevel for the transaction.

[Visual Basic]
Overrides Public ReadOnly Property IsolationLevel As IsolationLevel
[C#]
public override IsolationLevel IsolationLevel {get;}

Return Type

The IsolationLevel for the transaction.

See Also

DbTransactionBase Class | DbTransactionBase Members


%%PageItemTitle%% $$Events$$

DbTransactionBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbTransactionBase Class Events

Devart.Common Namespace : DbTransactionBase Class

For a list of all members of this type, see DbTransactionBase members.

Public Events

Public Event StateChanged | Occurs when the state of the transaction is changed.
Public Event StateChanging | Occurs when the state of the transaction is changing.

See Also

DbTransactionBase Class | Devart.Common Namespace


%%PageItemTitle%%

DbTransactionBase Class | DbTransactionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StateChanged Event

Devart.Common Namespace > DbTransactionBase Class : StateChanged Event

Occurs when the state of the transaction is changed.

[Visual Basic]
Public Event StateChanged() As TransactionStateChangedEventHandler
[C#]
public event TransactionStateChangedEventHandler StateChanged();

See Also

DbTransactionBase Class | DbTransactionBase Members


%%PageItemTitle%%

DbTransactionBase Class | DbTransactionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StateChanging Event

Devart.Common Namespace > DbTransactionBase Class : StateChanging Event

Occurs when the state of the transaction is changing.

[Visual Basic]
Public Event StateChanging() As TransactionStateChangingEventHandler
[C#]
public event TransactionStateChangingEventHandler StateChanging();

See Also

DbTransactionBase Class | DbTransactionBase Members


%%PageItemTitle%%

MonitorEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

MonitorEventArgs Class

Devart.Common Namespace : MonitorEventArgs Class

Provides data for the DbMonitor.TraceEvent event of the DbMonitor class.

For a list of all members of this type, see MonitorEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.MonitorEventArgs

Syntax

[Visual Basic]
Public Class MonitorEventArgs
   Inherits EventArgs
[C#]
public class MonitorEventArgs : EventArgs

Remarks

The DbMonitor.TraceEvent event occurs when DbMonitor object is active and the monitoring application performs any SQL activity.

Example

The following sample shows how to enable and disable monitoring of database activity in your application.

[C#]

static void OnEvent(object sender, MonitorEventArgs e)
{
  if (e.TracePoint==MonitorTracePoint.BeforeEvent)
  {
    Console.WriteLine("Description: " + e.Description);
    Console.WriteLine(" Extra info: " + e.ExtraInfo);
  }
}

[MTAThread]
static void Main(string[] args)
{
  PgSqlConnection pgConn = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  PgSqlMonitor pgMonitor = new PgSqlMonitor();
  pgMonitor.TraceEvent += new MonitorEventHandler(OnEvent);
  pgMonitor.IsActive = true;
  PgSqlCommand pgCommand = new PgSqlCommand("select count(*) from Dept",pgConn);
  pgConn.Open();
  Console.WriteLine(pgCommand.ExecuteScalar());
  pgConn.Close();
  pgMonitor.TraceEvent -= new MonitorEventHandler(OnEvent);
  Console.ReadLine();
}

[Visual Basic]

Sub OnEvent(ByVal sender As Object, ByVal e As MonitorEventArgs)
  If e.TracePoint = MonitorTracePoint.BeforeEvent Then
    Console.WriteLine("Description: " & e.Description)
    Console.WriteLine(" Extra info: " & e.ExtraInfo)
  End If
End Sub

<MTAThread()> _
Sub Main()
  Dim pgConn As PgSqlConnection = New PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  Dim pgMonitor As PgSqlMonitor = New PgSqlMonitor
  AddHandler pgMonitor.TraceEvent, AddressOf OnEvent
  pgMonitor.IsActive = True
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("select count(*) from Dept", pgConn)
  pgConn.Open()
  Console.WriteLine(pgCommand.ExecuteScalar())
  pgConn.Close()
  RemoveHandler pgMonitor.TraceEvent, AddressOf OnEvent
  Console.ReadLine()
End Sub

See Also

MonitorEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

MonitorEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

MonitorEventArgs Class Members

Devart.Common Namespace : MonitorEventArgs Class

MonitorEventArgs overview

Public Properties

Public Property CallStack | Gets the call stack of the monitor event.
Public Property Description | Gets the description of a DbMonitor event.
Public Property Duration | The time between the start and the end of the event.
Public Property EventType | Gets DbMonitor event type.
Public Property ExtraInfo | Gets the additional information for a DbMonitor event.
Public Property TracePoint | Determines whether DbMonitor.TraceEvent event occurs before or after the operation takes place.

See Also

MonitorEventArgs Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

MonitorEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

MonitorEventArgs Class Properties

Devart.Common Namespace : MonitorEventArgs Class

For a list of all members of this type, see MonitorEventArgs members.

Public Properties

Public Property CallStack | Gets the call stack of the monitor event.
Public Property Description | Gets the description of a DbMonitor event.
Public Property Duration | The time between the start and the end of the event.
Public Property EventType | Gets DbMonitor event type.
Public Property ExtraInfo | Gets the additional information for a DbMonitor event.
Public Property TracePoint | Determines whether DbMonitor.TraceEvent event occurs before or after the operation takes place.

See Also

MonitorEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CallStack Property

Devart.Common Namespace > MonitorEventArgs Class : CallStack Property (MonitorEventArgs)

Gets the call stack of the monitor event.

[Visual Basic]
Public ReadOnly Property CallStack As String()
[C#]
public string[] CallStack {get;}

Return Type

The call stack of the monitor event.

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Description Property

Devart.Common Namespace > MonitorEventArgs Class : Description Property

Gets the description of a DbMonitor event.

[Visual Basic]
Public ReadOnly Property Description As String
[C#]
public string Description {get;}

Return Type

The text description of a DbMonitor event.

Remarks

This property contains such information as text of SQL statement.

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Duration Property

Devart.Common Namespace > MonitorEventArgs Class : Duration Property

The time between the start and the end of the event.

[Visual Basic]
Public ReadOnly Property Duration As Double
[C#]
public double Duration {get;}

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

EventType Property

Devart.Common Namespace > MonitorEventArgs Class : EventType Property

Gets DbMonitor event type.

[Visual Basic]
Public ReadOnly Property EventType As MonitorEventType
[C#]
public MonitorEventType EventType {get;}

Return Type

The DbMonitor event type that depends on SQL activity of the application.

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ExtraInfo Property

Devart.Common Namespace > MonitorEventArgs Class : ExtraInfo Property

Gets the additional information for a DbMonitor event.

[Visual Basic]
Public ReadOnly Property ExtraInfo As String
[C#]
public string ExtraInfo {get;}

Return Type

The string representation of the connection string, error text, or SQL parameters.

Remarks

This property contains such information as connection string or quantity of rows affected by a query.

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

MonitorEventArgs Class | MonitorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TracePoint Property

Devart.Common Namespace > MonitorEventArgs Class : TracePoint Property

Determines whether DbMonitor.TraceEvent event occurs before or after the operation takes place.

[Visual Basic]
Public ReadOnly Property TracePoint As MonitorTracePoint
[C#]
public MonitorTracePoint TracePoint {get;}

Return Type

One of MonitorTracePoint values.

See Also

MonitorEventArgs Class | MonitorEventArgs Members


%%PageItemTitle%%

ParentDataRelation Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParentDataRelation Class

Devart.Common Namespace : ParentDataRelation Class

Establishes query-based master-detail relation.

For a list of all members of this type, see ParentDataRelation members.

Inheritance Hierarchy

System.Object
Devart.Common.ParentDataRelation

Syntax

[Visual Basic]
Public Class ParentDataRelation
[C#]
public class ParentDataRelation

Remarks

The ParentDataRelation class is designed to establish a master-detail relationship where details data is not cached on the client. Every time the current position in the master table is changed, the client DbDataTable requests the appropriate portion of data from the server.

Use property ParentTable to specify master DbDataTable, and the properties ParentColumnNames and ChildColumnNames to describe the relationiship.

Note that this feature can be used only for two instances of DbDataTable class that have same DbDataTable.Owner. In other words, the DbDataTable objects must reside on the same forms.

Example

The following example shows how to render related data in two grids.

[C#]

PgSqlConnection connection = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
connection.Open();
PgSqlDataTable deptTable = new PgSqlDataTable("SELECT * FROM dept", connection);
PgSqlDataTable empTable = new PgSqlDataTable("SELECT * FROM emp", connection);
empTable.ParentRelation.ParentTable = deptTable;
empTable.ParentRelation.ParentColumnNames = new string[] { "deptno" };
empTable.ParentRelation.ChildColumnNames = new string[] { "deptno" };
deptTable.Owner = this;
empTable.Owner = this;
deptTable.FetchAll = true;
empTable.FetchAll = true;
deptTable.Open();
empTable.Open();
deptDataGrid.DataSource = deptTable;
empDataGrid.DataSource = empTable;

[Visual Basic]

Dim connection As New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
connection.Open()
Dim deptTable As New PgSqlDataTable("SELECT * FROM dept", connection)
Dim empTable As New PgSqlDataTable("SELECT * FROM emp", connection)
empTable.ParentRelation.ParentTable = deptTable
empTable.ParentRelation.ParentColumnNames = New String() {"deptno"}
empTable.ParentRelation.ChildColumnNames = New String() {"deptno"}
deptTable.Owner = Me
empTable.Owner = Me
deptTable.FetchAll = True
empTable.FetchAll = True
deptTable.Open()
empTable.Open()
deptDataGrid.DataSource = deptTable
empDataGrid.DataSource = empTable

See Also

ParentDataRelation Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

ParentDataRelation Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ParentDataRelation Class Members

Devart.Common Namespace : ParentDataRelation Class

ParentDataRelation overview

Public Constructors

Public Constructor ParentDataRelation Constructor Initializes a new instance of the ParentDataRelation class using the specified parent DbDataTable and matched arrays of parent and child column names.

Public Properties

Public Property ChildColumnNames | Gets or sets list of child columns used to establish the relation.
Public Property ParentColumnNames | Gets or sets list of child columns used to establish the relation.
Public Property ParentTable | Gets or sets the DbDataTable that is used as master dataset.

See Also

ParentDataRelation Class | Devart.Common Namespace


%%PageItemTitle%%

ParentDataRelation Class | ParentDataRelation Members

Language

Visual Basic

C#

Show All

parentTable
A DbDataTable that is used as master dataset.
parentColumnNames
List of master columns used to establish the relation.
childColumnNames
List of child columns used to establish the relation.
See Also Languages Devart.Data Send comments on this topic.

ParentDataRelation Constructor

Devart.Common Namespace > ParentDataRelation Class : ParentDataRelation Constructor (ParentDataRelation)

Initializes a new instance of the ParentDataRelation class using the specified parent DbDataTable and matched arrays of parent and child column names.

[Visual Basic]
Public Function New( _
   ByVal parentTable As IListSource, _
   ByVal parentColumnNames() As String, _
   ByVal childColumnNames() As String _
)
[C#]
public ParentDataRelation(
   IListSource parentTable,
   string[] parentColumnNames,
   string[] childColumnNames
);

Parameters

parentTable
A DbDataTable that is used as master dataset.
parentColumnNames
List of master columns used to establish the relation.
childColumnNames
List of child columns used to establish the relation.

See Also

ParentDataRelation Class | ParentDataRelation Members


%%PageItemTitle%% $$Properties$$

ParentDataRelation Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ParentDataRelation Class Properties

Devart.Common Namespace : ParentDataRelation Class

For a list of all members of this type, see ParentDataRelation members.

Public Properties

Public Property ChildColumnNames | Gets or sets list of child columns used to establish the relation.
Public Property ParentColumnNames | Gets or sets list of child columns used to establish the relation.
Public Property ParentTable | Gets or sets the DbDataTable that is used as master dataset.

See Also

ParentDataRelation Class | Devart.Common Namespace


%%PageItemTitle%%

ParentDataRelation Class | ParentDataRelation Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ChildColumnNames Property

Devart.Common Namespace > ParentDataRelation Class : ChildColumnNames Property

Gets or sets list of child columns used to establish the relation.

[Visual Basic]
Public Property ChildColumnNames As String()
[C#]
public string[] ChildColumnNames {get; set;}

Return Type

List of child columns used to establish the relation.

See Also

ParentDataRelation Class | ParentDataRelation Members


%%PageItemTitle%%

ParentDataRelation Class | ParentDataRelation Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParentColumnNames Property

Devart.Common Namespace > ParentDataRelation Class : ParentColumnNames Property

Gets or sets list of child columns used to establish the relation.

[Visual Basic]
Public Property ParentColumnNames As String()
[C#]
public string[] ParentColumnNames {get; set;}

Return Type

List of parent columns used to establish the relation.

See Also

ParentDataRelation Class | ParentDataRelation Members


%%PageItemTitle%%

ParentDataRelation Class | ParentDataRelation Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ParentTable Property

Devart.Common Namespace > ParentDataRelation Class : ParentTable Property

Gets or sets the DbDataTable that is used as master dataset.

[Visual Basic]
Public Property ParentTable As DbDataTable
[C#]
public DbDataTable ParentTable {get; set;}

Return Type

A DbDataTable that is used as master dataset.

See Also

ParentDataRelation Class | ParentDataRelation Members


%%PageItemTitle%%

ProxyException Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyException Class

Devart.Common Namespace : ProxyException Class

Represents an exception that occurs when connecting through a proxy server.

For a list of all members of this type, see ProxyException members.

Inheritance Hierarchy

System.Object
System.Exception
Devart.Common.ProxyException

Syntax

[Visual Basic]
Public Class ProxyException
   Inherits Exception
   Implements _Exception, ISerializable
[C#]
public class ProxyException : Exception, _Exception, ISerializable

See Also

ProxyException Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

ProxyException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyException Class Members

Devart.Common Namespace : ProxyException Class

ProxyException overview

Public Constructors

Public Constructor ProxyException Constructor Overloaded. Initializes a new instance of the ProxyException class with the exception message.

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

ProxyException Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyException Class | ProxyException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyException Constructor

Devart.Common Namespace > ProxyException Class : ProxyException Constructor (ProxyException)

Initializes a new instance of the ProxyException class with the exception message.

Overload List

Initializes a new instance of the ProxyException class with the exception message.

[Visual Basic] Public Sub New(String)

[C#] public ProxyException(string);

Initializes a new instance of the ProxyException class to initialize with inner exception.

[Visual Basic] Public Sub New(Exception)

[C#] public ProxyException(Exception);

See Also

ProxyException Class | ProxyException Members


%%PageItemTitle%%

ProxyException Class | ProxyException Members | Overload List

Language

Visual Basic

C#

Show All

inner
Inner exception
See Also Languages Devart.Data Send comments on this topic.

ProxyException Constructor(Exception)

Devart.Common Namespace > ProxyException Class > ProxyException Constructor : ProxyException Constructor(Exception)

Initializes a new instance of the ProxyException class to initialize with inner exception.

[Visual Basic]
Public Function New( _
   ByVal inner As Exception _
)
[C#]
public ProxyException(
   Exception inner
);

Parameters

inner
Inner exception

See Also

ProxyException Class | ProxyException Members | Overload List


%%PageItemTitle%%

ProxyException Class | ProxyException Members | Overload List

Language

Visual Basic

C#

Show All

message
The exception message.
See Also Languages Devart.Data Send comments on this topic.

ProxyException Constructor(String)

Devart.Common Namespace > ProxyException Class > ProxyException Constructor : ProxyException Constructor(String)

Initializes a new instance of the ProxyException class with the exception message.

[Visual Basic]
Public Function New( _
   ByVal message As String _
)
[C#]
public ProxyException(
   string message
);

Parameters

message
The exception message.

See Also

ProxyException Class | ProxyException Members | Overload List


%%PageItemTitle%%

ProxyOptions Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyOptions Class

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

Represents proxy server settings.

For a list of all members of this type, see ProxyOptions members.

Inheritance Hierarchy

System.Object
Devart.Common.ProxyOptions

Syntax

[Visual Basic]
Public Class ProxyOptions
[C#]
public class ProxyOptions

Remarks

This class contains settings for a connection through proxy in Devart.Data.PostgreSql.PgSqlConnection. Use the Devart.Data.PostgreSql.PgSqlConnection.ProxyOptions property to adjust the settings.

For more information on using proxy connections refer to the Network Tunneling article.

See Also

ProxyOptions Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

ProxyOptions Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyOptions Class Members

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

ProxyOptions overview

Public Constructors

Public Constructor ProxyOptions Constructor Overloaded. Initializes a new instance of the ProxyOptions class.

Public Fields

Public Field static (Shared in Visual Basic) DefaultPort | The default value for the Port property.
Public Field static (Shared in Visual Basic) ProxyHostKeyword | Represents the name of proxy host parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyPasswordKeyword | Represents the name of proxy password parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyPortKeyword | Represents the name of proxy port parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyUserKeyword | Represents the name of proxy user parameter in the connection string.

Public Properties

Public Property Host | Gets or sets the host name or IP address of the proxy server to which to connect.
Public Property Password | Gets or sets the password for the proxy server account.
Public Property Port | Gets or sets the port number of the proxy server.
Public Property ProxyAddress | Gets the uniform resource identifier (URI), generated from the values of the Host, Port, User, and Password properties.
Public Property User | Gets or sets the proxy server account name.

Public Methods

Public Method ShouldSerialize | Indicates whether designers should serialize this instanse.
Public Method ToString | Overridden. Returns a String that represents the current ProxyOptions.

Public Events

Public Event PropertyChanged Occurs when one of the properties of the ProxyOptions was changed.

See Also

ProxyOptions Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyOptions Constructor

Devart.Common Namespace > ProxyOptions Class : ProxyOptions Constructor (ProxyOptions)

Initializes a new instance of the ProxyOptions class.

Overload List

Initializes a new instance of the ProxyOptions class.

[Visual Basic] Public Sub New()

[C#] public ProxyOptions();

Initializes a new instance of the ProxyOptions class.

[Visual Basic] Public Sub New(String,Integer,String,String)

[C#] public ProxyOptions(string,int,string,string);

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyOptions Constructor()

Devart.Common Namespace > ProxyOptions Class > ProxyOptions Constructor : ProxyOptions Constructor()

Initializes a new instance of the ProxyOptions class.

[Visual Basic]
Public Function New()
[C#]
public ProxyOptions();

See Also

ProxyOptions Class | ProxyOptions Members | Overload List


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members | Overload List

Language

Visual Basic

C#

Show All

host
The host name or IP address of proxy server.
port
The port number of the proxy server.
user
The proxy server account name.
password
The password for the proxy server account.
See Also Languages Devart.Data Send comments on this topic.

ProxyOptions Constructor(String,Int32,String,String)

Devart.Common Namespace > ProxyOptions Class > ProxyOptions Constructor : ProxyOptions Constructor(String,Int32,String,String)

Initializes a new instance of the ProxyOptions class.

[Visual Basic]
Public Function New( _
   ByVal host As String, _
   ByVal port As Integer, _
   ByVal user As String, _
   ByVal password As String _
)
[C#]
public ProxyOptions(
   string host,
   int port,
   string user,
   string password
);

Parameters

host
The host name or IP address of proxy server.
port
The port number of the proxy server.
user
The proxy server account name.
password
The password for the proxy server account.

See Also

ProxyOptions Class | ProxyOptions Members | Overload List


%%PageItemTitle%% $$Fields$$

ProxyOptions Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyOptions Class Fields

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

For a list of all members of this type, see ProxyOptions members.

Public Fields

Public Field static (Shared in Visual Basic) DefaultPort | The default value for the Port property.
Public Field static (Shared in Visual Basic) ProxyHostKeyword | Represents the name of proxy host parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyPasswordKeyword | Represents the name of proxy password parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyPortKeyword | Represents the name of proxy port parameter in the connection string.
Public Field static (Shared in Visual Basic) ProxyUserKeyword | Represents the name of proxy user parameter in the connection string.

See Also

ProxyOptions Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DefaultPort Field

Devart.Common Namespace > ProxyOptions Class : DefaultPort Field

The default value for the Port property.

[Visual Basic]
Public Shared DefaultPort As Integer
[C#]
public static int DefaultPort

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyHostKeyword Field

Devart.Common Namespace > ProxyOptions Class : ProxyHostKeyword Field

Represents the name of proxy host parameter in the connection string.

[Visual Basic]
Public Shared ReadOnly ProxyHostKeyword As String
[C#]
public static readonly string ProxyHostKeyword

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyPasswordKeyword Field

Devart.Common Namespace > ProxyOptions Class : ProxyPasswordKeyword Field

Represents the name of proxy password parameter in the connection string.

[Visual Basic]
Public Shared ReadOnly ProxyPasswordKeyword As String
[C#]
public static readonly string ProxyPasswordKeyword

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyPortKeyword Field

Devart.Common Namespace > ProxyOptions Class : ProxyPortKeyword Field

Represents the name of proxy port parameter in the connection string.

[Visual Basic]
Public Shared ReadOnly ProxyPortKeyword As String
[C#]
public static readonly string ProxyPortKeyword

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyUserKeyword Field

Devart.Common Namespace > ProxyOptions Class : ProxyUserKeyword Field

Represents the name of proxy user parameter in the connection string.

[Visual Basic]
Public Shared ReadOnly ProxyUserKeyword As String
[C#]
public static readonly string ProxyUserKeyword

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%% $$Properties$$

ProxyOptions Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyOptions Class Properties

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

For a list of all members of this type, see ProxyOptions members.

Public Properties

Public Property Host | Gets or sets the host name or IP address of the proxy server to which to connect.
Public Property Password | Gets or sets the password for the proxy server account.
Public Property Port | Gets or sets the port number of the proxy server.
Public Property ProxyAddress | Gets the uniform resource identifier (URI), generated from the values of the Host, Port, User, and Password properties.
Public Property User | Gets or sets the proxy server account name.

See Also

ProxyOptions Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Host Property

Devart.Common Namespace > ProxyOptions Class : Host Property (ProxyOptions)

Gets or sets the host name or IP address of the proxy server to which to connect.

[Visual Basic]
Public Property Host As String
[C#]
public string Host {get; set;}

Return Type

The host name or IP address of proxy server.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Password Property

Devart.Common Namespace > ProxyOptions Class : Password Property (ProxyOptions)

Gets or sets the password for the proxy server account.

[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}

Return Type

The password for the proxy server account.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Port Property

Devart.Common Namespace > ProxyOptions Class : Port Property (ProxyOptions)

Gets or sets the port number of the proxy server.

[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}

Return Type

The port number of the proxy server. The default value is 3128.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ProxyAddress Property

Devart.Common Namespace > ProxyOptions Class : ProxyAddress Property

Gets the uniform resource identifier (URI), generated from the values of the Host, Port, User, and Password properties.

[Visual Basic]
Public ReadOnly Property ProxyAddress As Uri
[C#]
public Uri ProxyAddress {get;}

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

User Property

Devart.Common Namespace > ProxyOptions Class : User Property

Gets or sets the proxy server account name.

[Visual Basic]
Public Property User As String
[C#]
public string User {get; set;}

Return Type

The proxy server account name.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%% $$Methods$$

ProxyOptions Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyOptions Class Methods

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

For a list of all members of this type, see ProxyOptions members.

Public Methods

Public Method ShouldSerialize | Indicates whether designers should serialize this instanse.
Public Method ToString | Overridden. Returns a String that represents the current ProxyOptions.

See Also

ProxyOptions Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ShouldSerialize Method

Devart.Common Namespace > ProxyOptions Class : ShouldSerialize Method (ProxyOptions)

Indicates whether designers should serialize this instanse.

[Visual Basic]
Public Function ShouldSerialize() As Boolean
[C#]
public bool ShouldSerialize();

Return Type

true, if this instance will be serialized; otherwise, false.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ToString Method

Devart.Common Namespace > ProxyOptions Class : ToString Method (ProxyOptions)

Returns a String that represents the current ProxyOptions.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%% $$Events$$

ProxyOptions Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyOptions Class Events

Devart.Common Namespace : ProxyOptions Class (Devart.Common)

For a list of all members of this type, see ProxyOptions members.

Public Events

Public Event PropertyChanged Occurs when one of the properties of the ProxyOptions was changed.

See Also

ProxyOptions Class | Devart.Common Namespace


%%PageItemTitle%%

ProxyOptions Class | ProxyOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

PropertyChanged Event

Devart.Common Namespace > ProxyOptions Class : PropertyChanged Event

Occurs when one of the properties of the ProxyOptions was changed.

[Visual Basic]
Public Event PropertyChanged() As ProxyOptionsPropertyChanged
[C#]
public event ProxyOptionsPropertyChanged PropertyChanged();

Remarks

The event handler receives two parameters: the name of the changed property and its new value.

See Also

ProxyOptions Class | ProxyOptions Members


%%PageItemTitle%%

QueryRecordCountException Members | Devart.Common Namespace | QueryRecordCount Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

QueryRecordCountException Class

Devart.Common Namespace : QueryRecordCountException Class

Describes an error that is raised during record count request process.

For a list of all members of this type, see QueryRecordCountException members.

Inheritance Hierarchy

System.Object
System.Exception
Devart.Common.QueryRecordCountException

Syntax

[Visual Basic]
Public Class QueryRecordCountException
   Inherits Exception
   Implements _Exception, ISerializable
[C#]
public class QueryRecordCountException : Exception, _Exception, ISerializable

Remarks

This class is used to differentiate exceptions from QueryRecordCount and other fetch exceptions. The actual error message can be accessed via the InnerException property.

Example

The sample shows a catch block that is defined to catch a QueryRecordCountException exception.

[C#]

// Create a command selecting all records from the Dept table.
Devart.Data.PostgreSql.PgSqlCommand command = new Devart.Data.PostgreSql.PgSqlCommand("select * from Dept");
try
{
    // Execution of the command will fail as no connection is set to it.
    command.GetRecordCount();
}
catch (QueryRecordCountException ex)
{
    // Use the InnerException property to determine the actual error occurred.
    Console.WriteLine("An error occurred while counting records in the result set: "
        + ex.InnerException.Message);
}

[Visual Basic]

' Create a command selecting all records from the Dept table.
Dim command = New Devart.Data.PostgreSql.PgSqlCommand("select * from Dept")
Try
    ' Execution of the command will fail as no connection is set to it.
    command.GetRecordCount()
Catch ex As QueryRecordCountException
    ' Use the InnerException property to determine the actual error occurred.
    Console.WriteLine("An error occurred while counting records in the result set: " _
        + ex.InnerException.Message)
End Try

See Also

QueryRecordCountException Members | Devart.Common Namespace | QueryRecordCount Property


%%PageItemTitle%% $$Members$$

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property

See Also Devart.Data Send comments on this topic.

QueryRecordCountException Class Members

Devart.Common Namespace : QueryRecordCountException Class

QueryRecordCountException overview

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property


%%PageItemTitle%%

ScriptErrorEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ScriptErrorEventArgs Class

Devart.Common Namespace : ScriptErrorEventArgs Class

Provides data for the Error event of the DbScript class.

For a list of all members of this type, see ScriptErrorEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.ScriptErrorEventArgs

Syntax

[Visual Basic]
Public NotInheritable Class ScriptErrorEventArgs
   Inherits EventArgs
[C#]
public sealed class ScriptErrorEventArgs : EventArgs

Remarks

The Error event contains all information about an error and allows to choose whether to ignore the error or stop script execution.

See Also

ScriptErrorEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

ScriptErrorEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ScriptErrorEventArgs Class Members

Devart.Common Namespace : ScriptErrorEventArgs Class

ScriptErrorEventArgs overview

Public Constructors

Public Constructor ScriptErrorEventArgs Constructor Initialize a new instance of ScriptErrorEventArgs class.

Public Properties

Public Property Exception | Gets the Exception instance that DbScript throws.
Public Property Ignore | Gets or sets whether the current error will be ignored or not.
Public Property Length | Gets length of statement where an error occurred.
Public Property LineNumber | Gets number of the line where an error occurred.
Public Property LinePosition | Gets position in the line where an error occurred.
Public Property Offset | Gets offset of statement where an error occurred.
Public Property StatementType | Gets type of the statement that caused an error.
Public Property Text | Gets SQL statement where an error occurred.

See Also

ScriptErrorEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

e
The Exception instance that contains information specific to DbScript error.
text
SQL statement text where an error occurred.
offset
Offset of statement where an error occurs.
length
Length of statement where an error occurs.
lineNumber
Number of the line where an error occurs.
linePosition
Position in the line where an error occurs.
statementType
Type of the statement.
See Also Languages Devart.Data Send comments on this topic.

ScriptErrorEventArgs Constructor

Devart.Common Namespace > ScriptErrorEventArgs Class : ScriptErrorEventArgs Constructor (ScriptErrorEventArgs)

Initialize a new instance of ScriptErrorEventArgs class.

[Visual Basic]
Public Function New( _
   ByVal e As Exception, _
   ByVal text As String, _
   ByVal offset As Integer, _
   ByVal length As Integer, _
   ByVal lineNumber As Integer, _
   ByVal linePosition As Integer, _
   ByVal statementType As SqlStatementType _
)
[C#]
public ScriptErrorEventArgs(
   Exception e,
   string text,
   int offset,
   int length,
   int lineNumber,
   int linePosition,
   SqlStatementType statementType
);

Parameters

e
The Exception instance that contains information specific to DbScript error.
text
SQL statement text where an error occurred.
offset
Offset of statement where an error occurs.
length
Length of statement where an error occurs.
lineNumber
Number of the line where an error occurs.
linePosition
Position in the line where an error occurs.
statementType
Type of the statement.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%% $$Properties$$

ScriptErrorEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ScriptErrorEventArgs Class Properties

Devart.Common Namespace : ScriptErrorEventArgs Class

For a list of all members of this type, see ScriptErrorEventArgs members.

Public Properties

Public Property Exception | Gets the Exception instance that DbScript throws.
Public Property Ignore | Gets or sets whether the current error will be ignored or not.
Public Property Length | Gets length of statement where an error occurred.
Public Property LineNumber | Gets number of the line where an error occurred.
Public Property LinePosition | Gets position in the line where an error occurred.
Public Property Offset | Gets offset of statement where an error occurred.
Public Property StatementType | Gets type of the statement that caused an error.
Public Property Text | Gets SQL statement where an error occurred.

See Also

ScriptErrorEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Exception Property

Devart.Common Namespace > ScriptErrorEventArgs Class : Exception Property (ScriptErrorEventArgs)

Gets the Exception instance that DbScript throws.

[Visual Basic]
Public ReadOnly Property Exception As Exception
[C#]
public Exception Exception {get;}

Return Type

An Exception instance that contains information specific to DbScript error.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Ignore Property

Devart.Common Namespace > ScriptErrorEventArgs Class : Ignore Property (ScriptErrorEventArgs)

Gets or sets whether the current error will be ignored or not.

[Visual Basic]
Public Property Ignore As Boolean
[C#]
public bool Ignore {get; set;}

Return Type

true if the current error will be ignored; otherwise false.

Remarks

If false (by default), Execute method stops and returns immediately after event handler finishes. If you want to ignore the error and continue execution of the script, set this property to true.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Length Property

Devart.Common Namespace > ScriptErrorEventArgs Class : Length Property (ScriptErrorEventArgs)

Gets length of statement where an error occurred.

[Visual Basic]
Public ReadOnly Property Length As Integer
[C#]
public int Length {get;}

Return Type

Length of statement where an error occurred.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LineNumber Property

Devart.Common Namespace > ScriptErrorEventArgs Class : LineNumber Property (ScriptErrorEventArgs)

Gets number of the line where an error occurred.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

Number of the line where an error occurred.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LinePosition Property

Devart.Common Namespace > ScriptErrorEventArgs Class : LinePosition Property (ScriptErrorEventArgs)

Gets position in the line where an error occurred.

[Visual Basic]
Public ReadOnly Property LinePosition As Integer
[C#]
public int LinePosition {get;}

Return Type

Position in the line where an error occurred.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Offset Property

Devart.Common Namespace > ScriptErrorEventArgs Class : Offset Property (ScriptErrorEventArgs)

Gets offset of statement where an error occurred.

[Visual Basic]
Public ReadOnly Property Offset As Integer
[C#]
public int Offset {get;}

Return Type

Offset of statement where an error occurred.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StatementType Property

Devart.Common Namespace > ScriptErrorEventArgs Class : StatementType Property (ScriptErrorEventArgs)

Gets type of the statement that caused an error.

[Visual Basic]
Public ReadOnly Property StatementType As SqlStatementType
[C#]
public SqlStatementType StatementType {get;}

Return Type

One of the SqlStatementType values.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Text Property

Devart.Common Namespace > ScriptErrorEventArgs Class : Text Property (ScriptErrorEventArgs)

Gets SQL statement where an error occurred.

[Visual Basic]
Public ReadOnly Property Text As String
[C#]
public string Text {get;}

Return Type

SQL statement text where an error occurred.

See Also

ScriptErrorEventArgs Class | ScriptErrorEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ScriptProgressEventArgs Class

Devart.Common Namespace : ScriptProgressEventArgs Class

Provides data for the Progress event of the DbScript class.

For a list of all members of this type, see ScriptProgressEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.ScriptProgressEventArgs

Syntax

[Visual Basic]
Public NotInheritable Class ScriptProgressEventArgs
   Inherits EventArgs
[C#]
public sealed class ScriptProgressEventArgs : EventArgs

Remarks

The Progress event contains all information about the statement that has just executed.

See Also

ScriptProgressEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

ScriptProgressEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ScriptProgressEventArgs Class Members

Devart.Common Namespace : ScriptProgressEventArgs Class

ScriptProgressEventArgs overview

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property StatementType | Gets type of the statement that is executed.
Public Property Text | Gets SQL statement that has been executed.

See Also

ScriptProgressEventArgs Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

ScriptProgressEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ScriptProgressEventArgs Class Properties

Devart.Common Namespace : ScriptProgressEventArgs Class

For a list of all members of this type, see ScriptProgressEventArgs members.

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property StatementType | Gets type of the statement that is executed.
Public Property Text | Gets SQL statement that has been executed.

See Also

ScriptProgressEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Length Property

Devart.Common Namespace > ScriptProgressEventArgs Class : Length Property (ScriptProgressEventArgs)

Gets length of the statement in symbols.

[Visual Basic]
Public ReadOnly Property Length As Integer
[C#]
public int Length {get;}

Return Type

Length of the statement.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LineNumber Property

Devart.Common Namespace > ScriptProgressEventArgs Class : LineNumber Property (ScriptProgressEventArgs)

Gets number of line in the whole script where the statement can be located.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

Number of line in the whole script.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LinePosition Property

Devart.Common Namespace > ScriptProgressEventArgs Class : LinePosition Property (ScriptProgressEventArgs)

Gets position of the statement in its line.

[Visual Basic]
Public ReadOnly Property LinePosition As Integer
[C#]
public int LinePosition {get;}

Return Type

Position of the statement.

Remarks

Read the property to get offset of the statement from the beginning of the line where it can be located.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Offset Property

Devart.Common Namespace > ScriptProgressEventArgs Class : Offset Property (ScriptProgressEventArgs)

Gets offset of the statement in the whole script text.

[Visual Basic]
Public ReadOnly Property Offset As Integer
[C#]
public int Offset {get;}

Return Type

Offset of the statement in the script text.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StatementType Property

Devart.Common Namespace > ScriptProgressEventArgs Class : StatementType Property (ScriptProgressEventArgs)

Gets type of the statement that is executed.

[Visual Basic]
Public ReadOnly Property StatementType As SqlStatementType
[C#]
public SqlStatementType StatementType {get;}

Return Type

One of the SqlStatementType values.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Text Property

Devart.Common Namespace > ScriptProgressEventArgs Class : Text Property (ScriptProgressEventArgs)

Gets SQL statement that has been executed.

[Visual Basic]
Public ReadOnly Property Text As String
[C#]
public string Text {get;}

Return Type

SQL statement.

See Also

ScriptProgressEventArgs Class | ScriptProgressEventArgs Members


%%PageItemTitle%%

SqlStatement Members | Devart.Common Namespace | SqlStatementCollection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SqlStatement Class

Devart.Common Namespace : SqlStatement Class

Represents a single statement in a script.

For a list of all members of this type, see SqlStatement members.

Inheritance Hierarchy

System.Object
Devart.Common.SqlStatement

Syntax

[Visual Basic]
Public Class SqlStatement
[C#]
public class SqlStatement

Remarks

Use SqlStatement to execute individual statements in a script. Each SqlStatement object contains SQL text and information about location of statement in the whole script.

SqlStatement object can be obtained through Statements collection. After originating ScriptText has been modified any obsolete SqlStatement objects can no longer be used.

Example

This sample shows how to retrieve collection of statements that make up the script and execute them one by one.

[C#]

string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
PgSqlConnection pgConn = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
PgSqlScript pgScript = new PgSqlScript(script,pgConn);
SqlStatementCollection pgColl = pgScript.Statements;
IDataReader pgReader;
pgConn.Open();
foreach (SqlStatement pgStatement in pgColl)
{
  Console.WriteLine(pgStatement.Text);
  try
  {
    pgReader = pgStatement.Execute();
    Console.WriteLine("  Records affected " + pgReader.RecordsAffected);
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetString(0));
    }
    pgReader.Close();
    Console.WriteLine();
  }
  catch
  {
    Console.WriteLine("  Failed");
  }
}
pgConn.Close();

[Visual Basic]

Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
    "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
    "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
    "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
    "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
    "SELECT * FROM DEPT"
Dim pgConn As PgSqlConnection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
Dim pgScript As PgSqlScript = New PgSqlScript(script, pgConn)
Dim pgColl As SqlStatementCollection = pgScript.Statements
Dim pgReader As IDataReader
pgConn.Open()
For Each pgStatement As SqlStatement In pgColl
  Console.WriteLine(pgStatement.Text)
  Try
    pgReader = pgStatement.Execute()
    Console.WriteLine(" Records affected " & pgReader.RecordsAffected)
    While pgReader.Read()
      Console.WriteLine(pgReader.GetString(0))
    End While
    pgReader.Close()
    Console.WriteLine()
  Catch ex As Exception
    Console.WriteLine(" Failed")
  End Try
Next pgStatement
pgConn.Close()

See Also

SqlStatement Members | Devart.Common Namespace | SqlStatementCollection Class


%%PageItemTitle%% $$Members$$

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

SqlStatement Class Members

Devart.Common Namespace : SqlStatement Class

SqlStatement overview

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property StatementType | Gets type of the statement.
Public Property Text | Gets SQL statement to be executed.

Public Methods

Public Method Execute | Executes the statement and returns result set.
Public Method ExecuteNonQuery | Executes the statement.

See Also

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class


%%PageItemTitle%% $$Properties$$

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

SqlStatement Class Properties

Devart.Common Namespace : SqlStatement Class

For a list of all members of this type, see SqlStatement members.

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property StatementType | Gets type of the statement.
Public Property Text | Gets SQL statement to be executed.

See Also

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | Text Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Length Property

Devart.Common Namespace > SqlStatement Class : Length Property (SqlStatement)

Gets length of the statement in symbols.

[Visual Basic]
Public ReadOnly Property Length As Integer
[C#]
public int Length {get;}

Return Type

Length of the statement in symbols.

See Also

SqlStatement Class | SqlStatement Members | Text Property


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | LinePosition Property | Offset Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LineNumber Property

Devart.Common Namespace > SqlStatement Class : LineNumber Property (SqlStatement)

Gets number of line in the whole script where the statement can be located.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

Number of line in the whole script.

See Also

SqlStatement Class | SqlStatement Members | LinePosition Property | Offset Property


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | LineNumber Property | Offset Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

LinePosition Property

Devart.Common Namespace > SqlStatement Class : LinePosition Property (SqlStatement)

Gets position of the statement in its line.

[Visual Basic]
Public ReadOnly Property LinePosition As Integer
[C#]
public int LinePosition {get;}

Return Type

Position of the statement.

Remarks

Read the property to get offset of the statement from the beginning of the line where it can be located.

See Also

SqlStatement Class | SqlStatement Members | LineNumber Property | Offset Property


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | LineNumber Property | Offset Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Offset Property

Devart.Common Namespace > SqlStatement Class : Offset Property (SqlStatement)

Gets offset of the statement in the whole script text.

[Visual Basic]
Public ReadOnly Property Offset As Integer
[C#]
public int Offset {get;}

Return Type

Offset of the statement in the script text.

See Also

SqlStatement Class | SqlStatement Members | LineNumber Property | Offset Property


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

StatementType Property

Devart.Common Namespace > SqlStatement Class : StatementType Property (SqlStatement)

Gets type of the statement.

[Visual Basic]
Public ReadOnly Property StatementType As SqlStatementType
[C#]
public SqlStatementType StatementType {get;}

Return Type

One of the SqlStatementType values.

See Also

SqlStatement Class | SqlStatement Members


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | Length Property | Execute Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Text Property

Devart.Common Namespace > SqlStatement Class : Text Property (SqlStatement)

Gets SQL statement to be executed.

[Visual Basic]
Public ReadOnly Property Text As String
[C#]
public string Text {get;}

Return Type

SQL statement.

See Also

SqlStatement Class | SqlStatement Members | Length Property | Execute Method


%%PageItemTitle%% $$Methods$$

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class

See Also Devart.Data Send comments on this topic.

SqlStatement Class Methods

Devart.Common Namespace : SqlStatement Class

For a list of all members of this type, see SqlStatement members.

Public Methods

Public Method Execute | Executes the statement and returns result set.
Public Method ExecuteNonQuery | Executes the statement.

See Also

SqlStatement Class | Devart.Common Namespace | SqlStatementCollection Class


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | Text Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Execute Method

Devart.Common Namespace > SqlStatement Class : Execute Method (SqlStatement)

Executes the statement and returns result set.

[Visual Basic]
Public Function Execute() As IDataReader
[C#]
public IDataReader Execute();

Return Type

Result set returned by the statement execution.

Remarks

This method is an alternative to Execute and ExecuteNext methods. It allows you to execute statements individually in any order. Note that Execute of SqlStatement does not generate Error or Progress event.

Example

This sample shows how to retrieve collection of statements that make up the script and execute them one by one.

[C#]

string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
PgSqlConnection pgConn = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
PgSqlScript pgScript = new PgSqlScript(script,pgConn);
SqlStatementCollection pgColl = pgScript.Statements;
IDataReader pgReader;
pgConn.Open();
foreach (SqlStatement pgStatement in pgColl)
{
  Console.WriteLine(pgStatement.Text);
  try
  {
    pgReader = pgStatement.Execute();
    Console.WriteLine("  Records affected " + pgReader.RecordsAffected);
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetString(0));
    }
    pgReader.Close();
    Console.WriteLine();
  }
  catch
  {
    Console.WriteLine("  Failed");
  }
}
pgConn.Close();

[Visual Basic]

Dim script As String = _
  "DROP TABLE DEPT;" + _
  "CREATE TABLE DEPT (" + _
  " DEPTNO INT PRIMARY KEY," + _
  " DNAME VARCHAR(14)," + _
  " LOC VARCHAR(13)" + _
  ")WITH OIDS;" + _
    "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" + _
    "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" + _
    "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" + _
    "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" + _
    "SELECT * FROM DEPT"
Dim pgConn As PgSqlConnection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
Dim pgScript As PgSqlScript = New PgSqlScript(script, pgConn)
Dim pgColl As SqlStatementCollection = pgScript.Statements
Dim pgReader As IDataReader
pgConn.Open()
For Each pgStatement As SqlStatement In pgColl
  Console.WriteLine(pgStatement.Text)
  Try
    pgReader = pgStatement.Execute()
    Console.WriteLine(" Records affected " & pgReader.RecordsAffected)
    While pgReader.Read()
      Console.WriteLine(pgReader.GetString(0))
    End While
    pgReader.Close()
    Console.WriteLine()
  Catch ex As Exception
    Console.WriteLine(" Failed")
  End Try
Next pgStatement
pgConn.Close()

See Also

SqlStatement Class | SqlStatement Members | Text Property


%%PageItemTitle%%

SqlStatement Class | SqlStatement Members | Text Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

ExecuteNonQuery Method

Devart.Common Namespace > SqlStatement Class : ExecuteNonQuery Method (SqlStatement)

Executes the statement.

[Visual Basic]
Public Sub ExecuteNonQuery()
[C#]
public void ExecuteNonQuery();

Remarks

This method is an alternative to Execute and ExecuteNext methods. It allows you to execute statements individually in any order. Note that SqlStatement.Execute of SqlStatement does not generate Error or Progress event.

See Also

SqlStatement Class | SqlStatement Members | Text Property


%%PageItemTitle%%

SqlStatementCollection Members | Devart.Common Namespace | Statements Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SqlStatementCollection Class

Devart.Common Namespace : SqlStatementCollection Class

Represents collection of statements that constitute PostgreSQL script.

For a list of all members of this type, see SqlStatementCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Common.SqlStatementCollection

Syntax

[Visual Basic]
Public Class SqlStatementCollection
   Inherits CollectionBase
   Implements ICollection, IEnumerable, IList
[C#]
public class SqlStatementCollection : CollectionBase, ICollection, IEnumerable, IList

Remarks

The collection is read-only. You can not add your own SqlStatement objects or remove them.

SqlStatementCollection is used to execute statements in a script one by one. To populate the collection with data use Statements property.

Example

This sample shows how to retrieve collection of statements that make up the script and execute them one by one.

[C#]

string script =
  "DROP TABLE DEPT;"+
  "CREATE TABLE DEPT ("+
  "  DEPTNO INT PRIMARY KEY,"+
  "  DNAME VARCHAR(14),"+
  "  LOC VARCHAR(13)"+
  ")WITH OIDS;"+
  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
PgSqlConnection pgConn = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
PgSqlScript pgScript = new PgSqlScript(script,pgConn);
SqlStatementCollection pgColl = pgScript.Statements;
IDataReader pgReader;
pgConn.Open();
foreach (SqlStatement pgStatement in pgColl)
{
  Console.WriteLine(pgStatement.Text);
  try
  {
    pgReader = pgStatement.Execute();
    Console.WriteLine("  Records affected " + pgReader.RecordsAffected);
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetString(0));
    }
    pgReader.Close();
    Console.WriteLine();
  }
  catch
  {
    Console.WriteLine("  Failed");
  }
}
pgConn.Close();

[Visual Basic]

Dim script As String = _
  "DROP TABLE DEPT;" & _
  "CREATE TABLE DEPT (" & _
  " DEPTNO INT PRIMARY KEY," & _
  " DNAME VARCHAR(14)," & _
  " LOC VARCHAR(13)" & _
  ")WITH OIDS;" & _
    "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" & _
    "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" & _
    "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" & _
    "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" & _
    "SELECT * FROM DEPT"
Dim pgConn As PgSqlConnection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
Dim pgScript As PgSqlScript = New PgSqlScript(script, pgConn)
Dim pgColl As SqlStatementCollection = pgScript.Statements
Dim pgReader As IDataReader
pgConn.Open()
For Each pgStatement As SqlStatement In pgColl
  Console.WriteLine(pgStatement.Text)
  Try
    pgReader = pgStatement.Execute()
    Console.WriteLine(" Records affected " & pgReader.RecordsAffected)
    While pgReader.Read()
      Console.WriteLine(pgReader.GetString(0))
    End While
    pgReader.Close()
    Console.WriteLine()
  Catch ex As Exception
    Console.WriteLine(" Failed")
  End Try
Next pgStatement
pgConn.Close()

See Also

SqlStatementCollection Members | Devart.Common Namespace | Statements Property


%%PageItemTitle%% $$Members$$

SqlStatementCollection Class | Devart.Common Namespace | Statements Property

See Also Devart.Data Send comments on this topic.

SqlStatementCollection Class Members

Devart.Common Namespace : SqlStatementCollection Class

SqlStatementCollection overview

Public Constructors

Public Constructor SqlStatementCollection Constructor Initializes a new instance of the SqlStatementCollection class.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets the SqlStatement at the specified index.

Public Methods

Public Method Add | Not used in SqlStatementCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SqlStatement object exists in the collection.
Public Method CopyTo | Copies SqlStatement objects from the SqlStatementCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SqlStatement object.
Public Method Insert | Not used in SqlStatementCollection.
Public Method Remove | Not used in SqlStatementCollection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SqlStatementCollection Class | Devart.Common Namespace | Statements Property


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SqlStatementCollection Constructor

Devart.Common Namespace > SqlStatementCollection Class : SqlStatementCollection Constructor (SqlStatementCollection)

Initializes a new instance of the SqlStatementCollection class.

[Visual Basic]
Public Function New()
[C#]
public SqlStatementCollection();

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%% $$Properties$$

SqlStatementCollection Class | Devart.Common Namespace | Statements Property

See Also Devart.Data Send comments on this topic.

SqlStatementCollection Class Properties

Devart.Common Namespace : SqlStatementCollection Class

For a list of all members of this type, see SqlStatementCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets the SqlStatement at the specified index.

See Also

SqlStatementCollection Class | Devart.Common Namespace | Statements Property


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index of the statement.
See Also Languages Devart.Data Send comments on this topic.

Item Property

Devart.Common Namespace > SqlStatementCollection Class : Item Property (SqlStatementCollection)

Gets the SqlStatement at the specified index.

[Visual Basic]
Public Default Property Item( _
   ByVal index As Integer _
) As SqlStatement
[C#]
public SqlStatement this[
   int index
]; {get; set;}

Parameters

index
The zero-based index of the statement.

Return Type

The SqlStatement at the specified index.

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%% $$Methods$$

SqlStatementCollection Class | Devart.Common Namespace | Statements Property

See Also Devart.Data Send comments on this topic.

SqlStatementCollection Class Methods

Devart.Common Namespace : SqlStatementCollection Class

For a list of all members of this type, see SqlStatementCollection members.

Public Methods

Public Method Add | Not used in SqlStatementCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SqlStatement object exists in the collection.
Public Method CopyTo | Copies SqlStatement objects from the SqlStatementCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SqlStatement object.
Public Method Insert | Not used in SqlStatementCollection.
Public Method Remove | Not used in SqlStatementCollection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SqlStatementCollection Class | Devart.Common Namespace | Statements Property


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data Send comments on this topic.

Add Method

Devart.Common Namespace > SqlStatementCollection Class : Add Method (SqlStatementCollection)

Not used in SqlStatementCollection.

[Visual Basic]
Public Function Add( _
   ByVal value As SqlStatement _
) As Integer
[C#]
public int Add(
   SqlStatement value
);

Parameters

value

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

value
The value of the SqlStatement object to find.
See Also Languages Devart.Data Send comments on this topic.

Contains Method

Devart.Common Namespace > SqlStatementCollection Class : Contains Method (SqlStatementCollection)

Gets a value indicating whether a SqlStatement object exists in the collection.

[Visual Basic]
Public Function Contains( _
   ByVal value As SqlStatement _
) As Boolean
[C#]
public bool Contains(
   SqlStatement value
);

Parameters

value
The value of the SqlStatement object to find.

Return Type

true if the collection contains the SqlStatement; otherwise, false.

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

array
The array into which to copy the SqlStatement objects.
index
The zero-based index of the object to copy.
See Also Languages Devart.Data Send comments on this topic.

CopyTo Method

Devart.Common Namespace > SqlStatementCollection Class : CopyTo Method (SqlStatementCollection)

Copies SqlStatement objects from the SqlStatementCollection to the specified array.

[Visual Basic]
Public Sub CopyTo( _
   ByVal array() As SqlStatement, _
   ByVal index As Integer _
)
[C#]
public void CopyTo(
   SqlStatement[] array,
   int index
);

Parameters

array
The array into which to copy the SqlStatement objects.
index
The zero-based index of the object to copy.

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

value
The SqlStatement object to find.
See Also Languages Devart.Data Send comments on this topic.

IndexOf Method

Devart.Common Namespace > SqlStatementCollection Class : IndexOf Method (SqlStatementCollection)

Gets the location in the collection of the SqlStatement object.

[Visual Basic]
Public Function IndexOf( _
   ByVal value As SqlStatement _
) As Integer
[C#]
public int IndexOf(
   SqlStatement value
);

Parameters

value
The SqlStatement object to find.

Return Type

The zero-based location of the SqlStatement in the collection.

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

index
value
See Also Languages Devart.Data Send comments on this topic.

Insert Method

Devart.Common Namespace > SqlStatementCollection Class : Insert Method (SqlStatementCollection)

Not used in SqlStatementCollection.

[Visual Basic]
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As SqlStatement _
)
[C#]
public void Insert(
   int index,
   SqlStatement value
);

Parameters

index
value

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

SqlStatementCollection Class | SqlStatementCollection Members

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data Send comments on this topic.

Remove Method

Devart.Common Namespace > SqlStatementCollection Class : Remove Method (SqlStatementCollection)

Not used in SqlStatementCollection.

[Visual Basic]
Public Sub Remove( _
   ByVal value As SqlStatement _
)
[C#]
public void Remove(
   SqlStatement value
);

Parameters

value

See Also

SqlStatementCollection Class | SqlStatementCollection Members


%%PageItemTitle%%

TransactionStateChangedEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangedEventArgs Class

Devart.Common Namespace : TransactionStateChangedEventArgs Class

Provides data for the DbTransactionBase.StateChanged event of the DbTransactionBase class.

For a list of all members of this type, see TransactionStateChangedEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.TransactionStateChangeEventArgs
Devart.Common.TransactionStateChangedEventArgs

Syntax

[Visual Basic]
Public NotInheritable Class TransactionStateChangedEventArgs
   Inherits TransactionStateChangeEventArgs
[C#]
public sealed class TransactionStateChangedEventArgs : TransactionStateChangeEventArgs

See Also

TransactionStateChangedEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

TransactionStateChangedEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangedEventArgs Class Members

Devart.Common Namespace : TransactionStateChangedEventArgs Class

TransactionStateChangedEventArgs overview

Public Constructors

Public Constructor TransactionStateChangedEventArgs Constructor Initializes an instance of the TransactionStateChangedEventArgs class.

Public Properties

Public Property Action (Inherited from TransactionStateChangeEventArgs) Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangedEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

TransactionStateChangedEventArgs Class | TransactionStateChangedEventArgs Members | TransactionAction Enumeration

Language

Visual Basic

C#

Show All

action
The operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged event occurs.
See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangedEventArgs Constructor

Devart.Common Namespace > TransactionStateChangedEventArgs Class : TransactionStateChangedEventArgs Constructor (TransactionStateChangedEventArgs)

Initializes an instance of the TransactionStateChangedEventArgs class.

[Visual Basic]
Public Function New( _
   ByVal action As TransactionAction _
)
[C#]
public TransactionStateChangedEventArgs(
   TransactionAction action
);

Parameters

action
The operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged event occurs.

See Also

TransactionStateChangedEventArgs Class | TransactionStateChangedEventArgs Members | TransactionAction Enumeration


%%PageItemTitle%%

TransactionStateChangeEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangeEventArgs Class

Devart.Common Namespace : TransactionStateChangeEventArgs Class

Base class for TransactionStateChangedEventArgs and TransactionStateChangingEventArgs classes.

For a list of all members of this type, see TransactionStateChangeEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.TransactionStateChangeEventArgs
Devart.Common.TransactionStateChangedEventArgs
Devart.Common.TransactionStateChangingEventArgs

Syntax

[Visual Basic]
Public MustInherit Class TransactionStateChangeEventArgs
   Inherits EventArgs
[C#]
public abstract class TransactionStateChangeEventArgs : EventArgs

Example

This sample demonstrates how the common base TransactionStateChangeEventArgs class for TransactionStateChanged and TransactionStateChanging envent arguments allows using more general code.

[C#]

PgSqlConnection connection = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
   connection.TransactionStateChanged += new TransactionStateChangedEventHandler(connection_TransactionStateChange);
   connection.TransactionStateChanging += new TransactionStateChangingEventHandler(connection_TransactionStateChange);
   connection.Open();
   // ...
PgSqlTransaction transaction = connection.BeginTransaction();
   // ...
   transaction.Commit();
   // ...

void connection_TransactionStateChange(object sender, TransactionStateChangeEventArgs e) {

    // common actions that must be done before and after the transaction state change
    // ...

    if (e is TransactionStateChangingEventArgs) {
        // actions before the transaction state change
        // ...
    }
    else { // e is TransactionStateChangedEventArgs
        // actions after the transaction state change
        // ...
    }
}

[Visual Basic]

Dim connection As New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
AddHandler connection.TransactionStateChanged, New TransactionStateChangedEventHandler(AddressOf &_ Me.connection_TransactionStateChange)
    AddHandler connection.TransactionStateChanging, New TransactionStateChangingEventHandler(AddressOf &_ Me.connection_TransactionStateChange)
    connection.Open()
    ' ...
    Dim Transaction As OracleTransaction
    Transaction = connection.BeginTransaction()
    ' ...
    Transaction.Commit()
    ' ...

    Private Sub connection_TransactionStateChange(ByVal sender As Object, ByVal e As TransactionStateChangeEventArgs)
    ' common actions that must be done before and after the transaction state change
    '...
    If TypeOf e Is TransactionStateChangingEventArgs Then
        ' actions before the transaction state change
        ' ...
    Else ' e is TransactionStateChangedEventArgs
        ' actions after the transaction state change
        ' ...
    End If
End Sub

See Also

TransactionStateChangeEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

TransactionStateChangeEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangeEventArgs Class Members

Devart.Common Namespace : TransactionStateChangeEventArgs Class

TransactionStateChangeEventArgs overview

Public Properties

Public Property Action Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangeEventArgs Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

TransactionStateChangeEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangeEventArgs Class Properties

Devart.Common Namespace : TransactionStateChangeEventArgs Class

For a list of all members of this type, see TransactionStateChangeEventArgs members.

Public Properties

Public Property Action Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangeEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

TransactionStateChangeEventArgs Class | TransactionStateChangeEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Action Property

Devart.Common Namespace > TransactionStateChangeEventArgs Class : Action Property

Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

[Visual Basic]
Public ReadOnly Property Action As TransactionAction
[C#]
public TransactionAction Action {get;}

Return Type

One of the TransactionAction values.

See Also

TransactionStateChangeEventArgs Class | TransactionStateChangeEventArgs Members


%%PageItemTitle%%

TransactionStateChangingEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangingEventArgs Class

Devart.Common Namespace : TransactionStateChangingEventArgs Class

Provides data for the DbTransactionBase.StateChanging event of the DbTransactionBase class.

For a list of all members of this type, see TransactionStateChangingEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.TransactionStateChangeEventArgs
Devart.Common.TransactionStateChangingEventArgs

Syntax

[Visual Basic]
Public NotInheritable Class TransactionStateChangingEventArgs
   Inherits TransactionStateChangeEventArgs
[C#]
public sealed class TransactionStateChangingEventArgs : TransactionStateChangeEventArgs

See Also

TransactionStateChangingEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

TransactionStateChangingEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangingEventArgs Class Members

Devart.Common Namespace : TransactionStateChangingEventArgs Class

TransactionStateChangingEventArgs overview

Public Constructors

Public Constructor TransactionStateChangingEventArgs Constructor Initializes a new instance of the TransactionStateChangingEventArgs class.

Public Properties

Public Property Action (Inherited from TransactionStateChangeEventArgs) Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangingEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

TransactionStateChangingEventArgs Class | TransactionStateChangingEventArgs Members | TransactionAction Enumeration

Language

Visual Basic

C#

Show All

action
The operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanging event occurs.
See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangingEventArgs Constructor

Devart.Common Namespace > TransactionStateChangingEventArgs Class : TransactionStateChangingEventArgs Constructor (TransactionStateChangingEventArgs)

Initializes a new instance of the TransactionStateChangingEventArgs class.

[Visual Basic]
Public Function New( _
   ByVal action As TransactionAction _
)
[C#]
public TransactionStateChangingEventArgs(
   TransactionAction action
);

Parameters

action
The operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangingEventArgs Class | TransactionStateChangingEventArgs Members | TransactionAction Enumeration


%%PageItemTitle%% Enumerations

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Common Namespace (Devart.Data) Enumerations

Enumerations

Enumeration | Description
DumpMode | Specifies what kind of information should be exported by Devart.Data.PostgreSql.PgSqlDump.
MonitorEventType | Describes type of the current DbMonitor event.
MonitorTracePoint | Determines when DbMonitor.TraceEvent event occurs.
RefreshRowMode | Describes autorefresh actions that can be taken by DbCommandBuilder and DbDataTable.
SqlStatementType | Describes type of a statement in a script.
TransactionAction | Indicates the operation, that is being performed or has been performed in the transaction in the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging events.

See Also

Devart.Data Assembly


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DumpMode Enumeration

Devart.Common Namespace : DumpMode Enumeration

Specifies what kind of information should be exported by Devart.Data.PostgreSql.PgSqlDump.

Members

Member | Description
All | Export both data and metadata. The dump contains DDL and DML statements.
Schema | Export metadata information only. The dump contains DDL statements only. Information about users is included as well.
Data | Export only data contained in tables. The dump text contains DML statements only.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

MonitorEventType Enumeration

Devart.Common Namespace : MonitorEventType Enumeration

Describes type of the current DbMonitor event.

Members

Member | Description
Connect | Application opens connection to a data source.
Disconnect | Application closes connection to a data source.
Prepare | Application prepares an execute statement.
Execute | Application executes a statement against a data source.
BeginTransaction | Application begins a transaction (local or distributed) against a data source.
Commit | Application executes COMMIT statement against a data source.
Rollback | Application executes ROLLBACK statement against a data source.
Error | Data source returns an error message.
ActivateInPool | Application takes a connection from the pool.
ReturnToPool | Application returns a connection to the pool.
Custom | Application executes any user defined statement against a data source.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

MonitorTracePoint Enumeration

Devart.Common Namespace : MonitorTracePoint Enumeration

Determines when DbMonitor.TraceEvent event occurs.

Members

Member | Description
BeforeEvent | Occurs in DbMonitor before some operation has started.
AfterEvent | Occurs in DbMonitor after some operation is complete.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace | RefreshMode Property | RefreshMode Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

RefreshRowMode Enumeration

Devart.Common Namespace : RefreshRowMode Enumeration

Describes autorefresh actions that can be taken by DbCommandBuilder and DbDataTable.

Members

Member | Description
None | Never refresh field values from the server.
AfterInsert | Retrieve field values from the server after an INSERT statement execution.
AfterUpdate | Retrieve field values from the server after an UPDATE statement execution.
Both | Retrieve field values from the server after an execution of either INSERT or UPDATE statements.

See Also

Devart.Common Namespace | RefreshMode Property | RefreshMode Property


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SqlStatementType Enumeration

Devart.Common Namespace : SqlStatementType Enumeration

Describes type of a statement in a script.

Members

Member | Description
Unknown | Unknown statement type.
Select | A SELECT statement.
Insert | An INSERT statement.
Update | An UPDATE statement.
Delete | A DELETE statement.
Batch | A complex construction like script or statement block.
Alter | An ALTER statement.
Create | A CREATE statement.
Drop | A DROP statement.
Execute | An EXECUTE statement.
Commit | A COMMIT statement.
Rollback | A ROLLBACK statement.
With | A WITH statement.
Extended | A construction that does not represent usual SQL statements.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

TransactionAction Enumeration

Devart.Common Namespace : TransactionAction Enumeration

Indicates the operation, that is being performed or has been performed in the transaction in the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging events.

Members

Member | Description
BeginTransaction | Transaction is being started or has been started.
Commit | Transaction is being committed or has been committed.
Rollback | Transaction is being rolled back or has been rolled back.
Savepoint | The savepoint is being created or has been created.
ReleaseSavepoint | Savepoint is being released or has been released.
RollbackToSavepoint | Transaction is being rolled back to savepoint or has been rolled back to savepoint.

See Also

Devart.Common Namespace


%%PageItemTitle%% Delegates

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Common Namespace (Devart.Data) Delegates

Delegates

Delegate | Description
MonitorEventHandler | Represents the method that will handle the DbMonitor.TraceEvent event of the DbMonitor class.
ProxyOptionsPropertyChanged | Represents the method that will handle the ProxyOptions.PropertyChanged event of the ProxyOptions class.
ScriptErrorEventHandler | Represents the method that will handle the DbScript.Error event of the DbScript.
ScriptProgressEventHandler | Represents the method that will handle the DbScript.Progress event of the DbScript.
TransactionStateChangedEventHandler | Represents the method that will handle the DbTransactionBase.StateChanged event of DbTransactionBase descendants.
TransactionStateChangingEventHandler | Represents the method that will handle the DbTransactionBase.StateChanging event of DbTransactionBase descendants.

See Also

Devart.Data Assembly


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The MonitorEventArgs object that contains the event data.
See Also Languages Devart.Data Send comments on this topic.

MonitorEventHandler Delegate

Devart.Common Namespace : MonitorEventHandler Delegate

Represents the method that will handle the DbMonitor.TraceEvent event of the DbMonitor class.

[Visual Basic]
Public Delegate Sub MonitorEventHandler( _
   ByVal sender As Object, _
   ByVal e As MonitorEventArgs _
)
[C#]
public delegate void MonitorEventHandler(
   object sender,
   MonitorEventArgs e
);

Parameters

sender
The source of the event.
e
The MonitorEventArgs object that contains the event data.

Remarks

When you create a MonitorEventArgs 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

Example

The following sample shows how to enable and disable monitoring of database activity in your application.

[C#]

static void OnEvent(object sender, MonitorEventArgs e)
{
  if (e.TracePoint==MonitorTracePoint.BeforeEvent)
  {
    Console.WriteLine("Description: " + e.Description);
    Console.WriteLine(" Extra info: " + e.ExtraInfo);
  }
}

[MTAThread]
static void Main(string[] args)
{
  PgSqlConnection pgConn = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  PgSqlMonitor pgMonitor = new PgSqlMonitor();
  pgMonitor.TraceEvent += new MonitorEventHandler(OnEvent);
  pgMonitor.IsActive = true;
  PgSqlCommand pgCommand = new PgSqlCommand("select count(*) from Test.Dept",pgConn);
  pgConn.Open();
  Console.WriteLine(pgCommand.ExecuteScalar());
  pgConn.Close();
  pgMonitor.TraceEvent -= new MonitorEventHandler(OnEvent);
  Console.ReadLine();
}

[Visual Basic]

Sub OnEvent(ByVal sender As Object, ByVal e As MonitorEventArgs)
  If e.TracePoint = MonitorTracePoint.BeforeEvent Then
    Console.WriteLine("Description: " & e.Description)
    Console.WriteLine(" Extra info: " & e.ExtraInfo)
  End If
End Sub

<MTAThread()> _
Sub Main()
  Dim pgConn As PgSqlConnection = New PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  Dim pgMonitor As PgSqlMonitor = New PgSqlMonitor
  AddHandler pgMonitor.TraceEvent, AddressOf OnEvent
  pgMonitor.IsActive = True
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("select count(*) from Test.Dept", pgConn)
  pgConn.Open()
  Console.WriteLine(pgCommand.ExecuteScalar())
  pgConn.Close()
  RemoveHandler pgMonitor.TraceEvent, AddressOf OnEvent
  Console.ReadLine()
End Sub

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

name
The name of the changed ProxyOptions property.
value
The new value of the ProxyOptions property.
See Also Languages Devart.Data Send comments on this topic.

ProxyOptionsPropertyChanged Delegate

Devart.Common Namespace : ProxyOptionsPropertyChanged Delegate

Represents the method that will handle the ProxyOptions.PropertyChanged event of the ProxyOptions class.

[Visual Basic]
Public Delegate Sub ProxyOptionsPropertyChanged( _
   ByVal name As String, _
   ByVal value As Object _
)
[C#]
public delegate void ProxyOptionsPropertyChanged(
   string name,
   object value
);

Parameters

name
The name of the changed ProxyOptions property.
value
The new value of the ProxyOptions property.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The ScriptErrorEventArgs object that contains the event data.
See Also Languages Devart.Data Send comments on this topic.

ScriptErrorEventHandler Delegate

Devart.Common Namespace : ScriptErrorEventHandler Delegate

Represents the method that will handle the Error event of the DbScript.

[Visual Basic]
Public Delegate Sub ScriptErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As ScriptErrorEventArgs _
)
[C#]
public delegate void ScriptErrorEventHandler(
   object sender,
   ScriptErrorEventArgs e
);

Parameters

sender
The source of the event.
e
The ScriptErrorEventArgs object that contains the event data.

Remarks

When you create a ScriptErrorEventArgs 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The ScriptErrorEventArgs object that contains the event data.
See Also Languages Devart.Data Send comments on this topic.

ScriptProgressEventHandler Delegate

Devart.Common Namespace : ScriptProgressEventHandler Delegate

Represents the method that will handle the Progress event of the DbScript.

[Visual Basic]
Public Delegate Sub ScriptProgressEventHandler( _
   ByVal sender As Object, _
   ByVal e As ScriptProgressEventArgs _
)
[C#]
public delegate void ScriptProgressEventHandler(
   object sender,
   ScriptProgressEventArgs e
);

Parameters

sender
The source of the event.
e
The ScriptErrorEventArgs object that contains the event data.

Remarks

When you create a ScriptErrorEventArgs 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The TransactionStateChangedEventArgs object that contains the event data.
See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangedEventHandler Delegate

Devart.Common Namespace : TransactionStateChangedEventHandler Delegate

Represents the method that will handle the DbTransactionBase.StateChanged event of DbTransactionBase descendants.

[Visual Basic]
Public Delegate Sub TransactionStateChangedEventHandler( _
   ByVal sender As Object, _
   ByVal e As TransactionStateChangedEventArgs _
)
[C#]
public delegate void TransactionStateChangedEventHandler(
   object sender,
   TransactionStateChangedEventArgs e
);

Parameters

sender
The source of the event.
e
The TransactionStateChangedEventArgs object that contains the event data.

Remarks

When you create a TransactionStateChangedEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Common Namespace


%%PageItemTitle%%

Devart.Common Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The TransactionStateChangingEventArgs object that contains the event data.
See Also Languages Devart.Data Send comments on this topic.

TransactionStateChangingEventHandler Delegate

Devart.Common Namespace : TransactionStateChangingEventHandler Delegate

Represents the method that will handle the DbTransactionBase.StateChanging event of DbTransactionBase descendants.

[Visual Basic]
Public Delegate Sub TransactionStateChangingEventHandler( _
   ByVal sender As Object, _
   ByVal e As TransactionStateChangingEventArgs _
)
[C#]
public delegate void TransactionStateChangingEventHandler(
   object sender,
   TransactionStateChangingEventArgs e
);

Parameters

sender
The source of the event.
e
The TransactionStateChangingEventArgs object that contains the event data.

Remarks

When you create a TransactionStateChangingEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Common Namespace


%%ItemTitle%%

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Data Namespace

Inheritance Hierarchy

Classes

Class | Description
DataLink | Allows establishing flexible cross-form data binding.

See Also

Devart.Data Assembly


%%PageItemTitle%% Classes

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Data Namespace Classes

Inheritance Hierarchy

Classes

Class | Description
DataLink | Allows establishing flexible cross-form data binding.

See Also

Devart.Data Assembly


%%PageItemTitle%%

DataLink Members | Devart.Data Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DataLink Class

Devart.Data Namespace : DataLink Class

Allows establishing flexible cross-form data binding.

For a list of all members of this type, see DataLink members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.BindingSource
Devart.Data.DataLink

Syntax

[Visual Basic]
Public Class DataLink
   Inherits BindingSource
   Implements ICollection, IEnumerable, IList, IBindingList, IBindingListView, ICancelAddNew, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, ITypedList, IDisposable, ICurrencyManagerProvider
[C#]
public class DataLink : BindingSource, ICollection, IEnumerable, IList, IBindingList, IBindingListView, ICancelAddNew, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, ITypedList, IDisposable, ICurrencyManagerProvider

Remarks

For information on features of DataLink please refer to topic DataLink Component Architecture. See also description of InterForm Technology.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

Example

It is recommended to work with this component in design time. For example, if you create the PgSqlDataTable object (“pgDataTable1”) on Form1, you can access Form1's pgDataTable1 via the DataSource property of Form2's DataLink object (“dataLink1”). In this case, you will find the following entry in Form2.InitializeComponent():

[C#]

private void InitializeComponent() {
    ...
    this.dataLink1.DataSource = ((object)(Devart.Common.GlobalComponentsCache.GetObjectByName("Form1.pgDataTable1")));
    ...
}

[Visual Basic]

Private Sub InitializeComponent()
    ...
    Me.DataLink1.DataSource = CType(Devart.Common.GlobalComponentsCache.GetObjectByName("Form1.pgDataTable1"), Object)
    ...
End Sub

See Also

DataLink Members | Devart.Data Namespace


%%PageItemTitle%% $$Members$$

DataLink Class | Devart.Data Namespace

See Also Devart.Data Send comments on this topic.

DataLink Class Members

Devart.Data Namespace : DataLink Class

DataLink overview

Public Constructors

Public Constructor DataLink Constructor Creates a new instance of the DataLink class.

Public Properties

Public Property AllowEdit (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether items in the underlying list can be edited.
Public Property AllowNew (Inherited from System.Windows.Forms.BindingSource) | Gets or sets a value indicating whether the AddNew method can be used to add items to the list.
Public Property AllowRemove (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether items can be removed from the underlying list.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Count (Inherited from System.Windows.Forms.BindingSource) | Gets the total number of items in the underlying list.
Public Property CurrencyManager (Inherited from System.Windows.Forms.BindingSource) | Gets the currency manager associated with this BindingSource.
Public Property Current (Inherited from System.Windows.Forms.BindingSource) | Gets the current item in the list.
Public Property CurrentRow | Gets the current data row, which can be changed by user by changing position in the data grid or data controls.
Public Property DataMember | Gets or sets the specific data member in a multimember data source to bind to a data listing control.
Public Property DataSource | Gets or sets the source containing a list of values used to populate the items within the control.
Public Property Filter (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the expression used to filter which rows are viewed.
Public Property IsBindingSuspended (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the list binding is suspended.
Public Property IsFixedSize (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the underlying list has a fixed size.
Public Property IsReadOnly (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the underlying list is read-only.
Public Property IsSorted (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the items in the underlying list are sorted.
Public Property IsSynchronized (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether access to the collection is synchronized (thread safe).
Public Property Item (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the list element at the specified index.
Public Property List | Gets the list that the connector is bound to.
Public Property Owner | Gets or sets a form or other container that the DataLink instance belongs to.
Public Property Position | Gets or sets the index of the current item in the underlying list.
Public Property RaiseListChangedEvents (Inherited from System.Windows.Forms.BindingSource) | Gets or sets a value indicating whether ListChanged events should be raised.
Public Property SeparateEditing | Puts separate filters over the DataView object that was created.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Sort (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the column names used for sorting, and the sort order for viewing the rows in the data source.
Public Property SupportsAdvancedSorting (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports multi-column sorting.
Public Property SupportsChangeNotification (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports change notification.
Public Property SupportsFiltering (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports filtering.
Public Property SupportsSearching (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports searching with the Find method.
Public Property SupportsSorting (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports sorting.
Public Property Synchronized | Gets or sets a value indicating whether to synchronize current position with other DataLink instances that reference the same data source.
Public Property SyncRoot (Inherited from System.Windows.Forms.BindingSource) | Gets an object that can be used to synchronize access to the underlying list.

Public Methods

Public Method Add (Inherited from System.Windows.Forms.BindingSource) | Adds an existing item to the internal list.
Public Method AddNew | Overridden. Adds a new item to the underlying list.
Public Method CancelEdit (Inherited from System.Windows.Forms.BindingSource) | Cancels the current edit operation.
Public Method Clear (Inherited from System.Windows.Forms.BindingSource) | Removes all elements from the list.
Public Method Contains (Inherited from System.Windows.Forms.BindingSource) | Determines whether an object is an item in the list.
Public Method CopyTo (Inherited from System.Windows.Forms.BindingSource) | Copies the contents of the List to the specified array, starting at the specified index value.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndEdit (Inherited from System.Windows.Forms.BindingSource) | Applies pending changes to the underlying data source.
Public Method Find | Overloaded. Returns the index of the item in the list with the specified property name and value.
Public Method GetEnumerator (Inherited from System.Windows.Forms.BindingSource) | Retrieves an enumerator for the List.
Public Method GetItemProperties (Inherited from System.Windows.Forms.BindingSource) |
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetListName (Inherited from System.Windows.Forms.BindingSource) |
Public Method GetRelatedCurrencyManager (Inherited from System.Windows.Forms.BindingSource) | Gets the related currency manager for the specified data member.
Public Method IndexOf (Inherited from System.Windows.Forms.BindingSource) | Searches for the specified object and returns the index of the first occurrence within the entire list.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert (Inherited from System.Windows.Forms.BindingSource) | Inserts an item into the list at the specified index.
Public Method MoveFirst (Inherited from System.Windows.Forms.BindingSource) | Moves to the first item in the list.
Public Method MoveLast (Inherited from System.Windows.Forms.BindingSource) | Moves to the last item in the list.
Public Method MoveNext (Inherited from System.Windows.Forms.BindingSource) | Moves to the next item in the list.
Public Method MovePrevious (Inherited from System.Windows.Forms.BindingSource) | Moves to the previous item in the list.
Public Method Remove (Inherited from System.Windows.Forms.BindingSource) | Removes the specified item from the list.
Public Method RemoveAt (Inherited from System.Windows.Forms.BindingSource) | Removes the item at the specified index in the list.
Public Method RemoveCurrent (Inherited from System.Windows.Forms.BindingSource) | Removes the current item from the list.
Public Method RemoveFilter (Inherited from System.Windows.Forms.BindingSource) | Removes the filter associated with the BindingSource.
Public Method RemoveSort (Inherited from System.Windows.Forms.BindingSource) | Removes the sort associated with the BindingSource.
Public Method ResetAllowNew (Inherited from System.Windows.Forms.BindingSource) | Reinitializes the AllowNew property.
Public Method ResetBindings (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values.
Public Method ResetCurrentItem (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread the currently selected item and refresh its displayed value.
Public Method ResetItem (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread the item at the specified index, and refresh its displayed value.
Public Method ResumeBinding (Inherited from System.Windows.Forms.BindingSource) | Resumes data binding.
Public Method SuspendBinding (Inherited from System.Windows.Forms.BindingSource) | Suspends data binding to prevent changes from updating the bound data source.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event AddingNew (Inherited from System.Windows.Forms.BindingSource) | Occurs before an item is added to the underlying list.
Public Event BindingComplete (Inherited from System.Windows.Forms.BindingSource) | Occurs when all the clients have been bound to this BindingSource.
Public Event CurrentChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the currently bound item changes.
Public Event CurrentItemChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when a property value of the Current property has changed.
Public Event DataError (Inherited from System.Windows.Forms.BindingSource) | Occurs when a currency-related exception is silently handled by the BindingSource.
Public Event DataMemberChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the DataMember property value has changed.
Public Event DataSourceChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the DataSource property value has changed.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event ListChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the underlying list changes or an item in the list changes.
Public Event PositionChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs after the value of the Position property has changed.

See Also

DataLink Class | Devart.Data Namespace


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DataLink Constructor

Devart.Data Namespace > DataLink Class : DataLink Constructor (DataLink)

Creates a new instance of the DataLink class.

[Visual Basic]
Public Function New()
[C#]
public DataLink();

See Also

DataLink Class | DataLink Members


%%PageItemTitle%% $$Properties$$

DataLink Class | Devart.Data Namespace

See Also Devart.Data Send comments on this topic.

DataLink Class Properties

Devart.Data Namespace : DataLink Class

For a list of all members of this type, see DataLink members.

Public Properties

Public Property AllowEdit (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether items in the underlying list can be edited.
Public Property AllowNew (Inherited from System.Windows.Forms.BindingSource) | Gets or sets a value indicating whether the AddNew method can be used to add items to the list.
Public Property AllowRemove (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether items can be removed from the underlying list.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Count (Inherited from System.Windows.Forms.BindingSource) | Gets the total number of items in the underlying list.
Public Property CurrencyManager (Inherited from System.Windows.Forms.BindingSource) | Gets the currency manager associated with this BindingSource.
Public Property Current (Inherited from System.Windows.Forms.BindingSource) | Gets the current item in the list.
Public Property CurrentRow | Gets the current data row, which can be changed by user by changing position in the data grid or data controls.
Public Property DataMember | Gets or sets the specific data member in a multimember data source to bind to a data listing control.
Public Property DataSource | Gets or sets the source containing a list of values used to populate the items within the control.
Public Property Filter (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the expression used to filter which rows are viewed.
Public Property IsBindingSuspended (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the list binding is suspended.
Public Property IsFixedSize (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the underlying list has a fixed size.
Public Property IsReadOnly (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the underlying list is read-only.
Public Property IsSorted (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the items in the underlying list are sorted.
Public Property IsSynchronized (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether access to the collection is synchronized (thread safe).
Public Property Item (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the list element at the specified index.
Public Property List | Gets the list that the connector is bound to.
Public Property Owner | Gets or sets a form or other container that the DataLink instance belongs to.
Public Property Position | Gets or sets the index of the current item in the underlying list.
Public Property RaiseListChangedEvents (Inherited from System.Windows.Forms.BindingSource) | Gets or sets a value indicating whether ListChanged events should be raised.
Public Property SeparateEditing | Puts separate filters over the DataView object that was created.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Sort (Inherited from System.Windows.Forms.BindingSource) | Gets or sets the column names used for sorting, and the sort order for viewing the rows in the data source.
Public Property SupportsAdvancedSorting (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports multi-column sorting.
Public Property SupportsChangeNotification (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports change notification.
Public Property SupportsFiltering (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports filtering.
Public Property SupportsSearching (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports searching with the Find method.
Public Property SupportsSorting (Inherited from System.Windows.Forms.BindingSource) | Gets a value indicating whether the data source supports sorting.
Public Property Synchronized | Gets or sets a value indicating whether to synchronize current position with other DataLink instances that reference the same data source.
Public Property SyncRoot (Inherited from System.Windows.Forms.BindingSource) | Gets an object that can be used to synchronize access to the underlying list.

See Also

DataLink Class | Devart.Data Namespace


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

CurrentRow Property

Devart.Data Namespace > DataLink Class : CurrentRow Property

Gets the current data row, which can be changed by user by changing position in the data grid or data controls.

[Visual Basic]
Public ReadOnly Property CurrentRow As DbDataRowView
[C#]
public DbDataRowView CurrentRow {get;}

Return Type

The current data row, which can be changed by user by changing position in the data grid or data controls.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members | DataSource Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DataMember Property

Devart.Data Namespace > DataLink Class : DataMember Property

Gets or sets the specific data member in a multimember data source to bind to a data listing control.

[Visual Basic]
Public Property DataMember As String
[C#]
public string DataMember {get; set;}

Return Type

A data member from a multimember data source. The default value is an empty string.

Remarks

Use the DataMember property to specify a member from a multimember data source to bind to the list control. For example, if you have a data source with more than one table specified in the DataSource property, use the DataMember property to specify which table to bind to a data listing control.

See Also

DataLink Class | DataLink Members | DataSource Property


%%PageItemTitle%%

DataLink Class | DataLink Members | DataMember Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

DataSource Property

Devart.Data Namespace > DataLink Class : DataSource Property (DataLink)

Gets or sets the source containing a list of values used to populate the items within the control.

[Visual Basic]
Public Property DataSource As Object
[C#]
public object DataSource {get; set;}

Return Type

An IEnumerable or IListSource that contains a collection of values used to supply data to this control. The default value is a null reference.

Remarks

Use the DataSource property to specify the source of values to bind to a data listing control. A data source must be an object that implements either the System.Collections.IEnumerable interface (such as System.Data.DataView, System.Collections.ArrayList, or System.Collections.Hashtable) or the IListSource interface to bind to a control derived from the BaseDataList class. When you set the DataSource property, you must manually write the code to perform data binding.

If the data source specified by the DataSource property contains multiple sources of data, use the DataMember property to specify the specific source to bind to the control. For example, if you have a System.Data.DataSet object with multiple tables, you must specify which table to bind to the control.

See Also

DataLink Class | DataLink Members | DataMember Property


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

List Property

Devart.Data Namespace > DataLink Class : List Property

Gets the list that the connector is bound to.

[Visual Basic]
Public ReadOnly Property List As IList
[C#]
public IList List {get;}

Return Type

The list that the connector is bound to.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Owner Property

Devart.Data Namespace > DataLink Class : Owner Property (DataLink)

Gets or sets a form or other container that the DataLink instance belongs to.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

A form or other container that the object belongs to.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Position Property

Devart.Data Namespace > DataLink Class : Position Property (DataLink)

Gets or sets the index of the current item in the underlying list.

[Visual Basic]
Public Property Position As Integer
[C#]
public int Position {get; set;}

Return Type

The zero-based index of the current item in the underlying list.

Remarks

When setting the Position property, out-of-range values are treated in the following manner:

  • Negative values are treated as 0.
  • Values greater than or equal to Count are treated as Count minus 1.

Changing the Position property will correspondingly change the CurrentRow property.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members | Creating and Using DataViews

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

SeparateEditing Property

Devart.Data Namespace > DataLink Class : SeparateEditing Property

Puts separate filters over the DataView object that was created.

[Visual Basic]
Public Property SeparateEditing As Boolean
[C#]
public bool SeparateEditing {get; set;}

Remarks

By default DataLink uses the same DataView object as the data source it references to does. This influences sorting and filtering data to DataLink.

When the SeparateEditing property is set to true, DataLink creates its own DataView object, over which filters are put separately.

See Also

DataLink Class | DataLink Members | Creating and Using DataViews


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Synchronized Property

Devart.Data Namespace > DataLink Class : Synchronized Property

Gets or sets a value indicating whether to synchronize current position with other DataLink instances that reference the same data source.

[Visual Basic]
Public Property Synchronized As Boolean
[C#]
public bool Synchronized {get; set;}

Return Type

If , navigation in this instance of DataLink will affect other instances. The default value is false.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%% $$Methods$$

DataLink Class | Devart.Data Namespace

See Also Devart.Data Send comments on this topic.

DataLink Class Methods

Devart.Data Namespace : DataLink Class

For a list of all members of this type, see DataLink members.

Public Methods

Public Method Add (Inherited from System.Windows.Forms.BindingSource) | Adds an existing item to the internal list.
Public Method AddNew | Overridden. Adds a new item to the underlying list.
Public Method CancelEdit (Inherited from System.Windows.Forms.BindingSource) | Cancels the current edit operation.
Public Method Clear (Inherited from System.Windows.Forms.BindingSource) | Removes all elements from the list.
Public Method Contains (Inherited from System.Windows.Forms.BindingSource) | Determines whether an object is an item in the list.
Public Method CopyTo (Inherited from System.Windows.Forms.BindingSource) | Copies the contents of the List to the specified array, starting at the specified index value.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndEdit (Inherited from System.Windows.Forms.BindingSource) | Applies pending changes to the underlying data source.
Public Method Find | Overloaded. Returns the index of the item in the list with the specified property name and value.
Public Method GetEnumerator (Inherited from System.Windows.Forms.BindingSource) | Retrieves an enumerator for the List.
Public Method GetItemProperties (Inherited from System.Windows.Forms.BindingSource) |
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetListName (Inherited from System.Windows.Forms.BindingSource) |
Public Method GetRelatedCurrencyManager (Inherited from System.Windows.Forms.BindingSource) | Gets the related currency manager for the specified data member.
Public Method IndexOf (Inherited from System.Windows.Forms.BindingSource) | Searches for the specified object and returns the index of the first occurrence within the entire list.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert (Inherited from System.Windows.Forms.BindingSource) | Inserts an item into the list at the specified index.
Public Method MoveFirst (Inherited from System.Windows.Forms.BindingSource) | Moves to the first item in the list.
Public Method MoveLast (Inherited from System.Windows.Forms.BindingSource) | Moves to the last item in the list.
Public Method MoveNext (Inherited from System.Windows.Forms.BindingSource) | Moves to the next item in the list.
Public Method MovePrevious (Inherited from System.Windows.Forms.BindingSource) | Moves to the previous item in the list.
Public Method Remove (Inherited from System.Windows.Forms.BindingSource) | Removes the specified item from the list.
Public Method RemoveAt (Inherited from System.Windows.Forms.BindingSource) | Removes the item at the specified index in the list.
Public Method RemoveCurrent (Inherited from System.Windows.Forms.BindingSource) | Removes the current item from the list.
Public Method RemoveFilter (Inherited from System.Windows.Forms.BindingSource) | Removes the filter associated with the BindingSource.
Public Method RemoveSort (Inherited from System.Windows.Forms.BindingSource) | Removes the sort associated with the BindingSource.
Public Method ResetAllowNew (Inherited from System.Windows.Forms.BindingSource) | Reinitializes the AllowNew property.
Public Method ResetBindings (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values.
Public Method ResetCurrentItem (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread the currently selected item and refresh its displayed value.
Public Method ResetItem (Inherited from System.Windows.Forms.BindingSource) | Causes a control bound to the BindingSource to reread the item at the specified index, and refresh its displayed value.
Public Method ResumeBinding (Inherited from System.Windows.Forms.BindingSource) | Resumes data binding.
Public Method SuspendBinding (Inherited from System.Windows.Forms.BindingSource) | Suspends data binding to prevent changes from updating the bound data source.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DataLink Class | Devart.Data Namespace


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

AddNew Method

Devart.Data Namespace > DataLink Class : AddNew Method

Adds a new item to the underlying list.

[Visual Basic]
Overrides Public Function AddNew() As Object
[C#]
public override object AddNew();

Return Type

The Object that was created and added to the list.

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data Send comments on this topic.

Find Method

Devart.Data Namespace > DataLink Class : Find Method

Returns the index of the item in the list with the specified property name and value.

Overload List

Returns the index of the item in the list with the specified property name and value.

[Visual Basic] Overloads Public Function Find(String,Object) As Integer

[C#] public int Find(string,object);

Searches for the index of the item that has the given property descriptor.

[Visual Basic] Overloads Public Overridable Function Find(PropertyDescriptor,Object) As Integer

[C#] public virtual int Find(PropertyDescriptor,object);

See Also

DataLink Class | DataLink Members


%%PageItemTitle%%

DataLink Class | DataLink Members | Overload List

Language

Visual Basic

C#

Show All

propertyName
The name of the property to search for.
key
The value of the item with the specified name to find.
See Also Languages Devart.Data Send comments on this topic.

Find(String,Object) Method

Devart.Data Namespace > DataLink Class > Find Method : Find(String,Object) Method

Returns the index of the item in the list with the specified property name and value.

[Visual Basic]
Overloads Public Function Find( _
   ByVal propertyName As String, _
   ByVal key As Object _
) As Integer
[C#]
public int Find(
   string propertyName,
   object key
);

Parameters

propertyName
The name of the property to search for.
key
The value of the item with the specified name to find.

Return Type

The zero-based index of the item, having the specified property name and value.

See Also

DataLink Class | DataLink Members | Overload List


%%ItemTitle%%

Devart.Data.PostgreSql Send comments on this topic.

Assembly Overview

Namespaces

Namespace | Description
Devart.Common |
Devart.Data.PostgreSql |


%%ItemTitle%%

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Common Namespace (Devart.Data.PostgreSql)

Inheritance Hierarchy

Classes

Class | Description
DbConnectionBase | Represents an open connection to a server.
DbStatementExecuteEventArgs | Base class for Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs, that is used in the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event.
SelectColumn | Represents a column or an expression in SELECT, GROUP BY and ORDER BY clauses of a SQL statement.
SelectColumnCollection | Represents a collection of columns and expressions in a SelectStatement object.
SelectStatement | Composes, modifies and parses SELECT statements.
SelectStatementNode | An abstract SQL element.
SelectTable | Represents a table or a subquery in the FROM clause of a SELECT statement.
SelectTableCollection | Represents a collection of tables and subqueries in a SelectStatement object.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%% Classes

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Common Namespace (Devart.Data.PostgreSql) Classes

Inheritance Hierarchy

Classes

Class | Description
DbConnectionBase | Represents an open connection to a server.
DbStatementExecuteEventArgs | Base class for Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs, that is used in the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event.
SelectColumn | Represents a column or an expression in SELECT, GROUP BY and ORDER BY clauses of a SQL statement.
SelectColumnCollection | Represents a collection of columns and expressions in a SelectStatement object.
SelectStatement | Composes, modifies and parses SELECT statements.
SelectStatementNode | An abstract SQL element.
SelectTable | Represents a table or a subquery in the FROM clause of a SELECT statement.
SelectTableCollection | Represents a collection of tables and subqueries in a SelectStatement object.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

DbConnectionBase Members | Devart.Common Namespace | DbConnection | PgSqlConnection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DbConnectionBase Class

Devart.Common Namespace : DbConnectionBase Class

Represents an open connection to a server.

For a list of all members of this type, see DbConnectionBase members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbConnection
Devart.Common.DbConnectionBase
Devart.Data.PostgreSql.PgSqlConnection

Syntax

[Visual Basic]
Public MustInherit Class DbConnectionBase
   Inherits DbConnection
   Implements IComponent, IDbConnection, IDisposable
[C#]
public abstract class DbConnectionBase : DbConnection, IComponent, IDbConnection, IDisposable

Remarks

The abstract DbConnectionBase class implements some of DbConnection functionality that is DBMS-independent.

Example

The following sample demonstrates how using base classes helps to create database-independent code.

[C#]

public void PrintDept(DbConnectionBase myConnection) {
    DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
    myCommand.CommandText = "SELECT * FROM Test.Dept";
    myConnection.Open();
    DbDataReader myReader = myCommand.ExecuteReader();
    try {
        while (myReader.Read()) {
            Console.WriteLine(myReader.GetInt32(0) + " " +
                myReader.GetString(1) + " " + myReader.GetString(2));
        }
    }
    finally {
        myReader.Close();
        myConnection.Close();
    }
}

[Visual Basic]

Public Sub PrintDept(ByVal myConnection As DbConnectionBase)
    Dim myCommand As DbCommandBase = myConnection.CreateCommand()
    myCommand.CommandText = "SELECT * FROM Test.Dept"
    myConnection.Open()
    Dim myReader As DbDataReader = myCommand.ExecuteReader()
    Try
        While myReader.Read()
            Console.WriteLine(String.Concat(myReader.GetInt32(0), " ", _
                myReader.GetString(1), " ", myReader.GetString(2)))
        End While
    Finally
        myReader.Close()
        myConnection.Close()
    End Try
End Sub

See Also

DbConnectionBase Members | Devart.Common Namespace | DbConnection | PgSqlConnection Class


%%PageItemTitle%% $$Members$$

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

DbConnectionBase Class Members

Devart.Common Namespace : DbConnectionBase Class

DbConnectionBase overview

Public Properties

Public Property ConnectionString | Overridden. Gets or sets the string used to open a server connection.
Public Property ConnectionTimeout | Overridden. Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Database | Overridden. Gets or sets the name of the current database or the database to be used once a connection is open.
Public Property DataSource | Overridden. Gets or sets name of the server to which to connect.
Public Property InDistributedTransaction | Indicates whether the connection is enlisted in a distributed transaction.
Public Property Name | Gets or sets name of the component.
Public Property Owner | Gets or sets a form or other container that the DbConnectionBase instance belongs to.
Public Property ServerVersion | Overridden. Gets a string containing the version of the instance of the server to which the client is connected.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property State | Overridden. Gets the current state of the connection.

Public Methods

Public Method BeginOpen | Starts an asynchronous invocation of an Open method.
Public Method BeginTransaction (Inherited from System.Data.Common.DbConnection) | Overloaded. Starts a database transaction.
Public Method ChangeDatabase | Overridden. Changes the current database associated with an open DbConnectionBase.
Public Method Close | Overridden. Closes the connection to the database. This is the preferred method of closing any open connection.
Public Method CreateCommand (Inherited from System.Data.Common.DbConnection) | Creates and returns a DbCommand object associated with the current connection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndOpen | Ends an asynchronous invocation of the Open method.
Public Method EnlistTransaction | Overridden. Enlists in the specified transaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetSchema | Overloaded. Overridden. Provides information about server schema objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overridden. Opens a data source connection with the property settings specified by the ConnectionString.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event StateChange | Occurs when the state of the connection changes.
Public Event TransactionStateChanged | Occurs when the state of the transaction is changed.
Public Event TransactionStateChanging | Occurs when the state of the transaction is changing.

See Also

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class


%%PageItemTitle%% $$Properties$$

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

DbConnectionBase Class Properties

Devart.Common Namespace : DbConnectionBase Class

For a list of all members of this type, see DbConnectionBase members.

Public Properties

Public Property ConnectionString | Overridden. Gets or sets the string used to open a server connection.
Public Property ConnectionTimeout | Overridden. Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Database | Overridden. Gets or sets the name of the current database or the database to be used once a connection is open.
Public Property DataSource | Overridden. Gets or sets name of the server to which to connect.
Public Property InDistributedTransaction | Indicates whether the connection is enlisted in a distributed transaction.
Public Property Name | Gets or sets name of the component.
Public Property Owner | Gets or sets a form or other container that the DbConnectionBase instance belongs to.
Public Property ServerVersion | Overridden. Gets a string containing the version of the instance of the server to which the client is connected.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property State | Overridden. Gets the current state of the connection.

See Also

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionString Property

Devart.Common Namespace > DbConnectionBase Class : ConnectionString Property (DbConnectionBase)

Gets or sets the string used to open a server connection.

[Visual Basic]
Overrides Public Property ConnectionString As String
[C#]
public override string ConnectionString {get; set;}

Return Type

The connection string that includes parameters needed to establish the initial connection. The default value is an empty string ("").

Remarks

When ConnectionString property is assigned a value, connection closes. The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as ArgumentException, is generated. Other errors can be found only when an attempt is made to Open the connection.

The ConnectionString is similar to an OLE DB connection string. Values may be delimited by single or double quotes, (for example, name='value' or name="value"). Either single or double quotes may be used within a connection string by using the other delimiter, for example, name="value's" or name= 'value"s', but not name= 'value's' or name= ""value"". All blank characters, except those placed within a value or within quotes, are ignored. Keyword value pairs must be separated by a semicolon (;). If a semicolon is part of a value, it also must be delimited by quotes. No escape sequences are supported. The value type is irrelevant. Names are not case sensitive.

If a given name occurs more than once in the connection string, the value associated with the last occurrence is used.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionTimeout Property

Devart.Common Namespace > DbConnectionBase Class : ConnectionTimeout Property (DbConnectionBase)

Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

[Visual Basic]
Overrides Public ReadOnly Property ConnectionTimeout As Integer
[C#]
public override int ConnectionTimeout {get;}

Return Type

The time (in seconds) to wait for a connection to open. The default value is 15 seconds.

Remarks

A value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect will wait indefinitely.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Database Property

Devart.Common Namespace > DbConnectionBase Class : Database Property (DbConnectionBase)

Gets or sets the name of the current database or the database to be used once a connection is open.

[Visual Basic]
Overrides Public ReadOnly Property Database As String
[C#]
public override string Database {get;}

Return Type

The name of the current database or the name of the database to be used once a connection is open. The default value is an empty string ("").

Remarks

If the query contains no reference to database to which a table belongs, an attempt is made to find the table in database, which name is specified in Database property. If the value of the property is empty, you must include in a query name of a database for every table you use.

Assigning a value to this property does not lead to closing of current connection.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataSource Property

Devart.Common Namespace > DbConnectionBase Class : DataSource Property (DbConnectionBase)

Gets or sets name of the server to which to connect.

[Visual Basic]
Overrides Public ReadOnly Property DataSource As String
[C#]
public override string DataSource {get;}

Return Type

Gets or sets name of the server to which to connect. The default value is an empty string ("").

Remarks

When a value is assigned to this property, the DbConnectionBase is closed.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InDistributedTransaction Property

Devart.Common Namespace > DbConnectionBase Class : InDistributedTransaction Property

Indicates whether the connection is enlisted in a distributed transaction.

[Visual Basic]
Public ReadOnly Property InDistributedTransaction As Boolean
[C#]
public bool InDistributedTransaction {get;}

Return Type

true if the connection is enlisted in a distributed transaction; otherwise, false.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Common Namespace > DbConnectionBase Class : Name Property (DbConnectionBase)

Gets or sets name of the component.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Owner Property

Devart.Common Namespace > DbConnectionBase Class : Owner Property (DbConnectionBase)

Gets or sets a form or other container that the DbConnectionBase instance belongs to.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

A form or other container that the object belongs to.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ServerVersion Property

Devart.Common Namespace > DbConnectionBase Class : ServerVersion Property (DbConnectionBase)

Gets a string containing the version of the instance of the server to which the client is connected.

[Visual Basic]
Overrides Public ReadOnly Property ServerVersion As String
[C#]
public override string ServerVersion {get;}

Return Type

The version of the server instance.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

State Property

Devart.Common Namespace > DbConnectionBase Class : State Property (DbConnectionBase)

Gets the current state of the connection.

[Visual Basic]
Overrides Public ReadOnly Property State As ConnectionState
[C#]
public override ConnectionState State {get;}

Return Type

A bitwise combination of the ConnectionState values. The default value is Closed.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%% $$Methods$$

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

DbConnectionBase Class Methods

Devart.Common Namespace : DbConnectionBase Class

For a list of all members of this type, see DbConnectionBase members.

Public Methods

Public Method BeginOpen | Starts an asynchronous invocation of an Open method.
Public Method BeginTransaction (Inherited from System.Data.Common.DbConnection) | Overloaded. Starts a database transaction.
Public Method ChangeDatabase | Overridden. Changes the current database associated with an open DbConnectionBase.
Public Method Close | Overridden. Closes the connection to the database. This is the preferred method of closing any open connection.
Public Method CreateCommand (Inherited from System.Data.Common.DbConnection) | Creates and returns a DbCommand object associated with the current connection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndOpen | Ends an asynchronous invocation of the Open method.
Public Method EnlistTransaction | Overridden. Enlists in the specified transaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetSchema | Overloaded. Overridden. Provides information about server schema objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overridden. Opens a data source connection with the property settings specified by the ConnectionString.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

BeginOpen Method

Devart.Common Namespace > DbConnectionBase Class : BeginOpen Method

Starts an asynchronous invocation of an Open method.

[Visual Basic]
Public Function BeginOpen( _
   ByVal callback As AsyncCallback, _
   ByVal stateObject As Object _
) As IAsyncResult
[C#]
public IAsyncResult BeginOpen(
   AsyncCallback callback,
   object stateObject
);

Parameters

callback
The delegate to call when the asynchronous invoke is complete. If callback is a null reference (Nothing in Visual Basic), the delegate is not called.
stateObject
State information that is passed on to the delegate.

Return Type

An IAsyncResult interface that represents the asynchronous operation started by calling this method.

Remarks

BeginOpen method enables you to open a connection to server without having current thread blocked. In other words, your program can continue execution while the connection is establishing so you do not have to wait for it.

To start opening a connection, you have to call BeginOpen method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to IAsyncResult object. After executing this method program flow continues.

When you are ready to use the connection, call EndOpen. If at the moment you call this method the negotiation process has not yet been finished, application stops and waits till the function returns which means that the connection is open.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

This sample shows how to implement asynchronous opening of a connection.

[C#]

public void AsyncOpen(DbConnectionBase myConnection)
{
  IAsyncResult myAsyncResult = myConnection.BeginOpen(null, null);
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values('100', 'DEVELOPMENT')";
  //some operations here
  myConnection.EndOpen(myAsyncResult);
  try
  {
    myCommand.ExecuteNonQuery();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub AsyncOpen(ByVal myConnection As DbConnectionBase)
  Dim myAsyncResult As IAsyncResult = myConnection.BeginOpen(Nothing, Nothing)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values('110', 'QA')"
  ' some operations here
  myConnection.EndOpen(myAsyncResult)
  Try
    myCommand.ExecuteNonQuery()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

value
The database name.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ChangeDatabase Method

Devart.Common Namespace > DbConnectionBase Class : ChangeDatabase Method (DbConnectionBase)

Changes the current database associated with an open DbConnectionBase.

[Visual Basic]
Overrides Public Sub ChangeDatabase( _
   ByVal value As String _
)
[C#]
public override void ChangeDatabase(
   string value
);

Parameters

value
The database name.

Remarks

This method does not close physical connection to the server, it only changes the current database associated with an open DbConnectionBase. See Database property for more information about databases associated with connections.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Close Method

Devart.Common Namespace > DbConnectionBase Class : Close Method (DbConnectionBase)

Closes the connection to the database. This is the preferred method of closing any open connection.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

Remarks

The Close method rolls back any pending transactions. It then releases the connection to the connection pool, or closes the connection if connection pooling is disabled.

Note that you must manually close all connections opened by the application. If a DbConnectionBase goes out of scope, it is not closed automatically till the application shuts down.

An application can call Close more than one time without generating an exception.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned from BeginOpen.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EndOpen Method

Devart.Common Namespace > DbConnectionBase Class : EndOpen Method

Ends an asynchronous invocation of the Open method.

[Visual Basic]
Public Sub EndOpen( _
   ByVal result As IAsyncResult _
)
[C#]
public void EndOpen(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned from BeginOpen.

Remarks

BeginOpen method enables you to open a connection to server without having current thread blocked. In other words, your program can continue execution while the connection is establishing so you do not have to wait for it.

To start opening a connection, you have to call BeginOpen method, which in turn invokes appropriate actions in another thread. Return value of this method must be assigned to IAsyncResult object. After executing this method program flow continues.

When you are ready to use the connection, call EndOpen. If at the moment you call this method the negotiation process has not yet been finished, application stops and waits till the function returns which means that the connection is open.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

This sample shows how to implement asynchronous opening of a connection.

[C#]

public void AsyncOpen(DbConnectionBase myConnection)
{
  IAsyncResult myAsyncResult = myConnection.BeginOpen(null, null);
  DbCommandBase myCommand = (DbCommandBase)myConnection.CreateCommand();
  myCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values('100', 'DEVELOPMENT')";
  //some operations here
  myConnection.EndOpen(myAsyncResult);
  try
  {
    myCommand.ExecuteNonQuery();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Public Sub AsyncOpen(ByVal myConnection As DbConnectionBase)
  Dim myAsyncResult As IAsyncResult = myConnection.BeginOpen(Nothing, Nothing)
  Dim myCommand As DbCommandBase = myConnection.CreateCommand()
  myCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values('110', 'QA')"
  ' some operations here
  myConnection.EndOpen(myAsyncResult)
  Try
    myCommand.ExecuteNonQuery()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

transaction
A reference to an existing System.Transactions.Transaction in which to enlist.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EnlistTransaction Method

Devart.Common Namespace > DbConnectionBase Class : EnlistTransaction Method

Enlists in the specified transaction.

[Visual Basic]
Overrides Public Sub EnlistTransaction( _
   ByVal transaction As Transaction _
)
[C#]
public override void EnlistTransaction(
   Transaction transaction
);

Parameters

transaction
A reference to an existing System.Transactions.Transaction in which to enlist.

Remarks

Once a connection is explicitly enlisted in a distributed transaction, it cannot be unenlisted or enlisted in another transaction until the first transaction finishes.

Example

These samples demonstrate usage of EnlistTransaction.

[C#]

PostgreSqlCommand1.Connection=PostgreSqlConnection1;
using (TransactionScope transScope = new TransactionScope()) {
 PostgreSqlConnection1.Open();
 PostgreSqlCommand1.ExecuteNonQuery();
 transScope.Complete();
}
PostgreSqlConnection1.Close();

- or -

PostgreSqlCommand1.Connection=PostgreSqlConnection1;
PostgreSqlConnection1.Open();
using (TransactionScope transScope = new TransactionScope()) {
 PostgreSqlConnection1.EnlistTransaction(Transaction.Current);
 PostgreSqlCommand1.ExecuteNonQuery();
 transScope.Complete();
}
PostgreSqlConnection1.Close();

- or -

CommittableTransaction cmtTx = new CommittableTransaction();
PostgreSqlConnection1.Open();
PostgreSqlConnection1.EnlistTransaction(cmtTx);
PostgreSqlCommand1.ExecuteNonQuery();
PostgreSqlConnection1.Close();

[Visual Basic]

Me.PostgreSqlCommand1.Connection = Me.PostgreSqlConnection1
Using transScope = New Transactions.TransactionScope
  Me.PostgreSqlConnection1.Open()
  Me.PostgreSqlCommand1.ExecuteNonQuery()
  transScope.Complete()
End Using
Me.PostgreSqlConnection1.Close()

- or -

Me.PostgreSqlCommand1.Connection = Me.PostgreSqlConnection1
Me.PostgreSqlConnection1.Open()
Using transScope = New Transactions.TransactionScope
  Me.PostgreSqlConnection1.EnlistTransaction(Transactions.Transaction.Current)
  Me.PostgreSqlCommand1.ExecuteNonQuery()
  transScope.Complete()
End Using
Me.PostgreSqlConnection1.Close()

- or -

Dim cmtTx As New Transactions.CommittableTransaction
Me.PostgreSqlConnection1.Open()
Me.PostgreSqlConnection1.EnlistTransaction(cmtTx)
Me.PostgreSqlCommand1.ExecuteNonQuery()
Me.PostgreSqlConnection1.Close()

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetSchema Method

Devart.Common Namespace > DbConnectionBase Class : GetSchema Method

Provides information about server schema objects.

Overload List

Returns list of metadata collections and number of restrictions for a collection.

[Visual Basic] Overloads Overrides Public Function GetSchema() As DataTable

[C#] public override DataTable GetSchema();

Provides information about server schema objects.

[Visual Basic] Overloads Overrides Public Function GetSchema(String) As DataTable

[C#] public override DataTable GetSchema(string);

Returns detailed information about a server schema object.

[Visual Basic] Overloads Overrides Public Function GetSchema(String,String()) As DataTable

[C#] public override DataTable GetSchema(string,string[]);

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetSchema() Method

Devart.Common Namespace > DbConnectionBase Class > GetSchema Method : GetSchema() Method

Returns list of metadata collections and number of restrictions for a collection.

[Visual Basic]
Overloads Overrides Public Function GetSchema() As DataTable
[C#]
public override DataTable GetSchema();

Return Type

A DataTable object.

Remarks

Calling this method is actually same as calling GetSchema method with parameter "MetaDataCollections". It allows to obtain information about names of the server schema elements.

Refer to "Retrieving Metadata" article for detailed information.

See Also

DbConnectionBase Class | DbConnectionBase Members | Overload List


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members | Overload List

Language

Visual Basic

C#

Show All

collectionName
Name of the collection to get information about.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetSchema(String) Method

Devart.Common Namespace > DbConnectionBase Class > GetSchema Method : GetSchema(String) Method

Provides information about server schema objects.

[Visual Basic]
Overloads Overrides Public Function GetSchema( _
   ByVal collectionName As String _
) As DataTable
[C#]
public override DataTable GetSchema(
   string collectionName
);

Parameters

collectionName
Name of the collection to get information about.

Return Type

A DataTable object.

Remarks

GetSchema with 1 argument returns general information about the collection queried. For example, GetSchema("Users") returns list of the users on the server. To get the list of collections, call the GetSchema method without parameters, or with single parameter "MetaDataCollections" (which is actually the same). The table object returned by the method will contain three columns. The first field of every row is a keyword allowed to pass to the method (as collectionName argument). The second field is number of restriction values for this keywords (passed through restrictionValues argument).

Refer to "Retrieving Metadata" article for detailed information.

See Also

DbConnectionBase Class | DbConnectionBase Members | Overload List


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members | Overload List

Language

Visual Basic

C#

Show All

collectionName
Name of the collection to get information about.
restrictionValues
Array of strings representing collection restrictions. In some cases last array members may be omitted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetSchema(String,String[]) Method

Devart.Common Namespace > DbConnectionBase Class > GetSchema Method : GetSchema(String,String[]) Method

Returns detailed information about a server schema object.

[Visual Basic]
Overloads Overrides Public Function GetSchema( _
   ByVal collectionName As String, _
   ByVal restrictionValues() As String _
) As DataTable
[C#]
public override DataTable GetSchema(
   string collectionName,
   string[] restrictionValues
);

Parameters

collectionName
Name of the collection to get information about.
restrictionValues
Array of strings representing collection restrictions. In some cases last array members may be omitted.

Return Type

A DataTable object.

Remarks

GetSchema with 2 arguments returns detailed information about the collection or collection members. You can use wildcards in some cases to obtain information about several collection members.

Refer to "Retrieving Metadata" article for detailed information.

See Also

DbConnectionBase Class | DbConnectionBase Members | Overload List


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open Method

Devart.Common Namespace > DbConnectionBase Class : Open Method (DbConnectionBase)

Opens a data source connection with the property settings specified by the ConnectionString.

[Visual Basic]
Overrides Public Sub Open()
[C#]
public override void Open();

Remarks

The DbConnectionBase draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to the data source.

Note: If the DbConnectionBase goes out of scope, the connection it represents does not close automatically. Therefore, you must explicitly close the connection by calling Close.

Opening an open connection does nothing.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%% $$Events$$

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

DbConnectionBase Class Events

Devart.Common Namespace : DbConnectionBase Class

For a list of all members of this type, see DbConnectionBase members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event StateChange | Occurs when the state of the connection changes.
Public Event TransactionStateChanged | Occurs when the state of the transaction is changed.
Public Event TransactionStateChanging | Occurs when the state of the transaction is changing.

See Also

DbConnectionBase Class | Devart.Common Namespace | DbConnection | PgSqlConnection Class


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

StateChange Event

Devart.Common Namespace > DbConnectionBase Class : StateChange Event

Occurs when the state of the connection changes.

[Visual Basic]
Public Event StateChange() As StateChangeEventHandler
[C#]
public event StateChangeEventHandler StateChange();

Remarks

The event handler receives an argument of type StateChangeEventArgs containing data related to this event. The following StateChangeEventArgs properties provide information specific to this event.
Property | Description
CurrentState | Gets the new state of the connection. The connection object will be in the new state already when the event is fired.
OriginalState | Gets the original state of the connection.

The StateChange event is raised immediately after the State changes from Closed to Opened, or from Opened to Closed.

If an event handler throws an exception from within the StateChange event, the exception propagates to the caller of the Open or Close method.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TransactionStateChanged Event

Devart.Common Namespace > DbConnectionBase Class : TransactionStateChanged Event

Occurs when the state of the transaction is changed.

[Visual Basic]
Public Event TransactionStateChanged() As TransactionStateChangedEventHandler
[C#]
public event TransactionStateChangedEventHandler TransactionStateChanged();

Example

This sample demonstrates how to use the TransactionStateChanged and TransactionStateChanging events.

[C#]

PgSqlConnection connection = new PgSqlConnection(
     "host=server;database=test;user id=postgres;");
     connection.TransactionStateChanged += new TransactionStateChangedEventHandler(connection_TransactionStateChanged);
     connection.TransactionStateChanging += new TransactionStateChangingEventHandler(connection_TransactionStateChanging);
     connection.Open();

     // ...
PgSqlTransaction tr = connection.BeginTransaction();
     // ...
     tr.Commit();
     // ...

void connection_TransactionStateChanging(object sender, TransactionStateChangingEventArgs e) {

    if (e.Action == TransactionAction.Commit) {
        // do somthing...
    }
}

void connection_TransactionStateChanged(object sender, TransactionStateChangedEventArgs e) {

    if (e.Action == TransactionAction.Commit) {
        // do somthing...
    }
}

[Visual Basic]

Dim connection As New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
AddHandler connection.TransactionStateChanged, New TransactionStateChangedEventHandler(AddressOf &_ Me.connection_TransactionStateChanged)
    AddHandler connection.TransactionStateChanging, New TransactionStateChangingEventHandler(AddressOf &_ Me.connection_TransactionStateChanging)
    connection.Open()
    '...
    Dim Transaction As PgSqlTransaction
    Transaction = connection.BeginTransaction()
    '...
    Transaction.Commit()
    '...

    Private Sub connection_TransactionStateChanged(ByVal sender As Object, ByVal e As TransactionStateChangedEventArgs)
    If (e.Action = TransactionAction.Commit) Then
        '...
    End If
End Sub

Private Sub connection_TransactionStateChanging(ByVal sender As Object, ByVal e As TransactionStateChangingEventArgs)
    If (e.Action = TransactionAction.Commit) Then
        '...
    End If
End Sub

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbConnectionBase Class | DbConnectionBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TransactionStateChanging Event

Devart.Common Namespace > DbConnectionBase Class : TransactionStateChanging Event

Occurs when the state of the transaction is changing.

[Visual Basic]
Public Event TransactionStateChanging() As TransactionStateChangingEventHandler
[C#]
public event TransactionStateChangingEventHandler TransactionStateChanging();

Example

This sample demonstrates how to use the TransactionStateChanged and TransactionStateChanging events.

See Also

DbConnectionBase Class | DbConnectionBase Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DbStatementExecuteEventArgs Class

Devart.Common Namespace : DbStatementExecuteEventArgs Class

Base class for Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs, that is used in the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event.

For a list of all members of this type, see DbStatementExecuteEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.DbStatementExecuteEventArgs
Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs

Syntax

[Visual Basic]
Public Class DbStatementExecuteEventArgs
   Inherits EventArgs
[C#]
public class DbStatementExecuteEventArgs : EventArgs

See Also

DbStatementExecuteEventArgs Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

DbStatementExecuteEventArgs Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

DbStatementExecuteEventArgs Class Members

Devart.Common Namespace : DbStatementExecuteEventArgs Class

DbStatementExecuteEventArgs overview

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property Reader | Gets or sets an IDataReader that represents statement resultset.
Public Property StatementStatus | Determines status of the statement and script execution.
Public Property StatementType | Gets type of the statement.
Public Property Text | Gets the SQL statement that is about to be executed.

See Also

DbStatementExecuteEventArgs Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbStatementExecuteEventArgs Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

DbStatementExecuteEventArgs Class Properties

Devart.Common Namespace : DbStatementExecuteEventArgs Class

For a list of all members of this type, see DbStatementExecuteEventArgs members.

Public Properties

Public Property Length | Gets length of the statement in symbols.
Public Property LineNumber | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition | Gets position of the statement in its line.
Public Property Offset | Gets offset of the statement in the whole script text.
Public Property Reader | Gets or sets an IDataReader that represents statement resultset.
Public Property StatementStatus | Determines status of the statement and script execution.
Public Property StatementType | Gets type of the statement.
Public Property Text | Gets the SQL statement that is about to be executed.

See Also

DbStatementExecuteEventArgs Class | Devart.Common Namespace


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Length Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : Length Property (DbStatementExecuteEventArgs)

Gets length of the statement in symbols.

[Visual Basic]
Public ReadOnly Property Length As Integer
[C#]
public int Length {get;}

Return Type

Length of the statement.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LineNumber Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : LineNumber Property (DbStatementExecuteEventArgs)

Gets number of line in the whole script where the statement can be located.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

Number of line in the whole script.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LinePosition Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : LinePosition Property (DbStatementExecuteEventArgs)

Gets position of the statement in its line.

[Visual Basic]
Public ReadOnly Property LinePosition As Integer
[C#]
public int LinePosition {get;}

Return Type

Position of the statement.

Remarks

Read the property to get offset of the statement from the beginning of the line where it can be located.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Offset Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : Offset Property (DbStatementExecuteEventArgs)

Gets offset of the statement in the whole script text.

[Visual Basic]
Public ReadOnly Property Offset As Integer
[C#]
public int Offset {get;}

Return Type

Offset of the statement in the script text.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Reader Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : Reader Property (DbStatementExecuteEventArgs)

Gets or sets an IDataReader that represents statement resultset.

[Visual Basic]
Public Property Reader As IDataReader
[C#]
public IDataReader Reader {get; set;}

Return Type

An IDataReader object. This property can be null.

Remarks

Use this property when you set StatementStatus to StatementStatus.SkipStatement.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

StatementStatus Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : StatementStatus Property

Determines status of the statement and script execution.

[Visual Basic]
Public Property StatementStatus As SqlStatementStatus
[C#]
public SqlStatementStatus StatementStatus {get; set;}

Return Type

One of the SqlStatementStatus values. The default value is SqlStatementStatus.Continue.

Remarks

By setting this property you can control what should be done with the statement.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

StatementType Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : StatementType Property (DbStatementExecuteEventArgs)

Gets type of the statement.

[Visual Basic]
Public ReadOnly Property StatementType As SqlStatementType
[C#]
public SqlStatementType StatementType {get;}

Return Type

One of the SqlStatementType values.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Text Property

Devart.Common Namespace > DbStatementExecuteEventArgs Class : Text Property (DbStatementExecuteEventArgs)

Gets the SQL statement that is about to be executed.

[Visual Basic]
Public ReadOnly Property Text As String
[C#]
public string Text {get;}

Return Type

The SQL statement to be executed.

See Also

DbStatementExecuteEventArgs Class | DbStatementExecuteEventArgs Members


%%PageItemTitle%%

SelectColumn Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Class

Devart.Common Namespace : SelectColumn Class

Represents a column or an expression in SELECT, GROUP BY and ORDER BY clauses of a SQL statement.

For a list of all members of this type, see SelectColumn members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatementNode
Devart.Common.SelectColumn

Syntax

[Visual Basic]
Public NotInheritable Class SelectColumn
   Inherits SelectStatementNode
[C#]
public sealed class SelectColumn : SelectStatementNode

Example

This example shows how SelectColumns can be used to create a SelectStatement object representing the following query:

SELECT test.dept.dname Department, test.dept.loc Location
    FROM test.dept

[C#]

PgSqlSelectStatement statement = new PgSqlSelectStatement();

// Create columns. Specify their schema, tables to which they belong, their names and aliases.
SelectColumn cName = new SelectColumn("test", "dept", "dname", "Department");
SelectColumn cLoc = new SelectColumn("test", "dept", "loc", "Location");

statement.Columns.Add(cName);
statement.Columns.Add(cLoc);

statement.Tables.Add(new SelectTable("test", "dept", ""));

[Visual Basic]

Dim statement As PgSqlSelectStatement = New PgSqlSelectStatement()

' Create columns. Specify their schema, tables to which they belong, their names and aliases.
Dim cName = New SelectColumn("test", "dept", "dname", "Department")
Dim cLoc = New SelectColumn("test", "dept", "loc", "Location")

statement.Columns.Add(cName)
statement.Columns.Add(cLoc)

statement.Tables.Add(New SelectTable("test", "dept", ""))

See Also

SelectColumn Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectColumn Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Class Members

Devart.Common Namespace : SelectColumn Class

SelectColumn overview

Public Constructors

Public Constructor SelectColumn Constructor Overloaded. Creates and initializes new instance of SelectColumn.

Public Properties

Public Property Alias | Gets or sets column alias.
Public Property Database | Gets or sets database that the column belongs to.
Public Property Expression | Gets or sets the SQL expression that the column represents.
Public Property Name | Gets or sets name of the column.
Public Property Schema | Gets or sets schema that the column belongs to.
Public Property Table | Gets or sets table or view that the column belongs to.

Public Methods

Public Method Equals | Overridden. Determines whether two SelectColumn objects are identical.
Public Method GetHashCode | Overridden. Returns hash code of the current instance.
Public Method ToString | Overridden. Returns the current SelectColumn object in the text form.

See Also

SelectColumn Class | Devart.Common Namespace


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Constructor

Devart.Common Namespace > SelectColumn Class : SelectColumn Constructor (SelectColumn)

Creates and initializes new instance of SelectColumn.

Overload List

Creates and initializes new instance of SelectColumn with the specified column name (expression text).

[Visual Basic] Public Sub New(String)

[C#] public SelectColumn(string);

Creates and initializes new instance of SelectColumn with the specified schema name, table name, column name (expression text) and an alias.

[Visual Basic] Public Sub New(String,String,String,String)

[C#] public SelectColumn(string,string,string,string);

Creates and initializes new instance of SelectColumn with the specified schema name, table name, column name (expression text) and an alias.

[Visual Basic] Public Sub New(String,String,String,String,String)

[C#] public SelectColumn(string,string,string,string,string);

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Constructor(String)

Devart.Common Namespace > SelectColumn Class > SelectColumn Constructor : SelectColumn Constructor(String)

Creates and initializes new instance of SelectColumn with the specified column name (expression text).

[Visual Basic]
Public Function New( _
   ByVal name As String _
)
[C#]
public SelectColumn(
   string name
);

Parameters

name

See Also

SelectColumn Class | SelectColumn Members | Overload List


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members | Overload List

Language

Visual Basic

C#

Show All

schema
The schema that the column belongs to.
table
The table or view that the column belongs to.
name
The name of the column or expression text.
alias
The column alias.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Constructor(String,String,String,String)

Devart.Common Namespace > SelectColumn Class > SelectColumn Constructor : SelectColumn Constructor(String,String,String,String)

Creates and initializes new instance of SelectColumn with the specified schema name, table name, column name (expression text) and an alias.

[Visual Basic]
Public Function New( _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String _
)
[C#]
public SelectColumn(
   string schema,
   string table,
   string name,
   string alias
);

Parameters

schema
The schema that the column belongs to.
table
The table or view that the column belongs to.
name
The name of the column or expression text.
alias
The column alias.

See Also

SelectColumn Class | SelectColumn Members | Overload List


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members | Overload List

Language

Visual Basic

C#

Show All

database
The database that the column belongs to.
schema
The schema that the column belongs to.
table
The table or view that the column belongs to.
name
The name of the column or expression text.
alias
The column alias.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Constructor(String,String,String,String,String)

Devart.Common Namespace > SelectColumn Class > SelectColumn Constructor : SelectColumn Constructor(String,String,String,String,String)

Creates and initializes new instance of SelectColumn with the specified schema name, table name, column name (expression text) and an alias.

[Visual Basic]
Public Function New( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String _
)
[C#]
public SelectColumn(
   string database,
   string schema,
   string table,
   string name,
   string alias
);

Parameters

database
The database that the column belongs to.
schema
The schema that the column belongs to.
table
The table or view that the column belongs to.
name
The name of the column or expression text.
alias
The column alias.

See Also

SelectColumn Class | SelectColumn Members | Overload List


%%PageItemTitle%% $$Properties$$

SelectColumn Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Class Properties

Devart.Common Namespace : SelectColumn Class

For a list of all members of this type, see SelectColumn members.

Public Properties

Public Property Alias | Gets or sets column alias.
Public Property Database | Gets or sets database that the column belongs to.
Public Property Expression | Gets or sets the SQL expression that the column represents.
Public Property Name | Gets or sets name of the column.
Public Property Schema | Gets or sets schema that the column belongs to.
Public Property Table | Gets or sets table or view that the column belongs to.

See Also

SelectColumn Class | Devart.Common Namespace


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Alias Property

Devart.Common Namespace > SelectColumn Class : Alias Property (SelectColumn)

Gets or sets column alias.

[Visual Basic]
Public Property Alias As String
[C#]
public string Alias {get; set;}

Return Type

Column alias.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Database Property

Devart.Common Namespace > SelectColumn Class : Database Property (SelectColumn)

Gets or sets database that the column belongs to.

[Visual Basic]
Public Property Database As String
[C#]
public string Database {get; set;}

Return Type

A database that the column belongs to.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Expression Property

Devart.Common Namespace > SelectColumn Class : Expression Property

Gets or sets the SQL expression that the column represents.

[Visual Basic]
Public Property Expression As String
[C#]
public string Expression {get; set;}

Return Type

The SQL expression.

Remarks

If the Expression property is non-empty, the Name property is ignored.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Common Namespace > SelectColumn Class : Name Property (SelectColumn)

Gets or sets name of the column.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the column.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schema Property

Devart.Common Namespace > SelectColumn Class : Schema Property (SelectColumn)

Gets or sets schema that the column belongs to.

[Visual Basic]
Public Property Schema As String
[C#]
public string Schema {get; set;}

Return Type

A schema that the column belongs to.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Table Property

Devart.Common Namespace > SelectColumn Class : Table Property

Gets or sets table or view that the column belongs to.

[Visual Basic]
Public Property Table As String
[C#]
public string Table {get; set;}

Return Type

A table or view that the column belongs to.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%% $$Methods$$

SelectColumn Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumn Class Methods

Devart.Common Namespace : SelectColumn Class

For a list of all members of this type, see SelectColumn members.

Public Methods

Public Method Equals | Overridden. Determines whether two SelectColumn objects are identical.
Public Method GetHashCode | Overridden. Returns hash code of the current instance.
Public Method ToString | Overridden. Returns the current SelectColumn object in the text form.

See Also

SelectColumn Class | Devart.Common Namespace


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

obj
A SelectColumn object to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Common Namespace > SelectColumn Class : Equals Method (SelectColumn)

Determines whether two SelectColumn objects are identical.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
A SelectColumn object to compare with.

Return Type

true, if the given obj object equals to the current SelectColumn instance.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Common Namespace > SelectColumn Class : GetHashCode Method (SelectColumn)

Returns hash code of the current instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Remarks

Do not use the GetHashCode method. It is for internal purposes only.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumn Class | SelectColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Common Namespace > SelectColumn Class : ToString Method (SelectColumn)

Returns the current SelectColumn object in the text form.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

Text representation of the current SelectColumn object.

See Also

SelectColumn Class | SelectColumn Members


%%PageItemTitle%%

SelectColumnCollection Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectColumnCollection Class

Devart.Common Namespace : SelectColumnCollection Class

Represents a collection of columns and expressions in a SelectStatement object.

For a list of all members of this type, see SelectColumnCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Common.SelectColumnCollection

Syntax

[Visual Basic]
Public NotInheritable Class SelectColumnCollection
   Inherits CollectionBase
   Implements ICollection, IEnumerable, IList
[C#]
public sealed class SelectColumnCollection : CollectionBase, ICollection, IEnumerable, IList

Remarks

Use SelectColumnCollection class to manage columns used in a query. To access the collection use the SelectStatement.Columns, SelectStatement.GroupBy and SelectStatement.OrderBy properties.

Example

In the following sample we retrieve a collection of SelectColumns from an PgSqlSelectStatement object and print them. For example, if statement represents the command:

SELECT test.dept.dname Department, test.dept.loc Location
    FROM test.dept

the output of the sample would be the following:

test.dept.dname Department
test.dept.loc Location

[C#]

SelectColumnCollection collection = statement.Columns;

foreach (SelectColumn column in collection)
    Console.WriteLine(column.ToString());

[Visual Basic]

Dim collection As SelectColumnCollection = statement.Columns
For Each column In collection
    Console.WriteLine(column.ToString())
Next

See Also

SelectColumnCollection Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectColumnCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumnCollection Class Members

Devart.Common Namespace : SelectColumnCollection Class

SelectColumnCollection overview

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets or sets the SelectColumn at the specified index.

Public Methods

Public Method Add | Overloaded. Adds the specified SelectColumn to the SelectColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SelectColumn object exists in the collection.
Public Method CopyTo | Copies SelectColumn objects from the SelectColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SelectColumn object.
Public Method Insert | Inserts a SelectColumn into the collection at the specified index.
Public Method Remove | Removes the specified SelectColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SelectColumnCollection Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

SelectColumnCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumnCollection Class Properties

Devart.Common Namespace : SelectColumnCollection Class

For a list of all members of this type, see SelectColumnCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets or sets the SelectColumn at the specified index.

See Also

SelectColumnCollection Class | Devart.Common Namespace


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index of the table.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Common Namespace > SelectColumnCollection Class : Item Property (SelectColumnCollection)

Gets or sets the SelectColumn at the specified index.

[Visual Basic]
Public Default Property Item( _
   ByVal index As Integer _
) As SelectColumn
[C#]
public SelectColumn this[
   int index
]; {get; set;}

Parameters

index
The zero-based index of the table.

Return Type

The SelectColumn at the specified index.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%% $$Methods$$

SelectColumnCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectColumnCollection Class Methods

Devart.Common Namespace : SelectColumnCollection Class

For a list of all members of this type, see SelectColumnCollection members.

Public Methods

Public Method Add | Overloaded. Adds the specified SelectColumn to the SelectColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SelectColumn object exists in the collection.
Public Method CopyTo | Copies SelectColumn objects from the SelectColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SelectColumn object.
Public Method Insert | Inserts a SelectColumn into the collection at the specified index.
Public Method Remove | Removes the specified SelectColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SelectColumnCollection Class | Devart.Common Namespace


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Common Namespace > SelectColumnCollection Class : Add Method (SelectColumnCollection)

Adds the specified SelectColumn to the SelectColumnCollection.

Overload List

Creates a new SelectColumn object with the name specified and adds it to the collection.

[Visual Basic] Overloads Public Function Add(String) As SelectColumn

[C#] public SelectColumn Add(string);

Creates a new SelectColumn object with the name specified and adds it to the collection.

[Visual Basic] Overloads Public Function Add(String,Boolean) As SelectColumn

[C#] public SelectColumn Add(string,bool);

Adds a newly created SelectColumn object with the specified schema, table, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String) As SelectColumn

[C#] public SelectColumn Add(string,string,string,string);

Adds a newly created SelectColumn object with the specified schema, table, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String,Boolean) As SelectColumn

[C#] public SelectColumn Add(string,string,string,string,bool);

Adds a newly created SelectColumn object with the specified database, schema, table, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String,String) As SelectColumn

[C#] public SelectColumn Add(string,string,string,string,string);

Adds a newly created SelectColumn object with the specified database, schema, table, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String,String,Boolean) As SelectColumn

[C#] public SelectColumn Add(string,string,string,string,string,bool);

Adds the specified SelectColumn to the SelectColumnCollection.

[Visual Basic] Overloads Public Function Add(SelectColumn) As Integer

[C#] public int Add(SelectColumn);

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column which the SelectColumn object should represent.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String) Method

Creates a new SelectColumn object with the name specified and adds it to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal name As String _
) As SelectColumn
[C#]
public SelectColumn Add(
   string name
);

Parameters

name
The name of the column which the SelectColumn object should represent.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column that the SelectColumn object should represent.
quote
Specifies whether the column name should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,Boolean) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String,Boolean) Method

Creates a new SelectColumn object with the name specified and adds it to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal name As String, _
   ByVal quote As Boolean _
) As SelectColumn
[C#]
public SelectColumn Add(
   string name,
   bool quote
);

Parameters

name
The name of the column that the SelectColumn object should represent.
quote
Specifies whether the column name should be quoted.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String,String,String,String) Method

Adds a newly created SelectColumn object with the specified schema, table, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String _
) As SelectColumn
[C#]
public SelectColumn Add(
   string schema,
   string table,
   string name,
   string alias
);

Parameters

schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.
quote
Specifies if the column parameters should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String,Boolean) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String,String,String,String,Boolean) Method

Adds a newly created SelectColumn object with the specified schema, table, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String, _
   ByVal quote As Boolean _
) As SelectColumn
[C#]
public SelectColumn Add(
   string schema,
   string table,
   string name,
   string alias,
   bool quote
);

Parameters

schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.
quote
Specifies if the column parameters should be quoted.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

database
The database which the table containing this column belongs to.
schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String,String) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String,String,String,String,String) Method

Adds a newly created SelectColumn object with the specified database, schema, table, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String _
) As SelectColumn
[C#]
public SelectColumn Add(
   string database,
   string schema,
   string table,
   string name,
   string alias
);

Parameters

database
The database which the table containing this column belongs to.
schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column that the SelectColumn object should represent.
alias
The alias of the column.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

database
The database which the table containing this column belongs to.
schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column which the SelectColumn object should represent.
alias
The alias of the column.
quote
Specifies if the column parameters should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String,String,Boolean) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(String,String,String,String,String,Boolean) Method

Adds a newly created SelectColumn object with the specified database, schema, table, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal table As String, _
   ByVal name As String, _
   ByVal alias As String, _
   ByVal quote As Boolean _
) As SelectColumn
[C#]
public SelectColumn Add(
   string database,
   string schema,
   string table,
   string name,
   string alias,
   bool quote
);

Parameters

database
The database which the table containing this column belongs to.
schema
The schema which the table containing this column belongs to.
table
The name of the table containing the column.
name
The name of the column which the SelectColumn object should represent.
alias
The alias of the column.
quote
Specifies if the column parameters should be quoted.

Return Type

The SelectColumn object created.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The SelectColumn to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(SelectColumn) Method

Devart.Common Namespace > SelectColumnCollection Class > Add Method : Add(SelectColumn) Method

Adds the specified SelectColumn to the SelectColumnCollection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal value As SelectColumn _
) As Integer
[C#]
public int Add(
   SelectColumn value
);

Parameters

value
The SelectColumn to add to the collection.

Return Type

Index of the new SelectColumn object.

See Also

SelectColumnCollection Class | SelectColumnCollection Members | Overload List


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

value
The value of the SelectColumn object to find.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Contains Method

Devart.Common Namespace > SelectColumnCollection Class : Contains Method (SelectColumnCollection)

Gets a value indicating whether a SelectColumn object exists in the collection.

[Visual Basic]
Public Function Contains( _
   ByVal value As SelectColumn _
) As Boolean
[C#]
public bool Contains(
   SelectColumn value
);

Parameters

value
The value of the SelectColumn object to find.

Return Type

true if the collection contains the SelectColumn; otherwise, false.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

array
The array into which to copy the SelectColumn objects.
index
The zero-based index of the array.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CopyTo Method

Devart.Common Namespace > SelectColumnCollection Class : CopyTo Method (SelectColumnCollection)

Copies SelectColumn objects from the SelectColumnCollection to the specified array.

[Visual Basic]
Public Sub CopyTo( _
   ByVal array() As SelectColumn, _
   ByVal index As Integer _
)
[C#]
public void CopyTo(
   SelectColumn[] array,
   int index
);

Parameters

array
The array into which to copy the SelectColumn objects.
index
The zero-based index of the array.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

value
The SelectColumn object to find.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IndexOf Method

Devart.Common Namespace > SelectColumnCollection Class : IndexOf Method (SelectColumnCollection)

Gets the location in the collection of the SelectColumn object.

[Visual Basic]
Public Function IndexOf( _
   ByVal value As SelectColumn _
) As Integer
[C#]
public int IndexOf(
   SelectColumn value
);

Parameters

value
The SelectColumn object to find.

Return Type

The zero-based location of the SelectColumn in the collection.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index where the table is to be inserted within the collection.
value
The SelectColumn to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Insert Method

Devart.Common Namespace > SelectColumnCollection Class : Insert Method (SelectColumnCollection)

Inserts a SelectColumn into the collection at the specified index.

[Visual Basic]
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As SelectColumn _
)
[C#]
public void Insert(
   int index,
   SelectColumn value
);

Parameters

index
The zero-based index where the table is to be inserted within the collection.
value
The SelectColumn to add to the collection.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectColumnCollection Class | SelectColumnCollection Members

Language

Visual Basic

C#

Show All

value
The SelectColumn object to remove from the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Remove Method

Devart.Common Namespace > SelectColumnCollection Class : Remove Method (SelectColumnCollection)

Removes the specified SelectColumn object from the collection.

[Visual Basic]
Public Sub Remove( _
   ByVal value As SelectColumn _
)
[C#]
public void Remove(
   SelectColumn value
);

Parameters

value
The SelectColumn object to remove from the collection.

See Also

SelectColumnCollection Class | SelectColumnCollection Members


%%PageItemTitle%%

SelectStatement Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectStatement Class

Devart.Common Namespace : SelectStatement Class

Composes, modifies and parses SELECT statements.

For a list of all members of this type, see SelectStatement members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatement
Devart.Data.PostgreSql.PgSqlSelectStatement

Syntax

[Visual Basic]
Public Class SelectStatement
[C#]
public class SelectStatement

Remarks

The SelectStatement class is designed for easy manipulation of SQL SELECT statements. It allows you to perform the following tasks:

  • Construct SELECT statements in run time;
  • Modify the statements with object-oriented interface;
  • Parse the statements from strings.
The SelectStatement class exposes SELECT, ORDER BY and GROUP BY clauses as collections of SelectColumn objects (SelectColumnCollection), and FROM clause as collection of SelectTable objects (SelectTableCollection). The WHERE and HAVING clauses are represented as string expressions.

To obtain the statement text use the ToString method.

Instances of this class cannot be created directly. To use its functionality, one needs to create an object of a descendant class, like Devart.Data.PostgreSql.PgSqlSelectStatement.

See Also

SelectStatement Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectStatement Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectStatement Class Members

Devart.Common Namespace : SelectStatement Class

SelectStatement overview

Public Properties

Public Property All | Gets or sets the value, indicating if the all records are selected or only the unique ones.
Public Property Columns | Contains list of columns and expressions used in the select-list of the current SelectStatement object.
Public Property Distinct | Gets or sets whether statement should request unique rows only.
Public Property GroupBy | Contains list of columns used in the GROUP BY clause of the current SelectStatement object.
Public Property Having | Gets or sets HAVING clause of the statement.
Public Property OrderBy | Contains list of columns used in the ORDER BY clause of the current SelectStatement object.
Public Property Tables | Contains list of tables and subqueries used in the FROM clause of the current SelectStatement object.
Public Property Where | Gets or sets WHERE clause of the statement.

Public Methods

Public Method AddHavingCondition | Adds new condition to HAVING clause of the statement, represented by the Having property.
Public Method AddWhereCondition | Adds new condition to WHERE clause of the statement, represented by the Where property.
Public Method Clear | Clears all parts of the SelectStatement.
Public Method ToString | Overridden. Returns SQL statement in the text form.

See Also

SelectStatement Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

SelectStatement Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectStatement Class Properties

Devart.Common Namespace : SelectStatement Class

For a list of all members of this type, see SelectStatement members.

Public Properties

Public Property All | Gets or sets the value, indicating if the all records are selected or only the unique ones.
Public Property Columns | Contains list of columns and expressions used in the select-list of the current SelectStatement object.
Public Property Distinct | Gets or sets whether statement should request unique rows only.
Public Property GroupBy | Contains list of columns used in the GROUP BY clause of the current SelectStatement object.
Public Property Having | Gets or sets HAVING clause of the statement.
Public Property OrderBy | Contains list of columns used in the ORDER BY clause of the current SelectStatement object.
Public Property Tables | Contains list of tables and subqueries used in the FROM clause of the current SelectStatement object.
Public Property Where | Gets or sets WHERE clause of the statement.

See Also

SelectStatement Class | Devart.Common Namespace


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

All Property

Devart.Common Namespace > SelectStatement Class : All Property

Gets or sets the value, indicating if the all records are selected or only the unique ones.

[Visual Basic]
Public Property All As Boolean
[C#]
public bool All {get; set;}

Return Type

true, if the result set should contain all the rows; otherwise, false.

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Columns Property

Devart.Common Namespace > SelectStatement Class : Columns Property (SelectStatement)

Contains list of columns and expressions used in the select-list of the current SelectStatement object.

[Visual Basic]
Public ReadOnly Property Columns As SelectColumnCollection
[C#]
public SelectColumnCollection Columns {get;}

Return Type

A SelectColumnCollection that represents list of columns and expressions used in the SELECT clause.

Example

The following example demonstrates how to use the Columns property.

[C#]

private void RefreshStatement(PgSqlSelectStatement stmt)
{
  stmt.Clear();
  stmt.Columns.Add(new SelectColumn("ENAME"));
  stmt.Columns.Add(new SelectColumn("", "emp", "JOB", "j"));
  stmt.Columns.Add(new SelectColumn("test", "", "emp", "HIREDATE", "hd"));

  stmt.Tables.Add(new SelectTable("emp"));

  //select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  string queryText = stmt.ToString();
}

[Visual Basic]

Private Sub RefreshStatement(ByVal stmt As PgSqlSelectStatement)
  stmt.Clear()
  stmt.Columns.Add(New SelectColumn("ENAME"))
  stmt.Columns.Add(New SelectColumn("", "emp", "JOB", "j"))
  stmt.Columns.Add(New SelectColumn("test", "", "emp", "HIREDATE", "hd"))
  stmt.Tables.Add(New SelectTable("emp"))
  'select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  Dim queryText As String = stmt.ToString
End Sub

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Distinct Property

Devart.Common Namespace > SelectStatement Class : Distinct Property

Gets or sets whether statement should request unique rows only.

[Visual Basic]
Public Property Distinct As Boolean
[C#]
public bool Distinct {get; set;}

Return Type

true, if the result set should contain unique rows only; otherwise, false.

Example

The following example demonstrates how to use the Distinct property.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("JOB"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Distinct = true;

//select distinct JOB from emp
string queryText = stmt.ToString();

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("JOB"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.Distinct = True

'select distinct JOB from emp
Dim queryText As String = stmt.ToString

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GroupBy Property

Devart.Common Namespace > SelectStatement Class : GroupBy Property

Contains list of columns used in the GROUP BY clause of the current SelectStatement object.

[Visual Basic]
Public ReadOnly Property GroupBy As SelectColumnCollection
[C#]
public SelectColumnCollection GroupBy {get;}

Return Type

A SelectColumnCollection that represents list of columns used in the GROUP BY clause.

Example

The following example demonstrates how to use the GroupBy property.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
SelectColumn jobName = new SelectColumn("JOB");
stmt.Columns.Add(jobName);
stmt.Columns.Add(new SelectColumn("AVG(SAL)"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.GroupBy.Add(jobName);
stmt.Having = "AVG(SAL) > 1000";

//select JOB,AVG(SAL) from emp group by JOB having AVG(SAL) > 1000
PgSqlCommand command = new PgSqlCommand(stmt.ToString());

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Having Property

Devart.Common Namespace > SelectStatement Class : Having Property

Gets or sets HAVING clause of the statement.

[Visual Basic]
Public Overridable Property Having As String
[C#]
public virtual string Having {get; set;}

Return Type

The HAVING clause of the statement.

Remarks

To quickly add new condition to the clause use the AddHavingCondition method.

Example

The following example demonstrates how to use the Having property.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
SelectColumn jobName = new SelectColumn("JOB");
stmt.Columns.Add(jobName);
stmt.Columns.Add(new SelectColumn("AVG(SAL)"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.GroupBy.Add(jobName);
stmt.Having = "AVG(SAL) > 1000";

//select JOB,AVG(SAL) from emp group by JOB having AVG(SAL) > 1000
PgSqlCommand command = new PgSqlCommand(stmt.ToString());

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
Dim jobName As New SelectColumn("JOB")
stmt.Columns.Add(jobName)
stmt.Columns.Add(New SelectColumn("AVG(SAL)"))
stmt.Tables.Add(New SelectTable("emp"))

stmt.GroupBy.Add(jobName)
stmt.Having = "AVG(SAL) > 1000"

'select JOB,AVG(SAL) from emp group by JOB having AVG(SAL) > 1000
Dim command As New PgSqlCommand(stmt.ToString)

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

OrderBy Property

Devart.Common Namespace > SelectStatement Class : OrderBy Property

Contains list of columns used in the ORDER BY clause of the current SelectStatement object.

[Visual Basic]
Public ReadOnly Property OrderBy As SelectColumnCollection
[C#]
public SelectColumnCollection OrderBy {get;}

Return Type

A SelectColumnCollection that represents list of columns used in the ORDER BY clause.

Example

The following example demonstrates how to use the OrderBy property.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
SelectColumn empName = new SelectColumn("ENAME");
stmt.Columns.Add(empName);
stmt.Tables.Add(new SelectTable("emp"));

stmt.OrderBy.Add(empName);

//select ENAME from emp order by ENAME
PgSqlCommand command = new PgSqlCommand(stmt.ToString());

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
Dim empName As New SelectColumn("ENAME")
stmt.Columns.Add(empName)
stmt.Tables.Add(New SelectTable("emp"))

stmt.OrderBy.Add(empName)

'select ENAME from emp order by ENAME
Dim command5 As New PgSqlCommand(stmt.ToString)

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Tables Property

Devart.Common Namespace > SelectStatement Class : Tables Property (SelectStatement)

Contains list of tables and subqueries used in the FROM clause of the current SelectStatement object.

[Visual Basic]
Public ReadOnly Property Tables As SelectTableCollection
[C#]
public SelectTableCollection Tables {get;}

Return Type

A SelectTableCollection that represents list of tables and subqueries used in the FROM clause.

Example

The following example demonstrates how to use the Tables property.

[C#]

private void RefreshStatement(PgSqlSelectStatement stmt)
{
  stmt.Clear();
  stmt.Columns.Add(new SelectColumn("ENAME"));
  stmt.Columns.Add(new SelectColumn("", "emp", "JOB", "j"));
  stmt.Columns.Add(new SelectColumn("test", "", "emp", "HIREDATE", "hd"));

  stmt.Tables.Add(new SelectTable("emp"));

  //select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  string queryText = stmt.ToString();
}

[Visual Basic]

Private Sub RefreshStatement(ByVal stmt As PgSqlSelectStatement)
  stmt.Clear()
  stmt.Columns.Add(New SelectColumn("ENAME"))
  stmt.Columns.Add(New SelectColumn("", "emp", "JOB", "j"))
  stmt.Columns.Add(New SelectColumn("test", "", "emp", "HIREDATE", "hd"))
  stmt.Tables.Add(New SelectTable("emp"))
  'select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  Dim queryText As String = stmt.ToString
End Sub

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Where Property

Devart.Common Namespace > SelectStatement Class : Where Property

Gets or sets WHERE clause of the statement.

[Visual Basic]
Public Overridable Property Where As String
[C#]
public virtual string Where {get; set;}

Return Type

The WHERE clause of the statement.

Remarks

To quickly add new condition to the clause use the AddWhereCondition method.

Example

The following example demonstrates how to use the Where property.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("ENAME"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Where = "1000 < SAL AND SAL < 1500 OR JOB = 'SALESMAN'";

PgSqlCommand command = new PgSqlCommand(stmt.ToString());

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("ENAME"))
stmt.Tables.Add(New SelectTable("emp"))

stmt.Where = "1000 < SAL AND SAL < 1500 OR JOB = 'SALESMAN'"

Dim command As New PgSqlCommand(stmt.ToString)

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%% $$Methods$$

SelectStatement Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectStatement Class Methods

Devart.Common Namespace : SelectStatement Class

For a list of all members of this type, see SelectStatement members.

Public Methods

Public Method AddHavingCondition | Adds new condition to HAVING clause of the statement, represented by the Having property.
Public Method AddWhereCondition | Adds new condition to WHERE clause of the statement, represented by the Where property.
Public Method Clear | Clears all parts of the SelectStatement.
Public Method ToString | Overridden. Returns SQL statement in the text form.

See Also

SelectStatement Class | Devart.Common Namespace


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

condition
A new condition to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddHavingCondition Method

Devart.Common Namespace > SelectStatement Class : AddHavingCondition Method

Adds new condition to HAVING clause of the statement, represented by the Having property.

[Visual Basic]
Public Sub AddHavingCondition( _
   ByVal condition As String _
)
[C#]
public void AddHavingCondition(
   string condition
);

Parameters

condition
A new condition to add.

Remarks

If the Having property is not empty, the new condition is concatenated using AND keyword.

Example

The following example demonstrates how to use the AddHavingCondition method.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("EMP"));
stmt.Columns.Add(new SelectColumn("SAL"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.AddHavingCondition("SAL > 1000");

//select JOB,SAL from emp having SAL > 1000
PgSqlCommand command = new PgSqlCommand(stmt.ToString());

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("EMP"))
stmt.Columns.Add(New SelectColumn("SAL"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.AddHavingCondition("SAL > 1000")

'select JOB,SAL from emp having SAL > 1000
Dim command As New PgSqlCommand(stmt.ToString)

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

condition
A new condition to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddWhereCondition Method

Devart.Common Namespace > SelectStatement Class : AddWhereCondition Method

Adds new condition to WHERE clause of the statement, represented by the Where property.

[Visual Basic]
Public Sub AddWhereCondition( _
   ByVal condition As String _
)
[C#]
public void AddWhereCondition(
   string condition
);

Parameters

condition
A new condition to add.

Remarks

If the Where property is not empty, the new condition is concatenated using AND keyword.

Example

The following example demonstrates how to use the AddWhereCondition method.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("ENAME"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Where = "1000 < SAL";
stmt.AddWhereCondition("SAL < 1500");
stmt.AddWhereCondition("JOB = 'SALESMAN'");

//select ENAME from emp where ((1000 < SAL) AND SAL < 1500 ) AND JOB = 'SALESMAN'
PgSqlCommand command = new PgSqlCommand(stmt.ToString());

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("ENAME"))
stmt.Tables.Add(New SelectTable("emp"))

stmt.Where = "1000 < SAL"
stmt.AddWhereCondition("SAL < 1500")
stmt.AddWhereCondition("JOB = 'SALESMAN'")

'select ENAME from emp where ((1000 < SAL) AND SAL < 1500 ) AND JOB = 'SALESMAN'
Dim command As New PgSqlCommand(stmt.ToString)

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Common Namespace > SelectStatement Class : Clear Method (SelectStatement)

Clears all parts of the SelectStatement.

[Visual Basic]
Public Overridable Sub Clear()
[C#]
public virtual void Clear();

Remarks

Call Clear to empty all properties of the SelectStatement object.

Example

The following example demonstrates how to use the Clear method.

[C#]

private void RefreshStatement(PgSqlSelectStatement stmt)
{
  stmt.Clear();
  stmt.Columns.Add(new SelectColumn("ENAME"));
  stmt.Columns.Add(new SelectColumn("", "emp", "JOB", "j"));
  stmt.Columns.Add(new SelectColumn("test", "", "emp", "HIREDATE", "hd"));

  stmt.Tables.Add(new SelectTable("emp"));

  //select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  string queryText = stmt.ToString();
}

[Visual Basic]

Private Sub RefreshStatement(ByVal stmt As PgSqlSelectStatement)
  stmt.Clear()
  stmt.Columns.Add(New SelectColumn("ENAME"))
  stmt.Columns.Add(New SelectColumn("", "emp", "JOB", "j"))
  stmt.Columns.Add(New SelectColumn("test", "", "emp", "HIREDATE", "hd"))
  stmt.Tables.Add(New SelectTable("emp"))
  'select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  Dim queryText As String = stmt.ToString
End Sub

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatement Class | SelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Common Namespace > SelectStatement Class : ToString Method (SelectStatement)

Returns SQL statement in the text form.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

The text of SQL statement that is equivalent to current state of the SelectStatement object.

Example

The following example demonstrates how to use the ToString method.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("JOB"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Distinct = true;

//select distinct JOB from emp
string queryText = stmt.ToString();

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("JOB"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.Distinct = True

'select distinct JOB from emp
Dim queryText As String = stmt.ToString

See Also

SelectStatement Class | SelectStatement Members


%%PageItemTitle%%

SelectStatementNode Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectStatementNode Class

Devart.Common Namespace : SelectStatementNode Class

An abstract SQL element.

For a list of all members of this type, see SelectStatementNode members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatementNode
Devart.Common.SelectColumn
Devart.Common.SelectTable
Devart.Data.PostgreSql.PgSqlSelectLimit

Syntax

[Visual Basic]
Public Class SelectStatementNode
[C#]
public class SelectStatementNode

See Also

SelectStatementNode Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectStatementNode Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectStatementNode Class Members

Devart.Common Namespace : SelectStatementNode Class

SelectStatementNode overview

Public Constructors

Public Constructor SelectStatementNode Constructor Creates and initializes new instance of SelectStatementNode.

See Also

SelectStatementNode Class | Devart.Common Namespace


%%PageItemTitle%%

SelectStatementNode Class | SelectStatementNode Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectStatementNode Constructor

Devart.Common Namespace > SelectStatementNode Class : SelectStatementNode Constructor (SelectStatementNode)

Creates and initializes new instance of SelectStatementNode.

[Visual Basic]
Public Function New()
[C#]
public SelectStatementNode();

See Also

SelectStatementNode Class | SelectStatementNode Members


%%PageItemTitle%%

SelectTable Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTable Class

Devart.Common Namespace : SelectTable Class

Represents a table or a subquery in the FROM clause of a SELECT statement.

For a list of all members of this type, see SelectTable members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatementNode
Devart.Common.SelectTable

Syntax

[Visual Basic]
Public NotInheritable Class SelectTable
   Inherits SelectStatementNode
[C#]
public sealed class SelectTable : SelectStatementNode

Example

This example shows how SelectTables can be used to create a SelectStatement object representing the following query:

SELECT * FROM test.dept tDept, test.emp tEmp

[C#]

PgSqlSelectStatement statement = new PgSqlSelectStatement();

statement.Columns.Add("*");

// Create SelectTables, specify their schemas, names and aliases.
SelectTable dept = new SelectTable("test", "dept", "tDept");
SelectTable emp = new SelectTable("test", "emp", "tEmp");

statement.Tables.Add(dept);
statement.Tables.Add(emp);

[Visual Basic]

Dim statement = New PgSqlSelectStatement()

statement.Columns.Add("*")

' Create SelectTables, specify their schemas, names and aliases.
Dim dept = New SelectTable("test", "dept", "tDept")
Dim emp = New SelectTable("test", "emp", "tEmp")

statement.Tables.Add(dept)
statement.Tables.Add(emp)

See Also

SelectTable Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectTable Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTable Class Members

Devart.Common Namespace : SelectTable Class

SelectTable overview

Public Constructors

Public Constructor SelectTable Constructor Overloaded. Creates and initializes new instance of SelectTable.

Public Properties

Public Property Alias | Gets or sets table alias.
Public Property Database | Gets or sets the name of the table database.
Public Property JoinClause | Gets or sets a JOIN clause for the SelectTable.
Public Property JoinCondition | Gets or sets a JOIN ON clause for the SelectTable.
Public Property Name | Gets or sets name of the table or subquery text.
Public Property Schema | Gets or sets the name of the table schema.
Public Property SubQuery | Gets the subquery text that the SelectTable represents.

Public Methods

Public Method Equals | Overridden. Determines whether two SelectTable objects are identical.
Public Method GetHashCode | Overridden. Returns hash code of the current instance.
Public Method ToString | Overridden. Returns the current SelectTable object in the text form.

See Also

SelectTable Class | Devart.Common Namespace


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTable Constructor

Devart.Common Namespace > SelectTable Class : SelectTable Constructor (SelectTable)

Creates and initializes new instance of SelectTable.

Overload List

Creates and initializes new instance of SelectTable with the specified table name (subquery text).

[Visual Basic] Public Sub New(String)

[C#] public SelectTable(string);

Creates and initializes new instance of SelectTable with the specified schema, table name (subquery text) and alias.

[Visual Basic] Public Sub New(String,String,String)

[C#] public SelectTable(string,string,string);

Creates and initializes new instance of SelectTable with the specified schema, table name (subquery text) and alias.

[Visual Basic] Public Sub New(String,String,String,String)

[C#] public SelectTable(string,string,string,string);

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the table or subquery text.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTable Constructor(String)

Devart.Common Namespace > SelectTable Class > SelectTable Constructor : SelectTable Constructor(String)

Creates and initializes new instance of SelectTable with the specified table name (subquery text).

[Visual Basic]
Public Function New( _
   ByVal name As String _
)
[C#]
public SelectTable(
   string name
);

Parameters

name
The name of the table or subquery text.

See Also

SelectTable Class | SelectTable Members | Overload List


%%PageItemTitle%%

SelectTable Class | SelectTable Members | Overload List

Language

Visual Basic

C#

Show All

schema
The name of the table schema.
name
The name of the table or subquery text.
alias
The alias for the table or expression.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTable Constructor(String,String,String)

Devart.Common Namespace > SelectTable Class > SelectTable Constructor : SelectTable Constructor(String,String,String)

Creates and initializes new instance of SelectTable with the specified schema, table name (subquery text) and alias.

[Visual Basic]
Public Function New( _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String _
)
[C#]
public SelectTable(
   string schema,
   string name,
   string alias
);

Parameters

schema
The name of the table schema.
name
The name of the table or subquery text.
alias
The alias for the table or expression.

See Also

SelectTable Class | SelectTable Members | Overload List


%%PageItemTitle%%

SelectTable Class | SelectTable Members | Overload List

Language

Visual Basic

C#

Show All

database
The name of the table database.
schema
The name of the table schema.
name
The name of the table or subquery text.
alias
The alias for the table or expression.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTable Constructor(String,String,String,String)

Devart.Common Namespace > SelectTable Class > SelectTable Constructor : SelectTable Constructor(String,String,String,String)

Creates and initializes new instance of SelectTable with the specified schema, table name (subquery text) and alias.

[Visual Basic]
Public Function New( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String _
)
[C#]
public SelectTable(
   string database,
   string schema,
   string name,
   string alias
);

Parameters

database
The name of the table database.
schema
The name of the table schema.
name
The name of the table or subquery text.
alias
The alias for the table or expression.

See Also

SelectTable Class | SelectTable Members | Overload List


%%PageItemTitle%% $$Properties$$

SelectTable Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTable Class Properties

Devart.Common Namespace : SelectTable Class

For a list of all members of this type, see SelectTable members.

Public Properties

Public Property Alias | Gets or sets table alias.
Public Property Database | Gets or sets the name of the table database.
Public Property JoinClause | Gets or sets a JOIN clause for the SelectTable.
Public Property JoinCondition | Gets or sets a JOIN ON clause for the SelectTable.
Public Property Name | Gets or sets name of the table or subquery text.
Public Property Schema | Gets or sets the name of the table schema.
Public Property SubQuery | Gets the subquery text that the SelectTable represents.

See Also

SelectTable Class | Devart.Common Namespace


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Alias Property

Devart.Common Namespace > SelectTable Class : Alias Property (SelectTable)

Gets or sets table alias.

[Visual Basic]
Public Property Alias As String
[C#]
public string Alias {get; set;}

Return Type

Table alias.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Database Property

Devart.Common Namespace > SelectTable Class : Database Property (SelectTable)

Gets or sets the name of the table database.

[Visual Basic]
Public Property Database As String
[C#]
public string Database {get; set;}

Return Type

The name of the table database.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

JoinClause Property

Devart.Common Namespace > SelectTable Class : JoinClause Property

Gets or sets a JOIN clause for the SelectTable.

[Visual Basic]
Public Property JoinClause As String
[C#]
public string JoinClause {get; set;}

Return Type

The JOIN clause.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

JoinCondition Property

Devart.Common Namespace > SelectTable Class : JoinCondition Property

Gets or sets a JOIN ON clause for the SelectTable.

[Visual Basic]
Public Property JoinCondition As String
[C#]
public string JoinCondition {get; set;}

Return Type

The JOIN ON clause.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Common Namespace > SelectTable Class : Name Property (SelectTable)

Gets or sets name of the table or subquery text.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the table or subquery text.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schema Property

Devart.Common Namespace > SelectTable Class : Schema Property (SelectTable)

Gets or sets the name of the table schema.

[Visual Basic]
Public Property Schema As String
[C#]
public string Schema {get; set;}

Return Type

The name of the table schema.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SubQuery Property

Devart.Common Namespace > SelectTable Class : SubQuery Property

Gets the subquery text that the SelectTable represents.

[Visual Basic]
Public Property SubQuery As String
[C#]
public string SubQuery {get; set;}

Return Type

The subquery text.

Remarks

If the SubQuery property is non-empty, the Name property is ignored.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%% $$Methods$$

SelectTable Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTable Class Methods

Devart.Common Namespace : SelectTable Class

For a list of all members of this type, see SelectTable members.

Public Methods

Public Method Equals | Overridden. Determines whether two SelectTable objects are identical.
Public Method GetHashCode | Overridden. Returns hash code of the current instance.
Public Method ToString | Overridden. Returns the current SelectTable object in the text form.

See Also

SelectTable Class | Devart.Common Namespace


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

obj
A SelectColumn object to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Common Namespace > SelectTable Class : Equals Method (SelectTable)

Determines whether two SelectTable objects are identical.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
A SelectColumn object to compare with.

Return Type

true, if the given obj object equals to the current SelectTable instance.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Common Namespace > SelectTable Class : GetHashCode Method (SelectTable)

Returns hash code of the current instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Remarks

Do not use the GetHashCode method. It is for internal purposes only.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTable Class | SelectTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Common Namespace > SelectTable Class : ToString Method (SelectTable)

Returns the current SelectTable object in the text form.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

Text representation of the current SelectTable object.

See Also

SelectTable Class | SelectTable Members


%%PageItemTitle%%

SelectTableCollection Members | Devart.Common Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectTableCollection Class

Devart.Common Namespace : SelectTableCollection Class

Represents a collection of tables and subqueries in a SelectStatement object.

For a list of all members of this type, see SelectTableCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Common.SelectTableCollection

Syntax

[Visual Basic]
Public NotInheritable Class SelectTableCollection
   Inherits CollectionBase
   Implements ICollection, IEnumerable, IList
[C#]
public sealed class SelectTableCollection : CollectionBase, ICollection, IEnumerable, IList

Remarks

Use SelectTableCollection class to manage tables used in a query. To access the collection use the SelectStatement.Tables property.

Example

In the following sample we retrieve a collection of SelectTables from an PgSqlSelectStatement object 'statement' and print them. For example, if statement represents the command

SELECT * FROM test.dept tDept,test.emp tEmp

the output of the sample would be the following:

test.dept tDept
test.emp tEmp

[C#]

SelectTableCollection collection = statement.Tables;
foreach (SelectTable table in collection)
    Console.WriteLine(table.ToString());

[Visual Basic]

Dim collection As SelectTableCollection = statement.Tables
For Each table In collection
    Console.WriteLine(table.ToString())
Next

See Also

SelectTableCollection Members | Devart.Common Namespace


%%PageItemTitle%% $$Members$$

SelectTableCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTableCollection Class Members

Devart.Common Namespace : SelectTableCollection Class

SelectTableCollection overview

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets or sets the SelectTable at the specified index.

Public Methods

Public Method Add | Overloaded. Adds the specified SelectTable to the SelectTableCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SelectTable object exists in the collection.
Public Method CopyTo | Copies SelectTable objects from the SelectTableCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SelectTable object.
Public Method Insert | Inserts a SelectTable into the collection at the specified index.
Public Method Remove | Removes the specified SelectTable object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SelectTableCollection Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

SelectTableCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTableCollection Class Properties

Devart.Common Namespace : SelectTableCollection Class

For a list of all members of this type, see SelectTableCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Gets or sets the SelectTable at the specified index.

See Also

SelectTableCollection Class | Devart.Common Namespace


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index of the table.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Common Namespace > SelectTableCollection Class : Item Property (SelectTableCollection)

Gets or sets the SelectTable at the specified index.

[Visual Basic]
Public Default Property Item( _
   ByVal index As Integer _
) As SelectTable
[C#]
public SelectTable this[
   int index
]; {get; set;}

Parameters

index
The zero-based index of the table.

Return Type

The SelectTable at the specified index.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%% $$Methods$$

SelectTableCollection Class | Devart.Common Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

SelectTableCollection Class Methods

Devart.Common Namespace : SelectTableCollection Class

For a list of all members of this type, see SelectTableCollection members.

Public Methods

Public Method Add | Overloaded. Adds the specified SelectTable to the SelectTableCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains | Gets a value indicating whether a SelectTable object exists in the collection.
Public Method CopyTo | Copies SelectTable objects from the SelectTableCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf | Gets the location in the collection of the SelectTable object.
Public Method Insert | Inserts a SelectTable into the collection at the specified index.
Public Method Remove | Removes the specified SelectTable object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

SelectTableCollection Class | Devart.Common Namespace


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Common Namespace > SelectTableCollection Class : Add Method (SelectTableCollection)

Adds the specified SelectTable to the SelectTableCollection.

Overload List

Creates a new SelectTable object with the name specified and adds it to the collection.

[Visual Basic] Overloads Public Function Add(String) As SelectTable

[C#] public SelectTable Add(string);

Creates a new SelectTable object with the name specified and adds it to the collection.

[Visual Basic] Overloads Public Function Add(String,Boolean) As SelectTable

[C#] public SelectTable Add(string,bool);

Adds a newly created SelectTable object with the specified schema, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String) As SelectTable

[C#] public SelectTable Add(string,string,string);

Adds a newly created SelectTable object with the specified schema, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,Boolean) As SelectTable

[C#] public SelectTable Add(string,string,string,bool);

Adds a newly created SelectTable object with the specified database, schema, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String) As SelectTable

[C#] public SelectTable Add(string,string,string,string);

Adds a newly created SelectTable object with the specified database, schema, name, and alias to the collection.

[Visual Basic] Overloads Public Function Add(String,String,String,String,Boolean) As SelectTable

[C#] public SelectTable Add(string,string,string,string,bool);

Adds the specified SelectTable to the SelectTableCollection.

[Visual Basic] Overloads Public Function Add(SelectTable) As Integer

[C#] public int Add(SelectTable);

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the table that the SelectTable object should represent.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String) Method

Creates a new SelectTable object with the name specified and adds it to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal name As String _
) As SelectTable
[C#]
public SelectTable Add(
   string name
);

Parameters

name
The name of the table that the SelectTable object should represent.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the table that the SelectTable object should represent.
quoted
Specifies whether the table name should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,Boolean) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String,Boolean) Method

Creates a new SelectTable object with the name specified and adds it to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal name As String, _
   ByVal quoted As Boolean _
) As SelectTable
[C#]
public SelectTable Add(
   string name,
   bool quoted
);

Parameters

name
The name of the table that the SelectTable object should represent.
quoted
Specifies whether the table name should be quoted.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String,String,String) Method

Adds a newly created SelectTable object with the specified schema, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String _
) As SelectTable
[C#]
public SelectTable Add(
   string schema,
   string name,
   string alias
);

Parameters

schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
quote
Specifies if the table parameters should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,Boolean) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String,String,String,Boolean) Method

Adds a newly created SelectTable object with the specified schema, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String, _
   ByVal quote As Boolean _
) As SelectTable
[C#]
public SelectTable Add(
   string schema,
   string name,
   string alias,
   bool quote
);

Parameters

schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
quote
Specifies if the table parameters should be quoted.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

database
The database, which the table belongs to.
schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String,String,String,String) Method

Adds a newly created SelectTable object with the specified database, schema, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String _
) As SelectTable
[C#]
public SelectTable Add(
   string database,
   string schema,
   string name,
   string alias
);

Parameters

database
The database, which the table belongs to.
schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

database
The database, which the table belongs to.
schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
quote
Specifies if the table parameters should be quoted.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,String,String,String,Boolean) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(String,String,String,String,Boolean) Method

Adds a newly created SelectTable object with the specified database, schema, name, and alias to the collection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal database As String, _
   ByVal schema As String, _
   ByVal name As String, _
   ByVal alias As String, _
   ByVal quote As Boolean _
) As SelectTable
[C#]
public SelectTable Add(
   string database,
   string schema,
   string name,
   string alias,
   bool quote
);

Parameters

database
The database, which the table belongs to.
schema
The schema, which the table belongs to.
name
The name of the table that the SelectTable object should represent.
alias
The alias of the table.
quote
Specifies if the table parameters should be quoted.

Return Type

The SelectTable object created.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The SelectTable to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(SelectTable) Method

Devart.Common Namespace > SelectTableCollection Class > Add Method : Add(SelectTable) Method

Adds the specified SelectTable to the SelectTableCollection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal value As SelectTable _
) As Integer
[C#]
public int Add(
   SelectTable value
);

Parameters

value
The SelectTable to add to the collection.

Return Type

Index of the new SelectTable object.

See Also

SelectTableCollection Class | SelectTableCollection Members | Overload List


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

value
The value of the SelectTable object to find.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Contains Method

Devart.Common Namespace > SelectTableCollection Class : Contains Method (SelectTableCollection)

Gets a value indicating whether a SelectTable object exists in the collection.

[Visual Basic]
Public Function Contains( _
   ByVal value As SelectTable _
) As Boolean
[C#]
public bool Contains(
   SelectTable value
);

Parameters

value
The value of the SelectTable object to find.

Return Type

true if the collection contains the SelectTable; otherwise, false.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

array
The array into which to copy the SelectTable objects.
index
The zero-based index of the array.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CopyTo Method

Devart.Common Namespace > SelectTableCollection Class : CopyTo Method (SelectTableCollection)

Copies SelectTable objects from the SelectTableCollection to the specified array.

[Visual Basic]
Public Sub CopyTo( _
   ByVal array() As SelectTable, _
   ByVal index As Integer _
)
[C#]
public void CopyTo(
   SelectTable[] array,
   int index
);

Parameters

array
The array into which to copy the SelectTable objects.
index
The zero-based index of the array.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

value
The SelectTable object to find.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IndexOf Method

Devart.Common Namespace > SelectTableCollection Class : IndexOf Method (SelectTableCollection)

Gets the location in the collection of the SelectTable object.

[Visual Basic]
Public Function IndexOf( _
   ByVal value As SelectTable _
) As Integer
[C#]
public int IndexOf(
   SelectTable value
);

Parameters

value
The SelectTable object to find.

Return Type

The zero-based location of the SelectTable in the collection.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index where the table is to be inserted within the collection.
value
The SelectTable to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Insert Method

Devart.Common Namespace > SelectTableCollection Class : Insert Method (SelectTableCollection)

Inserts a SelectTable into the collection at the specified index.

[Visual Basic]
Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As SelectTable _
)
[C#]
public void Insert(
   int index,
   SelectTable value
);

Parameters

index
The zero-based index where the table is to be inserted within the collection.
value
The SelectTable to add to the collection.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%PageItemTitle%%

SelectTableCollection Class | SelectTableCollection Members

Language

Visual Basic

C#

Show All

value
The SelectTable object to remove from the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Remove Method

Devart.Common Namespace > SelectTableCollection Class : Remove Method (SelectTableCollection)

Removes the specified SelectTable object from the collection.

[Visual Basic]
Public Sub Remove( _
   ByVal value As SelectTable _
)
[C#]
public void Remove(
   SelectTable value
);

Parameters

value
The SelectTable object to remove from the collection.

See Also

SelectTableCollection Class | SelectTableCollection Members


%%ItemTitle%%

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace

Inheritance Hierarchy

Classes

Class | Description
PgSqlAlerter | Manages PostgreSQL notifications with LISTEN and NOTIFY commands.
PgSqlAlerterAlertEventArgs | Provides data for the PgSqlAlerter.Alert event.
PgSqlAlerterErrorEventArgs | Provides data for the PgSqlAlerter.Error event.
PgSqlAlerterStoppedEventArgs | Provides data for the PgSqlAlerter.Stopped event.
PgSqlAttribute | Represents PostgreSQL column in a composite type.
PgSqlAttributeCollection | Represents collection of PgSqlAttribute objects.
PgSqlBigIntRange | Represents the PostgreSQL int8range type. Each object of the PgSqlBigIntRange class stores a range of integer values.
PgSqlBlob | Represents a variable-length stream of binary data to be stored in or retrieved from a database.
PgSqlCommand | Represents a SQL statement or stored procedure to execute against PostgreSQL.
PgSqlCommandBuilder | Automatically generates single-table commands used to reconcile changes made to a DataSet with the PostgreSQL.
PgSqlConnection | Represents an open connection to PostgreSQL.
PgSqlConnectionStringBuilder | Generates automatically connection strings used to connect to PostgreSQL.
PgSqlCursor | Represents a PostgreSQL REF CURSOR and value of cursor field.
PgSqlDataAdapter | Represents a set of data commands and a data source connection that are used to fill the DataSet and update a PostgreSQL data.
PgSqlDataReader | Reads a forward-only stream of rows from PostgreSQL.
PgSqlDataSet | Represents an in-memory cache of data with support for PostgreSQL-specific features.
PgSqlDataSourceEnumerator | Retrieves list of available servers in the network.
PgSqlDataTable | Represents a single object that provides all of the functionality needed to retrieve and manipulate data from a PostgreSQL data source.
PgSqlDateRange | Represents the PostgreSQL daterange type. Each object of the PgSqlDateRange class stores a range of date values.
PgSqlDependency | Tracks changes on the server.
PgSqlDump | Serves to store a database or its parts as a script and also to restore database from the received script.
PgSqlError | Represents a PostgreSQL notice, warning, and error messages.
PgSqlErrorCollection | Represents a collection of PgSqlError objects.
PgSqlErrorEventArgs | Provides data for the PgSqlConnection.Error event.
PgSqlException | The exception that is generated when PostgreSQL returns a warning or error.
PgSqlInfoMessageEventArgs | Provides data for the PgSqlConnection.InfoMessage event.
PgSqlIntRange | Represents the PostgreSQL int4range type. Each object of the PgSqlIntRange class stores a range of integer values.
PgSqlLargeObject | Represents a PostgreSQL large object.
PgSqlLoader | Serves to load external data into PostgreSQL.
PgSqlLoaderColumn | Represents the attributes for column loading.
PgSqlLoaderColumnCollection | Represents a collection of columns relevant to a PgSqlLoader.
PgSqlLoaderErrorEventArgs | Provides data for the PgSqlLoader.Error event of the PgSqlLoader class.
PgSqlLocalization | This static class allows configuring localization settings.
PgSqlMetaDataCollectionNames | Enumerates collection names you can use for metadata retrieval purposes.
PgSqlMonitor | Monitors dynamic SQL execution in applications that use dotConnect for PostgreSQL.
PgSqlNotificationEventArgs | Provides data for the PgSqlConnection.Notification event of the PgSqlConnection class.
PgSqlNumericRange | Represents the PostgreSQL numrange type. Each object of the PgSqlNumericRange class stores a range of integer values.
PgSqlParameter | Represents a parameter to a PgSqlCommand, and optionally, its mapping to DataSet columns.
PgSqlParameterCollection | Collects all parameters relevant to a PgSqlCommand as well as their respective mappings to DataSet columns.
PgSqlProviderFactory | Represents a factory required to create inheritors of generic base classes to use with dotConnect for PostgreSQL.
Generic PgSqlRangeType | Generic base type for classes, representing PostgreSQL range types.
PgSqlRow | Represents PostgreSQL composite type data.
PgSqlRowType | Represents PostgreSQL row data type.
PgSqlRowUpdatedEventArgs | Provides data for the PgSqlDataAdapter.RowUpdated event.
PgSqlRowUpdatingEventArgs | Provides data for the PgSqlDataAdapter.RowUpdating event. This class cannot be inherited.
PgSqlScript | Serves to execute series of SQL statements separated by special symbols.
PgSqlSelectLimit | Represents PostgreSQL LIMIT clause.
PgSqlSelectStatement | Represents PostgreSQL SELECT statement.
PgSqlStatementExecuteEventArgs | Provides data for the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of the PgSqlScript class.
PgSqlTableChangeEventArgs | Provides data for the PgSqlDependency.OnChange event of the PgSqlDependency class.
PgSqlText | Represents a variable-length stream of characters to be stored in or retrieved from the database.
PgSqlTimeStampRange | Represents the PostgreSQL tsrange type. Each object of the PgSqlTimeStampRange class stores a range of integer values.
PgSqlTimeStampTZRange | Represents the PostgreSQL tstzrange type. Each object of the PgSqlTimeStampTZRange class stores a range of integer values.
PgSqlTransaction | Represents a SQL transaction to be made in the PostgreSQL database.
SslOptions | Represents information required to establish a SSL connection.

Enumerations

Enumeration | Description
PgSqlDumpObjects | Determines which database objects will be included in the dump.
PgSqlLargeObjectOpenMode | Specifies how to open an existing large object - for reading or for writing.
PgSqlLoaderMode | Determines the operating mode of the PgSqlLoader.
PgSqlType | Specifies the data type of a field, property, PgSqlParameter or PgSqlAttribute.
ProtocolVersion | Specifies version of protocol to be used when more than one is available.
Severity | Specifies a severity of occurred event.
SslMode | Determines SSL connection priority.
TransactionErrorBehavior | Determines how dotConnect for PostgreSQL handles errors, which occur within a transaction.

Structures

Structure | Description
PgSqlArray | Represents a PostgreSQL ARRAY value.
PgSqlBox | Represents PostgreSQL box geometric data type.
PgSqlCircle | Represents PostgreSQL circle geometric data type.
PgSqlInet | Represents the PostgreSQL inet or cidr data type that stores an IPv4 or IPv6 address and optionally its subnet.
PgSqlInterval | Represents the PostgreSQL INTERVAL data type. Each object of the PgSqlInterval class stores a period of time in years, months, days, hours, minutes, seconds, and milliseconds.
PgSqlLSeg | Represents PostgreSQL lseg geometric data type.
PgSqlMacAddr | Represents the PostgreSQL macaddr data type that stores MAC addresses.
PgSqlPath | Represents PostgreSQL path geometric data type.
PgSqlPoint | Represents PostgreSQL point geometric data type.
PgSqlPolygon | Represents PostgreSQL polygon geometric data type.
PgSqlTime | Represents the PostgreSQL date and timestamp data types.
PgSqlTimeStamp | Represents the PostgreSQL date and timestamp data types.

Delegates

Delegate | Description
OnChangeEventHandler | Represents the method that will handle the PgSqlDependency.OnChange event of a PgSqlDependency.
PgSqlAlerterAlertEventHandler | Represents the method that will handle the PgSqlAlerter.Alert event of PgSqlAlerter.
PgSqlAlerterErrorEventHandler | Represents the method that will handle the PgSqlAlerter.Error event of PgSqlAlerter.
PgSqlAlerterStoppedEventHandler | Represents the method that will handle the PgSqlAlerter.Stopped event of PgSqlAlerter.
PgSqlErrorEventHandler | Represents the method that will handle the PgSqlConnection.Error event of a PgSqlConnection.
PgSqlInfoMessageEventHandler | Represents the method that will handle the PgSqlConnection.InfoMessage event of PgSqlConnection.
PgSqlLoaderErrorEventHandler | Represents the method that will handle the PgSqlLoader.Error event of a PgSqlLoader.
PgSqlNotificationEventHandler | Represents the method that will handle the PgSqlConnection.Notification event of a PgSqlConnection.
PgSqlRowUpdatedEventHandler | Represents the method that will handle the PgSqlDataAdapter.RowUpdated event of an PgSqlDataAdapter.
PgSqlRowUpdatingEventHandler | Represents the method that will handle the PgSqlDataAdapter.RowUpdating event of an PgSqlDataAdapter.
PgSqlStatementExecuteEventHandler | Represents the method that will handle the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of an PgSqlScript.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%% Classes

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace Classes

Inheritance Hierarchy

Classes

Class | Description
PgSqlAlerter | Manages PostgreSQL notifications with LISTEN and NOTIFY commands.
PgSqlAlerterAlertEventArgs | Provides data for the PgSqlAlerter.Alert event.
PgSqlAlerterErrorEventArgs | Provides data for the PgSqlAlerter.Error event.
PgSqlAlerterStoppedEventArgs | Provides data for the PgSqlAlerter.Stopped event.
PgSqlAttribute | Represents PostgreSQL column in a composite type.
PgSqlAttributeCollection | Represents collection of PgSqlAttribute objects.
PgSqlBigIntRange | Represents the PostgreSQL int8range type. Each object of the PgSqlBigIntRange class stores a range of integer values.
PgSqlBlob | Represents a variable-length stream of binary data to be stored in or retrieved from a database.
PgSqlCommand | Represents a SQL statement or stored procedure to execute against PostgreSQL.
PgSqlCommandBuilder | Automatically generates single-table commands used to reconcile changes made to a DataSet with the PostgreSQL.
PgSqlConnection | Represents an open connection to PostgreSQL.
PgSqlConnectionStringBuilder | Generates automatically connection strings used to connect to PostgreSQL.
PgSqlCursor | Represents a PostgreSQL REF CURSOR and value of cursor field.
PgSqlDataAdapter | Represents a set of data commands and a data source connection that are used to fill the DataSet and update a PostgreSQL data.
PgSqlDataReader | Reads a forward-only stream of rows from PostgreSQL.
PgSqlDataSet | Represents an in-memory cache of data with support for PostgreSQL-specific features.
PgSqlDataSourceEnumerator | Retrieves list of available servers in the network.
PgSqlDataTable | Represents a single object that provides all of the functionality needed to retrieve and manipulate data from a PostgreSQL data source.
PgSqlDateRange | Represents the PostgreSQL daterange type. Each object of the PgSqlDateRange class stores a range of date values.
PgSqlDependency | Tracks changes on the server.
PgSqlDump | Serves to store a database or its parts as a script and also to restore database from the received script.
PgSqlError | Represents a PostgreSQL notice, warning, and error messages.
PgSqlErrorCollection | Represents a collection of PgSqlError objects.
PgSqlErrorEventArgs | Provides data for the PgSqlConnection.Error event.
PgSqlException | The exception that is generated when PostgreSQL returns a warning or error.
PgSqlInfoMessageEventArgs | Provides data for the PgSqlConnection.InfoMessage event.
PgSqlIntRange | Represents the PostgreSQL int4range type. Each object of the PgSqlIntRange class stores a range of integer values.
PgSqlLargeObject | Represents a PostgreSQL large object.
PgSqlLoader | Serves to load external data into PostgreSQL.
PgSqlLoaderColumn | Represents the attributes for column loading.
PgSqlLoaderColumnCollection | Represents a collection of columns relevant to a PgSqlLoader.
PgSqlLoaderErrorEventArgs | Provides data for the PgSqlLoader.Error event of the PgSqlLoader class.
PgSqlLocalization | This static class allows configuring localization settings.
PgSqlMetaDataCollectionNames | Enumerates collection names you can use for metadata retrieval purposes.
PgSqlMonitor | Monitors dynamic SQL execution in applications that use dotConnect for PostgreSQL.
PgSqlNotificationEventArgs | Provides data for the PgSqlConnection.Notification event of the PgSqlConnection class.
PgSqlNumericRange | Represents the PostgreSQL numrange type. Each object of the PgSqlNumericRange class stores a range of integer values.
PgSqlParameter | Represents a parameter to a PgSqlCommand, and optionally, its mapping to DataSet columns.
PgSqlParameterCollection | Collects all parameters relevant to a PgSqlCommand as well as their respective mappings to DataSet columns.
PgSqlProviderFactory | Represents a factory required to create inheritors of generic base classes to use with dotConnect for PostgreSQL.
Generic PgSqlRangeType | Generic base type for classes, representing PostgreSQL range types.
PgSqlRow | Represents PostgreSQL composite type data.
PgSqlRowType | Represents PostgreSQL row data type.
PgSqlRowUpdatedEventArgs | Provides data for the PgSqlDataAdapter.RowUpdated event.
PgSqlRowUpdatingEventArgs | Provides data for the PgSqlDataAdapter.RowUpdating event. This class cannot be inherited.
PgSqlScript | Serves to execute series of SQL statements separated by special symbols.
PgSqlSelectLimit | Represents PostgreSQL LIMIT clause.
PgSqlSelectStatement | Represents PostgreSQL SELECT statement.
PgSqlStatementExecuteEventArgs | Provides data for the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of the PgSqlScript class.
PgSqlTableChangeEventArgs | Provides data for the PgSqlDependency.OnChange event of the PgSqlDependency class.
PgSqlText | Represents a variable-length stream of characters to be stored in or retrieved from the database.
PgSqlTimeStampRange | Represents the PostgreSQL tsrange type. Each object of the PgSqlTimeStampRange class stores a range of integer values.
PgSqlTimeStampTZRange | Represents the PostgreSQL tstzrange type. Each object of the PgSqlTimeStampTZRange class stores a range of integer values.
PgSqlTransaction | Represents a SQL transaction to be made in the PostgreSQL database.
SslOptions | Represents information required to establish a SSL connection.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

PgSqlAlerter Members | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Class

Devart.Data.PostgreSql Namespace : PgSqlAlerter Class

Manages PostgreSQL notifications with LISTEN and NOTIFY commands.

For a list of all members of this type, see PgSqlAlerter members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Data.PostgreSql.PgSqlAlerter

Syntax

[Visual Basic]
Public Class PgSqlAlerter
   Inherits Component
   Implements IComponent, ISupportInitialize, IDisposable
[C#]
public class PgSqlAlerter : Component, IComponent, ISupportInitialize, IDisposable

Remarks

PgSqlAlerter allows you to register new notifications or listen to existing notifications on PostgreSQL server.

Notifications are posted to all clients when a client executes the NOTIFY command. Use PgSqlAlerter to handle events for responding to actions and database changes made by other applications.

To get events, application must register its intereset in the required events. To do it, enumerate names of the notifications in the AlertNames property and call the Start method. PgSqlAlerter issues the LISTEN command to listen to the specified events. When one of the registered events occurs, the PgSqlAlerter.Alert handler is called.

Notifications are transaction-based. This means that the waiting connection does not get an event until the transaction posting the event commits.

For detailed information on the mechanism please refer to PostgreSQL documentation, NOTIFY SQL command: http://www.postgresql.org/docs/8.3/interactive/sql-notify.html.

Example

In the following sample, an instance of PgSqlAlerter, 'recipient', is subscribed for several alerts. Another instance, 'sender', notifies server that these alerts should be sent. One more alert is sent by a trigger that fires when a new row is inserted into the Dept table.

The definitions of the trigger and the corresponding trigger function are:

  CREATE OR REPLACE FUNCTION dept_insert_notice()
    RETURNS trigger AS
  $BODY$
  BEGIN
  NOTIFY "trigger event";
  RETURN NEW;
  END;
  $BODY$
    LANGUAGE 'plpgsql' VOLATILE;

  CREATE TRIGGER dept_insert_trigger
  BEFORE INSERT
  ON dept
  FOR EACH ROW
  EXECUTE PROCEDURE dept_insert_notice();

[C#]

static public void PgSqlAlerter_Test(PgSqlConnection connection) {

    string alerts = "event1,event2,trigger event";
    // Create an alerter subscribed to the alerts specified above.
    PgSqlAlerter recipient = new PgSqlAlerter(connection, alerts);

    // Add event handlers for the events when an alert is incoming and when the alerter stops to listen.
    recipient.Alert += new PgSqlAlerterAlertEventHandler(recipient_Alert);
    recipient.Stopped += new PgSqlAlerterStoppedEventHandler(recipient_Stopped);

    // Register alerts and start the waiting process
    recipient.Start();
    Console.WriteLine("The waiting process has been started");
    // Signal all registered alerts
    Notify(connection);

    // Wait for the notifications from server
    Thread.Sleep(1000);
    recipient.Stop();
}

static public void Notify(PgSqlConnection connection) {

    // Create another instance of PgSqlAlerter that will send notifications to the server.
    PgSqlAlerter sender = new PgSqlAlerter();
    sender.Connection = connection;

    // Signal to the server that an alert should be sent.
    sender.Signal("event1");

    // Send several alerts at once:
    sender.Signal("event2,event1");

    //The following command inserts a row into the Dept table, firing the 'dept_insert_trigger' trigger:
    PgSqlCommand cmd = new PgSqlCommand("insert into dept values (50, 'IT', 'San Diego')", connection);
    cmd.ExecuteNonQuery();

    //The following notification name was not registered, so the client will not receive this signal
    sender.Signal("unknown event");

}

    // A simple event handler that receives the incoming alert and prints its content.
static public void recipient_Alert(object sender, PgSqlAlerterAlertEventArgs e) {

    Console.WriteLine("Received alert - {0}", e.AlertName);
}

    // A simple event handler processing the Stopped event of the alerter.
static public void recipient_Stopped(object sender, PgSqlAlerterStoppedEventArgs e) {

    Console.WriteLine("The waiting process has been stopped");
}

[Visual Basic]

Sub PgSqlAlerter_Test(ByVal connection As PgSqlConnection)

    Dim alerts As String = "event1,event2,trigger event"
    ' Create an alerter subscribed to the alerts specified above.
    Dim recipient As PgSqlAlerter = New PgSqlAlerter(connection, alerts)

    ' Add event handlers for the events when an alert is incoming and when the alerter stops to listen.
    AddHandler recipient.Alert, New PgSqlAlerterAlertEventHandler(AddressOf recipient_Alert)
    AddHandler recipient.Stopped, New PgSqlAlerterStoppedEventHandler(AddressOf recipient_Stopped)

    ' Register alerts and start the waiting process
    recipient.Start()
    Console.WriteLine("The waiting process has been started")
    ' Signal all registered alerts
    Notify(connection)

    ' Wait for the notifications from server
    Thread.Sleep(100)
    recipient.Stop()
End Sub

Sub Notify(ByVal connection As PgSqlConnection)
    ' Create another instance of PgSqlAlerter that will send notifications to the server.
    Dim sender As New PgSqlAlerter
    sender.Connection = connection

    ' Signal to the server that an alert should be sent.
    sender.Signal("event1")

    ' Send several alerts at once:
    sender.Signal("event2,event1")

    'The following command inserts a row into the Dept table, firing the 'dept_insert_trigger' trigger:
    Dim cmd As PgSqlCommand = New PgSqlCommand("insert into dept values (50, 'IT', 'San Diego')", connection)
    cmd.ExecuteNonQuery()

    ' The following notification name was not registered, so the client will not receive this signal
    sender.Signal("unknown event")

End Sub

    ' A simple event handler that receives the incoming alert and prints its content.
Sub recipient_Alert(ByVal sender As Object, ByVal e As PgSqlAlerterAlertEventArgs)
    Console.WriteLine("Received alert - {0}", e.AlertName)
End Sub

    ' A simple event handler processing the Stopped event of the alerter.
Sub recipient_Stopped(ByVal sender As Object, ByVal e As PgSqlAlerterStoppedEventArgs)
    Console.WriteLine("The waiting process has been stopped")
End Sub

See Also

PgSqlAlerter Members | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method


%%PageItemTitle%% $$Members$$

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Class Members

Devart.Data.PostgreSql Namespace : PgSqlAlerter Class

PgSqlAlerter overview

Public Constructors

Public Constructor PgSqlAlerter Constructor Overloaded. Initializes a new instance of the PgSqlAlerter class.

Public Properties

Public Property Active | Gets or sets a value that indicates whether the PgSqlAlerter is active or stopped.
Public Property AlertNames | Gets or sets the list of notification names.
Public Property Connection | Gets or sets the PgSqlConnection used by the PgSqlAlerter.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Signal | Overloaded. Sends a notification to the specified list of names.
Public Method Start | Registers interest in notifications specified in the AlertNames property and starts the listening process.
Public Method Stop | Stops the listening process and unregisters the notification names specified in AlertNames.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Alert | Occurs when the listening process receives a notification from the server.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when an exception happens during listening.
Public Event Stopped | Occurs when the listening process is stopped.

See Also

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Constructor

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : PgSqlAlerter Constructor (PgSqlAlerter)

Initializes a new instance of the PgSqlAlerter class.

Overload List

Initializes a new instance of the PgSqlAlerter class.

[Visual Basic] Public Sub New()

[C#] public PgSqlAlerter();

Initializes a new instance of the PgSqlAlerter class with the specified PgSqlConnection and the list of alert names.

[Visual Basic] Public Sub New(PgSqlConnection,String)

[C#] public PgSqlAlerter(PgSqlConnection,string);

See Also

PgSqlAlerter Class | PgSqlAlerter Members


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Constructor()

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class > PgSqlAlerter Constructor : PgSqlAlerter Constructor()

Initializes a new instance of the PgSqlAlerter class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlAlerter();

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Overload List


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Overload List

Language

Visual Basic

C#

Show All

connection
The PgSqlConnection to use.
alertNames
The comma-delimited list of notification names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Constructor(PgSqlConnection,String)

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class > PgSqlAlerter Constructor : PgSqlAlerter Constructor(PgSqlConnection,String)

Initializes a new instance of the PgSqlAlerter class with the specified PgSqlConnection and the list of alert names.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal alertNames As String _
)
[C#]
public PgSqlAlerter(
   PgSqlConnection connection,
   string alertNames
);

Parameters

connection
The PgSqlConnection to use.
alertNames
The comma-delimited list of notification names.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Class Properties

Devart.Data.PostgreSql Namespace : PgSqlAlerter Class

For a list of all members of this type, see PgSqlAlerter members.

Public Properties

Public Property Active | Gets or sets a value that indicates whether the PgSqlAlerter is active or stopped.
Public Property AlertNames | Gets or sets the list of notification names.
Public Property Connection | Gets or sets the PgSqlConnection used by the PgSqlAlerter.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.

See Also

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Start Method | Stop Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Active Property

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Active Property (PgSqlAlerter)

Gets or sets a value that indicates whether the PgSqlAlerter is active or stopped.

[Visual Basic]
Public Property Active As Boolean
[C#]
public bool Active {get; set;}

Return Type

If true, the PgSqlAlerter is actively listening to the registered notification events; otherwise, false.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Start Method | Stop Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Start Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AlertNames Property

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : AlertNames Property

Gets or sets the list of notification names.

[Visual Basic]
Public Property AlertNames As String
[C#]
public string AlertNames {get; set;}

Return Type

The comma-delimited list of notification names.

Remarks

This property can be changed only when Active is false.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Start Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Connection Property (PgSqlAlerter)

Gets or sets the PgSqlConnection used by the PgSqlAlerter.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

A PgSqlConnection object.

Remarks

This property can be changed only when Active is false.

See Also

PgSqlAlerter Class | PgSqlAlerter Members


%%PageItemTitle%% $$Methods$$

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Class Methods

Devart.Data.PostgreSql Namespace : PgSqlAlerter Class

For a list of all members of this type, see PgSqlAlerter members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Signal | Overloaded. Sends a notification to the specified list of names.
Public Method Start | Registers interest in notifications specified in the AlertNames property and starts the listening process.
Public Method Stop | Stops the listening process and unregisters the notification names specified in AlertNames.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Signal Method

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Signal Method

Sends a notification to the specified list of names.

Overload List

Sends a notification to the specified list of names.

[Visual Basic] Overloads Public Sub Signal(String)

[C#] public void Signal(string);

Sends a notification to the specified list of names.

[Visual Basic] Overloads Public Sub Signal(String,String)

[C#] public void Signal(string,string);

See Also

PgSqlAlerter Class | PgSqlAlerter Members


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Overload List | AlertNames Property | Start Method | Alert Event

Language

Visual Basic

C#

Show All

alertNames
The comma-delimited list of notification names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Signal(String) Method

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class > Signal Method : Signal(String) Method

Sends a notification to the specified list of names.

[Visual Basic]
Overloads Public Sub Signal( _
   ByVal alertNames As String _
)
[C#]
public void Signal(
   string alertNames
);

Parameters

alertNames
The comma-delimited list of notification names.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Overload List | AlertNames Property | Start Method | Alert Event


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Overload List | AlertNames Property | Start Method | Alert Event

Language

Visual Basic

C#

Show All

alertNames
The comma-delimited list of notification names.
payload
The notification payload string.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Signal(String,String) Method

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class > Signal Method : Signal(String,String) Method

Sends a notification to the specified list of names.

[Visual Basic]
Overloads Public Sub Signal( _
   ByVal alertNames As String, _
   ByVal payload As String _
)
[C#]
public void Signal(
   string alertNames,
   string payload
);

Parameters

alertNames
The comma-delimited list of notification names.
payload
The notification payload string.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Overload List | AlertNames Property | Start Method | Alert Event


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | AlertNames Property | Signal(String) Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Start Method

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Start Method (PgSqlAlerter)

Registers interest in notifications specified in the AlertNames property and starts the listening process.

[Visual Basic]
Public Sub Start()
[C#]
public void Start();

See Also

PgSqlAlerter Class | PgSqlAlerter Members | AlertNames Property | Signal(String) Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | AlertNames Property | Start Method | Stopped Event

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Stop Method

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Stop Method (PgSqlAlerter)

Stops the listening process and unregisters the notification names specified in AlertNames.

[Visual Basic]
Public Sub Stop()
[C#]
public void Stop();

See Also

PgSqlAlerter Class | PgSqlAlerter Members | AlertNames Property | Start Method | Stopped Event


%%PageItemTitle%% $$Events$$

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerter Class Events

Devart.Data.PostgreSql Namespace : PgSqlAlerter Class

For a list of all members of this type, see PgSqlAlerter members.

Public Events

Public Event Alert | Occurs when the listening process receives a notification from the server.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when an exception happens during listening.
Public Event Stopped | Occurs when the listening process is stopped.

See Also

PgSqlAlerter Class | Devart.Data.PostgreSql Namespace | AlertNames Property | Start Method


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Signal(String) Method | PgSqlAlerterAlertEventArgs Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Alert Event

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Alert Event

Occurs when the listening process receives a notification from the server.

[Visual Basic]
Public Event Alert() As PgSqlAlerterAlertEventHandler
[C#]
public event PgSqlAlerterAlertEventHandler Alert();

Event Data

The event handler receives an argument of type PgSqlAlerterAlertEventArgs containing data related to this event. The following PgSqlAlerterAlertEventArgs properties provide information specific to this event.

Property | Description
AlertName | Gets the name of the notification signalled.
Payload | Gets the notification payload string of the notification signalled.

Remarks

Clients that want to process notification messages sent by the server should create a __Delegates.PgSqlAlerterAlertEventHandler delegate to listen to this event.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Signal(String) Method | PgSqlAlerterAlertEventArgs Class


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Error Event

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Error Event (PgSqlAlerter)

Occurs when an exception happens during listening.

[Visual Basic]
Public Event Error() As PgSqlAlerterErrorEventHandler
[C#]
public event PgSqlAlerterErrorEventHandler Error();

Event Data

The event handler receives an argument of type PgSqlAlerterErrorEventArgs containing data related to this event. The following PgSqlAlerterErrorEventArgs properties provide information specific to this event.

Property | Description
Exception | Gets the exception happened during listening.
Terminated | Determines whether to stop listening after an exception.

Remarks

PgSqlAlerterErrorEventArgs.Exception value determines wether the listening continues after the exception. By default it is set to false, and the listening continues (and uses some of the computer resources). If you need to stop the listening after an exception, set this property to true. Important Note: In such case not only this PgSqlAlerter stops listening, but all other alerters stop listening as well.

See Also

PgSqlAlerter Class | PgSqlAlerter Members


%%PageItemTitle%%

PgSqlAlerter Class | PgSqlAlerter Members | Stop Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Stopped Event

Devart.Data.PostgreSql Namespace > PgSqlAlerter Class : Stopped Event

Occurs when the listening process is stopped.

[Visual Basic]
Public Event Stopped() As PgSqlAlerterStoppedEventHandler
[C#]
public event PgSqlAlerterStoppedEventHandler Stopped();

Remarks

Clients that want to process this event should create a __Delegates.PgSqlAlerterStoppedEventHandler delegate to listen to this event.

See Also

PgSqlAlerter Class | PgSqlAlerter Members | Stop Method


%%PageItemTitle%%

PgSqlAlerterAlertEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterAlertEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlAlerterAlertEventArgs Class

Provides data for the PgSqlAlerter.Alert event.

For a list of all members of this type, see PgSqlAlerterAlertEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlAlerterAlertEventArgs

Syntax

[Visual Basic]
Public Class PgSqlAlerterAlertEventArgs
   Inherits EventArgs
[C#]
public class PgSqlAlerterAlertEventArgs : EventArgs

See Also

PgSqlAlerterAlertEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlAlerterAlertEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterAlertEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlAlerterAlertEventArgs Class

PgSqlAlerterAlertEventArgs overview

Public Properties

Public Property AlertName | Gets the name of the notification signalled.
Public Property Payload | Gets the notification payload string of the notification signalled.

See Also

PgSqlAlerterAlertEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlAlerterAlertEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterAlertEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlAlerterAlertEventArgs Class

For a list of all members of this type, see PgSqlAlerterAlertEventArgs members.

Public Properties

Public Property AlertName | Gets the name of the notification signalled.
Public Property Payload | Gets the notification payload string of the notification signalled.

See Also

PgSqlAlerterAlertEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlAlerterAlertEventArgs Class | PgSqlAlerterAlertEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AlertName Property

Devart.Data.PostgreSql Namespace > PgSqlAlerterAlertEventArgs Class : AlertName Property

Gets the name of the notification signalled.

[Visual Basic]
Public ReadOnly Property AlertName As String
[C#]
public string AlertName {get;}

Return Type

The name of the notification.

See Also

PgSqlAlerterAlertEventArgs Class | PgSqlAlerterAlertEventArgs Members


%%PageItemTitle%%

PgSqlAlerterAlertEventArgs Class | PgSqlAlerterAlertEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Payload Property

Devart.Data.PostgreSql Namespace > PgSqlAlerterAlertEventArgs Class : Payload Property

Gets the notification payload string of the notification signalled.

[Visual Basic]
Public ReadOnly Property Payload As String
[C#]
public string Payload {get;}

Return Type

The notification payload string.

See Also

PgSqlAlerterAlertEventArgs Class | PgSqlAlerterAlertEventArgs Members


%%PageItemTitle%%

PgSqlAlerterErrorEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterErrorEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlAlerterErrorEventArgs Class

Provides data for the PgSqlAlerter.Error event.

For a list of all members of this type, see PgSqlAlerterErrorEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlAlerterErrorEventArgs

Syntax

[Visual Basic]
Public Class PgSqlAlerterErrorEventArgs
   Inherits EventArgs
[C#]
public class PgSqlAlerterErrorEventArgs : EventArgs

See Also

PgSqlAlerterErrorEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlAlerterErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterErrorEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlAlerterErrorEventArgs Class

PgSqlAlerterErrorEventArgs overview

Public Properties

Public Property Exception | Gets the exception happened during listening.
Public Property Terminated | Determines whether to stop listening after an exception.

See Also

PgSqlAlerterErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlAlerterErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterErrorEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlAlerterErrorEventArgs Class

For a list of all members of this type, see PgSqlAlerterErrorEventArgs members.

Public Properties

Public Property Exception | Gets the exception happened during listening.
Public Property Terminated | Determines whether to stop listening after an exception.

See Also

PgSqlAlerterErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlAlerterErrorEventArgs Class | PgSqlAlerterErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Exception Property

Devart.Data.PostgreSql Namespace > PgSqlAlerterErrorEventArgs Class : Exception Property (PgSqlAlerterErrorEventArgs)

Gets the exception happened during listening.

[Visual Basic]
Public ReadOnly Property Exception As Exception
[C#]
public Exception Exception {get;}

Return Type

The exception happened during listening.

See Also

PgSqlAlerterErrorEventArgs Class | PgSqlAlerterErrorEventArgs Members


%%PageItemTitle%%

PgSqlAlerterErrorEventArgs Class | PgSqlAlerterErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Terminated Property

Devart.Data.PostgreSql Namespace > PgSqlAlerterErrorEventArgs Class : Terminated Property

Determines whether to stop listening after an exception.

[Visual Basic]
Public Property Terminated As Boolean
[C#]
public bool Terminated {get; set;}

Return Type

true if PgSqlAlerter should stop listening after the exception (any other PgSqlAlerters also stop listening after it); otherwise, false.

See Also

PgSqlAlerterErrorEventArgs Class | PgSqlAlerterErrorEventArgs Members


%%PageItemTitle%%

PgSqlAlerterStoppedEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterStoppedEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlAlerterStoppedEventArgs Class

Provides data for the PgSqlAlerter.Stopped event.

For a list of all members of this type, see PgSqlAlerterStoppedEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlAlerterStoppedEventArgs

Syntax

[Visual Basic]
Public Class PgSqlAlerterStoppedEventArgs
   Inherits EventArgs
[C#]
public class PgSqlAlerterStoppedEventArgs : EventArgs

See Also

PgSqlAlerterStoppedEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlAlerterStoppedEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterStoppedEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlAlerterStoppedEventArgs Class

PgSqlAlerterStoppedEventArgs overview

See Also

PgSqlAlerterStoppedEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlAttribute Members | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttribute Class

Devart.Data.PostgreSql Namespace : PgSqlAttribute Class

Represents PostgreSQL column in a composite type.

For a list of all members of this type, see PgSqlAttribute members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlAttribute

Syntax

[Visual Basic]
Public Class PgSqlAttribute
[C#]
public class PgSqlAttribute

Remarks

Use PgSqlAttribute to handle columns in PostgreSQL composite types. To obtain the attribute use items of PgSqlAttributeCollection, which in turn can be obtained with PgSqlRowType.Attributes property. To get a value that corresponds to the attribute use one of the PgSqlRow.Item methods.

For detailed information on PostgreSQL composite types and how they are treated in dotConnect for PostgreSQL refer to article Working with Composite Types.

Example

This sample demonstrates usage of PgSqlRow, PgSqlRowType, PgSqlAttribute, and PgSqlAttributeCollection classes. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlAttribute Members | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class


%%PageItemTitle%% $$Members$$

PgSqlAttribute Class | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttribute Class Members

Devart.Data.PostgreSql Namespace : PgSqlAttribute Class

PgSqlAttribute overview

Public Properties

Public Property DbType | Gets type of the attribute.
Public Property Name | Gets name of the attribute.
Public Property RowType | Gets PgSqlRowType that describes data contained in the attribute.
Public Property TypeName | Gets type of the attribute.

See Also

PgSqlAttribute Class | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class


%%PageItemTitle%% $$Properties$$

PgSqlAttribute Class | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttribute Class Properties

Devart.Data.PostgreSql Namespace : PgSqlAttribute Class

For a list of all members of this type, see PgSqlAttribute members.

Public Properties

Public Property DbType | Gets type of the attribute.
Public Property Name | Gets name of the attribute.
Public Property RowType | Gets PgSqlRowType that describes data contained in the attribute.
Public Property TypeName | Gets type of the attribute.

See Also

PgSqlAttribute Class | Devart.Data.PostgreSql Namespace | PgSqlAttributeCollection Class | PgSqlRow Class


%%PageItemTitle%%

PgSqlAttribute Class | PgSqlAttribute Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DbType Property

Devart.Data.PostgreSql Namespace > PgSqlAttribute Class : DbType Property (PgSqlAttribute)

Gets type of the attribute.

[Visual Basic]
Public ReadOnly Property DbType As PgSqlType
[C#]
public PgSqlType DbType {get;}

Return Type

One of PgSqlType values.

Remarks

You can find text representation of the type in TypeName property.

See Also

PgSqlAttribute Class | PgSqlAttribute Members


%%PageItemTitle%%

PgSqlAttribute Class | PgSqlAttribute Members | TypeName Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Data.PostgreSql Namespace > PgSqlAttribute Class : Name Property (PgSqlAttribute)

Gets name of the attribute.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Return Type

Name of the attribute.

See Also

PgSqlAttribute Class | PgSqlAttribute Members | TypeName Property


%%PageItemTitle%%

PgSqlAttribute Class | PgSqlAttribute Members | DbType Property | TypeName Property | PgSqlRow Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowType Property

Devart.Data.PostgreSql Namespace > PgSqlAttribute Class : RowType Property (PgSqlAttribute)

Gets PgSqlRowType that describes data contained in the attribute.

[Visual Basic]
Public ReadOnly Property RowType As PgSqlRowType
[C#]
public PgSqlRowType RowType {get;}

Return Type

PgSqlRowType instance that describes data contained in the attribute.

Remarks

This property is a null reference (Nothing in Visual Basic) unless the DbType is PgSqlType.Row. In this case RowType property points to instance of PgSqlRowType that can be used to describe PgSqlRow contained in the attribute.

See Also

PgSqlAttribute Class | PgSqlAttribute Members | DbType Property | TypeName Property | PgSqlRow Class


%%PageItemTitle%%

PgSqlAttribute Class | PgSqlAttribute Members | Name Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TypeName Property

Devart.Data.PostgreSql Namespace > PgSqlAttribute Class : TypeName Property

Gets type of the attribute.

[Visual Basic]
Public ReadOnly Property TypeName As String
[C#]
public string TypeName {get;}

Return Type

Type of the attribute.

Remarks

In simple cases this property is just a string representation of DbType. When DbType is PgSqlType.Row the TypeName property contains name of a composite type that you can later use with PgSqlRowType.GetRowType method to retrieve enclosed data.

See Also

PgSqlAttribute Class | PgSqlAttribute Members | Name Property


%%PageItemTitle%%

PgSqlAttributeCollection Members | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttributeCollection Class

Devart.Data.PostgreSql Namespace : PgSqlAttributeCollection Class

Represents collection of PgSqlAttribute objects.

For a list of all members of this type, see PgSqlAttributeCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Data.PostgreSql.PgSqlAttributeCollection

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlAttributeCollection
   Inherits CollectionBase
   Implements ICollection, IEnumerable, IList
[C#]
public sealed class PgSqlAttributeCollection : CollectionBase, ICollection, IEnumerable, IList

Remarks

PgSqlAttributeCollection can be retrieved using PgSqlRowType.Attributes property. The collection is read-only.

For information on how to use PgSqlAttributeCollection with composite types refer to article Working with Composite Types.

Example

This sample demonstrates usage of PgSqlRow, PgSqlRowType, PgSqlAttribute, and PgSqlAttributeCollection classes. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlAttributeCollection Members | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class


%%PageItemTitle%% $$Members$$

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttributeCollection Class Members

Devart.Data.PostgreSql Namespace : PgSqlAttributeCollection Class

PgSqlAttributeCollection overview

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets the PgSqlAttribute with the specified name.

Public Methods

Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class


%%PageItemTitle%% $$Properties$$

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttributeCollection Class Properties

Devart.Data.PostgreSql Namespace : PgSqlAttributeCollection Class

For a list of all members of this type, see PgSqlAttributeCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets the PgSqlAttribute with the specified name.

See Also

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class


%%PageItemTitle%%

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlAttributeCollection Class : Item Property (PgSqlAttributeCollection)

Gets the PgSqlAttribute with the specified name.

Overload List

Gets the PgSqlAttribute with the specified name.

[Visual Basic] Overloads Public Item(String) As PgSqlAttribute

[C#] public PgSqlAttribute Item(string);

Gets the PgSqlAttribute at the specified index.

[Visual Basic] Overloads Public Item(Integer) As PgSqlAttribute

[C#] public PgSqlAttribute Item(int);

See Also

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members


%%PageItemTitle%%

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
Name of PgSqlAttribute to get.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(String) Property

Devart.Data.PostgreSql Namespace > PgSqlAttributeCollection Class > Item Property : Item(String) Property

Gets the PgSqlAttribute with the specified name.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal name As String _
) As PgSqlAttribute
[C#]
public PgSqlAttribute Item(
   string name
); {get;}

Parameters

name
Name of PgSqlAttribute to get.

Return Type

PgSqlAttribute with the specified name.

See Also

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members | Overload List


%%PageItemTitle%%

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members | Overload List

Language

Visual Basic

C#

Show All

i
Index of PgSqlAttribute to get.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(Int32) Property

Devart.Data.PostgreSql Namespace > PgSqlAttributeCollection Class > Item Property : Item(Int32) Property

Gets the PgSqlAttribute at the specified index.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal i As Integer _
) As PgSqlAttribute
[C#]
public PgSqlAttribute Item(
   int i
); {get;}

Parameters

i
Index of PgSqlAttribute to get.

Return Type

PgSqlAttribute at the specified index.

See Also

PgSqlAttributeCollection Class | PgSqlAttributeCollection Members | Overload List


%%PageItemTitle%%

PgSqlBigIntRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Class

Devart.Data.PostgreSql Namespace : PgSqlBigIntRange Class

Represents the PostgreSQL int8range type. Each object of the PgSqlBigIntRange class stores a range of integer values.

For a list of all members of this type, see PgSqlBigIntRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<Int64>
Devart.Data.PostgreSql.PgSqlBigIntRange

Syntax

[Visual Basic]
Public Class PgSqlBigIntRange
   Inherits PgSqlRangeType(Of Long)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlBigIntRange : PgSqlRangeType<long>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlBigIntRange object call the PgSqlDataReader.GetPgSqlBigIntRange method of the PgSqlDataReader class.

See Also

PgSqlBigIntRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlBigIntRange Class

PgSqlBigIntRange overview

Public Constructors

Public Constructor PgSqlBigIntRange Constructor Overloaded. Initializes a new instance of the PgSqlBigIntRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlBigIntRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlBigIntRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class : PgSqlBigIntRange Constructor (PgSqlBigIntRange)

Initializes a new instance of the PgSqlBigIntRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlBigIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(Long,Long)

[C#] public PgSqlBigIntRange(long,long);

Initializes a new instance of the PgSqlBigIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(Long,Boolean,Long,Boolean)

[C#] public PgSqlBigIntRange(long,bool,long,bool);

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Constructor(Int64,Boolean,Int64,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class > PgSqlBigIntRange Constructor : PgSqlBigIntRange Constructor(Int64,Boolean,Int64,Boolean)

Initializes a new instance of the PgSqlBigIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Long, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As Long, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlBigIntRange(
   long lowerBound,
   bool isLowerBoundInclusive,
   long upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members | Overload List | #ctor


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Constructor(Int64,Int64)

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class > PgSqlBigIntRange Constructor : PgSqlBigIntRange Constructor(Int64,Int64)

Initializes a new instance of the PgSqlBigIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Long, _
   ByVal upperBound As Long _
)
[C#]
public PgSqlBigIntRange(
   long lowerBound,
   long upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members | Overload List | #ctor


%%PageItemTitle%% $$Fields$$

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlBigIntRange Class

For a list of all members of this type, see PgSqlBigIntRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlBigIntRange object.

See Also

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class : Empty Field (PgSqlBigIntRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlBigIntRange
[C#]
public static readonly PgSqlBigIntRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class : Null Field (PgSqlBigIntRange)

Represents a null PgSqlBigIntRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlBigIntRange
[C#]
public static readonly PgSqlBigIntRange Null

Return Type

An object that represents a null PgSqlBigIntRange value.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members | IsNull Property


%%PageItemTitle%% $$Methods$$

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlBigIntRange Class

For a list of all members of this type, see PgSqlBigIntRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlBigIntRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class : ContainsElement Method (PgSqlBigIntRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As Long _
) As Boolean
[C#]
public override bool ContainsElement(
   long element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members


%%PageItemTitle%%

PgSqlBigIntRange Class | PgSqlBigIntRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlBigIntRange Class : Parse Method (PgSqlBigIntRange)

Converts the specified String representation of a date to its PgSqlBigIntRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlBigIntRange
[C#]
public static PgSqlBigIntRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlBigIntRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlBigIntRange Class | PgSqlBigIntRange Members


%%PageItemTitle%%

PgSqlBlob Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Class

Devart.Data.PostgreSql Namespace : PgSqlBlob Class

Represents a variable-length stream of binary data to be stored in or retrieved from a database.

For a list of all members of this type, see PgSqlBlob members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Devart.Data.PostgreSql.PgSqlBlob
Devart.Data.PostgreSql.PgSqlText

Syntax

[Visual Basic]
Public Class PgSqlBlob
   Inherits Stream
   Implements INullable, ICloneable, IDisposable, IXmlSerializable
[C#]
public class PgSqlBlob : Stream, INullable, ICloneable, IDisposable, IXmlSerializable

Remarks

PgSqlBlob is used to insert or retrieve BLOB fields in databases.

Example

In this example two functions are presented. First can upload a file onto a server, and second can retrieve a BLOB field and paste it into a file. Notice that two classes used here (BinaryWriter and BinaryReader) to provide more flexible stream manipulation are actually redundant for simple data transfer operations.

[C#]

public void DownloadBlob(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection);
  pgConnection.Open();
  PgSqlDataReader myReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default);
  try
  {
    while (myReader.Read())
    {
      PgSqlBlob myBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("Picture"));
      if(!myBlob.IsNull)
      {
        string FN = myReader.GetString(myReader.GetOrdinal("PicName"));
        FileStream fs = new FileStream("D:\\Tmp\\"+FN+".bmp", FileMode.Create);
        BinaryWriter w = new BinaryWriter(fs);
        w.Write(myBlob.Value);
        w.Close();
        fs.Close();
        Console.WriteLine(FN+" downloaded.");
      }
    }
  }
  finally
  {
    myReader.Close();
    pgConnection.Close();
  }
}

public void UploadBlob(PgSqlConnection pgConnection)
{
  FileStream fs = new FileStream("D:\\Tmp\\_Water.bmp", FileMode.Open, FileAccess.Read);
  BinaryReader r = new BinaryReader(fs);
  PgSqlBlob myBlob = new PgSqlBlob(r.ReadBytes((int)fs.Length));
  PgSqlCommand pgCommand = new PgSqlCommand("INSERT INTO Test.Pictures (ID, PicName, Picture) VALUES(1,'Water',:Pictures)", pgConnection);
  pgCommand.Parameters.Add("Pictures",myBlob);
  pgConnection.Open();
  try
  {
    Console.WriteLine(pgCommand.ExecuteNonQuery()+" rows affected.");
  }
  finally
  {
    pgConnection.Close();
    r.Close();
  }
}

[Visual Basic]

Public Sub DownloadBlob(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection)
  pgConnection.Open()
  Dim myReader As PgSqlDataReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default)
  Try
    While myReader.Read()
      Dim myBlob As PgSqlBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("Picture"))
      If Not myBlob.IsNull Then
        Dim FN As String = myReader.GetString(myReader.GetOrdinal("PicName"))
        Dim fs As FileStream = New FileStream("D:\Tmp\" + FN + ".bmp", FileMode.Create)
        Dim w As BinaryWriter = New BinaryWriter(fs)
        w.Write(myBlob.Value)
        w.Close()
        fs.Close()
        Console.WriteLine(String.Concat(FN, " downloaded."))
      End If
    End While
  Finally
    myReader.Close()
    pgConnection.Close()
  End Try
End Sub

Public Sub UploadBlob(ByVal pgConnection As PgSqlConnection)
  Dim fs As FileStream = New FileStream("D:\Tmp\_Water.bmp", FileMode.Open, FileAccess.Read)
  Dim r As BinaryReader = New BinaryReader(fs)
  Dim myBlob As PgSqlBlob = New PgSqlBlob(r.ReadBytes(Convert.ToInt32(fs.Length)))
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("INSERT INTO Test.Pictures (ID, PicName, Picture) VALUES(2,'Water',:Pictures)", pgConnection)
  pgCommand.Parameters.Add("Pictures", myBlob)
  pgConnection.Open()
  Try
    Console.WriteLine(String.Concat(pgCommand.ExecuteNonQuery(), " rows affected."))
  Finally
    pgConnection.Close()
    r.Close()
  End Try
End Sub

See Also

PgSqlBlob Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlBlob Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Class Members

Devart.Data.PostgreSql Namespace : PgSqlBlob Class

PgSqlBlob overview

Public Constructors

Public Constructor PgSqlBlob Constructor Overloaded. Initializes a new instance of the PgSqlBlob class.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlBlob object.

Public Properties

Public Property CanRead | Overridden. Gets a value indicating whether the PgSqlBlob stream can be read.
Public Property CanSeek | Overridden. Gets a value indicating whether forward and backward seek operations can be performed.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite | Overridden. Gets a value indicating whether the PgSqlBlob object supports writing.
Public Property IsEmpty | Gets a value indicating whether the PgSqlBlob is empty or not.
Public Property IsNull | Gets a value indicating whether the PgSqlBlob is a Null stream.
Public Property Length | Overridden. Gets the size of the PgSqlBlob.
Public Property Position | Overridden. Gets the current read position in the PgSqlBlob stream.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property Value | Gets the value of the PgSqlBlob object.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Clone | Creates a copy of the current PgSqlBlob object.
Public Method Close | Overridden. Closes the current stream and releases any resources associated with it.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose | Releases all resources allocated by this object.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Equals | Overridden. Returns a value indicating whether two PgSqlBlob instances have same value.
Public Method Flush | Overridden. Flush/write all buffers for the current PgSqlBlob.
Public Method GetHashCode | Overridden.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Read | Overridden. Reads a sequence of bytes from the current PgSqlBlob stream and advances the position within the stream by the number of bytes read.
Public Method ReadByte (Inherited from System.IO.Stream) | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Public Method Seek | Overridden. Sets the position on the current PgSqlBlob stream.
Public Method SetLength | Overridden. Sets length for PgSqlBlob value.
Public Method ToString | Overridden. Converts the current PgSqlBlob object to a String.
Public Method Write | Overridden. Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.
Public Method WriteByte (Inherited from System.IO.Stream) | Writes a byte to the current position in the stream and advances the position within the stream by one byte.

See Also

PgSqlBlob Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Constructor

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : PgSqlBlob Constructor (PgSqlBlob)

Initializes a new instance of the PgSqlBlob class.

Overload List

Initializes a new instance of the PgSqlBlob class.

[Visual Basic] Public Sub New()

[C#] public PgSqlBlob();

Initializes a new instance of the PgSqlBlob class, setting the Value property to the provided array of bytes.

[Visual Basic] Public Sub New(Byte())

[C#] public PgSqlBlob(byte[]);

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Constructor()

Devart.Data.PostgreSql Namespace > PgSqlBlob Class > PgSqlBlob Constructor : PgSqlBlob Constructor()

Initializes a new instance of the PgSqlBlob class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlBlob();

See Also

PgSqlBlob Class | PgSqlBlob Members | Overload List


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Overload List

Language

Visual Basic

C#

Show All

value
The byte array to be stored in the Value property.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Constructor(Byte[])

Devart.Data.PostgreSql Namespace > PgSqlBlob Class > PgSqlBlob Constructor : PgSqlBlob Constructor(Byte[])

Initializes a new instance of the PgSqlBlob class, setting the Value property to the provided array of bytes.

[Visual Basic]
Public Function New( _
   ByVal value() As Byte _
)
[C#]
public PgSqlBlob(
   byte[] value
);

Parameters

value
The byte array to be stored in the Value property.

Example

[C#]

byte[] byteArray = { 1, 2, 3, 4, 5};
PgSqlBlob blob1 = new PgSqlBlob(byteArray);

[Visual Basic]

Dim byteArray As Byte() = New Byte() {1, 2, 3, 4, 5}
Dim blob1 As New PgSqlBlob(byteArray)

See Also

PgSqlBlob Class | PgSqlBlob Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlBlob Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Class Fields

Devart.Data.PostgreSql Namespace : PgSqlBlob Class

For a list of all members of this type, see PgSqlBlob members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlBlob object.

See Also

PgSqlBlob Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Null Field (PgSqlBlob)

Represents a null PgSqlBlob object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlBlob
[C#]
public static readonly PgSqlBlob Null

Remarks

Use field Null to assign to a PgSqlBlob in order to represent a Null value. In this case a BLOB inserted in a field of a table will be Null rather than zero-length byte array.

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%% $$Properties$$

PgSqlBlob Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Class Properties

Devart.Data.PostgreSql Namespace : PgSqlBlob Class

For a list of all members of this type, see PgSqlBlob members.

Public Properties

Public Property CanRead | Overridden. Gets a value indicating whether the PgSqlBlob stream can be read.
Public Property CanSeek | Overridden. Gets a value indicating whether forward and backward seek operations can be performed.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite | Overridden. Gets a value indicating whether the PgSqlBlob object supports writing.
Public Property IsEmpty | Gets a value indicating whether the PgSqlBlob is empty or not.
Public Property IsNull | Gets a value indicating whether the PgSqlBlob is a Null stream.
Public Property Length | Overridden. Gets the size of the PgSqlBlob.
Public Property Position | Overridden. Gets the current read position in the PgSqlBlob stream.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property Value | Gets the value of the PgSqlBlob object.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

See Also

PgSqlBlob Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanRead Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : CanRead Property (PgSqlBlob)

Gets a value indicating whether the PgSqlBlob stream can be read.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public override bool CanRead {get;}

Return Type

true if the PgSqlBlob stream supports reading; false if a PgSqlBlob is closed, disposed, or Null.

Remarks

Use CanRead property to determine whether PgSqlBlob object supports reading. PgSqlBlob can not be read from if it has Null value.

Example

[C#]

void ReverseBlob()
{
  byte[] byteArray = { (byte)'A', (byte)'B', (byte)'C' };
  PgSqlBlob blobFrom = new PgSqlBlob(byteArray);
  //blobFrom.ToString() = "ABC"

  PgSqlBlob blobTo = new PgSqlBlob();
  ........
  //reverse PgSqlBlob
  if (blobFrom.CanSeek && blobFrom.CanRead && blobTo.CanWrite)
    for (blobFrom.Seek(-1, System.IO.SeekOrigin.End); ;blobFrom.Position -= 2)
    {
      blobTo.WriteByte((byte)blobFrom.ReadByte());
      if (blobFrom.Position == 1) break;
    }
  //blobTo.ToString() = "CBA";
}

[Visual Basic]

Private Sub ReverseBlob()
  Dim byteArray As Byte() = New Byte() {AscW("A"c), AscW("B"c), AscW("C"c)}
  Dim blobFrom As New PgSqlBlob(byteArray)
  ' blobFrom.ToString() = "ABC"

  Dim blobTo As New PgSqlBlob
  ......
  ' reverse PgSqlBlob
  If ((blobFrom.CanSeek AndAlso blobFrom.CanRead) AndAlso blobTo.CanWrite) Then
    blobFrom.Seek(CLng(-1), System.IO.SeekOrigin.End)
    Do While True
      blobTo.WriteByte(CByte(blobFrom.ReadByte))
      If (blobFrom.Position = 1) Then
        Return
      End If
      blobFrom.Position = blobFrom.Position - 2
    Loop
  End If
  ' blobTo.ToString() = "CBA";
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanSeek Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : CanSeek Property (PgSqlBlob)

Gets a value indicating whether forward and backward seek operations can be performed.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public override bool CanSeek {get;}

Return Type

true if the PgSqlBlob stream supports seeking; false if a PgSqlBlob is closed, disposed, or Null.

Remarks

Use this property to find out if a PgSqlBlob supports Seek operation. PgSqlBlob does not support seeking if it has Null value as well as if it has been disposed or closed.

Example

[C#]

void ReverseBlob()
{
  byte[] byteArray = { (byte)'A', (byte)'B', (byte)'C' };
  PgSqlBlob blobFrom = new PgSqlBlob(byteArray);
  //blobFrom.ToString() = "ABC"

  PgSqlBlob blobTo = new PgSqlBlob();
  ........
  //reverse PgSqlBlob
  if (blobFrom.CanSeek && blobFrom.CanRead && blobTo.CanWrite)
    for (blobFrom.Seek(-1, System.IO.SeekOrigin.End); ;blobFrom.Position -= 2)
    {
      blobTo.WriteByte((byte)blobFrom.ReadByte());
      if (blobFrom.Position == 1) break;
    }
  //blobTo.ToString() = "CBA";
}

[Visual Basic]

Private Sub ReverseBlob()
  Dim byteArray As Byte() = New Byte() {AscW("A"c), AscW("B"c), AscW("C"c)}
  Dim blobFrom As New PgSqlBlob(byteArray)
  ' blobFrom.ToString() = "ABC"

  Dim blobTo As New PgSqlBlob
  ......
  ' reverse PgSqlBlob
  If ((blobFrom.CanSeek AndAlso blobFrom.CanRead) AndAlso blobTo.CanWrite) Then
    blobFrom.Seek(CLng(-1), System.IO.SeekOrigin.End)
    Do While True
      blobTo.WriteByte(CByte(blobFrom.ReadByte))
      If (blobFrom.Position = 1) Then
        Return
      End If
      blobFrom.Position = blobFrom.Position - 2
    Loop
  End If
  ' blobTo.ToString() = "CBA";
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanWrite Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : CanWrite Property (PgSqlBlob)

Gets a value indicating whether the PgSqlBlob object supports writing.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public override bool CanWrite {get;}

Return Type

true if the PgSqlBlob stream can be written; false if a PgSqlBlob is closed, disposed or Null.

Remarks

Use this property to determine whether you can write to the instance of PgSqlBlob class.

Example

[C#]

void ReverseBlob()
{
  byte[] byteArray = { (byte)'A', (byte)'B', (byte)'C' };
  PgSqlBlob blobFrom = new PgSqlBlob(byteArray);
  //blobFrom.ToString() = "ABC"

  PgSqlBlob blobTo = new PgSqlBlob();
  ........
  //reverse PgSqlBlob
  if (blobFrom.CanSeek && blobFrom.CanRead && blobTo.CanWrite)
    for (blobFrom.Seek(-1, System.IO.SeekOrigin.End); ;blobFrom.Position -= 2)
    {
      blobTo.WriteByte((byte)blobFrom.ReadByte());
      if (blobFrom.Position == 1) break;
    }
  //blobTo.ToString() = "CBA";
}

[Visual Basic]

Private Sub ReverseBlob()
  Dim byteArray As Byte() = New Byte() {AscW("A"c), AscW("B"c), AscW("C"c)}
  Dim blobFrom As New PgSqlBlob(byteArray)
  ' blobFrom.ToString() = "ABC"

  Dim blobTo As New PgSqlBlob
  ......
  ' reverse PgSqlBlob
  If ((blobFrom.CanSeek AndAlso blobFrom.CanRead) AndAlso blobTo.CanWrite) Then
    blobFrom.Seek(CLng(-1), System.IO.SeekOrigin.End)
    Do While True
      blobTo.WriteByte(CByte(blobFrom.ReadByte))
      If (blobFrom.Position = 1) Then
        Return
      End If
      blobFrom.Position = blobFrom.Position - 2
    Loop
  End If
  ' blobTo.ToString() = "CBA";
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsEmpty Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : IsEmpty Property (PgSqlBlob)

Gets a value indicating whether the PgSqlBlob is empty or not.

[Visual Basic]
Public ReadOnly Property IsEmpty As Boolean
[C#]
public bool IsEmpty {get;}

Return Type

true if the PgSqlBlob is empty; otherwise, false.

Remarks

IsEmpty is true also if PgSqlBlob has Null value.

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : IsNull Property (PgSqlBlob)

Gets a value indicating whether the PgSqlBlob is a Null stream.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlBlob is a Null; otherwise, false.

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | SetLength Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Length Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Length Property (PgSqlBlob)

Gets the size of the PgSqlBlob.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public override long Length {get;}

Return Type

The size of the PgSqlBlob in bytes.

Remarks

The size of the PgSqlBlob is always returned in bytes for all data types.

Example

[C#]

PgSqlDataReader pictureReader = myCommand.ExecuteReader();
pictureReader.Read();
PgSqlBlob pictureBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"));
if (pictureBlob.Length > 100)
  pictureBlob.SetLength(100);

[Visual Basic]

Dim pictureReader As PgSqlDataReader = myCommand.ExecuteReader
pictureReader.Read()
Dim pictureBlob As PgSqlBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"))
If (pictureBlob.Length > 100) Then
  pictureBlob.SetLength(CLng(100))
End If

See Also

PgSqlBlob Class | PgSqlBlob Members | SetLength Method


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | CanSeek Property | Seek Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Position Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Position Property (PgSqlBlob)

Gets the current read position in the PgSqlBlob stream.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public override long Position {get; set;}

Return Type

The current position within the PgSqlBlob stream.

Remarks

The stream must support seeking to get or set the position. Use the CanSeek property to determine whether the stream supports seeking.

Example

[C#]

void ReverseBlob()
{
  byte[] byteArray = { (byte)'A', (byte)'B', (byte)'C' };
  PgSqlBlob blobFrom = new PgSqlBlob(byteArray);
  //blobFrom.ToString() = "ABC"

  PgSqlBlob blobTo = new PgSqlBlob();
  ........
  //reverse PgSqlBlob
  if (blobFrom.CanSeek && blobFrom.CanRead && blobTo.CanWrite)
    for (blobFrom.Seek(-1, System.IO.SeekOrigin.End); ;blobFrom.Position -= 2)
    {
      blobTo.WriteByte((byte)blobFrom.ReadByte());
      if (blobFrom.Position == 1) break;
    }
  //blobTo.ToString() = "CBA";
}

[Visual Basic]

Private Sub ReverseBlob()
  Dim byteArray As Byte() = New Byte() {AscW("A"c), AscW("B"c), AscW("C"c)}
  Dim blobFrom As New PgSqlBlob(byteArray)
  ' blobFrom.ToString() = "ABC"

  Dim blobTo As New PgSqlBlob
  ......
  ' reverse PgSqlBlob
  If ((blobFrom.CanSeek AndAlso blobFrom.CanRead) AndAlso blobTo.CanWrite) Then
    blobFrom.Seek(CLng(-1), System.IO.SeekOrigin.End)
    Do While True
      blobTo.WriteByte(CByte(blobFrom.ReadByte))
      If (blobFrom.Position = 1) Then
        Return
      End If
      blobFrom.Position = blobFrom.Position - 2
    Loop
  End If
  ' blobTo.ToString() = "CBA";
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members | CanSeek Property | Seek Method


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Read Method | Write Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Value Property

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Value Property (PgSqlBlob)

Gets the value of the PgSqlBlob object.

[Visual Basic]
Public ReadOnly Property Value As Byte()
[C#]
public byte[] Value {get;}

Return Type

The value of the PgSqlBlob object.

Remarks

Check the IsNull property before reading the Value property to avoid raising an exception.

Example

This code fragment downloads a BLOB field from a table to a file. Value property is initialized by calling PgSqlDataReader.GetPgSqlBlob method and then written to a stream.

[C#]

PgSqlBlob myBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("Picture"));
if(!myBlob.IsNull)
{
  string FN = myReader.GetString(myReader.GetOrdinal("PicName"));
  FileStream fs = new FileStream("D:\\Tmp\\"+FN+".bmp", FileMode.Create);
  fs.Write(myBlob.Value,0,(int)myBlob.Length);
  fs.Close();
  Console.WriteLine(FN+" downloaded.");
}

[Visual Basic]

Dim myBlob As PgSqlBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("Picture"))
If Not myBlob.IsNull Then
  Dim FN As String = myReader.GetString(myReader.GetOrdinal("PicName"))
  Dim fs As FileStream = New FileStream("D:\Tmp\" + FN + ".bmp", FileMode.Create)
  fs.Write(myBlob.Value, 0, Convert.ToInt32(myBlob.Length))
  fs.Close()
  Console.WriteLine(String.Concat(FN, " downloaded."))
End If

See Also

PgSqlBlob Class | PgSqlBlob Members | Read Method | Write Method


%%PageItemTitle%% $$Methods$$

PgSqlBlob Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBlob Class Methods

Devart.Data.PostgreSql Namespace : PgSqlBlob Class

For a list of all members of this type, see PgSqlBlob members.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Clone | Creates a copy of the current PgSqlBlob object.
Public Method Close | Overridden. Closes the current stream and releases any resources associated with it.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose | Releases all resources allocated by this object.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Equals | Overridden. Returns a value indicating whether two PgSqlBlob instances have same value.
Public Method Flush | Overridden. Flush/write all buffers for the current PgSqlBlob.
Public Method GetHashCode | Overridden.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Read | Overridden. Reads a sequence of bytes from the current PgSqlBlob stream and advances the position within the stream by the number of bytes read.
Public Method ReadByte (Inherited from System.IO.Stream) | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Public Method Seek | Overridden. Sets the position on the current PgSqlBlob stream.
Public Method SetLength | Overridden. Sets length for PgSqlBlob value.
Public Method ToString | Overridden. Converts the current PgSqlBlob object to a String.
Public Method Write | Overridden. Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.
Public Method WriteByte (Inherited from System.IO.Stream) | Writes a byte to the current position in the stream and advances the position within the stream by one byte.

See Also

PgSqlBlob Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clone Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Clone Method (PgSqlBlob)

Creates a copy of the current PgSqlBlob object.

[Visual Basic]
Public Function Clone() As Object
[C#]
public object Clone();

Return Type

A new PgSqlBlob object.

Remarks

Creates a new PgSqlBlob object with the properties that have the same values as those of the original object. However, changing properties of the new object has no influence on the values of the same properties of the original object.

Example

In this example a PgSqlBlob instance is created and being written a byte (14 in decimal). Then it is cloned, and the second PgSqlBlob object returns its first byte of data stream (again, 14 in decimal).

[C#]

public void ClonePgSqlBlob()
{
  PgSqlBlob myBlob = new PgSqlBlob();
  myBlob.WriteByte(14);
  PgSqlBlob myBlob2 = (PgSqlBlob)myBlob.Clone();
  myBlob2.Seek(0,System.IO.SeekOrigin.Begin);
  Console.WriteLine(myBlob2.ReadByte());
}

[Visual Basic]

Public Sub ClonePgSqlBlob()
  Dim myBlob As PgSqlBlob = New PgSqlBlob
  myBlob.WriteByte(14)
  Dim myBlob2 As PgSqlBlob = CType(myBlob.Clone(), PgSqlBlob)
  myBlob2.Seek(0, System.IO.SeekOrigin.Begin)
  Console.WriteLine(myBlob2.ReadByte())
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Close Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Close Method (PgSqlBlob)

Closes the current stream and releases any resources associated with it.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

Remarks

Use Close to free resources taken by a PgSqlBlob instance, i.e. after performing large data transfer. After closing PgSqlBlob object call of any method of this object will throw an ObjectDisposedException.

This method is actually the same as Dispose method.

Example

[C#]

PgSqlDataReader pictureReader = myCommand.ExecuteReader();
pictureReader.Read();
PgSqlBlob pictureBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"));
...
//use pictureBlob
...
pictureBlob.Close();

[Visual Basic]

Dim pictureReader As PgSqlDataReader = myCommand.ExecuteReader
pictureReader.Read()
Dim pictureBlob As PgSqlBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"))
...
'use pictureBlob
...
pictureBlob.Close()

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Dispose Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Dispose Method (PgSqlBlob)

Releases all resources allocated by this object.

[Visual Basic]
Public Sub Dispose()
[C#]
public void Dispose();

Remarks

Use Dispose to free resources taken by a PgSqlBlob instance, i.e. after performing large data transfer. After disposing PgSqlBlob object call of any method of this object will throw an ObjectDisposedException.

This method is actually the same as Close method.

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

obj
A PgSqlBlob instance to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Equals Method (PgSqlBlob)

Returns a value indicating whether two PgSqlBlob instances have same value.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
A PgSqlBlob instance to compare with.

Return Type

true, if current PgSqlBlob equals to the object argument; otherwise, false.

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Flush Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Flush Method (PgSqlBlob)

Flush/write all buffers for the current PgSqlBlob.

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : GetHashCode Method (PgSqlBlob)
[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

See Also

PgSqlBlob Class | PgSqlBlob Members


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Seek Method | Write Method

Language

Visual Basic

C#

Show All

buffer
The byte array buffer to be populated.
offset
The zero-based byte offset in the buffer.
count
The amount of bytes to read.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Read Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Read Method (PgSqlBlob)

Reads a sequence of bytes from the current PgSqlBlob stream and advances the position within the stream by the number of bytes read.

[Visual Basic]
Overrides Public Function Read( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public override int Read(
   byte[] buffer,
   int offset,
   int count
);

Parameters

buffer
The byte array buffer to be populated.
offset
The zero-based byte offset in the buffer.
count
The amount of bytes to read.

Return Type

The total number of bytes read into the buffer.

Remarks

The Read method reads a maximum of count bytes from the current stream and stores them in buffer beginning at offset position. The current position within the stream is advanced by the number of bytes read. The Read method returns 0 if the position is at the end of the stream.

Example

In the example below a PgSqlBlob is created with 10 bytes in it. Then Position is changed using Seek method. An attempt to read 10 bytes is made afterwards, however, only 5 bytes remain till the end of the stream, so TargetArray is populated with 5 bytes only.

[C#]

public void ReadFromMyBlob()
{
  byte[] myByteArray = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  byte[] TargetArray = new Byte[15];
  PgSqlBlob myBlob = new PgSqlBlob(myByteArray);
  myBlob.Seek(5, SeekOrigin.Begin);
  Console.WriteLine(myBlob.Read(TargetArray, 0, 10) + " bytes are read");
}

[Visual Basic]

Public Sub ReadFromMyBlob()
  Dim myByteArray() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
  Dim TargetArray(15) As Byte
  Dim myBlob As PgSqlBlob = New PgSqlBlob(myByteArray)
  myBlob.Seek(5, SeekOrigin.Begin)
  Console.WriteLine(String.Concat(myBlob.Read(TargetArray, 0, 10), " bytes are read"))
End Sub

See Also

PgSqlBlob Class | PgSqlBlob Members | Seek Method | Write Method


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | CanSeek Property | Position Property

Language

Visual Basic

C#

Show All

offset
A byte offset relative to origin.
origin
A value of SeekOrigin type indicating the reference point used to obtain the new position.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Seek Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Seek Method (PgSqlBlob)

Sets the position on the current PgSqlBlob stream.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

Parameters

offset
A byte offset relative to origin.
origin
A value of SeekOrigin type indicating the reference point used to obtain the new position.

Return Type

The new position within the current stream.

Remarks

If offset is negative, the new position is required to precede the position specified by origin by the number of bytes specified by offset. If offset is zero (0), the new position is required to be the position specified by origin. If offset is positive, the new position is required to follow the position specified by origin by the number of bytes specified by offset.

Example

The first line of the example sets stream position to the very first element.

[C#]

myBlob.Seek(0, SeekOrigin.Begin);
Console.WriteLine(myBlob.Position);
Console.WriteLine(myBlob.ReadByte());

[Visual Basic]

myBlob.Seek(0, SeekOrigin.Begin)
Console.WriteLine(myBlob.Position)
Console.WriteLine(myBlob.ReadByte())

See Also

PgSqlBlob Class | PgSqlBlob Members | CanSeek Property | Position Property


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Length Property

Language

Visual Basic

C#

Show All

len
The size of the PgSqlBlob in bytes.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetLength Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : SetLength Method (PgSqlBlob)

Sets length for PgSqlBlob value.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal len As Long _
)
[C#]
public override void SetLength(
   long len
);

Parameters

len
The size of the PgSqlBlob in bytes.

Remarks

If the given value is less than the current length of the stream, the stream is truncated. If the given value is larger than the current length of the stream, the stream is expanded. If the stream is expanded, the contents of the stream between the old and the new length are undefined.

Example

[C#]

PgSqlDataReader pictureReader = myCommand.ExecuteReader();
pictureReader.Read();
PgSqlBlob pictureBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"));
if (pictureBlob.Length > 100)
  pictureBlob.SetLength(100);

[Visual Basic]

Dim pictureReader As PgSqlDataReader = myCommand.ExecuteReader
pictureReader.Read()
Dim pictureBlob As PgSqlBlob = pictureReader.GetPgSqlBlob(pictureReader.GetOrdinal("Picture"))
If (pictureBlob.Length > 100) Then
  pictureBlob.SetLength(CLng(100))
End If

See Also

PgSqlBlob Class | PgSqlBlob Members | Length Property


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Value Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : ToString Method (PgSqlBlob)

Converts the current PgSqlBlob object to a String.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

A String with the same value as the PgSqlBlob.

Remarks

If a Value is actually a sequence of bytes that represent a string, you can use ToString method to obtain that string. The default encoding is used.

Example

The example shows a code fragment that gets a PgSqlBlob field from a PgSqlReader and writes it to the console.

[C#]

...
PgSqlBlob myBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("TextColumnName"));
Console.WriteLine(myBlob.ToString());
...

[Visual Basic]

...
Dim Blob As PgSqlBlob = myReader.GetPgSqlBlob(myReader.GetOrdinal("TextColumnName"))
Console.WriteLine(myBlob.ToString())
...

See Also

PgSqlBlob Class | PgSqlBlob Members | Value Property


%%PageItemTitle%%

PgSqlBlob Class | PgSqlBlob Members | Read Method

Language

Visual Basic

C#

Show All

buffer
An array of bytes.
offset
The zero-based byte offset in the buffer.
count
The amount of bytes to be written to the current stream.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Write Method

Devart.Data.PostgreSql Namespace > PgSqlBlob Class : Write Method (PgSqlBlob)

Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public override void Write(
   byte[] buffer,
   int offset,
   int count
);

Parameters

buffer
An array of bytes.
offset
The zero-based byte offset in the buffer.
count
The amount of bytes to be written to the current stream.

Remarks

If the write operation is successful, the position within the stream advances by the number of bytes written.

Example

In the example a byte array is filled and written to a newly created PgSqlBlob instance.

[C#]

byte[] myByteArray = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
PgSqlBlob myBlob = new PgSqlBlob();
myBlob.Write(myByteArray,0,10);

[Visual Basic]

Dim myByteArray() As Byte = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
Dim myBlob As PgSqlBlob = New PgSqlBlob
myBlob.Write(myByteArray, 0, 10)

See Also

PgSqlBlob Class | PgSqlBlob Members | Read Method


%%PageItemTitle%%

PgSqlCommand Members | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Class

Devart.Data.PostgreSql Namespace : PgSqlCommand Class

Represents a SQL statement or stored procedure to execute against PostgreSQL.

For a list of all members of this type, see PgSqlCommand members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommand
Devart.Common.DbCommandBase
Devart.Data.PostgreSql.PgSqlCommand

Syntax

[Visual Basic]
Public Class PgSqlCommand
   Inherits DbCommandBase
   Implements IComponent, IDbCommand, ICloneable, IDisposable
[C#]
public class PgSqlCommand : DbCommandBase, IComponent, IDbCommand, ICloneable, IDisposable

Remarks

The PgSqlCommand class provides the following methods for executing commands against the PostgreSQL database:
Item | Description
ExecuteReader | Executes commands that return rows.
ExecutePageReader | Returns a specific subset of rows when paging through the results of a query.
Devart.Common.DbCommandBase.ExecuteNonQuery | Executes SQL commands such as INSERT, DELETE, UPDATE.
Devart.Common.DbCommandBase.ExecuteScalar | Retrieves a single value (for example, an aggregate value) from a data source.

If execution of the command results in a fatal PgSqlException, the PgSqlConnection may close. However, the user can reopen the connection and continue.

This class supports cross-form data binding with the InterForm Technology.

Example

The following example uses the ExecuteReader method of PgSqlCommand, along with PgSqlDataReader and PgSqlConnection, to select rows from a table.

[C#]

public void ReadMyData(string myConnString)
{
  string mySelectQuery = "SELECT DeptNo, DName FROM Test.Dept";
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery,pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  try
  {
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " + pgReader.GetString(1));
    }
  }
  finally
  {
  // always call Close when done reading.
  pgReader.Close();
  // always call Close when done reading.
  pgConnection.Close();
  }
}

[Visual Basic]

Public Sub ReadMyData(myConnString As String)
  Dim mySelectQuery As String = "SELECT DeptNo, DName FROM Test.Dept"
  Dim pgConnection As New PgSqlConnection(myConnString)
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  Try
    While pgReader.Read()
      Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
        + pgReader.GetString(1))
    End While
  Finally
      ' always call Close when done reading.
      pgReader.Close()
      ' always call Close when done with connection.
      pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Members | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%% $$Members$$

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Class Members

Devart.Data.PostgreSql Namespace : PgSqlCommand Class

PgSqlCommand overview

Public Constructors

Public Constructor PgSqlCommand Constructor Overloaded. Initializes a new instance of the PgSqlCommand class.

Public Properties

Public Property CommandText | Overridden. Gets or sets the SQL statement to execute against PostgreSQL.
Public Property CommandTimeout | Overridden. Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.
Public Property CommandType | Overridden. Gets or sets a value indicating how the CommandText property is to be interpreted.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlCommand.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property FetchAll | Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.
Public Property FetchSize | Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.
Public Property InsertOid | Returns the object ID generated for an OID column by the previous insert command.
Public Property Owner (Inherited from Devart.Common.DbCommandBase) | Gets or sets a form or other container that the Devart.Common.DbCommandBase instance belongs to.
Public Property ParameterCheck (Inherited from Devart.Common.DbCommandBase) | Gets or sets a value indicating whether the command object regenerates parameter objects if text of the command is changed.
Public Property Parameters | Gets or sets the PgSqlParameterCollection.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Transaction (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbTransaction within which this DbCommand object executes.
Public Property UnpreparedExecute | Determines if 'simple query' sub-protocol is applied for executing SQL statements without preparing on server side.
Public Property UpdatedRowSource (Inherited from Devart.Common.DbCommandBase) | Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

Public Methods

Public Method BeginExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Overloaded. Starts an asynchronous invocation of an Devart.Common.DbCommandBase.ExecuteNonQuery method.
Public Method BeginExecuteReader (Inherited from Devart.Common.DbCommandBase) | Overloaded. Starts an asynchronous invocation of an ExecuteReader method.
Public Method Cancel | Overridden. Attempts to cancel the execution of the PgSqlCommand.
Public Method Clone | Creates a new object that is a copy of the current PgSqlCommand instance.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method CreateParameter | Creates a new instance of a PgSqlParameter object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Ends an asynchronous invocation of the Devart.Common.DbCommandBase.ExecuteNonQuery method.
Public Method EndExecuteReader | Ends an asynchronous invocation of the ExecuteReader method.
Public Method ExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Executes SQL statement against the Connection and returns the number of rows affected.
Public Method ExecutePageReader | Returns a specific subset of rows when paging through the results of a query.
Public Method ExecuteReader | Overloaded. Sends the CommandText to the Connection and builds a PgSqlDataReader.
Public Method ExecuteScalar (Inherited from Devart.Common.DbCommandBase) | Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRecordCount (Inherited from Devart.Common.DbCommandBase) | Returns count of records in the resultset.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Prepare | Overridden. Creates a prepared (or compiled) version of the command on the server.
Public Method ResetCommandTimeout (Inherited from Devart.Common.DbCommandBase) | Resets Devart.Common.DbCommandBase.CommandTimeout to its default value, which is taken from Devart.Common.DbCommandBase.DefaultCommandTimeout.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : PgSqlCommand Constructor (PgSqlCommand)

Initializes a new instance of the PgSqlCommand class.

Overload List

Initializes a new instance of the PgSqlCommand class.

[Visual Basic] Public Sub New()

[C#] public PgSqlCommand();

Initializes a new instance of the PgSqlCommand class with the text of the query.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlCommand(string);

Initializes a new instance of the PgSqlCommand class with the text of the query and a object.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlCommand(string,PgSqlConnection);

Initializes a new instance of the PgSqlCommand class with the text of the query, a object, and the PgSqlTransaction.

[Visual Basic] Public Sub New(String,PgSqlConnection,PgSqlTransaction)

[C#] public PgSqlCommand(string,PgSqlConnection,PgSqlTransaction);

Initializes a new instance of the PgSqlCommand class with the text of the query, and the PgSqlTransaction object.

[Visual Basic] Public Sub New(String,PgSqlTransaction)

[C#] public PgSqlCommand(string,PgSqlTransaction);

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor()

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > PgSqlCommand Constructor : PgSqlCommand Constructor()

Initializes a new instance of the PgSqlCommand class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlCommand();

Remarks

The base constructor initializes all fields to their default values. The following table shows initial property values for an instance of PgSqlCommand.
Properties | Initial value
CommandText | empty string ("")
CommandTimeout | 30
CommandType | Text
Connection | null

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

commandText
The text of the query.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > PgSqlCommand Constructor : PgSqlCommand Constructor(String)

Initializes a new instance of the PgSqlCommand class with the text of the query.

[Visual Basic]
Public Function New( _
   ByVal commandText As String _
)
[C#]
public PgSqlCommand(
   string commandText
);

Parameters

commandText
The text of the query.

Remarks

The following table shows initial property values for an instance of PgSqlCommand.
Properties | Initial value
CommandText | commandText
CommandTimeout | 30
CommandType | Text
Connection | null

Example

The following example creates a PgSqlCommand and sets some of its properties.

[C#]

public void CreatePgSqlCommand()
{
  string mySelectQuery = "SELECT * FROM Test.Dept";
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery);
  pgCommand.FetchSize = 100;
}

[Visual Basic]

Public Sub CreatePgSqlCommand()
  Dim mySelectQuery As String = "SELECT * FROM Test.Dept"
  Dim pgCommand As New PgSqlCommand(mySelectQuery)
  pgCommand.FetchSize = 100
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

commandText
The text of the query.
connection
A PgSqlConnection object that represents the connection to PostgreSQL.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > PgSqlCommand Constructor : PgSqlCommand Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlCommand class with the text of the query and a object.

[Visual Basic]
Public Function New( _
   ByVal commandText As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlCommand(
   string commandText,
   PgSqlConnection connection
);

Parameters

commandText
The text of the query.
connection
A PgSqlConnection object that represents the connection to PostgreSQL.

Remarks

The following table shows initial property values for an instance of PgSqlCommand.
Properties | Initial value
CommandText | commandText
CommandTimeout | 30
CommandType | Text
Connection | connection

Example

The following example creates a PgSqlCommand and sets some of its properties.

[C#]

public void CreateCommand()
{
  PgSqlConnection pgConnection = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  string mySelectQuery = "SELECT * FROM Test.Dept";
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection);
  pgCommand.FetchSize = 100;
}

[Visual Basic]

Public Sub CreateCommand()
  Dim pgConnection As New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
  Dim mySelectQuery As String = _
    "SELECT * FROM Test.Dept"
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgCommand.FetchSize = 100
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class | PgSqlTransaction Class

Language

Visual Basic

C#

Show All

commandText
The text of the query.
connection
A PgSqlConnection object that represents the connection to PostgreSQL.
transaction
PgSqlTransaction object used to perform transactions with this PgSqlCommand object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor(String,PgSqlConnection,PgSqlTransaction)

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > PgSqlCommand Constructor : PgSqlCommand Constructor(String,PgSqlConnection,PgSqlTransaction)

Initializes a new instance of the PgSqlCommand class with the text of the query, a object, and the PgSqlTransaction.

[Visual Basic]
Public Function New( _
   ByVal commandText As String, _
   ByVal connection As PgSqlConnection, _
   ByVal transaction As PgSqlTransaction _
)
[C#]
public PgSqlCommand(
   string commandText,
   PgSqlConnection connection,
   PgSqlTransaction transaction
);

Parameters

commandText
The text of the query.
connection
A PgSqlConnection object that represents the connection to PostgreSQL.
transaction
PgSqlTransaction object used to perform transactions with this PgSqlCommand object.

Remarks

The following table shows initial property values for an instance of this implementation of the PgSqlCommand.
Properties | Initial value
CommandText | commandText
CommandTimeout | 30
CommandType | Text
Connection | connection

You can change the value for any of these parameters by setting the related property.

Example

The following example creates a PgSqlCommand and sets some of its properties.

[C#]

public void CreateCommand()
{
  PgSqlConnection pgConnection = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  pgConnection.Open();
  PgSqlTransaction myTrans = pgConnection.BeginTransaction();
  string mySelectQuery = "SELECT * FROM Test.Dept";
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection,myTrans);
  pgCommand.FetchSize = 100
}

[Visual Basic]

Public Sub CreateCommand()
  Dim pgConnection As New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
  pgConnection.Open()
  Dim myTrans As PgSqlTransaction = pgConnection.BeginTransaction()
  Dim mySelectQuery As String = _
    "SELECT * FROM Test.Dept"
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection, myTrans)
  pgCommand.FetchSize = 100
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class | PgSqlTransaction Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List

Language

Visual Basic

C#

Show All

commandText
The text of the query.
transaction
PgSqlTransaction object used to perform transactions with this PgSqlCommand object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Constructor(String,PgSqlTransaction)

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > PgSqlCommand Constructor : PgSqlCommand Constructor(String,PgSqlTransaction)

Initializes a new instance of the PgSqlCommand class with the text of the query, and the PgSqlTransaction object.

[Visual Basic]
Public Function New( _
   ByVal commandText As String, _
   ByVal transaction As PgSqlTransaction _
)
[C#]
public PgSqlCommand(
   string commandText,
   PgSqlTransaction transaction
);

Parameters

commandText
The text of the query.
transaction
PgSqlTransaction object used to perform transactions with this PgSqlCommand object.

Remarks

The following table shows initial property values for an instance of PgSqlCommand.
Properties | Initial value
CommandText | commandText
CommandTimeout | 30
CommandType | Text
Connection | null

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Class Properties

Devart.Data.PostgreSql Namespace : PgSqlCommand Class

For a list of all members of this type, see PgSqlCommand members.

Public Properties

Public Property CommandText | Overridden. Gets or sets the SQL statement to execute against PostgreSQL.
Public Property CommandTimeout | Overridden. Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.
Public Property CommandType | Overridden. Gets or sets a value indicating how the CommandText property is to be interpreted.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlCommand.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property FetchAll | Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.
Public Property FetchSize | Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.
Public Property InsertOid | Returns the object ID generated for an OID column by the previous insert command.
Public Property Owner (Inherited from Devart.Common.DbCommandBase) | Gets or sets a form or other container that the Devart.Common.DbCommandBase instance belongs to.
Public Property ParameterCheck (Inherited from Devart.Common.DbCommandBase) | Gets or sets a value indicating whether the command object regenerates parameter objects if text of the command is changed.
Public Property Parameters | Gets or sets the PgSqlParameterCollection.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Transaction (Inherited from System.Data.Common.DbCommand) | Gets or sets the DbTransaction within which this DbCommand object executes.
Public Property UnpreparedExecute | Determines if 'simple query' sub-protocol is applied for executing SQL statements without preparing on server side.
Public Property UpdatedRowSource (Inherited from Devart.Common.DbCommandBase) | Gets or sets how command results are applied to the DataRow when used by the Update method of the DbDataAdapter.

See Also

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Connection Property | CommandType Property | Parameters Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CommandText Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : CommandText Property (PgSqlCommand)

Gets or sets the SQL statement to execute against PostgreSQL.

[Visual Basic]
Overrides Public Property CommandText As String
[C#]
public override string CommandText {get; set;}

Return Type

The SQL statement or stored procedure to execute. The default value is an empty string ("").

When working with overloaded stored procedures, use following syntax for executing specific overloaded routine: "StoredProcName:1" or "StoredProcName:5". First example executes first overloaded stored procedure, while second example executes fifth overloaded procedure. This notation affects only describing procedures when ParameterCheck is true.

Remarks

Sense of CommandText property depends on value of CommandType property.

When CommandType value is Text, property CommandText should contain text of a query that must be run on the server. It also may contain several SQL statements, separated with the semicolon. You may use parameters in all the statements. If there are several statements, returning data, use PgSqlDataReader.NextResult to get all reader results.

When the value is StoredProcedure, property CommandText must be a name of a procedure to execute.

When the value is set to TableDirect, CommandText must be name of a table you want to get all data from. All rows and columns are retrieved.

Example

The following example creates a PgSqlCommand and sets some of its properties.

[C#]

public void CreateCommand()
{
  PgSqlCommand pgCommand = new PgSqlCommand();
  pgCommand.CommandText = "SELECT * FROM Test.Dept ORDER BY DeptNo";
}

[Visual Basic]

Public Sub CreateCommand()
  Dim pgCommand As New PgSqlCommand()
  pgCommand.CommandText = "SELECT * FROM Test.Dept ORDER BY DeptNo"
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Connection Property | CommandType Property | Parameters Property


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CommandTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : CommandTimeout Property (PgSqlCommand)

Gets or sets the wait time before terminating an attempt to execute a command and generating an error. Note that it is the time to wait for any server reply since the command was sent to a server, and it doesn't include the time necessary to fetch data if the command selects some data.

[Visual Basic]
Overrides Public Property CommandTimeout As Integer
[C#]
public override int CommandTimeout {get; set;}

Return Type

The time (in seconds) to wait for the command to execute. The default value is 30. Not available under .NET Compact Framework.

Remarks

Zero value specifies that the wait time is unlimited.

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | CommandText Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CommandType Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : CommandType Property (PgSqlCommand)

Gets or sets a value indicating how the CommandText property is to be interpreted.

[Visual Basic]
Overrides Public Property CommandType As CommandType
[C#]
public override CommandType CommandType {get; set;}

Return Type

One of the CommandType values. The default value is Text.

Remarks

CommandType can be one of the following values: Text, StoredProcedure, TableDirect.

When the value is CommandType.Text, the property CommandText should contain text of a query that must be run on the server.

When the value is CommandType.StoredProcedure, CommandText property must be a name of a procedure to execute.

When the value is set to TableDirect, CommandText must be name of a table you want to get all data from. All rows and columns are retrieved.

dotConnect for PostgreSQL supports named and unnamed parameters. Parameters of stored procedures can be used only as input, output values will be ignored.

Example

The following example creates an instance of a derived class PgSqlCommand and sets some of its properties.

[C#]

public void CreateCommand()
{
  PgSqlCommand pgCommand = new PgSqlCommand();
  pgCommand.CommandText = "SELECT * FROM Test.Dept ORDER BY DeptNo";
  pgCommand.CommandType = CommandType.Text;
}

[Visual Basic]

Public Sub CreateCommand()
  Dim pgCommand As New PgSqlCommand()
  pgCommand.CommandText = "SELECT * FROM Test.Dept ORDER BY DeptNo"
  pgCommand.CommandType = CommandType.Text
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | CommandText Property


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | CommandText Property | CommandType Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : Connection Property (PgSqlCommand)

Gets or sets the PgSqlConnection used by this instance of the PgSqlCommand.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

Remarks

PgSqlConnection specified in this property will carry out all operations executed with this PgSqlCommand.

This property supports the InterForm technology.

A single PgSqlConnection can be used by many PgSqlCommand objects on the assumption that all operations will be done consecutively. In other words, you can not execute an SQL statement while an asynchronous operation is in progress.

Example

The following example creates a PgSqlCommand and sets some of its properties.

[C#]

public void CreateCommand()
{
  string mySelectQuery = "SELECT * FROM Test.Dept ORDER BY DeptNo";
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery);
  pgCommand.Connection = new PgSqlConnection(
    "host=server;database=test;user id=postgres;");
  pgCommand.CommandType = System.Data.CommandType.Text;
}

[Visual Basic]

Public Sub CreateCommand()
  Dim mySelectQuery As String = _
    "SELECT * FROM Test.Dept ORDER BY DeptNo"
  Dim pgCommand As New PgSqlCommand(mySelectQuery)
  pgCommand.Connection = New PgSqlConnection( _
    "host=server;database=test;user id=postgres;")
  pgCommand.CommandType = System.Data.CommandType.Text
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | CommandText Property | CommandType Property


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | PgSqlDataReader Class | ExecuteReader Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FetchAll Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : FetchAll Property (PgSqlCommand)

Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.

[Visual Basic]
Public Property FetchAll As Boolean
[C#]
public bool FetchAll {get; set;}

Return Type

true, if the PgSqlDataReader object will request data from the server on execution ExecuteReader; otherwise false. The default value is true.

Remarks

FetchAll property allows your application to reduce greatly size of used memory on processing big volume data. If set to true, memory will be allocated for all data returned by your SELECT. If FetchAll property is set to false, memory will be allocated only at most for hundred records and on retrieving next records previous rows will be rewritten.

Example

The following example fills two ListBox by data from the PgSqlDataReader. This sample demonstrates ability to navigate through the PgSqlDataReader several times when FetchAll property set to true.

[C#]

public void FillListBox()
{
  PgSqlCommand cmd;
  PgSqlDataReader reader;
  ListBox deptnoList, nameList;
  cmd = new PgSqlCommand("select deptno, dname from dept");
  cmd.FetchAll = true;
  reader = cmd.ExecuteReader();
  foreach (IDataRecord rec in reader) {
    deptnoList.Items.Add(rec["deptno"]);
  }
  foreach (IDataRecord rec in reader) {
    nameList.Items.Add(rec["dname"]);
  }
}

[Visual Basic]

Public Sub FillListBox()
  Dim cmd As PgSqlCommand
  Dim reader As PgSqlDataReader
  Dim deptnoList As ListBox
  Dim nameList As ListBox
  cmd = New PgSqlCommand("select deptno, dname from dept")
  cmd.FetchAll = True
  reader = cmd.ExecuteReader()
  Dim rec As IDataRecord
  For Each rec In reader
    deptnoList.Items.Add(rec("deptno"))
  Next
  For Each rec In reader
    nameList.Items.Add(rec("dname"))
  Next
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | PgSqlDataReader Class | ExecuteReader Method


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FetchSize Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : FetchSize Property (PgSqlCommand)

Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.

[Visual Basic]
Public Property FetchSize As Integer
[C#]
public int FetchSize {get; set;}

Return Type

The number of rows that will be transferred across the network at a time. The default value is 0.

Remarks

If 0 value is assigned, a value of this parameter will be determined automatically and it will be changed dynamically when executing read operations. If you do not want to have a specific number of rows be fetched at a time, it is better to keep this default value.

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InsertOid Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : InsertOid Property

Returns the object ID generated for an OID column by the previous insert command.

[Visual Basic]
Public ReadOnly Property InsertOid As Long
[C#]
public long InsertOid {get;}

Return Type

The ID generated for an OID column.

Remarks

Use InsertOid property after you have performed an INSERT command into a table.

If the command doesn't perform an insertion into a table the value of InsertOid won't be defined.

Example

After running the query the value assigned to OID column for the inserted record is shown.

[C#]

static void GetLastId(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName, Loc) VALUES (Null, 'AnotherOne', 'SomeWhere')", pgConnection);
  pgConnection.Open();
  try
  {
    pgCommand.ExecuteNonQuery();
    Console.WriteLine(pgCommand.InsertOid);
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetLastId(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName, Loc) VALUES (Null, 'AnotherOne', 'SomeWhere')", pgConnection)
  pgConnection.Open()
  Try
    pgCommand.ExecuteNonQuery()
    Console.WriteLine(pgCommand.InsertOid)
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | PgSqlParameter Class | CommandText Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parameters Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : Parameters Property

Gets or sets the PgSqlParameterCollection.

[Visual Basic]
Public ReadOnly Property Parameters As PgSqlParameterCollection
[C#]
public PgSqlParameterCollection Parameters {get;}

Return Type

The parameters of a SQL statement or a stored procedure. The default value is an empty collection.

Remarks

By default, you have to construct this collection and provide values for it manually. However, if you choose to use autosynchronization mode by setting Devart.Common.DbCommandBase.ParameterCheck property to true you can have the collecton adjusted automatically. Please refer to article Using Parameters in dotConnect for PostgreSQL for detailed information on using this mode.

Example

The following example creates a PgSqlConnection, PgSqlCommand, fills its parameters and displays them. An UPDATE statement with the parameters involved is executed then.

[C#]

static void CreateCommand(PgSqlConnection pgConnection, string mySelectQuery, PgSqlParameter[] myParamArray)
{
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection);
  string myMessage = "";
  for (int i = 0; i < myParamArray.Length; i++)
  {
    pgCommand.Parameters.Add(myParamArray[i]);
    myMessage += pgCommand.Parameters[i].ToString() + "\n";
  }
  Console.Write(myMessage);
  try
  {
    pgConnection.Open();
    pgCommand.ExecuteNonQuery();
  }
  finally
  {
    pgConnection.Close();
  }
}

static void Main(string[] args)
{
  PgSqlParameter[] myParams = new PgSqlParameter[]
    {
      new PgSqlParameter("DeptNo", 10),
      new PgSqlParameter("DName", "COUNTING")
    };
  PgSqlConnection pgConnection1 = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  CreateCommand(pgConnection1,"UPDATE Test.Dept SET DName = :DName WHERE DeptNo = :DeptNo",myParams);
}

[Visual Basic]

Public Sub CreateCommand(ByVal pgConnection As Devart.Data.PostgreSql.PgSqlConnection, _
 ByVal mySelectQuery As String, ByVal myParamArray() As Devart.Data.PostgreSql.PgSqlParameter)
  Dim pgCommand As New Devart.Data.PostgreSql.PgSqlCommand(mySelectQuery, pgConnection)
  Dim myMessage As String = ""
  Dim i As Integer
  For i = 0 To (myParamArray.Length - 1)
    pgCommand.Parameters.Add(myParamArray(i))
    myMessage = String.Concat(myMessage, " ", pgCommand.Parameters(i).ToString())
  Next
  Console.WriteLine(myMessage)
  Try
    pgConnection.Open()
    pgCommand.ExecuteNonQuery()
  Finally
    pgConnection.Close()
  End Try
End Sub

Sub Main()
  Dim myP1 As New Devart.Data.PostgreSql.PgSqlParameter
  myP1.ParameterName = "DeptNo"
  myP1.Value = 10
  Dim myP2 As New Devart.Data.PostgreSql.PgSqlParameter
  myP2.ParameterName = "DName"
  myP2.Value = "ACCOUNTING"
  Dim myParams(1) As Devart.Data.PostgreSql.PgSqlParameter
  myParams(0) = myP1
  myParams(1) = myP2
  Dim pgConnection1 As New Devart.Data.PostgreSql.PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  CreateCommand(pgConnection1, "UPDATE Test.Dept SET DName = :DName WHERE DeptNo = :DeptNo", myParams)
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | PgSqlParameter Class | CommandText Property


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | ProtocolVersion Enumeration | UnpreparedExecute Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UnpreparedExecute Property

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : UnpreparedExecute Property (PgSqlCommand)

Determines if 'simple query' sub-protocol is applied for executing SQL statements without preparing on server side.

[Visual Basic]
Public Property UnpreparedExecute As Boolean
[C#]
public bool UnpreparedExecute {get; set;}

Return Type

true, if unprepared execute mode is used; otherwise false. Default valuse if false.

Remarks

This property is useful when using ProtocolVersion.Ver30. By default all queries are prepared when using ProtocolVersion.Ver30. You should set UnpreparedExecute property to true to avoid preparing. In this case queries will be sent in 'simple query' mode - simple executing queries without preparing them on the server. This is useful when executing multiple queries. PostgreSQL server allows preparing only one query at a time, and it returns error if batch queries were sent.

UnpreparedExecute does not affect anything if ProtocolVersion.Ver20 is used, because this protocol is itself 'simple query' or plain text protocol. SQL statement execution is made without preparing by default.

Example

This sample executes batch of SQL statements using the ProtocolVersion.Ver30. Setting UnpreparedExecute property to true disables server-side preparing of the queries.

[C#]

PgSqlConnection myConnection = new PgSqlConnection("user id=postgres;
    password=postgres;host=localhost;Protocol=ver30;Database=test;schema=test");
myConnection.Open();

PgSqlCommand myComman = new PgSqlCommand();
myComman.Connection = myConnection;
myComman.UnpreparedExecute = true;
myComman.CommandText = "SELECT 1;SELECT 2";

[Visual Basic]

Dim myConnection As PgSqlConnection = New PgSqlConnection("user id=postgres;" & _
    "password=postgres;host=localhost;Protocol=ver30;Database=test;schema=test")
myConnection.Open()

Dim myComman As PgSqlCommand = New PgSqlCommand()
myComman.Connection = myConnection
myComman.UnpreparedExecute = True
myComman.CommandText = "SELECT 1;SELECT 2"

See Also

PgSqlCommand Class | PgSqlCommand Members | ProtocolVersion Enumeration | UnpreparedExecute Property


%%PageItemTitle%% $$Methods$$

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Class Methods

Devart.Data.PostgreSql Namespace : PgSqlCommand Class

For a list of all members of this type, see PgSqlCommand members.

Public Methods

Public Method BeginExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Overloaded. Starts an asynchronous invocation of an Devart.Common.DbCommandBase.ExecuteNonQuery method.
Public Method BeginExecuteReader (Inherited from Devart.Common.DbCommandBase) | Overloaded. Starts an asynchronous invocation of an ExecuteReader method.
Public Method Cancel | Overridden. Attempts to cancel the execution of the PgSqlCommand.
Public Method Clone | Creates a new object that is a copy of the current PgSqlCommand instance.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method CreateParameter | Creates a new instance of a PgSqlParameter object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Ends an asynchronous invocation of the Devart.Common.DbCommandBase.ExecuteNonQuery method.
Public Method EndExecuteReader | Ends an asynchronous invocation of the ExecuteReader method.
Public Method ExecuteNonQuery (Inherited from Devart.Common.DbCommandBase) | Executes SQL statement against the Connection and returns the number of rows affected.
Public Method ExecutePageReader | Returns a specific subset of rows when paging through the results of a query.
Public Method ExecuteReader | Overloaded. Sends the CommandText to the Connection and builds a PgSqlDataReader.
Public Method ExecuteScalar (Inherited from Devart.Common.DbCommandBase) | Executes the query, and returns the first column of the first row in the result set returned by the query. Extra columns or rows are ignored.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRecordCount (Inherited from Devart.Common.DbCommandBase) | Returns count of records in the resultset.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Prepare | Overridden. Creates a prepared (or compiled) version of the command on the server.
Public Method ResetCommandTimeout (Inherited from Devart.Common.DbCommandBase) | Resets Devart.Common.DbCommandBase.CommandTimeout to its default value, which is taken from Devart.Common.DbCommandBase.DefaultCommandTimeout.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | PgSqlConnection Class | ExecuteReader Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Cancel Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : Cancel Method (PgSqlCommand)

Attempts to cancel the execution of the PgSqlCommand.

[Visual Basic]
Overrides Public Sub Cancel()
[C#]
public override void Cancel();

See Also

PgSqlCommand Class | PgSqlCommand Members | PgSqlConnection Class | ExecuteReader Method


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clone Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : Clone Method (PgSqlCommand)

Creates a new object that is a copy of the current PgSqlCommand instance.

[Visual Basic]
Public Function Clone() As Object
[C#]
public object Clone();

Return Type

A new PgSqlCommand object in which all property values are the same as the original.

Remarks

Use this method when you need to create a new PgSqlCommand object that is absolutely like existing one.

Example

This example shows how to clone a PgSqlCommand . To make sure all the properties are inherited, one of them (CommandText) is written to the console.

[C#]

public void CloneACommand()
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept");
    PgSqlCommand pgCommand2 = (PgSqlCommand)pgCommand.Clone();
  Console.WriteLine(pgCommand2.CommandText);
}

[Visual Basic]

Public Sub CloneACommand()
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Dept")
  Dim pgCommand2 As PgSqlCommand = CType(pgCommand.Clone(), PgSqlCommand)
  Console.WriteLine(pgCommand2.CommandText)
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Parameters Property | PgSqlParameter Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateParameter Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : CreateParameter Method (PgSqlCommand)

Creates a new instance of a PgSqlParameter object.

[Visual Basic]
Public Function CreateParameter() As PgSqlParameter
[C#]
public PgSqlParameter CreateParameter();

Return Type

A PgSqlParameter object.

Remarks

This method is a strongly-typed version of CreateParameter. See PgSqlParameter to find out more ways to create a parameter.

Example

This sample shows how to create a parameter using CreateParameter function.

[C#]

Public void CreateParam(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo=:Deptno",pgConnection);
  PgSqlParameter myParam = pgCommand.CreateParameter();
  myParam.PgSqlType = Devart.Data.PostgreSql.PgSqlType.Int;
  myParam.Value = 10;
  myParam.ParameterName = "Deptno";
  pgCommand.Parameters.Add(myParam);
  pgConnection.Open();
  PgSqlDataReader pgReader = null;
  try
  {
    pgReader = pgCommand.ExecuteReader();
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetInt32(0) + ", " + pgReader.GetString(1) + ", " + pgReader.GetString(2));
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub CreateParam(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo=:Deptno", pgConnection)
  Dim myParam As PgSqlParameter = pgCommand.CreateParameter()
  myParam.PgSqlType = Devart.Data.PostgreSql.PgSqlType.Int
  myParam.Value = 10
  myParam.ParameterName = "Deptno"
  pgCommand.Parameters.Add(myParam)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = Nothing
  Try
    pgReader = pgCommand.ExecuteReader()
    While pgReader.Read()
      Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
        + pgReader.GetString(1) + ", " _
        + pgReader.GetString(2))
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Parameters Property | PgSqlParameter Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | BeginExecuteReader Method | ExecuteReader Method | EndExecuteNonQuery Method

Language

Visual Basic

C#

Show All

result
The IAsyncResult returned from Devart.Common.DbCommandBase.BeginExecuteReader.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EndExecuteReader Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : EndExecuteReader Method (PgSqlCommand)

Ends an asynchronous invocation of the ExecuteReader method.

[Visual Basic]
Public Function EndExecuteReader( _
   ByVal result As IAsyncResult _
) As PgSqlDataReader
[C#]
public PgSqlDataReader EndExecuteReader(
   IAsyncResult result
);

Parameters

result
The IAsyncResult returned from Devart.Common.DbCommandBase.BeginExecuteReader.

Return Type

A PgSqlDataReader object.

Remarks

The function ends an asynchronous execution of a query that is started with Devart.Common.DbCommandBase.BeginExecuteReader. A pair of asynchronous functions (Devart.Common.DbCommandBase.BeginExecuteReader and EndExecuteReader) can be used instead of the synchronous function ExecuteReader to gain more performance and flexibility in your application.

Refer to "Asynchronous Query Execution" article for detailed information.

Example

In the example below an easiest way of executing an asynchronous operation is shown. First, all components are set up and a connection is opened. Second, a data retrieval operation is started. The operation state (done or in progress) is checked and a report is written to the console. At last query results are sent to PgSqlDataReader and rendered to the console.

[C#]

Public void Async_Exec(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept",pgConnection);
  Console.WriteLine("Starting asynchronous retrieval of data...");
  pgConnection.Open();
  IAsyncResult cres = pgCommand.BeginExecuteReader(null,null,CommandBehavior.Default);
  if (cres.IsCompleted)
    Console.WriteLine("Completed.");
  else
    Console.WriteLine("Have to wait for operation to complete...");
  PgSqlDataReader pgReader = pgCommand.EndExecuteReader(cres);
  try
  {
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetInt32(0) + " " + pgReader.GetString(1) + " " + pgReader.GetString(2));
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub Async_Exec(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Dept", pgConnection)
  Console.WriteLine("Starting asynchronous retrieval of data...")
  pgConnection.Open()
  Dim cres As IAsyncResult = pgCommand.BeginExecuteReader(Nothing, Nothing, CommandBehavior.Default)
  If cres.IsCompleted Then
    Console.WriteLine("Completed.")
  Else
    Console.WriteLine("Have to wait for operation to complete...")
  End If
  Dim pgReader As PgSqlDataReader = pgCommand.EndExecuteReader(cres)
  Try
    While pgReader.Read()
      Console.WriteLine(String.Concat(pgReader.GetInt32(0), " ", pgReader.GetString(1), " ", pgReader.GetString(2)))
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | BeginExecuteReader Method | ExecuteReader Method | EndExecuteNonQuery Method


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | ExecuteReader() Method

Language

Visual Basic

C#

Show All

behavior
One of the CommandBehavior values.
startRecord
maxRecords
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ExecutePageReader Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : ExecutePageReader Method (PgSqlCommand)

Returns a specific subset of rows when paging through the results of a query.

[Visual Basic]
Public Function ExecutePageReader( _
   ByVal behavior As CommandBehavior, _
   ByVal startRecord As Integer, _
   ByVal maxRecords As Integer _
) As PgSqlDataReader
[C#]
public PgSqlDataReader ExecutePageReader(
   CommandBehavior behavior,
   int startRecord,
   int maxRecords
);

Parameters

behavior
One of the CommandBehavior values.
startRecord
maxRecords

Return Type

A PgSqlDataReader object.

Remarks

Use method ExecutePageReader when you want to retrieve not the whole dataset but some part of it that begins with given row number and has certain quantity of rows. This is especially useful when working with large amounts of data.

If you want to retrieve all data in a dataset, use ExecuteReader instead.

Example

The example below shows how to retrieve a part of a table. If this function is called with parameters startRecord=2 and maxRecords=3, it returns 3 rows: second, third, and fourth.

[C#]

public void ExecutePaged(PgSqlConnection pgConnection, int StartRow, int PageLength)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept", pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecutePageReader(System.Data.CommandBehavior.Default,StartRow,PageLength);
  try
  {
    while (pgReader.Read())
    {
      Console.WriteLine(pgReader.GetInt32(0) + ", " + pgReader.GetString(1) + ", " + pgReader.GetString(2));
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub ExecutePaged(ByVal pgConnection As PgSqlConnection, ByVal StartRow As Integer, ByVal PageLength As Integer)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Dept", pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecutePageReader(System.Data.CommandBehavior.Default, StartRow, PageLength)
  Try
    While pgReader.Read()
      Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
      + pgReader.GetString(1) + ", " _
      + pgReader.GetString(2))
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | ExecuteReader() Method


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ExecuteReader Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : ExecuteReader Method

Sends the CommandText to the Connection and builds a PgSqlDataReader.

Overload List

Sends the CommandText to the Connection and builds a PgSqlDataReader.

[Visual Basic] Overloads Public Function ExecuteReader() As PgSqlDataReader

[C#] public PgSqlDataReader ExecuteReader();

Sends the CommandText to the Connection, and builds a PgSqlDataReader using one of the CommandBehavior values.

[Visual Basic] Overloads Public Function ExecuteReader(CommandBehavior) As PgSqlDataReader

[C#] public PgSqlDataReader ExecuteReader(CommandBehavior);

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ExecuteReader() Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > ExecuteReader Method : ExecuteReader() Method

Sends the CommandText to the Connection and builds a PgSqlDataReader.

[Visual Basic]
Overloads Public Function ExecuteReader() As PgSqlDataReader
[C#]
public PgSqlDataReader ExecuteReader();

Return Type

A PgSqlDataReader object.

Remarks

When FetchAll property is false the following restriction takes place. While the PgSqlDataReader is in use, the associated PgSqlConnection is busy serving the PgSqlDataReader. While in this state, no operations can be performed on the PgSqlConnection except closing. This is the case until the PgSqlDataReader.Close method of the PgSqlDataReader is called.

Example

The following example creates a PgSqlCommand, then executes it by passing a string that is SQL SELECT statement, and a string to use to connect to the data source.

[C#]

public void CreatePgSqlDataReader(string mySelectQuery,string pgConnectionString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(pgConnectionString);
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection);
  pgCommand.Connection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  try
  {
    while(pgReader.Read())
    {
      Console.WriteLine(pgReader.GetString(0));
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub CreatePgSqlDataReader(mySelectQuery As String, _
pgConnectionString As String)
  Dim pgConnection As New PgSqlConnection(pgConnectionString)
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgCommand.Connection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  Try
    While pgReader.Read()
      Console.WriteLine(pgReader.GetString(0))
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

behavior
One of the CommandBehavior values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ExecuteReader(CommandBehavior) Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class > ExecuteReader Method : ExecuteReader(CommandBehavior) Method

Sends the CommandText to the Connection, and builds a PgSqlDataReader using one of the CommandBehavior values.

[Visual Basic]
Overloads Public Function ExecuteReader( _
   ByVal behavior As CommandBehavior _
) As PgSqlDataReader
[C#]
public PgSqlDataReader ExecuteReader(
   CommandBehavior behavior
);

Parameters

behavior
One of the CommandBehavior values.

Return Type

A PgSqlDataReader object.

Remarks

When FetchAll property is false the following restriction takes place. While the PgSqlDataReader is in use, the associated PgSqlConnection is busy serving the PgSqlDataReader. While in this state, no operations can be performed on the PgSqlConnection except closing. This is the case until the PgSqlDataReader.Close method of the PgSqlDataReader is called.

Example

The following example creates a PgSqlCommand, then executes it by passing a string that is SQL SELECT statement, and a string to use to connect to the data source. The CommandBehavior is then set to CloseConnection.

[C#]

public void CreatePgSqlDataReader(string mySelectQuery,string pgConnectionString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(pgConnectionString);
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery, pgConnection);
  pgCommand.Connection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader(CommandBehavior.CloseConnection);
  while(pgReader.Read())
  {
    Console.WriteLine(pgReader.GetString(0));
  }
  pgReader.Close();
}

[Visual Basic]

Public Sub CreatePgSqlDataReader(mySelectQuery As String, _
pgConnectionString As String)
  Dim pgConnection As New PgSqlConnection(pgConnectionString)
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgCommand.Connection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader(CommandBehavior.CloseConnection)
  While pgReader.Read()
    Console.WriteLine(pgReader.GetString(0))
  End While
  pgReader.Close()
End Sub

See Also

PgSqlCommand Class | PgSqlCommand Members | Overload List | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlCommand Class | PgSqlCommand Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Prepare Method

Devart.Data.PostgreSql Namespace > PgSqlCommand Class : Prepare Method (PgSqlCommand)

Creates a prepared (or compiled) version of the command on the server.

[Visual Basic]
Overrides Public Sub Prepare()
[C#]
public override void Prepare();

See Also

PgSqlCommand Class | PgSqlCommand Members


%%PageItemTitle%%

PgSqlCommandBuilder Members | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Class

Devart.Data.PostgreSql Namespace : PgSqlCommandBuilder Class

Automatically generates single-table commands used to reconcile changes made to a DataSet with the PostgreSQL.

For a list of all members of this type, see PgSqlCommandBuilder members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommandBuilder
Devart.Common.DbCommandBuilderBase
Devart.Common.DbCommandBuilder
Devart.Data.PostgreSql.PgSqlCommandBuilder

Syntax

[Visual Basic]
Public Class PgSqlCommandBuilder
   Inherits DbCommandBuilder
   Implements IComponent, IDisposable
[C#]
public class PgSqlCommandBuilder : DbCommandBuilder, IComponent, IDisposable

Remarks

The PgSqlDataAdapter does not automatically generate the SQL statements required to reconcile changes made to a DataSet associated with PostgreSQL. However, you can create a PgSqlCommandBuilder object that generates SQL statements for single-table updates. After assigning the PgSqlDataAdapter to the PgSqlCommandBuilder, it begins to generate any additional SQL statements that you do not set.

The relationship between a PgSqlDataAdapter and its corresponding PgSqlCommandBuilder is always one-to-one. To create this correspondence, you set the DataAdapter property of the PgSqlCommandBuilder object. This causes the PgSqlCommandBuilder to register itself as a listener, which produces the output of PgSqlDataAdapter.RowUpdating events that affect the DataSet.

To generate INSERT, UPDATE, or DELETE statements, the PgSqlCommandBuilder uses the PgSqlDataAdapter.SelectCommand property to retrieve a required set of metadata. If you change the value of PgSqlDataAdapter.SelectCommand after the metadata has been retrieved (for example, after the first update), you then should call the Devart.Common.DbCommandBuilderBase.RefreshSchema method to update the metadata.

The PgSqlCommandBuilder also uses the Connection, Devart.Common.DbCommandBase.CommandTimeout, and Transaction properties referenced by the PgSqlDataAdapter.SelectCommand. The user should call Devart.Common.DbCommandBuilderBase.RefreshSchema if any of these properties are modified, or value of the PgSqlDataAdapter.SelectCommand property itself is changed. Otherwise the PgSqlDataAdapter.InsertCommand, PgSqlDataAdapter.UpdateCommand, and PgSqlDataAdapter.DeleteCommand properties retain their previous values.

If you assign null to corresponding property of PgSqlDataAdapter, the PgSqlCommandBuilder will be disassociated from the PgSqlDataAdapter, and the generated commands will no longer be used.

Example

The following example uses PgSqlCommand, along with PgSqlDataAdapter and PgSqlConnection, to select rows from PostgreSQL. The example is passed an initialized DataSet, a connection string, a query string that is SQL SELECT statement, and a string that is the name of the PostgreSQL table. The example then creates a PgSqlCommandBuilder.

[C#]

public DataSet SelectPgSqlSrvRows(DataSet myDataSet,string pgConnection,string mySelectQuery,string myTableName)
{
  PgSqlConnection myConn = new PgSqlConnection(pgConnection);
  PgSqlDataAdapter myDataAdapter = new PgSqlDataAdapter();
  myDataAdapter.SelectCommand = new PgSqlCommand(mySelectQuery, myConn);
  PgSqlCommandBuilder pgCommandBuilder = new PgSqlCommandBuilder(myDataAdapter);

  myConn.Open();

  DataSet myDataSet = new DataSet();
  myDataAdapter.Fill(myDataSet, "Departments");

  //code to modify data in dataset here

  //Without the PgSqlCommandBuilder this line would fail
  myDataAdapter.Update(myDataSet, "Departments");

  myConn.Close();

  return myDataSet;
}

[Visual Basic]

Public Function SelectPgSqlSrvRows(myDataSet As DataSet, pgConnection As String, mySelectQuery As String, myTableName As String) As DataSet
  Dim myConn As New PgSqlConnection(pgConnection)
  Dim myDataAdapter As New PgSqlDataAdapter()
  myDataAdapter.SelectCommand = New PgSqlCommand(mySelectQuery, myConn)
  Dim pgCommandBuilder As PgSqlCommandBuilder = New PgSqlCommandBuilder(myDataAdapter)

  myConn.Open()

  Dim myDataSet As DataSet = New DataSet
  myDataAdapter.Fill(myDataSet, "Departments")

  ' Code to modify data in DataSet here

  ' Without the PgSqlCommandBuilder this line would fail.
  myDataAdapter.Update(myDataSet, "Departments")

  myConn.Close()

  SelectPgSqlSrvRows = myDataSet
End Function

See Also

PgSqlCommandBuilder Members | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Class Members

Devart.Data.PostgreSql Namespace : PgSqlCommandBuilder Class

PgSqlCommandBuilder overview

Public Constructors

Public Constructor PgSqlCommandBuilder Constructor Overloaded. Initializes a new instance of the PgSqlCommandBuilder class.

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter | Gets or sets a PgSqlDataAdapter object for which this PgSqlCommandBuilder object will generate SQL statements.
Public Property KeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted (Inherited from Devart.Common.DbCommandBuilderBase) | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property RefreshingFields | Overridden. Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode (Inherited from Devart.Common.DbCommandBuilderBase) | Gets or sets a value that indicates whether and how the Devart.Common.DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingFields | Overridden. Gets or sets list of fields to modify.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.
Public Property UseCatalog | Overridden.
Public Property UseSchema (Inherited from Devart.Common.DbCommandBuilderBase) | Specifies whether the schema identifier is included in data source object names.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method static (Shared in Visual Basic) DeriveParameters | Populates the specified PgSqlCommand object's PgSqlCommand.Parameters collection with parameter information for the SQL statement specified in the CommandText.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand | Overloaded. Gets the automatically generated SQL statement required to perform deletions on the data source.
Public Method GetInsertCommand | Overloaded. Gets the automatically generated SQL statement required to perform inserts on the data source.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand | Overloaded. Gets the automatically generated SQL statement required to perform updates on the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier | Overridden. Returns the string passed as the parameter enclosed in quotes.
Public Method RefreshSchema (Inherited from Devart.Common.DbCommandBuilderBase) | Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier | Overridden. Removes quote strings from identifier.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Constructor

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : PgSqlCommandBuilder Constructor (PgSqlCommandBuilder)

Initializes a new instance of the PgSqlCommandBuilder class.

Overload List

Initializes a new instance of the PgSqlCommandBuilder class.

[Visual Basic] Public Sub New()

[C#] public PgSqlCommandBuilder();

Initializes a new instance of the PgSqlCommandBuilder class with the associated PgSqlDataAdapter object.

[Visual Basic] Public Sub New(PgSqlDataAdapter)

[C#] public PgSqlCommandBuilder(PgSqlDataAdapter);

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Constructor()

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > PgSqlCommandBuilder Constructor : PgSqlCommandBuilder Constructor()

Initializes a new instance of the PgSqlCommandBuilder class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlCommandBuilder();

Remarks

The base constructor initializes all fields to their default values.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

adapter
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Constructor(PgSqlDataAdapter)

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > PgSqlCommandBuilder Constructor : PgSqlCommandBuilder Constructor(PgSqlDataAdapter)

Initializes a new instance of the PgSqlCommandBuilder class with the associated PgSqlDataAdapter object.

[Visual Basic]
Public Function New( _
   ByVal adapter As PgSqlDataAdapter _
)
[C#]
public PgSqlCommandBuilder(
   PgSqlDataAdapter adapter
);

Parameters

adapter

Remarks

The PgSqlCommandBuilder registers itself as a listener for PgSqlDataAdapter.RowUpdating events that are generated by the PgSqlDataAdapter specified in this property.

When you create a new instance of PgSqlCommandBuilder, any existing PgSqlCommandBuilder associated with this PgSqlDataAdapter is released.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Class Properties

Devart.Data.PostgreSql Namespace : PgSqlCommandBuilder Class

For a list of all members of this type, see PgSqlCommandBuilder members.

Public Properties

Public Property CatalogLocation (Inherited from System.Data.Common.DbCommandBuilder) | Sets or gets the CatalogLocation for an instance of the DbCommandBuilder class.
Public Property ConflictOption (Inherited from System.Data.Common.DbCommandBuilder) | Specifies which ConflictOption is to be used by the DbCommandBuilder.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property DataAdapter | Gets or sets a PgSqlDataAdapter object for which this PgSqlCommandBuilder object will generate SQL statements.
Public Property KeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property Quoted (Inherited from Devart.Common.DbCommandBuilderBase) | Gets or sets whether the command builder quotes all the names of data source objects.
Public Property RefreshingFields | Overridden. Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode (Inherited from Devart.Common.DbCommandBuilderBase) | Gets or sets a value that indicates whether and how the Devart.Common.DbCommandBuilderBase should retrieve field values adjusted by server after an update.
Public Property SchemaSeparator (Inherited from System.Data.Common.DbCommandBuilder) | Gets or sets the character to be used for the separator between the schema identifier and any other identifiers.
Public Property SetAllValues (Inherited from System.Data.Common.DbCommandBuilder) | Specifies whether all column values in an update statement are included or only changed ones.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UpdatingFields | Overridden. Gets or sets list of fields to modify.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.
Public Property UseCatalog | Overridden.
Public Property UseSchema (Inherited from Devart.Common.DbCommandBuilderBase) | Specifies whether the schema identifier is included in data source object names.

See Also

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataAdapter Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : DataAdapter Property

Gets or sets a PgSqlDataAdapter object for which this PgSqlCommandBuilder object will generate SQL statements.

[Visual Basic]
Public Property DataAdapter As PgSqlDataAdapter
[C#]
public PgSqlDataAdapter DataAdapter {get; set;}

Return Type

A PgSqlDataAdapter object that is associated with this PgSqlCommandBuilder.

Remarks

The PgSqlCommandBuilder registers itself as a listener for PgSqlDataAdapter.RowUpdating events that are generated by the PgSqlDataAdapter specified in this property.

When you create a new instance of PgSqlCommandBuilder, any existing PgSqlCommandBuilder associated with this PgSqlDataAdapter is released.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

KeyFields Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : KeyFields Property (PgSqlCommandBuilder)

Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.

[Visual Basic]
Public Property KeyFields As String
[C#]
public string KeyFields {get; set;}

Return Type

The string containing list of key field names separated by semicolon.

Remarks

This property is used when the ConflictOption property is set to OverwriteChanges, otherwise all columns will be used in the WHERE clause.

If KeyFields is nonempty, its value is used as the list of columns for the WHERE clause. If KeyFields is empty, the primary key columns are used.

Example

The following example demonstrates how UPDATE and DELETE statements are generated.

[C#]

public void UseKeyFields(string connectionString) {

    PgSqlConnection conn = new PgSqlConnection(connectionString);
    conn.Open();

    PgSqlDataAdapter adapter = new PgSqlDataAdapter("SELECT * FROM Test.Dept", conn);
    PgSqlCommandBuilder commBuilder = new PgSqlCommandBuilder(adapter);

    commBuilder.ConflictOption = ConflictOption.OverwriteChanges;

    commBuilder.KeyFields = "DeptNo, DName";

    string updateComm = commBuilder.GetUpdateCommand().CommandText;
    string deleteComm = commBuilder.GetDeleteCommand().CommandText;

    Console.WriteLine(updateComm);
    Console.WriteLine(deleteComm);
    conn.Close();
}

[Visual Basic]

Public Sub UseKeyFields(ByVal connectionString As String)
    Dim conn As PgSqlConnection = New PgSqlConnection(connectionString)
    conn.Open()

    Dim adapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT * FROM Test.Dept", conn)
    Dim commBuilder As PgSqlCommandBuilder = New PgSqlCommandBuilder(adapter)

    commBuilder.ConflictOption = ConflictOption.OverwriteChanges

    commBuilder.KeyFields = "DeptNo, DName"

    Dim updateComm As String = commBuilder.GetUpdateCommand().CommandText
    Dim deleteComm As String = commBuilder.GetDeleteCommand().CommandText

    Console.WriteLine(updateComm)
    Console.WriteLine(deleteComm)
    conn.Close()
End Sub

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | GetRefreshCommand Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RefreshingFields Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : RefreshingFields Property (PgSqlCommandBuilder)

Gets or sets list of fields whose values should be retrieved after a DML statement execution.

[Visual Basic]
Overrides Public Property RefreshingFields As String
[C#]
public override string RefreshingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Remarks

This property is used in conjunction with Devart.Common.DbCommandBuilderBase.RefreshMode.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | GetRefreshCommand Method


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdatingFields Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : UpdatingFields Property (PgSqlCommandBuilder)

Gets or sets list of fields to modify.

[Visual Basic]
Overrides Public Property UpdatingFields As String
[C#]
public override string UpdatingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Remarks

UpdatingFields is used by GetInsertCommand and GetUpdateCommand overloads that do not have fields argument. If the UpdatingFields property is empty, full set of columns is used.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdatingTable Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : UpdatingTable Property (PgSqlCommandBuilder)

Gets or sets table name to generate update statements for.

[Visual Basic]
Public Property UpdatingTable As String
[C#]
public string UpdatingTable {get; set;}

Return Type

The name of the table.

Remarks

Use the UpdatingTable property to generate SQL statements for specific table in a complicated query.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UseCatalog Property

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : UseCatalog Property (PgSqlCommandBuilder)
[Visual Basic]
Overrides Public Property UseCatalog As Boolean
[C#]
public override bool UseCatalog {get; set;}

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%% $$Methods$$

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Class Methods

Devart.Data.PostgreSql Namespace : PgSqlCommandBuilder Class

For a list of all members of this type, see PgSqlCommandBuilder members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method static (Shared in Visual Basic) DeriveParameters | Populates the specified PgSqlCommand object's PgSqlCommand.Parameters collection with parameter information for the SQL statement specified in the CommandText.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetDeleteCommand | Overloaded. Gets the automatically generated SQL statement required to perform deletions on the data source.
Public Method GetInsertCommand | Overloaded. Gets the automatically generated SQL statement required to perform inserts on the data source.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetRefreshCommand | Overloaded. Gets the automatically generated SQL statement required to refresh values from the data source.
Public Method GetUpdateCommand | Overloaded. Gets the automatically generated SQL statement required to perform updates on the data source.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method QuoteIdentifier | Overridden. Returns the string passed as the parameter enclosed in quotes.
Public Method RefreshSchema (Inherited from Devart.Common.DbCommandBuilderBase) | Refreshes the data source schema information used to generate INSERT, UPDATE, or DELETE statements.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method UnquoteIdentifier | Overridden. Removes quote strings from identifier.

See Also

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

command
The PgSqlCommand referencing the SQL statement for which the parameter information is to be derived. The derived parameters will be populated into the PgSqlCommand.Parameters collection of this command.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DeriveParameters Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : DeriveParameters Method

Populates the specified PgSqlCommand object's PgSqlCommand.Parameters collection with parameter information for the SQL statement specified in the CommandText.

[Visual Basic]
Public Shared Sub DeriveParameters( _
   ByVal command As PgSqlCommand _
)
[C#]
public static void DeriveParameters(
   PgSqlCommand command
);

Parameters

command
The PgSqlCommand referencing the SQL statement for which the parameter information is to be derived. The derived parameters will be populated into the PgSqlCommand.Parameters collection of this command.

Remarks

DeriveParameters overwrites any existing parameter information for the PgSqlCommand.

DeriveParameters requires an extra call to the data server to obtain the information. If the parameter information is known in advance, it is more efficient to populate the parameters collection by setting the information explicitly.

For more information, see "Using Stored Procedures with a Command" in the Microsoft .NET Framework SDK documentation.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDeleteCommand Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : GetDeleteCommand Method (PgSqlCommandBuilder)

Gets the automatically generated SQL statement required to perform deletions on the data source.

Overload List

Gets the automatically generated SQL statement required to perform deletions on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetDeleteCommand() As PgSqlCommand

[C#] public PgSqlCommand GetDeleteCommand();

Gets the automatically generated SQL statement required to perform deletions on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetDeleteCommand(Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetDeleteCommand(bool);

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDeleteCommand() Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetDeleteCommand Method : GetDeleteCommand() Method

Gets the automatically generated SQL statement required to perform deletions on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetDeleteCommand() As PgSqlCommand
[C#]
public PgSqlCommand GetDeleteCommand();

Return Type

The text of the SQL statement to be executed.

Remarks

You can use the GetDeleteCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetDeleteCommand as the basis of a modified command. For example, you might call GetDeleteCommand and modify the Devart.Common.DbCommandBase.CommandTimeout value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetDeleteCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetDeleteCommand.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDeleteCommand(Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetDeleteCommand Method : GetDeleteCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform deletions on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetDeleteCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetDeleteCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.

Return Type

The text of the SQL statement to be executed.

Remarks

You can use the GetDeleteCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetDeleteCommand as the basis of a modified command. For example, you might call GetDeleteCommand and modify the Devart.Common.DbCommandBase.CommandTimeout value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetDeleteCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetDeleteCommand.

useColumnsForParameterNames argument determines whether names of parameters in command text will be like ":p1", ":p2" (if false), or names of columns will be used (if true), like ":mycolumn1", ":myothercolumn".

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInsertCommand Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : GetInsertCommand Method (PgSqlCommandBuilder)

Gets the automatically generated SQL statement required to perform inserts on the data source.

Overload List

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand() As PgSqlCommand

[C#] public PgSqlCommand GetInsertCommand();

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand(Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetInsertCommand(bool);

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetInsertCommand(String(),Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetInsertCommand(string[],bool);

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInsertCommand() Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetInsertCommand Method : GetInsertCommand() Method

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand() As PgSqlCommand
[C#]
public PgSqlCommand GetInsertCommand();

Return Type

The text of the SQL statement to be executed.

Remarks

You can use the GetInsertCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetInsertCommand as the basis of a modified command. For example, you might call GetInsertCommand and modify the Devart.Common.DbCommandBase.CommandTimeout value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetInsertCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetInsertCommand.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInsertCommand(Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetInsertCommand Method : GetInsertCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetInsertCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.

Return Type

The text of the SQL statement to be executed.

Remarks

You can use the GetInsertCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetInsertCommand as the basis of a modified command. For example, you might call GetInsertCommand and modify the Devart.Common.DbCommandBase.CommandTimeout value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetInsertCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetInsertCommand.

useColumnsForParameterNames argument determines whether names of paramerters in command text will be like ":p1", ":p2" (if false), or names of columns will be used (if true), like ":mycolumn1", ":myothercolumn".

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
Defines list of columns that are allowed to update.
useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInsertCommand(String[],Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetInsertCommand Method : GetInsertCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to perform inserts on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetInsertCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetInsertCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
Defines list of columns that are allowed to update.
useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.

Return Type

The text of the SQL statement to be executed.

Remarks

You can use the GetInsertCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetInsertCommand as the basis of a modified command. For example, you might call GetInsertCommand and modify the Devart.Common.DbCommandBase.CommandTimeout value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetInsertCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetInsertCommand.

useColumnsForParameterNames argument determines whether names of paramerters in command text will be like ":p1", ":p2" (if false), or names of columns will be used (if true), like ":mycolumn1", ":myothercolumn".

fields argument defines list of columns that are allowed to update. Columns not included into the list will not be updated.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetRefreshCommand Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : GetRefreshCommand Method (PgSqlCommandBuilder)

Gets the automatically generated SQL statement required to refresh values from the data source.

Overload List

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand() As PgSqlCommand

[C#] public PgSqlCommand GetRefreshCommand();

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetRefreshCommand(bool);

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic] Overloads Public Function GetRefreshCommand(String(),Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetRefreshCommand(string[],bool);

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetRefreshCommand() Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand() Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand() As PgSqlCommand
[C#]
public PgSqlCommand GetRefreshCommand();

Return Type

A DbCommand with CommandText containing SQL statement to be executed.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether dotConnect for PostgreSQL uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetRefreshCommand(Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand(Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetRefreshCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether dotConnect for PostgreSQL uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A PgSqlCommand with CommandText containing SQL statement to be executed.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect for PostgreSQL uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetRefreshCommand(String[],Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetRefreshCommand Method : GetRefreshCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to refresh values from the data source.

[Visual Basic]
Overloads Public Function GetRefreshCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetRefreshCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
The array of string containing list of the field names.
useColumnsForParameterNames
Determines whether dotConnect for PostgreSQL uses columns metadata to make up parameters' names. If true, the names are composed using colon and name of appropriate column; otherwise the names look like :p1, :p2 etc.

Return Type

A PgSqlCommand with CommandText containing SQL statement to be executed.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetUpdateCommand Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : GetUpdateCommand Method (PgSqlCommandBuilder)

Gets the automatically generated SQL statement required to perform updates on the data source.

Overload List

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand() As PgSqlCommand

[C#] public PgSqlCommand GetUpdateCommand();

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand(Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetUpdateCommand(bool);

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic] Overloads Public Function GetUpdateCommand(String(),Boolean) As PgSqlCommand

[C#] public PgSqlCommand GetUpdateCommand(string[],bool);

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetUpdateCommand() Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand() Method

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand() As PgSqlCommand
[C#]
public PgSqlCommand GetUpdateCommand();

Return Type

The PgSqlCommand object to be executed.

Remarks

You can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand and modify the CommandText value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetUpdateCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetUpdateCommand(Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand(Boolean) Method

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand( _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetUpdateCommand(
   bool useColumnsForParameterNames
);

Parameters

useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.

Return Type

The PgSqlCommand object to be executed.

Remarks

You can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand and modify the CommandText value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetUpdateCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.

useColumnsForParameterNames argument determines whether names of paramerters in command text will be like ":p1", ":p2" (if false), or names of columns will be used (if true), like ":mycolumn1", ":myothercolumn".

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List

Language

Visual Basic

C#

Show All

fields
Defines list of columns that are allowed to update.
useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetUpdateCommand(String[],Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class > GetUpdateCommand Method : GetUpdateCommand(String[],Boolean) Method

Gets the automatically generated SQL statement required to perform updates on the data source when an application calls Update on the PgSqlDataAdapter.

[Visual Basic]
Overloads Public Function GetUpdateCommand( _
   ByVal fields() As String, _
   ByVal useColumnsForParameterNames As Boolean _
) As PgSqlCommand
[C#]
public PgSqlCommand GetUpdateCommand(
   string[] fields,
   bool useColumnsForParameterNames
);

Parameters

fields
Defines list of columns that are allowed to update.
useColumnsForParameterNames
Determines whether names of parameters in command text will be based on columns' names.

Return Type

The PgSqlCommand object to be executed.

Remarks

You can use the GetUpdateCommand method for informational or troubleshooting purposes because it returns the PgSqlCommand object to be executed.

You can also use GetUpdateCommand as the basis of a modified command. For example, you might call GetUpdateCommand and modify the CommandText value, and then explicitly set that on the PgSqlDataAdapter.

After the SQL statement is first generated, you must explicitly call Devart.Common.DbCommandBuilderBase.RefreshSchema if it changes the statement in any way. Otherwise, the GetUpdateCommand still will be using information from the previous statement, which might not be correct. The SQL statements are first generated when the application calls either Update or GetUpdateCommand.

useColumnsForParameterNames argument determines whether names of paramerters in command text will be like ":p1", ":p2" (if false), or names of columns will be used (if true), like ":mycolumn1", ":myothercolumn".

fields argument defines list of columns that are allowed to update. Columns not included into the list will not be updated.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members | Overload List


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

unquotedIdentifier
Identifier to be placed inside the quotes.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

QuoteIdentifier Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : QuoteIdentifier Method (PgSqlCommandBuilder)

Returns the string passed as the parameter enclosed in quotes.

[Visual Basic]
Overrides Public Function QuoteIdentifier( _
   ByVal unquotedIdentifier As String _
) As String
[C#]
public override string QuoteIdentifier(
   string unquotedIdentifier
);

Parameters

unquotedIdentifier
Identifier to be placed inside the quotes.

Return Type

The identifier enclosed in quotes.

Remarks

This method constructs a quoted identifier by concatenating QuotePrefix, unquotedIdentifier, and QuoteSuffix.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members

Language

Visual Basic

C#

Show All

quotedIdentifier
String containing Devart.Common.DbCommandBuilderBase.QuotePrefix, identifier itself, and Devart.Common.DbCommandBuilderBase.QuoteSuffix parts.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UnquoteIdentifier Method

Devart.Data.PostgreSql Namespace > PgSqlCommandBuilder Class : UnquoteIdentifier Method

Removes quote strings from identifier.

[Visual Basic]
Overrides Public Function UnquoteIdentifier( _
   ByVal quotedIdentifier As String _
) As String
[C#]
public override string UnquoteIdentifier(
   string quotedIdentifier
);

Parameters

quotedIdentifier
String containing Devart.Common.DbCommandBuilderBase.QuotePrefix, identifier itself, and Devart.Common.DbCommandBuilderBase.QuoteSuffix parts.

Return Type

Unquoted identifier.

See Also

PgSqlCommandBuilder Class | PgSqlCommandBuilder Members


%%PageItemTitle%%

PgSqlConnection Members | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Class

Devart.Data.PostgreSql Namespace : PgSqlConnection Class

Represents an open connection to PostgreSQL.

For a list of all members of this type, see PgSqlConnection members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbConnection
Devart.Common.DbConnectionBase
Devart.Data.PostgreSql.PgSqlConnection

Syntax

[Visual Basic]
Public Class PgSqlConnection
   Inherits DbConnectionBase
   Implements IComponent, IDbConnection, ICloneable, IDisposable
[C#]
public class PgSqlConnection : DbConnectionBase, IComponent, IDbConnection, ICloneable, IDisposable

Remarks

A PgSqlConnection object represents a unique connection to PostgreSQL. Use it in conjunction with PgSqlCommand, PgSqlDataReader, PgSqlDataAdapter or other components for convenient interoperation with PostgreSQL.

When you create an instance of PgSqlConnection, all properties are set to their initial values. For a list of these values, see the _ctor constructor.

If the PgSqlConnection goes out of scope, it is not closed. Therefore, you must explicitly close the connection by calling Close.

Note that PgSqlConnection instance is not guaranteed to be thread safe. You should avoid using the same PgSqlConnection in several threads at the same time. It is recommended to open a new connection per thread and to close it when the work is done. Actually, connections will not be created/disposed every time with the Pooling=true; connection string option - connections will be stored at connection pool. This boosts performance greatly.

A single PgSqlConnection can be used by many PgSqlCommand objects on the assumption that all operations will be done consecutively. In other words, you can not execute a SQL statement while an asynchronous operation is in progress.

This class supports cross-form data binding with the InterForm Technology.

Example

The following example creates a PgSqlCommand and a PgSqlConnection. The PgSqlConnection is opened and set as the Connection property. The example then calls ExecuteNonQuery method, and closes the connection. To accomplish this, the ExecuteNonQuery is passed a connection string and a query string that is SQL INSERT statement.

[C#]

public void InsertRow(string pgConnectionString)
{
  // If the connection string is empty, use default.
  if(pgConnectionString == "")
  {
    pgConnectionString =
        "host=server;database=test;user id=postgres;";
  }
  PgSqlConnection myConn = new PgSqlConnection(pgConnectionString);
  string myInsertQuery = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')";
  PgSqlCommand pgCommand = new PgSqlCommand(myInsertQuery);
  pgCommand.Connection = myConn;
  myConn.Open();
  try
  {
    pgCommand.ExecuteNonQuery();
  }
  finally
  {
    myConn.Close();
  }
}

[Visual Basic]

Public Sub InsertRow(pgConnectionString As String)
  ' If the connection string is empty, use default.
  If pgConnectionString = "" Then
    pgConnectionString = _
        "host=server;database=test;user id=postgres;"
  End If
  Dim myConn As New PgSqlConnection(pgConnectionString)
  Dim myInsertQuery As String = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"
  Dim pgCommand As New PgSqlCommand(myInsertQuery)
  pgCommand.Connection = myConn
  myConn.Open()
  Try
    pgCommand.ExecuteNonQuery()
  Finally
    myConn.Close()
  End Try
End Sub

See Also

PgSqlConnection Members | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Class Members

Devart.Data.PostgreSql Namespace : PgSqlConnection Class

PgSqlConnection overview

Public Constructors

Public Constructor PgSqlConnection Constructor Overloaded. Initializes a new instance of the PgSqlConnection class.

Public Properties

Public Property AutoCommit | Obsolete. Determines whether modifications will be committed automatically at the server or not.
Public Property Charset | Gets or sets charset that will be used on the client side.
Public Property CommitTimeout | Gets the time to wait for the PgSqlTransaction.Commit method to execute before terminating the attempt and generating an error.
Public Property ConnectionString | Overridden. Gets or sets the string used to open a PostgreSQL connection.
Public Property ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Database | Gets or sets the name of the database to be used once a connection is open.
Public Property DataSource | Overridden. Returns the value of the Host property.
Public Property Host | Gets or sets name or IP address of host of PostgreSQL database to which to connect.
Public Property InDistributedTransaction (Inherited from Devart.Common.DbConnectionBase) | Indicates whether the connection is enlisted in a distributed transaction.
Public Property LocalFailover | Determines whether the ConnectionLost event, which allows implicit reconnecting and reexectuting the corresponding operation, occurs after connection is lost.
Public Property Name | Gets or sets the name of the component.
Public Property Owner | Gets or sets a form or other container that the PgSqlConnection instance belongs to.
Public Property Password | Gets or sets the user's password to connect.
Public Property Port | Gets or sets port of PostgreSQL database to which to connect.
Public Property ProtocolVersion | Gets the version of protocol to be used.
Public Property ProxyOptions | Gets or sets proxy server settings.
Public Property Schema | Gets or sets the name of the schema to be used once a connection is open.
Public Property ServerVersion | Gets a string containing the version of the instance of PostgreSQL to which the client is connected.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property SslOptions | Gets or sets SslOptions object which is used to establish secure connection with server.
Public Property State | Gets the current state of the connection.
Public Property Unicode | Gets or sets a value indicating whether the UTF8 charset will be used.
Public Property UserId | Gets or sets the name of the user to connect.

Public Methods

Public Method BeginOpen (Inherited from Devart.Common.DbConnectionBase) | Starts an asynchronous invocation of an Open method.
Public Method BeginTransaction | Overloaded. Begins a transaction at the database.
Public Method ChangeDatabase | Overridden. Changes the current database associated with an open PgSqlConnection.
Public Method static (Shared in Visual Basic) ClearAllPools | Overloaded. Clears all pools associated with the connection.
Public Method static (Shared in Visual Basic) ClearPool | Clears the pool matching ConnectionString of provided PgSqlConnection object.
Public Method Clone | Creates a new object that is a copy of the current instance.
Public Method Close (Inherited from Devart.Common.DbConnectionBase) | Closes the connection to the database. This is the preferred method of closing any open connection.
Public Method Commit | Commits the database transaction.
Public Method CreateCommand | Creates and returns a PgSqlCommand object associated with the PgSqlConnection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndOpen (Inherited from Devart.Common.DbConnectionBase) | Ends an asynchronous invocation of the Open method.
Public Method EnlistTransaction (Inherited from Devart.Common.DbConnectionBase) | Enlists in the specified transaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetSchema (Inherited from Devart.Common.DbConnectionBase) | Overloaded. Provides information about server schema objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overridden. Opens a PostgreSQL connection with the property settings specified by the ConnectionString.
Public Method Ping | Determines whether connection to PostgreSQL server is valid.
Public Method Rollback | Rolls back a transaction from a pending state.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event ConnectionLost | Occurs when connection to the data source is lost in case LocalFailover is set to true. You may use this event to implicitly reconnect and reexecute the current operation.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when PostgreSQL server sends an error message.
Public Event InfoMessage | Occurs when PostgreSQL returns a warning or informational message.
Public Event Notification | Occurs when PostgreSQL server provides a notification message.
Public Event StateChange (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the connection changes.
Public Event TransactionStateChanged (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the transaction is changed.
Public Event TransactionStateChanging (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the transaction is changing.

See Also

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Constructor

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : PgSqlConnection Constructor (PgSqlConnection)

Initializes a new instance of the PgSqlConnection class.

Overload List

Initializes a new instance of the PgSqlConnection class.

[Visual Basic] Public Sub New()

[C#] public PgSqlConnection();

Initializes a new instance of the PgSqlConnection class when given a string containing the connection string.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlConnection(string);

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Constructor()

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > PgSqlConnection Constructor : PgSqlConnection Constructor()

Initializes a new instance of the PgSqlConnection class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlConnection();

Remarks

When a new instance of PgSqlConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.
Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Password | empty string ("")
UserId | empty string ("")

Example

The following example creates and opens a PgSqlConnection.

[C#]

public void CreatePgSqlConnection()
{
  PgSqlConnection pgConnection = new PgSqlConnection();
  pgConnection.ConnectionString =
      "host=server;database=test;user id=postgres;";
  pgConnection.Open();
  //Do something
  pgConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim pgConnection As New PgSqlConnection()
  pgConnection.ConnectionString = _
      "host=server;database=test;user id=postgres;"
  pgConnection.Open()
  'Do something
  pgConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List | ConnectionString Property

Language

Visual Basic

C#

Show All

connectionString
The connection used to open the PostgreSQL server database.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > PgSqlConnection Constructor : PgSqlConnection Constructor(String)

Initializes a new instance of the PgSqlConnection class when given a string containing the connection string.

[Visual Basic]
Public Function New( _
   ByVal connectionString As String _
)
[C#]
public PgSqlConnection(
   string connectionString
);

Parameters

connectionString
The connection used to open the PostgreSQL server database.

Remarks

When a new instance of PgSqlConnection is created, the read/write properties are set to the following initial values unless they are specifically set using their associated keywords in the ConnectionString property.
Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Database | empty string ("")
Host | empty string ("")
Password | empty string ("")
Port | 5432
UserId | empty string ("")

You can change the value for these properties only by using the ConnectionString property.

Example

The following example creates and opens a PgSqlConnection.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString = "host=server;database=test;user id=postgres";
  PgSqlConnection myConnection = new PgSqlConnection(myConnString);
  myConnection.Open();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString As String = "host=server;database=test;user id=postgres"
  Dim myConnection As New PgSqlConnection(myConnString)
  myConnection.Open()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List | ConnectionString Property


%%PageItemTitle%% $$Properties$$

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Class Properties

Devart.Data.PostgreSql Namespace : PgSqlConnection Class

For a list of all members of this type, see PgSqlConnection members.

Public Properties

Public Property AutoCommit | Obsolete. Determines whether modifications will be committed automatically at the server or not.
Public Property Charset | Gets or sets charset that will be used on the client side.
Public Property CommitTimeout | Gets the time to wait for the PgSqlTransaction.Commit method to execute before terminating the attempt and generating an error.
Public Property ConnectionString | Overridden. Gets or sets the string used to open a PostgreSQL connection.
Public Property ConnectionTimeout | Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Database | Gets or sets the name of the database to be used once a connection is open.
Public Property DataSource | Overridden. Returns the value of the Host property.
Public Property Host | Gets or sets name or IP address of host of PostgreSQL database to which to connect.
Public Property InDistributedTransaction (Inherited from Devart.Common.DbConnectionBase) | Indicates whether the connection is enlisted in a distributed transaction.
Public Property LocalFailover | Determines whether the ConnectionLost event, which allows implicit reconnecting and reexectuting the corresponding operation, occurs after connection is lost.
Public Property Name | Gets or sets the name of the component.
Public Property Owner | Gets or sets a form or other container that the PgSqlConnection instance belongs to.
Public Property Password | Gets or sets the user's password to connect.
Public Property Port | Gets or sets port of PostgreSQL database to which to connect.
Public Property ProtocolVersion | Gets the version of protocol to be used.
Public Property ProxyOptions | Gets or sets proxy server settings.
Public Property Schema | Gets or sets the name of the schema to be used once a connection is open.
Public Property ServerVersion | Gets a string containing the version of the instance of PostgreSQL to which the client is connected.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property SslOptions | Gets or sets SslOptions object which is used to establish secure connection with server.
Public Property State | Gets the current state of the connection.
Public Property Unicode | Gets or sets a value indicating whether the UTF8 charset will be used.
Public Property UserId | Gets or sets the name of the user to connect.

See Also

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AutoCommit Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : AutoCommit Property

Obsolete. Determines whether modifications will be committed automatically at the server or not.

[Visual Basic]
Public Property AutoCommit As Boolean
[C#]
public bool AutoCommit {get; set;}

Return Type

true if Commit is called for the current transaction after the execution of each SQL statement; otherwise, false. The default value is true.

Remarks

PostgreSQL server version 7.3 and below has autocommit variable with the same meaning as AutoCommit property. At PostgreSQL server version 7.4 and higher this variable isn't used and always has 'on' value.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Unicode Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Charset Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Charset Property (PgSqlConnection)

Gets or sets charset that will be used on the client side.

[Visual Basic]
Public Property Charset As String
[C#]
public string Charset {get; set;}

Return Type

String that represents charset supported by PostgreSQL server.

Remarks

By default, charset is equal to PostgreSQL server_encoding run-time parameter. You can set this property to convert string data returned by the server to the specified charset used by your application. For example, if your database encoding is KOI8 but your application uses WIN1251 charset you can set this property to WIN to convert KOI8 strings to WIN1251. You also can use Unicode property to transfer all data in the UTF8 charset, but it may significant reduce network traffic and thus decrease application performance.

See Also

PgSqlConnection Class | PgSqlConnection Members | Unicode Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CommitTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : CommitTimeout Property

Gets the time to wait for the PgSqlTransaction.Commit method to execute before terminating the attempt and generating an error.

[Visual Basic]
Public Property CommitTimeout As Integer
[C#]
public int CommitTimeout {get; set;}

Return Type

The time (in seconds) to wait for a connection to open.

Remarks

A value of 0 indicates no limit, and should be avoided because an attempt to commit will wait indefinitely.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Open Method | PgSqlConnectionStringBuilder Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionString Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ConnectionString Property (PgSqlConnection)

Gets or sets the string used to open a PostgreSQL connection.

[Visual Basic]
Overrides Public Property ConnectionString As String
[C#]
public override string ConnectionString {get; set;}

Return Type

The connection string that includes the parameters needed to establish the initial connection. The default value is an empty string ("").

Remarks

The ConnectionString property can be set only when the connection is closed. Many of the connection string values have corresponding properties. When the connection string is set, all of these properties are updated, except when an error is detected. In this case, none of the properties are updated. PgSqlConnection properties return only those settings contained in the ConnectionString.

Resetting the ConnectionString on a closed connection resets all connection string values (and related properties) including the password. For example, if you set a connection string that includes "Username=postgres", and then reset the connection string to "Data Source=localhost", the UserId property is no longer set to "postgres".

The connection string is parsed immediately after being set. If errors in syntax are found when parsing, a runtime exception, such as ArgumentException, is generated. Other errors can be found only when an attempt is made to Open the connection.

The ConnectionString is similar to an OLE DB connection string. Values may be delimited by single or double quotes, (for example, name='value' or name="value"). Either single or double quotes may be used within a connection string by using the other delimiter, for example, name="value's" or name= 'value"s', but not name= 'value's' or name= ""value"". All blank characters, except those placed within a value or within quotes, are ignored. Keyword value pairs must be separated by a semicolon (;). If a semicolon is part of a value, it also must be delimited by quotes. No escape sequences are supported. The value type is irrelevant. Names are not case sensitive. Arguments names may occur only once in the connection string.

The following table lists the valid names for values within the ConnectionString.

Name | Description
AllowDateTimeOffset -or- Allow DateTimeOffset | Determines whether to use the DateTimeOffset type instead of DateTime when PgSqlDataReader returns a timestamptz value.
Character Set | A character set used by the client. Actually, if this property is enabled, then the "SET NAMES <Charset>" query is executed on establishing a connection. Default value is an empty string. That means there is no action performed with charset on the client and on the server.
Connection Lifetime | When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. The default value is 0.
Connect Timeout -or- Connection Timeout | The length of time (in seconds) to wait for a connection to the server before terminating the attempt and generating an error. The default value is 15.
Data Source -or- Host -or- Server | The name or IP address of host of PostgreSQL database to which to connect.
Database | The name of the database. If this parameter is not specified, it is assumed that name of the database is same as user name.
Default Command Timeout | The default time in seconds to wait while trying to execute a command before terminating the attempt and generating an error. 0 indicates no limit.
Default Fetch All | Default value of the FetchAll property of PgSqlCommand instances, created via the CreateCommand method. If the FetchAll mode is enabled, PgSqlDataReader object retrieves all the querried data from the server on execution.
Enlist | Determines whether the connection is automatically enlisted in the current distributed transaction. The default value is true. This parameter is not available in Mobile Edition.
Initial Schema | The name of the schema to be used once a connection is opened. You can change it later if you need. By default it is schema 'Public'.
Ignore Unnamed Parameters | Specifies whether to disable treating the '?' character in CommandText as an unnamed parameter.
Initialization Command | Specifies a database-specific command that should be executed immediately after establishing the connection.
Integrated Security | Determines whether to use a secure authentication with single sign-on (GSSAPI or SSPI, depending on the server).
Keep Alive | Specifies whether to send TCP keep-alive packets and the interval at which they are sent in seconds. Default value is 0, which means that the packets are not sent.
Max Pool Size | The maximum number of connections allowed in the pool. Setting the Max Pool Size value of the ConnectionString can affect performance. The default value is 100.
Min Pool Size | The minimum number of connections allowed in the pool. The default value is 0.
Password | The password for the PostgreSQL login account.
Persist Security Info | Indicates if security-sensitive information, such as the password, is not returned as part of the connection if the connection is open or has ever been in an open state.
Pooling | If true, by default, the PgSqlConnection object is drawn from the appropriate pool or is created and added to the appropriate pool.
Port | The port of PostgreSQL database to which to connect. The default value is 5432.
Proxy Host | The host name or IP address of proxy server.
Proxy Password | The password for the proxy server account.
Proxy Port | The port number of the proxy server. The default value is 3128.
Proxy User | The proxy server account name.
Protocol | The Frontend/Backend Protocol version. Available values are 2 and 3. Set the parameter to 2 for the protocol version 2.0 or to 3 for protocol version 3.0. Can be applied only for PostgreSQL server versions 7.4 or higher, for earlier versions of PostgreSQL this parameter must be explicitly set to 2. To execute several statements in the same query set procol to 2 version. The default value is 3.
SSL CA Cert | The location of the authority SSL certificate.
Ssl Cert | The location of the client SSL certificate.
Ssl Cipher List | The list of ciphers that client agrees to use.
Ssl Key | The location of the user's private key.
Ssl Mode | SSL connection priority. May be Disable, Allow, Prefer, and Require. The default value is Disable, which means that only an unencrypted SSL connection will be attempted.
Transaction Error Behavior | Determines whether to roll back a transaction automatically when an error occurs inside the transaction.
Transaction Scope Local | If there are several connections with the same connection string (which includes "Transaction Scope Local=true;") within a scope of TransactionScope, our provider will use only one connection internally. The default value is false. Not available in Mobile Edition.
Unicode | If true, by default, sets client charset to UTF8 and converts client data according to this charset.
UnpreparedExecute | If true, unprepared execute mode is used in PgSqlCommand instances by default.
User ID -or- User | The PostgreSQL login account.
Validate Connection | Specifies whether to validate connections that are being got from the pool.

Example

The following example creates a PgSqlConnection and sets some of its properties in the connection string.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString1 =
     "host=server;database=test;user id=postgres;";
  PgSqlConnection pgConnection1 = new PgSqlConnection(myConnString1);
  pgConnection1.Open();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString1 As String = _
      "host=server;database=test;user id=postgres;"
  Dim pgConnection1 As New PgSqlConnection(myConnString1)
  pgConnection1.Open()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Open Method | PgSqlConnectionStringBuilder Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ConnectionTimeout Property (PgSqlConnection)

Gets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

[Visual Basic]
Public Property ConnectionTimeout As Integer
[C#]
public int ConnectionTimeout {get; set;}

Return Type

The time (in seconds) to wait for a connection to open. The default value is 15 seconds.

Remarks

A value of 0 indicates no limit, and should be avoided in a ConnectionString because an attempt to connect will wait indefinitely. Use connection string to overwrite this value.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Database Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Database Property (PgSqlConnection)

Gets or sets the name of the database to be used once a connection is open.

[Visual Basic]
Public Property Database As String
[C#]
public string Database {get; set;}

Return Type

The name of the database to be used once a connection is open. The default value is an empty string ("").

Remarks

When a value is assigned to this property, the PgSqlConnection is closed and reopened.

If the database parameter is not specified in the ConnectionString, it is assumed that name of the database is same as user name.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataSource Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : DataSource Property (PgSqlConnection)

Returns the value of the Host property.

[Visual Basic]
Overrides Public ReadOnly Property DataSource As String
[C#]
public override string DataSource {get;}

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property | ConnectionTimeout Property | Database Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Host Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Host Property (PgSqlConnection)

Gets or sets name or IP address of host of PostgreSQL database to which to connect.

[Visual Basic]
Public Property Host As String
[C#]
public string Host {get; set;}

Return Type

The name or IP address of host of PostgreSQL database to which to connect. The default value is an empty string ("").

Example

The following example creates a PgSqlConnection and displays the host name.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString = "host=server;database=test;user id=postgres";
  PgSqlConnection myConnection = new PgSqlConnection(myConnString);
  myConnection.Open();
  MessageBox.Show("Host: " + myConnection.Host);
  myConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString As String = _
    "host=server;database=test;user id=postgres"
  Dim myConnection As New PgSqlConnection(myConnString)
  myConnection.Open()
  MessageBox.Show("Host: " + myConnection.Host)
  myConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property | ConnectionTimeout Property | Database Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LocalFailover Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : LocalFailover Property

Determines whether the ConnectionLost event, which allows implicit reconnecting and reexectuting the corresponding operation, occurs after connection is lost.

[Visual Basic]
Public Property LocalFailover As Boolean
[C#]
public bool LocalFailover {get; set;}

Return Type

If true, the ConnectionLost event occurs when connection is lost; otherwise, an exception is thrown. The default value is false.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Name Property (PgSqlConnection)

Gets or sets the name of the component.

[Visual Basic]
Public Property Name As String
[C#]
public string Name {get; set;}

Return Type

The name of the component.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Owner Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Owner Property (PgSqlConnection)

Gets or sets a form or other container that the PgSqlConnection instance belongs to.

[Visual Basic]
Public Property Owner As Object
[C#]
public object Owner {get; set;}

Return Type

A form or other container that the PgSqlConnection instance belongs to.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | UserId Property | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Password Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Password Property (PgSqlConnection)

Gets or sets the user's password to connect.

[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}

Return Type

The user's password to connect.

Remarks

When a value is assigned to this property, the PgSqlConnection is closed.

Example

The following example creates a PgSqlConnection and displays the password.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString =
      "host=server;database=test;user id=postgres;";
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();
  MessageBox.Show("Password: " + pgConnection.Password.ToString());
  pgConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString As String = _
    "host=server;database=test;user id=postgres;"
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()
  MessageBox.Show("Password: " + pgConnection.Password.ToString())
  pgConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | UserId Property | ConnectionString Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | ConnectionTimeout Property | Database Property | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Port Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Port Property (PgSqlConnection)

Gets or sets port of PostgreSQL database to which to connect.

[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}

Return Type

The port of PostgreSQL database to which to connect. The default value is 5432.

Example

The following example creates a PgSqlConnection and displays the port.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString = "User=postgres; Host=localhost; Port=5432; Database=testdb";
  PgSqlConnection myConnection = new PgSqlConnection(myConnString);
  myConnection.Open();
  MessageBox.Show("Port: " + myConnection.Port.ToString());
  myConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString As String = _
    "User=postgres; Host=localhost; Port=5432; Database=testdb"
  Dim myConnection As New PgSqlConnection(myConnString)
  myConnection.Open()
  MessageBox.Show("Port: " + myConnection.Port.ToString())
  myConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | ConnectionTimeout Property | Database Property | ConnectionString Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Protocol Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProtocolVersion Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ProtocolVersion Property (PgSqlConnection)

Gets the version of protocol to be used.

[Visual Basic]
Public ReadOnly Property ProtocolVersion As ProtocolVersion
[C#]
public ProtocolVersion ProtocolVersion {get;}

Return Type

One of ProtocolVersion values.

Remarks

Gets the protocol version set by PgSqlConnectionStringBuilder.Protocol or directly in ConnectionString.

See Also

PgSqlConnection Class | PgSqlConnection Members | Protocol Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProxyOptions Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ProxyOptions Property (PgSqlConnection)

Gets or sets proxy server settings.

[Visual Basic]
Public Property ProxyOptions As ProxyOptions
[C#]
public ProxyOptions ProxyOptions {get; set;}

Return Type

A Devart.Common.ProxyOptions object that contains settings for a proxy server.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schema Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Schema Property (PgSqlConnection)

Gets or sets the name of the schema to be used once a connection is open.

[Visual Basic]
Public Property Schema As String
[C#]
public string Schema {get; set;}

Return Type

The name of the current schema to be used once a connection is open.

Remarks

When connection is closed or in design-time, this property contains Initial Schema parameter of connection string. When connection is open the property represents name of current schema.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ServerVersion Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ServerVersion Property (PgSqlConnection)

Gets a string containing the version of the instance of PostgreSQL to which the client is connected.

[Visual Basic]
Public ReadOnly Property ServerVersion As String
[C#]
public string ServerVersion {get;}

Return Type

The version of the instance of PostgreSQL.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | SslOptions Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : SslOptions Property (PgSqlConnection)

Gets or sets SslOptions object which is used to establish secure connection with server.

[Visual Basic]
Public Property SslOptions As SslOptions
[C#]
public SslOptions SslOptions {get; set;}

Return Type

SslOptions object which is used to establish secure connection with server.

Remarks

You have to include "SSL=true" initialization parameter to ConnectionString to enable SSL data transfer.

Example

The following example shows how to enable SSL data transfer with dotConnect for PostgreSQL.

[C#]

PgSqlConnection conn = new PgSqlConnection("user id=postgres;password=postgres;host=localhost;");
conn.SslOptions.CACert = "E:\\Test\\root.crt";
conn.SslOptions.Cert = "E:\\Test\\client.crt";
conn.SslOptions.Key = "E:\\Test\\client.key";
conn.SslOptions.SslMode = SslMode.Require;
conn.Open();

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection("user id=postgres;password=postgres;host=localhost;")
conn.SslOptions.CACert = "E:\Test\root.crt"
conn.SslOptions.Cert = "E:\Test\client.crt"
conn.SslOptions.Key = "E:\Test\client.key"
conn.SslOptions.SslMode = SslMode.Require
conn.Open()

See Also

PgSqlConnection Class | PgSqlConnection Members | SslOptions Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

State Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : State Property (PgSqlConnection)

Gets the current state of the connection.

[Visual Basic]
Public Property State As ConnectionState
[C#]
public ConnectionState State {get; set;}

Return Type

A bitwise combination of the ConnectionState values. The default value is Closed.

Remarks

The allowed state changes are:

  • From Closed to Open, using the Open method of the PgSqlConnection object.
  • From Open to Closed, using either the Close method or the Dispose method of the PgSqlConnection object.

Example

The following example creates an instance of a derived class, PgSqlConnection, sets its ConnectionString, and displays its State.

[C#]

public void CreatePgSqlConnection()
{
  PgSqlConnection pgConnection = new PgSqlConnection();
  pgConnection.ConnectionString =
      "host=server;database=test;user id=postgres;";
  pgConnection.Open();
  MessageBox.Show("Connection State: " + pgConnection.State.ToString());
  pgConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim pgConnection As New PgSqlConnection()
  pgConnection.ConnectionString = _
      "host=server;database=test;user id=postgres;"
  pgConnection.Open()
  MessageBox.Show("Connection State: " + pgConnection.State.ToString())
  pgConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Unicode Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Unicode Property (PgSqlConnection)

Gets or sets a value indicating whether the UTF8 charset will be used.

[Visual Basic]
Public Property Unicode As Boolean
[C#]
public bool Unicode {get; set;}

Return Type

true, if client charset UTF8 is used; false, if default client charset is used. The default value is false.

Remarks

Sets PostgreSQL client charset to UTF8 and converts client data according to this charset.

When a value is assigned to this property, the PgSqlConnection is closed.

Example

The following two functions demonstrate how to use Unicode property to implement charset-safe string transfer.

[C#]

public void UploadString(PgSqlConnection pgConnection)
{
  pgConnection.Unicode = true;
  PgSqlCommand pgCommand = new PgSqlCommand("INSERT INTO Test.TextBlocks (BlockID, BlockName, BlockContent) VALUES(1,'First',:BlockText)", pgConnection);
  pgCommand.Parameters.Add("BlockText",PgSqlType.VarChar,50).Value = "Place here some text that requires Unicode support.";
  pgConnection.Open();
  try
  {
    Console.WriteLine(pgCommand.ExecuteNonQuery()+" rows affected.");
  }
  finally
  {
    pgConnection.Close();
  }
}

public void DownloadString(PgSqlConnection pgConnection)
{
  pgConnection.Unicode = true;
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.TextBlocks", pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader(CommandBehavior.Default);
  try
  {
    while (pgReader.Read())
    {
      string myString = (string)pgReader["BlockContent"];
      Console.WriteLine(myString);
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub UploadString(ByVal pgConnection As PgSqlConnection)
  pgConnection.Unicode = True
  Dim pgCommand As New PgSqlCommand("INSERT INTO Test.TextBlocks (BlockID, BlockName, BlockContent) VALUES(1,'First',:BlockText)", pgConnection)
  pgCommand.Parameters.Add("BlockText", PgSqlType.VarChar, 50).Value = "Place here some text that requires Unicode support."
  pgConnection.Open()
  Try
    Console.WriteLine(String.Concat(pgCommand.ExecuteNonQuery(), " rows affected."))
  Finally
    pgConnection.Close()
  End Try
End Sub

Public Sub DownloadString(ByVal pgConnection As PgSqlConnection)

  pgConnection.Unicode = True
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.TextBlocks", pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader(CommandBehavior.Default)
  Try
    While pgReader.Read()
      Dim myString As String = CType(pgReader("BlockContent"), String)
      Console.WriteLine(myString)
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | ConnectionString Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Password Property | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UserId Property

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : UserId Property (PgSqlConnection)

Gets or sets the name of the user to connect.

[Visual Basic]
Public Property UserId As String
[C#]
public string UserId {get; set;}

Return Type

The name of the user to connect.

Remarks

When a value is assigned to this property, the PgSqlConnection is closed.

Example

The following example creates a PgSqlConnection and displays the user name.

[C#]

public void CreatePgSqlConnection()
{
  string myConnString =
      "host=server;database=test;user id=postgres;";
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();
  MessageBox.Show("User: " + pgConnection.UserId);
  pgConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection()
  Dim myConnString As String = _
      "host=server;database=test;user id=postgres;"
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()
  MessageBox.Show("User: " + pgConnection.UserId)
  pgConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Password Property | ConnectionString Property


%%PageItemTitle%% $$Methods$$

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Class Methods

Devart.Data.PostgreSql Namespace : PgSqlConnection Class

For a list of all members of this type, see PgSqlConnection members.

Public Methods

Public Method BeginOpen (Inherited from Devart.Common.DbConnectionBase) | Starts an asynchronous invocation of an Open method.
Public Method BeginTransaction | Overloaded. Begins a transaction at the database.
Public Method ChangeDatabase | Overridden. Changes the current database associated with an open PgSqlConnection.
Public Method static (Shared in Visual Basic) ClearAllPools | Overloaded. Clears all pools associated with the connection.
Public Method static (Shared in Visual Basic) ClearPool | Clears the pool matching ConnectionString of provided PgSqlConnection object.
Public Method Clone | Creates a new object that is a copy of the current instance.
Public Method Close (Inherited from Devart.Common.DbConnectionBase) | Closes the connection to the database. This is the preferred method of closing any open connection.
Public Method Commit | Commits the database transaction.
Public Method CreateCommand | Creates and returns a PgSqlCommand object associated with the PgSqlConnection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndOpen (Inherited from Devart.Common.DbConnectionBase) | Ends an asynchronous invocation of the Open method.
Public Method EnlistTransaction (Inherited from Devart.Common.DbConnectionBase) | Enlists in the specified transaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetSchema (Inherited from Devart.Common.DbConnectionBase) | Overloaded. Provides information about server schema objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overridden. Opens a PostgreSQL connection with the property settings specified by the ConnectionString.
Public Method Ping | Determines whether connection to PostgreSQL server is valid.
Public Method Rollback | Rolls back a transaction from a pending state.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

BeginTransaction Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : BeginTransaction Method

Begins a transaction at the database.

Overload List

Begins a database transaction.

[Visual Basic] Overloads Public Function BeginTransaction() As PgSqlTransaction

[C#] public PgSqlTransaction BeginTransaction();

Begins a database transaction with the specified isolation level.

[Visual Basic] Overloads Public Function BeginTransaction(IsolationLevel) As PgSqlTransaction

[C#] public PgSqlTransaction BeginTransaction(IsolationLevel);

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List | PgSqlCommand Class | PgSqlTransaction Class | Commit Method | Rollback Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

BeginTransaction() Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > BeginTransaction Method : BeginTransaction() Method

Begins a database transaction.

[Visual Basic]
Overloads Public Function BeginTransaction() As PgSqlTransaction
[C#]
public PgSqlTransaction BeginTransaction();

Return Type

An object representing the new transaction.

Remarks

To commit or roll back the transaction, you must explicitly use the Commit or Rollback methods.

Example

The following example creates a PgSqlConnection and a PgSqlTransaction. It also demonstrates how to use the BeginTransaction, Commit, and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();

  PgSqlCommand pgCommand = new PgSqlCommand();
  pgCommand.Connection = pgConnection;
  PgSqlTransaction myTrans;

  // Start a local transaction
  myTrans = pgConnection.BeginTransaction();
  // Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans;

  try
  {
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    myTrans.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    myTrans.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()

  Dim pgCommand As New PgSqlCommand()
  pgCommand.Connection = pgConnection
  Dim myTrans As PgSqlTransaction

  ' Start a local transaction
  myTrans = pgConnection.BeginTransaction()
  ' Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans

  Try
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    myTrans.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    myTrans.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List | PgSqlCommand Class | PgSqlTransaction Class | Commit Method | Rollback Method


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List | PgSqlCommand Class | PgSqlTransaction Class | Commit Method | Rollback Method

Language

Visual Basic

C#

Show All

il
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

BeginTransaction(IsolationLevel) Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > BeginTransaction Method : BeginTransaction(IsolationLevel) Method

Begins a database transaction with the specified isolation level.

[Visual Basic]
Overloads Public Function BeginTransaction( _
   ByVal il As IsolationLevel _
) As PgSqlTransaction
[C#]
public PgSqlTransaction BeginTransaction(
   IsolationLevel il
);

Parameters

il

Return Type

An object representing the new transaction.

Remarks

To commit or roll back the transaction, you must explicitly use the Commit or Rollback methods.

PostrgeSQLDirect .NET supports ReadCommitted and Serializable only. To ensure that the provider transaction management model performs correctly, avoid using other transaction management models.

Example

The following example creates a PgSqlConnection and a PgSqlTransaction. It also demonstrates how to use the BeginTransaction, Commit, and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();

  PgSqlCommand pgCommand = new PgSqlCommand();
  pgCommand.Connection = pgConnection;
  PgSqlTransaction myTrans;

  // Start a local transaction
  myTrans = pgConnection.BeginTransaction(IsolationLevel.ReadCommitted);
  // Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans;

  try
  {
    pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    myTrans.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    myTrans.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()

  Dim pgCommand As New PgSqlCommand()
  pgCommand.Connection = pgConnection
  Dim myTrans As PgSqlTransaction

  ' Start a local transaction
  myTrans = pgConnection.BeginTransaction(IsolationLevel.ReadCommitted)
  ' Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans

  Try
    pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    myTrans.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    myTrans.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List | PgSqlCommand Class | PgSqlTransaction Class | Commit Method | Rollback Method


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Database Property

Language

Visual Basic

C#

Show All

databaseName
The database name.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ChangeDatabase Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ChangeDatabase Method (PgSqlConnection)

Changes the current database associated with an open PgSqlConnection.

[Visual Basic]
Overrides Public Sub ChangeDatabase( _
   ByVal databaseName As String _
)
[C#]
public override void ChangeDatabase(
   string databaseName
);

Parameters

databaseName
The database name.

Remarks

While changing the database the PgSqlConnection is closed and reopened.

See Also

PgSqlConnection Class | PgSqlConnection Members | Database Property


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ClearAllPools Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ClearAllPools Method

Clears all pools associated with the connection.

Overload List

Clears all pools associated with the connection.

[Visual Basic] Overloads Public Shared Sub ClearAllPools()

[C#] public static void ClearAllPools();

Clears all pools associated with the connection.

[Visual Basic] Overloads Public Shared Sub ClearAllPools(Boolean)

[C#] public static void ClearAllPools(bool);

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ClearAllPools() Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > ClearAllPools Method : ClearAllPools() Method

Clears all pools associated with the connection.

[Visual Basic]
Overloads Public Shared Sub ClearAllPools()
[C#]
public static void ClearAllPools();

Remarks

Pools are automatically cleared if a connection is idle for some time or closed by the server. Call ClearAllPools to force explicit pools clearance.

ClearAllPools method does not immediately clear the pools. The operation is started in approximately 30 seconds. The main thread of the application is not blocked.

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Overload List

Language

Visual Basic

C#

Show All

forced
Determines whether to start the operation immediately, or after the timeout.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ClearAllPools(Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class > ClearAllPools Method : ClearAllPools(Boolean) Method

Clears all pools associated with the connection.

[Visual Basic]
Overloads Public Shared Sub ClearAllPools( _
   ByVal forced As Boolean _
)
[C#]
public static void ClearAllPools(
   bool forced
);

Parameters

forced
Determines whether to start the operation immediately, or after the timeout.

Remarks

Pools are automatically cleared if a connection is idle for some time or closed by the server. Call the ClearAllPools method to force explicit pools clearance.

Note: if forced=false, this function is equivalent to ClearAllPools.

If there are many opened connections, immediate pool clearing can cause high server load, so it is recommended to use forced = false.

See Also

PgSqlConnection Class | PgSqlConnection Members | Overload List


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

connection
A connection that holds ConnectionString that identifies pool to clear.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ClearPool Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ClearPool Method

Clears the pool matching ConnectionString of provided PgSqlConnection object.

[Visual Basic]
Public Shared Sub ClearPool( _
   ByVal connection As PgSqlConnection _
)
[C#]
public static void ClearPool(
   PgSqlConnection connection
);

Parameters

connection
A connection that holds ConnectionString that identifies pool to clear.

Remarks

Pool is automatically cleared if a connection is idle for some time or closed by the server. Call ClearPool to force explicit pool clearance.

ClearPool does not immediately clear the pool. The operation is started in approximately 30 seconds. The main thread of the application is not blocked.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clone Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Clone Method (PgSqlConnection)

Creates a new object that is a copy of the current instance.

[Visual Basic]
Public Function Clone() As Object
[C#]
public object Clone();

Return Type

A new PgSqlConnection object.

Remarks

Creates a new PgSqlConnection object with the properties that have the same values as those of the original object. However, changing properties of the new object has no influence on the values of the same properties of the original object.

Note that state of the new instance is always Closed, regardless of the state of original instance.

Example

This example shows how to clone a PgSqlConnection. To make sure all the properties are inherited, one of them (UserId) is written to the console.

[C#]

public void CloneAConnection()
{
  PgSqlConnection pgConnection = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  PgSqlConnection pgConnection2 = (PgSqlConnection)pgConnection.Clone();
  Console.WriteLine(pgConnection2.UserId);
}

[Visual Basic]

Public Sub CloneAConnection()
  Dim pgConnection As New PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  Dim pgConnection2 As PgSqlConnection = CType(pgConnection.Clone(), PgSqlConnection)
  Console.WriteLine(pgConnection2.UserId)
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Rollback Method | BeginTransaction Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Commit Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Commit Method (PgSqlConnection)

Commits the database transaction.

[Visual Basic]
Public Sub Commit()
[C#]
public void Commit();

Example

The following example demonstrates how to use Commit and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();
  PgSqlCommand pgCommand = new PgSqlCommand();
  pgCommand.Connection = pgConnection;
  pgConnection.BeginTransaction();
  try
  {
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    pgConnection.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    pgConnection.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()
  Dim pgCommand As New PgSqlCommand()
  pgCommand.Connection = pgConnection
  pgConnection.BeginTransaction()
  Try
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    pgConnection.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    pgConnection.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Rollback Method | BeginTransaction Method


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateCommand Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : CreateCommand Method (PgSqlConnection)

Creates and returns a PgSqlCommand object associated with the PgSqlConnection.

[Visual Basic]
Public Function CreateCommand() As PgSqlCommand
[C#]
public PgSqlCommand CreateCommand();

Return Type

A PgSqlCommand object.

Remarks

You can use this method as an alternative to common PgSqlCommand constructors.

Example

In this sample PgSqlCommand object is created. It is automatically associated with PgSqlConnection that created it.

[C#]

public void CreatePgSqlCommand(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  PgSqlCommand pgCommand = pgConnection.CreateCommand();
  pgCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')";
  pgConnection.Open();
  try
  {
    pgCommand.ExecuteNonQuery();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub CreatePgSqlCommand(ByVal myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  Dim pgCommand As PgSqlCommand = pgConnection.CreateCommand()
  pgCommand.CommandText = "INSERT INTO DEPT VALUES (50,'Development','Philadelphia')"
  pgConnection.Open()
  Try
    pgCommand.ExecuteNonQuery()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | PgSqlCommand Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Close Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Open Method (PgSqlConnection)

Opens a PostgreSQL connection with the property settings specified by the ConnectionString.

[Visual Basic]
Overrides Public Sub Open()
[C#]
public override void Open();

Remarks

The PgSqlConnection draws an open connection from the connection pool if one is available. Otherwise, it establishes a new connection to the data source.

Note: If the PgSqlConnection goes out of scope, the connection it represents does not close automatically. Therefore, you must explicitly close the connection by calling Close.

Opening an open connection does nothing.

Example

The following example creates a PgSqlConnection, opens it, displays some of its properties, and then closes the connection.

[C#]

public void CreatePgSqlConnection(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();
  MessageBox.Show("ServerVersion: " + pgConnection.ServerVersion
    + "\nState: " + pgConnection.State.ToString());
  pgConnection.Close();
}

[Visual Basic]

Public Sub CreatePgSqlConnection(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()
  MessageBox.Show("ServerVersion: " + pgConnection.ServerVersion _
    + ControlChars.Cr + "State: " + pgConnection.State.ToString())
  pgConnection.Close()
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Close Method


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Ping Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Ping Method

Determines whether connection to PostgreSQL server is valid.

[Visual Basic]
Public Function Ping() As Boolean
[C#]
public bool Ping();

Return Type

true, if the connection is valid; otherwise, false.

Remarks

If the application has an open connection for a long time, it is recommended to check a connection for validation before using it. Call of Ping method has single round trip on PostgreSQL server.

It is not a good idea to keep a connection open for long time. Connection pool automatically pings all connections within, thus closing old connections and opening new ones is encouraged.

Example

This code sample shows how to check for server availability before issuing a query.

[C#]

public void ExecuteSafely(MySqlConnection myConnection)
{
  MySqlCommand myCommand = new MySqlCommand("INSERT INTO Test.Dept(DeptNo, DName) Values('50', 'DEVELOPMENT')");
  myCommand.Connection = myConnection;
  try
  {
    if (myConnection.Ping())
    {
      myCommand.ExecuteNonQuery();
      Console.WriteLine("Successfully executed");
    }
    else
    {
      myConnection.Close();
      Console.WriteLine("Unable to ping the server");
    }
  }
  catch
  {
    myConnection.Close();
    Console.WriteLine("Error during query execution");
  }
}

[Visual Basic]

Public Sub ExecuteSafely(ByVal myConnection As MySqlConnection)
  Dim myCommand As New MySqlCommand("INSERT INTO Test.Dept(DeptNo, DName) Values('50', 'DEVELOPMENT')")
  myCommand.Connection = myConnection
  Try
    If (myConnection.Ping()) Then
      myCommand.ExecuteNonQuery()
      Console.WriteLine("Successfully executed")
    Else
      myConnection.Close()
      Console.WriteLine("Unable to ping the server")
    End If
  Catch
    myConnection.Close()
    Console.WriteLine("Error during query")
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | Commit Method | BeginTransaction Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rollback Method

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Rollback Method (PgSqlConnection)

Rolls back a transaction from a pending state.

[Visual Basic]
Public Sub Rollback()
[C#]
public void Rollback();

Example

The following example demonstrates how to use Commit and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();

  PgSqlCommand pgCommand = new PgSqlCommand();
  pgConnection.BeginTransaction();
  try
  {
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    pgConnection.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    pgConnection.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()

  Dim pgCommand As New PgSqlCommand()
  pgConnection.BeginTransaction()
  Try
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    pgConnection.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    pgConnection.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlConnection Class | PgSqlConnection Members | Commit Method | BeginTransaction Method


%%PageItemTitle%% $$Events$$

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnection Class Events

Devart.Data.PostgreSql Namespace : PgSqlConnection Class

For a list of all members of this type, see PgSqlConnection members.

Public Events

Public Event ConnectionLost | Occurs when connection to the data source is lost in case LocalFailover is set to true. You may use this event to implicitly reconnect and reexecute the current operation.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | Occurs when PostgreSQL server sends an error message.
Public Event InfoMessage | Occurs when PostgreSQL returns a warning or informational message.
Public Event Notification | Occurs when PostgreSQL server provides a notification message.
Public Event StateChange (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the connection changes.
Public Event TransactionStateChanged (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the transaction is changed.
Public Event TransactionStateChanging (Inherited from Devart.Common.DbConnectionBase) | Occurs when the state of the transaction is changing.

See Also

PgSqlConnection Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | ConnectionLostEventHandler Delegate

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionLost Event

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : ConnectionLost Event

Occurs when connection to the data source is lost in case LocalFailover is set to true. You may use this event to implicitly reconnect and reexecute the current operation.

[Visual Basic]
Public Event ConnectionLost() As ConnectionLostEventHandler
[C#]
public event ConnectionLostEventHandler ConnectionLost();

See Also

PgSqlConnection Class | PgSqlConnection Members | ConnectionLostEventHandler Delegate


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | PgSqlErrorEventArgs Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Error Event

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Error Event (PgSqlConnection)

Occurs when PostgreSQL server sends an error message.

[Visual Basic]
Public Event Error() As PgSqlErrorEventHandler
[C#]
public event PgSqlErrorEventHandler Error();

Event Data

The event handler receives an argument of type PgSqlErrorEventArgs containing data related to this event. The following PgSqlErrorEventArgs properties provide information specific to this event.

Property | Description
Error | Gets the PgSqlError sent from the database.

Remarks

This event is fired when PostgreSQL server sends a message with Severity .Error. To trap other messages you should listen to the PgSqlConnection.InfoMessage event.

Immediately after the event is processed, an exception is raised.

See Also

PgSqlConnection Class | PgSqlConnection Members | PgSqlErrorEventArgs Class


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InfoMessage Event

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : InfoMessage Event

Occurs when PostgreSQL returns a warning or informational message.

[Visual Basic]
Public Event InfoMessage() As PgSqlInfoMessageEventHandler
[C#]
public event PgSqlInfoMessageEventHandler InfoMessage();

Event Data

The event handler receives an argument of type PgSqlInfoMessageEventArgs containing data related to this event. The following PgSqlInfoMessageEventArgs properties provide information specific to this event.

Property | Description
Errors | Gets the collection of messages sent from server.
Message | Gets the text describing the message.

Remarks

Clients that want to process warnings or informational messages sent by the server should create a __Delegates.PgSqlInfoMessageEventHandler delegate to listen to this event.

This event is fired when PostgreSQL server sends a message or multiple messages with Severity other than Severity.Error. To trap the errors you should listen to the PgSqlConnection.Error event.

See Also

PgSqlConnection Class | PgSqlConnection Members


%%PageItemTitle%%

PgSqlConnection Class | PgSqlConnection Members | PgSqlAlerter Class | InfoMessage Event | Error Event | PgSqlNotificationEventArgs Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Notification Event

Devart.Data.PostgreSql Namespace > PgSqlConnection Class : Notification Event

Occurs when PostgreSQL server provides a notification message.

[Visual Basic]
Public Event Notification() As PgSqlNotificationEventHandler
[C#]
public event PgSqlNotificationEventHandler Notification();

Event Data

The event handler receives an argument of type PgSqlNotificationEventArgs containing data related to this event. The following PgSqlNotificationEventArgs properties provide information specific to this event.

Property | Description
AdditionalMessage | Gets the additional information passed from the notifying process.
Condition | Gets the name of the notify condition.
ProcessId | Gets the ID of the notifying back-end process.

Remarks

This event is fired when you receive a notification through LISTEN/NOTIFY mechanism. In addition to this event, you can use the PgSqlAlerter class for working with PostgreSQL notifications.

Example

The following example demonstrates using Listening with dotConnect for PostgreSQL. You can execute "notify "listen_point"" at the server side to check this code.

[C#]

using System;
using Devart.Data.PostgreSql;
using System.Threading;

namespace ConsoleApplication3 {
    class Program {
        static System.Threading.Timer timer;
        static PgSqlConnection connection;
        static void Main(string[] args) {
            connection = new PgSqlConnection();
            connection.ConnectionString = "host=db; user id=postgres; password=postgres; database=postgres; schema=public; port=5438;";
            connection.Open();
            connection.Notification += new PgSqlNotificationEventHandler(ConnectionNotification);
            PgSqlCommand listenCommand = new PgSqlCommand("listen \"listen_point\"", connection);
            listenCommand.ExecuteNonQuery();

            System.Threading.TimerCallback timerDelegate = new TimerCallback(Check);
            timer = new System.Threading.Timer(timerDelegate, null, 1000, 3000);
            Console.ReadLine();
        }
        private static void ConnectionNotification(object sender, PgSqlNotificationEventArgs e) {

            string s = e.Condition;
            if (s != null && s == "listen_point") {

                // TODO: this code will be executed

            }
        }
        private static void Check(Object stateInfo) {

            //some command should be executed to check the notification
            PgSqlCommand listenCommand = new PgSqlCommand("select 1", connection);
            listenCommand.ExecuteNonQuery();
        }
    }
}

[Visual Basic]

Imports System
Imports Devart.Data.PostgreSql
Imports System.Threading
Module Module1
    Dim timer As System.Threading.Timer
    Dim connection As PgSqlConnection
    Sub Main()
        connection = New PgSqlConnection()
        connection.ConnectionString = "host=db; user id=postgres; password=postgres; database=postgres; schema=public; port=5438;"
        connection.Open()
        AddHandler connection.Notification, New PgSqlNotificationEventHandler(AddressOf ConnectionNotification)
        Dim listenCommand As New PgSqlCommand("listen ""listen_point""", connection)
        listenCommand.ExecuteNonQuery()
        Dim timerDelegate As New TimerCallback(AddressOf Check)
        timer = New System.Threading.Timer(timerDelegate, Nothing, 1000, 3000)
        Console.ReadLine()
    End Sub
    Private Sub ConnectionNotification(ByVal sender As Object, ByVal e As PgSqlNotificationEventArgs)

        Dim s As String = e.Condition
        If (s <> Nothing And s = "listen_point") Then

            ' TODO: this code will be executed

        End If
    End Sub
    Private Sub Check(ByVal stateInfo As Object)
        'some command should be executed to check the notification
        Dim listenCommand As New PgSqlCommand("select 1", connection)
        listenCommand.ExecuteNonQuery()
    End Sub

End Module

See Also

PgSqlConnection Class | PgSqlConnection Members | PgSqlAlerter Class | InfoMessage Event | Error Event | PgSqlNotificationEventArgs Class


%%PageItemTitle%%

PgSqlConnectionStringBuilder Members | Devart.Data.PostgreSql Namespace | ConnectionString Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Class

Devart.Data.PostgreSql Namespace : PgSqlConnectionStringBuilder Class

Generates automatically connection strings used to connect to PostgreSQL.

For a list of all members of this type, see PgSqlConnectionStringBuilder members.

Inheritance Hierarchy

System.Object
System.Data.Common.DbConnectionStringBuilder
Devart.Common.DbConnectionStringBuilder
Devart.Data.PostgreSql.PgSqlConnectionStringBuilder

Syntax

[Visual Basic]
Public Class PgSqlConnectionStringBuilder
   Inherits DbConnectionStringBuilder
   Implements ICollection, IDictionary, IEnumerable, ICustomTypeDescriptor
[C#]
public class PgSqlConnectionStringBuilder : DbConnectionStringBuilder, ICollection, IDictionary, IEnumerable, ICustomTypeDescriptor

Remarks

The PgSqlConnectionStringBuilder allows you to construct a connection string by assigning values to corresponding properties. After you have initialized all connection properties you need, use ConnectionString property or ToString method to obtain the connection string built.

See Also

PgSqlConnectionStringBuilder Members | Devart.Data.PostgreSql Namespace | ConnectionString Property


%%PageItemTitle%% $$Members$$

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Class Members

Devart.Data.PostgreSql Namespace : PgSqlConnectionStringBuilder Class

PgSqlConnectionStringBuilder overview

Public Constructors

Public Constructor PgSqlConnectionStringBuilder Constructor Overloaded. Initializes a new instance of the PgSqlConnectionStringBuilder class.

Public Properties

Public Property AllowDateTimeOffset | Determines whether to use the DateTimeOffset type instead of DateTime when PgSqlDataReader returns a timestamptz value.
Public Property ApplicationName | Gets or sets the client application name.
Public Property Charset | Gets or sets charset that will be used on the client side.
Public Property ConnectionLifetime | Gets or sets time span in seconds for connection to live.
Public Property ConnectionString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets or sets the connection string associated with the DbConnectionStringBuilder.
Public Property ConnectionTimeout | Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Count (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets the current number of keys that are contained within the ConnectionString property.
Public Property Database | Gets or sets the name of the database to be used once a connection is open.
Public Property DefaultCommandTimeout | Gets or sets the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.
Public Property DefaultFetchAll | Determines the default value of the FetchAll property of PgSqlCommand instances, created via the CreateCommand method. If the FetchAll mode is enabled, PgSqlDataReader object retrieves all the querried data from the server on execution.
Public Property Enlist | Gets or sets a Boolean value that indicates whether the connection is automatically enlisted in the current transaction context.
Public Property Host | Gets or sets name or IP address of host of PostgreSQL database to which to connect.
Public Property IgnoreUnnamedParameters | Determines whether to treat the '?' character in CommandText as an unnamed parameter.
Public Property InitializationCommand (Inherited from Devart.Common.DbConnectionStringBuilder) | Specifies a data source-specific command that should be executed immediately after establishing the connection.
Public Property IntegratedSecurity | Determines whether to use a secure authentication with single sign-on (GSSAPI or SSPI, depending on the server).
Public Property IsFixedSize | Overridden. Returns true.
Public Property IsReadOnly (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder is read-only.
Public Property Item | Overridden. Returns the value of given key.
Public Property KeepAlive | Specifies whether to send TCP keep-alive packets and the interval at which they are sent in seconds. Default value is 0, which means that the packets are not sent.
Public Property Keys | Overridden. Collection of keys in the PgSqlConnectionStringBuilder.
Public Property MaxPoolSize | The maximum number of connections allowed in the pool.
Public Property MinPoolSize | The minimum number of connections allowed in the pool.
Public Property Password | Gets or sets the user's password to connect.
Public Property PersistSecurityInfo | Gets or sets a value indicating whether password is stored in connection string after connection is opened.
Public Property Pooling | Gets or sets pooling mode.
Public Property Port | Gets or sets port of PostgreSQL database to which to connect.
Public Property Protocol | Gets or sets version of protocol to be used.
Public Property ProxyHost | Gets or sets the host name or IP address of the proxy server to which to connect.
Public Property ProxyPassword | Gets or sets the password for the proxy server account.
Public Property ProxyPort | Gets or sets the port number of the proxy server.
Public Property ProxyUser | Gets or sets the proxy server account name.
Public Property Schema | Gets or sets PostgreSQL schema to use.
Public Property SslCACert | Gets or sets location of authority certificate.
Public Property SslCert | Gets or sets the location of the client SSL certificate.
Public Property SslCipherList | Gets or sets list of ciphers that client agrees to use.
Public Property SslKey | Gets or sets location of user's private key.
Public Property SslMode | Gets or sets SSL connection priority.
Public Property TransactionErrorBehavior | Determines whether to roll back a transaction automatically when an error occurs inside the transaction.
Public Property TransactionScopeLocal | Enables support for non-distributed transactions in the TransactionScope implementation.
Public Property Unicode | Gets or sets a value indicating whether the UTF8 charset will be used.
Public Property UnpreparedExecute | Sets the default value of the PgSqlCommand.UnpreparedExecute property of PgSqlCommand instances.
Public Property UserId | Gets or sets the name of the user to connect.
Public Property ValidateConnection | Indicates whether to validate connections that are being taken from the pool.
Public Property Values | Overridden. Collection of values in the PgSqlConnectionStringBuilder.

Public Methods

Public Method Add (Inherited from System.Data.Common.DbConnectionStringBuilder) | Adds an entry with the specified key and value into the DbConnectionStringBuilder.
Public Method Clear | Overridden. Sets all PgSqlConnectionStringBuilder properties to default values.
Public Method ContainsKey | Overridden. Indicates whether specified key is set in the PgSqlConnectionStringBuilder object.
Public Method EquivalentTo | Overloaded. Overridden. Returns a value indicating whether this PgSqlConnectionStringBuilder has same parameters as given DbConnectionStringBuilder.
Public Method Remove | Overridden. Sets value of the specified key to default.
Public Method ShouldSerialize | Overridden. Determines whether the key will be serialized if required.
Public Method ToString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Returns the connection string associated with this DbConnectionStringBuilder.
Public Method TryGetValue | Overridden. Attempts to get a key value.

See Also

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Constructor

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : PgSqlConnectionStringBuilder Constructor (PgSqlConnectionStringBuilder)

Initializes a new instance of the PgSqlConnectionStringBuilder class.

Overload List

Initializes a new instance of the PgSqlConnectionStringBuilder class.

[Visual Basic] Public Sub New()

[C#] public PgSqlConnectionStringBuilder();

Initializes a new instance of the PgSqlConnectionStringBuilder class and assigns custom initial values to some properties.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlConnectionStringBuilder(string);

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Constructor()

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class > PgSqlConnectionStringBuilder Constructor : PgSqlConnectionStringBuilder Constructor()

Initializes a new instance of the PgSqlConnectionStringBuilder class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlConnectionStringBuilder();

Remarks

When a new instance of PgSqlConnectionStringBuilder is created, its properties are set to the following initial values:
Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Password | empty string ("")
UserId | empty string ("")

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List

Language

Visual Basic

C#

Show All

connectionString
Initial connection setup string.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class > PgSqlConnectionStringBuilder Constructor : PgSqlConnectionStringBuilder Constructor(String)

Initializes a new instance of the PgSqlConnectionStringBuilder class and assigns custom initial values to some properties.

[Visual Basic]
Public Function New( _
   ByVal connectionString As String _
)
[C#]
public PgSqlConnectionStringBuilder(
   string connectionString
);

Parameters

connectionString
Initial connection setup string.

Remarks

When a new instance of PgSqlConnectionStringBuilder is created, its properties are set to the following initial values unless they are specifically set using their associated keywords in the connectionString parameter.
Properties | Initial Value
ConnectionString | empty string ("")
ConnectionTimeout | 15
Password | empty string ("")
UserId | empty string ("")
If the connectionString parameter can not be parsed, an exception is thrown and the object is not created.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Class Properties

Devart.Data.PostgreSql Namespace : PgSqlConnectionStringBuilder Class

For a list of all members of this type, see PgSqlConnectionStringBuilder members.

Public Properties

Public Property AllowDateTimeOffset | Determines whether to use the DateTimeOffset type instead of DateTime when PgSqlDataReader returns a timestamptz value.
Public Property ApplicationName | Gets or sets the client application name.
Public Property Charset | Gets or sets charset that will be used on the client side.
Public Property ConnectionLifetime | Gets or sets time span in seconds for connection to live.
Public Property ConnectionString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets or sets the connection string associated with the DbConnectionStringBuilder.
Public Property ConnectionTimeout | Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.
Public Property Count (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets the current number of keys that are contained within the ConnectionString property.
Public Property Database | Gets or sets the name of the database to be used once a connection is open.
Public Property DefaultCommandTimeout | Gets or sets the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.
Public Property DefaultFetchAll | Determines the default value of the FetchAll property of PgSqlCommand instances, created via the CreateCommand method. If the FetchAll mode is enabled, PgSqlDataReader object retrieves all the querried data from the server on execution.
Public Property Enlist | Gets or sets a Boolean value that indicates whether the connection is automatically enlisted in the current transaction context.
Public Property Host | Gets or sets name or IP address of host of PostgreSQL database to which to connect.
Public Property IgnoreUnnamedParameters | Determines whether to treat the '?' character in CommandText as an unnamed parameter.
Public Property InitializationCommand (Inherited from Devart.Common.DbConnectionStringBuilder) | Specifies a data source-specific command that should be executed immediately after establishing the connection.
Public Property IntegratedSecurity | Determines whether to use a secure authentication with single sign-on (GSSAPI or SSPI, depending on the server).
Public Property IsFixedSize | Overridden. Returns true.
Public Property IsReadOnly (Inherited from System.Data.Common.DbConnectionStringBuilder) | Gets a value that indicates whether the DbConnectionStringBuilder is read-only.
Public Property Item | Overridden. Returns the value of given key.
Public Property KeepAlive | Specifies whether to send TCP keep-alive packets and the interval at which they are sent in seconds. Default value is 0, which means that the packets are not sent.
Public Property Keys | Overridden. Collection of keys in the PgSqlConnectionStringBuilder.
Public Property MaxPoolSize | The maximum number of connections allowed in the pool.
Public Property MinPoolSize | The minimum number of connections allowed in the pool.
Public Property Password | Gets or sets the user's password to connect.
Public Property PersistSecurityInfo | Gets or sets a value indicating whether password is stored in connection string after connection is opened.
Public Property Pooling | Gets or sets pooling mode.
Public Property Port | Gets or sets port of PostgreSQL database to which to connect.
Public Property Protocol | Gets or sets version of protocol to be used.
Public Property ProxyHost | Gets or sets the host name or IP address of the proxy server to which to connect.
Public Property ProxyPassword | Gets or sets the password for the proxy server account.
Public Property ProxyPort | Gets or sets the port number of the proxy server.
Public Property ProxyUser | Gets or sets the proxy server account name.
Public Property Schema | Gets or sets PostgreSQL schema to use.
Public Property SslCACert | Gets or sets location of authority certificate.
Public Property SslCert | Gets or sets the location of the client SSL certificate.
Public Property SslCipherList | Gets or sets list of ciphers that client agrees to use.
Public Property SslKey | Gets or sets location of user's private key.
Public Property SslMode | Gets or sets SSL connection priority.
Public Property TransactionErrorBehavior | Determines whether to roll back a transaction automatically when an error occurs inside the transaction.
Public Property TransactionScopeLocal | Enables support for non-distributed transactions in the TransactionScope implementation.
Public Property Unicode | Gets or sets a value indicating whether the UTF8 charset will be used.
Public Property UnpreparedExecute | Sets the default value of the PgSqlCommand.UnpreparedExecute property of PgSqlCommand instances.
Public Property UserId | Gets or sets the name of the user to connect.
Public Property ValidateConnection | Indicates whether to validate connections that are being taken from the pool.
Public Property Values | Overridden. Collection of values in the PgSqlConnectionStringBuilder.

See Also

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AllowDateTimeOffset Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : AllowDateTimeOffset Property

Determines whether to use the DateTimeOffset type instead of DateTime when PgSqlDataReader returns a timestamptz value.

[Visual Basic]
Public Property AllowDateTimeOffset As Boolean
[C#]
public bool AllowDateTimeOffset {get; set;}

Return Type

true, if the DateTimeOffset type should be used; otherwise false. Default valuse if false.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ApplicationName Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ApplicationName Property

Gets or sets the client application name.

[Visual Basic]
Public Property ApplicationName As String
[C#]
public string ApplicationName {get; set;}

Return Type

The client application name. The default value is an empty string (""). This value changes only when the application explicitly updates it.

Remarks

Can be any string of less than 64 characters (in a standard PostgreSQL build). Should include only printable ASCII characters; any other characters will be replaced with question marks (?).The application name will be displayed in the pg_stat_activity view and may be included in the server log entries.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Charset Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Charset Property (PgSqlConnectionStringBuilder)

Gets or sets charset that will be used on the client side.

[Visual Basic]
Public Property Charset As String
[C#]
public string Charset {get; set;}

Return Type

String that represents charset supported by PostgreSQL server.

Remarks

By default, charset is equal to PostgreSQL server encoding run-time parameter. You can set this property to convert string data returned by the server to the specified charset used by your application. For example, if your database encoding is KOI8 but your application uses WIN1251 charset you can set this property to WIN to convert KOI8 strings to WIN1251. You also can use Unicode property to transfer all data in the UTF8 charset, but it may significant reduce network traffic and thus decrease application performance.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionLifetime Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ConnectionLifetime Property

Gets or sets time span in seconds for connection to live.

[Visual Basic]
Public Property ConnectionLifetime As Integer
[C#]
public int ConnectionLifetime {get; set;}

Return Type

Number of seconds for connection to live.

Remarks

When a connection is returned to the pool, its creation time is compared with the current time, and the connection is destroyed if that time span (in seconds) exceeds the value specified by Connection Lifetime. The default value is 0 (connection always returns to pool).

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConnectionTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ConnectionTimeout Property (PgSqlConnectionStringBuilder)

Gets or sets the time to wait while trying to establish a connection before terminating the attempt and generating an error.

[Visual Basic]
Public Property ConnectionTimeout As Integer
[C#]
public int ConnectionTimeout {get; set;}

Return Type

The time (in seconds) to wait for a connection to open. The default value is 15 seconds.

Remarks

A value of 0 indicates no limit, and should be avoided, because an attempt to connect will wait indefinitely.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Database Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Database Property (PgSqlConnectionStringBuilder)

Gets or sets the name of the database to be used once a connection is open.

[Visual Basic]
Public Property Database As String
[C#]
public string Database {get; set;}

Return Type

The name of the database to be used once a connection is open. The default value is an empty string ("").

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DefaultCommandTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : DefaultCommandTimeout Property (PgSqlConnectionStringBuilder)

Gets or sets the time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.

[Visual Basic]
Public Property DefaultCommandTimeout As Integer
[C#]
public int DefaultCommandTimeout {get; set;}

Return Type

The time in seconds to wait while trying to execute a command before terminating the attempt and generating an error.

Remarks

A value of 0 indicates no limit. The default value is 30.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DefaultFetchAll Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : DefaultFetchAll Property

Determines the default value of the FetchAll property of PgSqlCommand instances, created via the CreateCommand method. If the FetchAll mode is enabled, PgSqlDataReader object retrieves all the querried data from the server on execution.

[Visual Basic]
Public Property DefaultFetchAll As Boolean
[C#]
public bool DefaultFetchAll {get; set;}

Return Type

If true, PgSqlDataReader object retrieves all the querried data from the server when executing a PgSqlCommand instance, created via the CreateCommand method.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Enlist Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Enlist Property

Gets or sets a Boolean value that indicates whether the connection is automatically enlisted in the current transaction context.

[Visual Basic]
Public Property Enlist As Boolean
[C#]
public bool Enlist {get; set;}

Return Type

true, if the connection is automatically enlisted in the current transaction context; false otherwise.

Remarks

This property corresponds to the "Enlist" key within the connection string. The default value is true. This property is not available in Mobile Edition.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Host Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Host Property (PgSqlConnectionStringBuilder)

Gets or sets name or IP address of host of PostgreSQL database to which to connect.

[Visual Basic]
Public Property Host As String
[C#]
public string Host {get; set;}

Return Type

The name or IP address of host of PostgreSQL database to which to connect. The default value is an empty string ("").

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IgnoreUnnamedParameters Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : IgnoreUnnamedParameters Property

Determines whether to treat the '?' character in CommandText as an unnamed parameter.

[Visual Basic]
Public Property IgnoreUnnamedParameters As Boolean
[C#]
public bool IgnoreUnnamedParameters {get; set;}

Return Type

true, if the '?' characters in CommandText should not be treated as unnamed parameters; otherwise false. Default valuse if false.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IntegratedSecurity Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : IntegratedSecurity Property

Determines whether to use a secure authentication with single sign-on (GSSAPI or SSPI, depending on the server).

[Visual Basic]
Public Property IntegratedSecurity As Boolean
[C#]
public bool IntegratedSecurity {get; set;}

Return Type

true, if the secure authentication with single sign-on should be used; otherwise false. Default valuse if false.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsFixedSize Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : IsFixedSize Property (PgSqlConnectionStringBuilder)

Returns true.

[Visual Basic]
Overrides Public ReadOnly Property IsFixedSize As Boolean
[C#]
public override bool IsFixedSize {get;}

Return Type

Always true.

Remarks

The value of this property is always true because connection string can consist of fixed number of keys.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
The key name.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Item Property (PgSqlConnectionStringBuilder)

Returns the value of given key.

[Visual Basic]
Overrides Public Default Property Item( _
   ByVal keyword As String _
) As Object
[C#]
public override object this[
   string keyword
]; {get; set;}

Parameters

keyword
The key name.

Return Type

Value of given key.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

KeepAlive Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : KeepAlive Property

Specifies whether to send TCP keep-alive packets and the interval at which they are sent in seconds. Default value is 0, which means that the packets are not sent.

[Visual Basic]
Public Property KeepAlive As Integer
[C#]
public int KeepAlive {get; set;}

Return Type

Interval in seconds between sending TCP keep-alive packets.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Values Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Keys Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Keys Property

Collection of keys in the PgSqlConnectionStringBuilder.

[Visual Basic]
Overrides Public ReadOnly Property Keys As ICollection
[C#]
public override ICollection Keys {get;}

Return Type

Collection of keys.

Remarks

PgSqlConnectionStringBuilder contains two collections: Keys and Values. Collection items with the same index contain key-value pairs. Use these collections to get indexed access to properties and values of PgSqlConnectionStringBuilder.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Values Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MaxPoolSize Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : MaxPoolSize Property

The maximum number of connections allowed in the pool.

[Visual Basic]
Public Property MaxPoolSize As Integer
[C#]
public int MaxPoolSize {get; set;}

Return Type

Number of connections allowed in the pool. The default value is 100.

Remarks

Setting the Max Pool Size value of the ConnectionString can affect performance.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MinPoolSize Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : MinPoolSize Property

The minimum number of connections allowed in the pool.

[Visual Basic]
Public Property MinPoolSize As Integer
[C#]
public int MinPoolSize {get; set;}

Return Type

Number of connections allowed in the pool. The default value is 0.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Password Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Password Property (PgSqlConnectionStringBuilder)

Gets or sets the user's password to connect.

[Visual Basic]
Public Property Password As String
[C#]
public string Password {get; set;}

Return Type

The user's password to connect.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PersistSecurityInfo Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : PersistSecurityInfo Property

Gets or sets a value indicating whether password is stored in connection string after connection is opened.

[Visual Basic]
Public Property PersistSecurityInfo As Boolean
[C#]
public bool PersistSecurityInfo {get; set;}

Return Type

If true, ConnectionString remains unaltered after opening connection; otherwise, password is removed. The default value is false.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Pooling Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Pooling Property

Gets or sets pooling mode.

[Visual Basic]
Public Property Pooling As Boolean
[C#]
public bool Pooling {get; set;}

Return Type

If true (the default value), when a PgSqlConnection is closed, the internal connection object is not actually closed, and is placed object is drawn from the appropriate pool or is created and added to the appropriate pool.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Port Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Port Property (PgSqlConnectionStringBuilder)

Gets or sets port of PostgreSQL database to which to connect.

[Visual Basic]
Public Property Port As Integer
[C#]
public int Port {get; set;}

Return Type

The port of PostgreSQL database to which to connect. The default value is 5432.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | ProtocolVersion Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Protocol Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Protocol Property

Gets or sets version of protocol to be used.

[Visual Basic]
Public Property Protocol As ProtocolVersion
[C#]
public ProtocolVersion Protocol {get; set;}

Return Type

One of ProtocolVersion values.

Remarks

You can optionally set Protocol property to ProtocolVersion.Ver20 to force using of 2.0 version on servers that have 3.0 selected by default (PostgreSQL servers 7.4 and higher).

Note that for PostgreSQL versions lower than 7.4, you must explicitly set it to ProtocolVersion.Ver20. Otherwise, you will get an error.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | ProtocolVersion Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProxyHost Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ProxyHost Property

Gets or sets the host name or IP address of the proxy server to which to connect.

[Visual Basic]
Public Property ProxyHost As String
[C#]
public string ProxyHost {get; set;}

Return Type

The host name or IP address of proxy server.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProxyPassword Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ProxyPassword Property

Gets or sets the password for the proxy server account.

[Visual Basic]
Public Property ProxyPassword As String
[C#]
public string ProxyPassword {get; set;}

Return Type

The password for the proxy server account.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProxyPort Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ProxyPort Property

Gets or sets the port number of the proxy server.

[Visual Basic]
Public Property ProxyPort As Integer
[C#]
public int ProxyPort {get; set;}

Return Type

The port number of the proxy server. The default value is 3128.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProxyUser Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ProxyUser Property

Gets or sets the proxy server account name.

[Visual Basic]
Public Property ProxyUser As String
[C#]
public string ProxyUser {get; set;}

Return Type

The proxy server account name.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schema Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Schema Property (PgSqlConnectionStringBuilder)

Gets or sets PostgreSQL schema to use.

[Visual Basic]
Public Property Schema As String
[C#]
public string Schema {get; set;}

Return Type

PostgreSQL schema to use.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslCACert Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SslCACert Property

Gets or sets location of authority certificate.

[Visual Basic]
Public Property SslCACert As String
[C#]
public string SslCACert {get; set;}

Return Type

Location of authority certificate.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Cert Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslCert Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SslCert Property

Gets or sets the location of the client SSL certificate.

[Visual Basic]
Public Property SslCert As String
[C#]
public string SslCert {get; set;}

Return Type

The location of the client certificate.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Cert Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslCipherList Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SslCipherList Property

Gets or sets list of ciphers that client agrees to use.

[Visual Basic]
Public Property SslCipherList As String
[C#]
public string SslCipherList {get; set;}

Return Type

List of ciphers that client agrees to use.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslKey Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SslKey Property

Gets or sets location of user's private key.

[Visual Basic]
Public Property SslKey As String
[C#]
public string SslKey {get; set;}

Return Type

Location of private key to use.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | SslMode Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslMode Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : SslMode Property (PgSqlConnectionStringBuilder)

Gets or sets SSL connection priority.

[Visual Basic]
Public Property SslMode As SslMode
[C#]
public SslMode SslMode {get; set;}

Return Type

One of the SslMode values.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | SslMode Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TransactionErrorBehavior Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : TransactionErrorBehavior Property (PgSqlConnectionStringBuilder)

Determines whether to roll back a transaction automatically when an error occurs inside the transaction.

[Visual Basic]
Public Property TransactionErrorBehavior As TransactionErrorBehavior
[C#]
public TransactionErrorBehavior TransactionErrorBehavior {get; set;}

Return Type

One of the TransactionErrorBehavior values.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TransactionScopeLocal Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : TransactionScopeLocal Property

Enables support for non-distributed transactions in the TransactionScope implementation.

[Visual Basic]
Public Property TransactionScopeLocal As Boolean
[C#]
public bool TransactionScopeLocal {get; set;}

Return Type

true, if one-phase commit is used within TransactionScope; false otherwise.

Remarks

This feature means that if there are several connections with the same connection string (which includes "Transaction Scope Local=true;") within a scope of TransactionScope, our provider will use only one connection internally. The default value is false. This property is not available in Mobile Edition.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Unicode Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Unicode Property (PgSqlConnectionStringBuilder)

Gets or sets a value indicating whether the UTF8 charset will be used.

[Visual Basic]
Public Property Unicode As Boolean
[C#]
public bool Unicode {get; set;}

Return Type

true, if client charset UTF8 is used; false, if default client charset is used. The default value is false.

Remarks

Sets PostgreSQL client charset to UTF8 and converts client data according to this charset.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | UnpreparedExecute Property | CreateCommand Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UnpreparedExecute Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : UnpreparedExecute Property (PgSqlConnectionStringBuilder)

Sets the default value of the PgSqlCommand.UnpreparedExecute property of PgSqlCommand instances.

[Visual Basic]
Public Property UnpreparedExecute As Boolean
[C#]
public bool UnpreparedExecute {get; set;}

Return Type

true, if unprepared execute mode is used in PgSqlCommand instances by default; otherwise false. Default valuse if false.

Remarks

This connection string parameter affects only PgSqlCommands, that were created by the CreateCommand method of PgSqlConnection.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | UnpreparedExecute Property | CreateCommand Method


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UserId Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : UserId Property (PgSqlConnectionStringBuilder)

Gets or sets the name of the user to connect.

[Visual Basic]
Public Property UserId As String
[C#]
public string UserId {get; set;}

Return Type

The name of the user to connect.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ValidateConnection Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ValidateConnection Property

Indicates whether to validate connections that are being taken from the pool.

[Visual Basic]
Public Property ValidateConnection As Boolean
[C#]
public bool ValidateConnection {get; set;}

Return Type

true, if the connection should be validated when it is taken from the pool; false otherwise.

Remarks

If true, each time when a connection is taken from the pool, it is checked for validity. If the connection is not valid, it is destroyed and a new one is created.

If this parameter is true, the connection pool manager background validation is disabled in this case as it is not needed. In such case we always have a valid connection, however the performance is not optimal.

This behaviour may be useful when the physical connection is unstable and connection can be lost in a short period of time. Pool manager validates pool connections every 30 seconds, so it is possible that connection will become invalid during this interval and the application will take it from the pool before the validation. If the physical connection is stable, pool manager validation is enough to ensure that the connection is valid, so it is better not to use this property. Use this property only if necessary because it causes a round-trip to the database to validate each connection immediately before it is provided to the application.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Keys Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Values Property

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Values Property

Collection of values in the PgSqlConnectionStringBuilder.

[Visual Basic]
Overrides Public ReadOnly Property Values As ICollection
[C#]
public override ICollection Values {get;}

Return Type

Collection of values.

Remarks

PgSqlConnectionStringBuilder contains two collections: Keys and Values. Collection items with the same index contain key-value pairs. Use these collections to get indexed access to properties and values of PgSqlConnectionStringBuilder.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Keys Property


%%PageItemTitle%% $$Methods$$

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlConnectionStringBuilder Class Methods

Devart.Data.PostgreSql Namespace : PgSqlConnectionStringBuilder Class

For a list of all members of this type, see PgSqlConnectionStringBuilder members.

Public Methods

Public Method Add (Inherited from System.Data.Common.DbConnectionStringBuilder) | Adds an entry with the specified key and value into the DbConnectionStringBuilder.
Public Method Clear | Overridden. Sets all PgSqlConnectionStringBuilder properties to default values.
Public Method ContainsKey | Overridden. Indicates whether specified key is set in the PgSqlConnectionStringBuilder object.
Public Method EquivalentTo | Overloaded. Overridden. Returns a value indicating whether this PgSqlConnectionStringBuilder has same parameters as given DbConnectionStringBuilder.
Public Method Remove | Overridden. Sets value of the specified key to default.
Public Method ShouldSerialize | Overridden. Determines whether the key will be serialized if required.
Public Method ToString (Inherited from System.Data.Common.DbConnectionStringBuilder) | Returns the connection string associated with this DbConnectionStringBuilder.
Public Method TryGetValue | Overridden. Attempts to get a key value.

See Also

PgSqlConnectionStringBuilder Class | Devart.Data.PostgreSql Namespace | ConnectionString Property


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Clear Method (PgSqlConnectionStringBuilder)

Sets all PgSqlConnectionStringBuilder properties to default values.

[Visual Basic]
Overrides Public Sub Clear()
[C#]
public override void Clear();

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
Key to search for.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsKey Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ContainsKey Method

Indicates whether specified key is set in the PgSqlConnectionStringBuilder object.

[Visual Basic]
Overrides Public Function ContainsKey( _
   ByVal keyword As String _
) As Boolean
[C#]
public override bool ContainsKey(
   string keyword
);

Parameters

keyword
Key to search for.

Return Type

true, if the value of the specified key differs from default; otherwise, false.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EquivalentTo Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : EquivalentTo Method (PgSqlConnectionStringBuilder)

Returns a value indicating whether this PgSqlConnectionStringBuilder has same parameters as given DbConnectionStringBuilder.

Overload List

Returns a value indicating whether this PgSqlConnectionStringBuilder object has same parameters as given DbConnectionStringBuilder object.

[Visual Basic] Overloads Overrides Public Function EquivalentTo(DbConnectionStringBuilder,Boolean) As Boolean

[C#] public override bool EquivalentTo(DbConnectionStringBuilder,bool);

Compares the connection information in this DbConnectionStringBuilder object with the connection information in the supplied object.

[Visual Basic] Overloads Public Overridable Function EquivalentTo(DbConnectionStringBuilder) As Boolean

[C#] public virtual bool EquivalentTo(DbConnectionStringBuilder);

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List

Language

Visual Basic

C#

Show All

connectionStringBuilder
A DbConnectionStringBuilder object to compare with.
loginOnly
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EquivalentTo(DbConnectionStringBuilder,Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class > EquivalentTo Method : EquivalentTo(DbConnectionStringBuilder,Boolean) Method

Returns a value indicating whether this PgSqlConnectionStringBuilder object has same parameters as given DbConnectionStringBuilder object.

[Visual Basic]
Overloads Overrides Public Function EquivalentTo( _
   ByVal connectionStringBuilder As DbConnectionStringBuilder, _
   ByVal loginOnly As Boolean _
) As Boolean
[C#]
public override bool EquivalentTo(
   DbConnectionStringBuilder connectionStringBuilder,
   bool loginOnly
);

Parameters

connectionStringBuilder
A DbConnectionStringBuilder object to compare with.
loginOnly

Return Type

true, if the two objects have same parameters; otherwise, false.

Remarks

Use EquivalentTo to quickly compare two DbConnectionStringBuilder objects. If you need to check only the main connection properties, ensuring that you login to the same place with the same user, set loginOnly to true.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members | Overload List


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
The key to clear.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Remove Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : Remove Method (PgSqlConnectionStringBuilder)

Sets value of the specified key to default.

[Visual Basic]
Overrides Public Function Remove( _
   ByVal keyword As String _
) As Boolean
[C#]
public override bool Remove(
   string keyword
);

Parameters

keyword
The key to clear.

Return Type

true, if operation is successful; false otherwise.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
Key name to inquiry.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ShouldSerialize Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : ShouldSerialize Method (PgSqlConnectionStringBuilder)

Determines whether the key will be serialized if required.

[Visual Basic]
Overrides Public Function ShouldSerialize( _
   ByVal keyword As String _
) As Boolean
[C#]
public override bool ShouldSerialize(
   string keyword
);

Parameters

keyword
Key name to inquiry.

Return Type

true, if the key will be serialized; false otherwise.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members

Language

Visual Basic

C#

Show All

keyword
Key name to obtain the value.
value
Value of the key. If operation fails, the value is null.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TryGetValue Method

Devart.Data.PostgreSql Namespace > PgSqlConnectionStringBuilder Class : TryGetValue Method

Attempts to get a key value.

[Visual Basic]
Overrides Public Function TryGetValue( _
   ByVal keyword As String, _
   ByRef value As Object _
) As Boolean
[C#]
public override bool TryGetValue(
   string keyword,
   out object value
);

Parameters

keyword
Key name to obtain the value.
value
Value of the key. If operation fails, the value is null.

Return Type

true if the operation is successful; false otherwise.

See Also

PgSqlConnectionStringBuilder Class | PgSqlConnectionStringBuilder Members


%%PageItemTitle%%

PgSqlCursor Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCursor Class

Devart.Data.PostgreSql Namespace : PgSqlCursor Class

Represents a PostgreSQL REF CURSOR and value of cursor field.

For a list of all members of this type, see PgSqlCursor members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlCursor

Syntax

[Visual Basic]
Public Class PgSqlCursor
[C#]
public class PgSqlCursor

Remarks

You can get cursor as a parameter value by Devart.Common.DbParameterBase.Value property or by calling PgSqlDataReader.GetPgSqlCursor method of the PgSqlDataReader object.

You can use cursor to obtain PgSqlDataReader object and read data from it, or retrieve its name. The PgSqlDataReader can be retrieved only once.

Note that to retrieve a result set to which the cursor is pointing, you need a transaction to be opened on your connection. The reason is that the PostgreSQL portal which is created for the cursor lives inside a transaction only. If no transaction is opened explicitly, a single transaction implicitly starts for each statement being executed. In this case, the portal which was created on the stored procedure execution, will be unavailable after this operation is over.

Example

This example demonstrates usage of PgSqlCursor class. To execute this code you have to create the following function on the server:

CREATE OR REPLACE FUNCTION refcursorfunc(OUT p refcursor) AS
$BODY$
DECLARE
v_refcursor refcursor;
BEGIN
OPEN v_refcursor FOR SELECT deptno FROM dept;
p := v_refcursor;
END;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE;

[C#]

PgSqlCommand cmd = new PgSqlCommand("refcursorfunc");
cmd.Connection = myConnection;
cmd.CommandType = CommandType.StoredProcedure;
cmd.ParameterCheck = true;
myConnection.Open();
PgSqlTransaction t = myConnection.BeginTransaction();
try {
  cmd.ExecuteNonQuery();
PgSqlCursor cursor = cmd.Parameters["p"].PgSqlValue as PgSqlCursor;
  using (PgSqlDataReader rd = cursor.GetDataReader()) {
    while (rd.Read())
      Console.WriteLine(rd.GetValue(0));
  }
}
finally {
  t.Commit();
  myConnection.Close();
}

[Visual Basic]

Dim cmd As New PgSqlCommand("refcursorfunc")
cmd.Connection = (Me.myConnection)
cmd.CommandType = CommandType.StoredProcedure
cmd.ParameterCheck = True
Me.myConnection.Open()
Dim t As PgSqlTransaction = Me.myConnection.BeginTransaction
Try
    cmd.ExecuteNonQuery()
Dim cursor As PgSqlCursor = TryCast(cmd.Parameters("p").PgSqlValue, PgSqlCursor)
Using rd As PgSqlDataReader = cursor.GetDataReader
        Do While rd.Read
            Console.WriteLine(rd.GetValue(0))
        Loop
    End Using
Finally
    t.Commit()
    Me.myConnection.Close()
End Try

See Also

PgSqlCursor Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlCursor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCursor Class Members

Devart.Data.PostgreSql Namespace : PgSqlCursor Class

PgSqlCursor overview

Public Properties

Public Property Connection | Gets the PgSqlConnection used by the PgSqlCursor.
Public Property CursorName | Gets the name of the cursor.
Public Property FetchAll | Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.
Public Property FetchSize | Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.

Public Methods

Public Method GetDataReader Overloaded. Gets an PgSqlDataReader for the specified cursor.

See Also

PgSqlCursor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlCursor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCursor Class Properties

Devart.Data.PostgreSql Namespace : PgSqlCursor Class

For a list of all members of this type, see PgSqlCursor members.

Public Properties

Public Property Connection | Gets the PgSqlConnection used by the PgSqlCursor.
Public Property CursorName | Gets the name of the cursor.
Public Property FetchAll | Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.
Public Property FetchSize | Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.

See Also

PgSqlCursor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlCursor Class : Connection Property (PgSqlCursor)

Gets the PgSqlConnection used by the PgSqlCursor.

[Visual Basic]
Public ReadOnly Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get;}

Return Type

A PgSqlConnection object.

See Also

PgSqlCursor Class | PgSqlCursor Members


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CursorName Property

Devart.Data.PostgreSql Namespace > PgSqlCursor Class : CursorName Property

Gets the name of the cursor.

[Visual Basic]
Public ReadOnly Property CursorName As String
[C#]
public string CursorName {get;}

Return Type

The name of the cursor.

Example

This example demonstrates usage of PgSqlCursor class. To execute this code you have to create the following function on the server:

CREATE OR REPLACE FUNCTION refcursorfunc(OUT p refcursor) AS
$BODY$
DECLARE
v_refcursor refcursor;
BEGIN
OPEN v_refcursor FOR SELECT deptno FROM dept;
p := v_refcursor;
END;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE;

[C#]

PgSqlCommand cmd = new PgSqlCommand("refcursorfunc");
cmd.Connection = myConnection;
cmd.CommandType = CommandType.StoredProcedure;
cmd.ParameterCheck = true;
myConnection.Open();
PgSqlTransaction t = myConnection.BeginTransaction();
try {
  cmd.ExecuteNonQuery();
PgSqlCursor cursor = cmd.Parameters["p"].PgSqlValue as PgSqlCursor;
PgSqlCommand cursorCmd = new PgSqlCommand(String.Format("FETCH ALL FROM \"{0}\";", cursor.CursorName));
  cursorCmd.Connection = myConnection;
  using (PgSqlDataReader rd = cursorCmd.ExecuteReader()) {
    while (rd.Read())
      Console.WriteLine(rd.GetValue(0));
  }
}
finally {
  t.Commit();
  myConnection.Close();
}

[Visual Basic]

Dim cmd As New PgSqlCommand("refcursorfunc")
cmd.Connection = (Me.myConnection)
cmd.CommandType = CommandType.StoredProcedure
cmd.ParameterCheck = True
Me.myConnection.Open()
Dim t As PgSqlTransaction = Me.myConnection.BeginTransaction
Try
    cmd.ExecuteNonQuery()
Dim cursor As PgSqlCursor = TryCast(cmd.Parameters("p").PgSqlValue, PgSqlCursor)
Dim cursorCmd As New PgSqlCommand(String.Format("FETCH ALL FROM ""{0}"";", cursor.CursorName))
cursorCmd.Connection = Me.myConnection
Using rd As PgSqlDataReader = cursorCmd.ExecuteReader
        Do While rd.Read
            Console.WriteLine(rd.GetValue(0))
        Loop
    End Using
Finally
    t.Commit()
    Me.myConnection.Close()
End Try

See Also

PgSqlCursor Class | PgSqlCursor Members


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FetchAll Property

Devart.Data.PostgreSql Namespace > PgSqlCursor Class : FetchAll Property (PgSqlCursor)

Gets or sets a value indicating whether the PgSqlDataReader object will request data from the server on execution ExecuteReader method.

[Visual Basic]
Public Property FetchAll As Boolean
[C#]
public bool FetchAll {get; set;}

Return Type

true, if the PgSqlDataReader object will request data from the server on execution ExecuteReader; otherwise false. The default value is true.

Remarks

FetchAll property allows your application to reduce greatly size of used memory on processing big volume data. If set to true, memory will be allocated for all data returned by your SELECT. If FetchAll property is set to false, memory will be allocated only at most for hundred records and on retrieving next records previous rows will be rewritten.

See Also

PgSqlCursor Class | PgSqlCursor Members


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FetchSize Property

Devart.Data.PostgreSql Namespace > PgSqlCursor Class : FetchSize Property (PgSqlCursor)

Gets or sets the number of rows that will be transferred across the network at a time if FetchAll is set to false.

[Visual Basic]
Public Property FetchSize As Integer
[C#]
public int FetchSize {get; set;}

Return Type

The number of rows that will be transferred across the network at a time. The default value is 0.

Remarks

If 0 value is assigned, a value of this parameter will be determined automatically and it will be changed dynamically when executing read operations. If you do not want to have a specific number of rows be fetched at a time, it is better to keep this default value.

See Also

PgSqlCursor Class | PgSqlCursor Members


%%PageItemTitle%% $$Methods$$

PgSqlCursor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCursor Class Methods

Devart.Data.PostgreSql Namespace : PgSqlCursor Class

For a list of all members of this type, see PgSqlCursor members.

Public Methods

Public Method GetDataReader Overloaded. Gets an PgSqlDataReader for the specified cursor.

See Also

PgSqlCursor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDataReader Method

Devart.Data.PostgreSql Namespace > PgSqlCursor Class : GetDataReader Method

Gets an PgSqlDataReader for the specified cursor.

Overload List

Gets an PgSqlDataReader for the specified cursor.

[Visual Basic] Overloads Public Function GetDataReader() As PgSqlDataReader

[C#] public PgSqlDataReader GetDataReader();

[Visual Basic] Overloads Public Function GetDataReader(CommandBehavior) As PgSqlDataReader

[C#] public PgSqlDataReader GetDataReader(CommandBehavior);

See Also

PgSqlCursor Class | PgSqlCursor Members


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDataReader() Method

Devart.Data.PostgreSql Namespace > PgSqlCursor Class > GetDataReader Method : GetDataReader() Method

Gets an PgSqlDataReader for the specified cursor.

[Visual Basic]
Overloads Public Function GetDataReader() As PgSqlDataReader
[C#]
public PgSqlDataReader GetDataReader();

Return Type

The PgSqlDataReader for the cursor.

Remarks

An PgSqlDataReader allows you to read data from the cursor at the server.

Example

This example demonstrates usage of PgSqlCursor class. To execute this code you have to create the following function on the server:

CREATE OR REPLACE FUNCTION refcursorfunc(OUT p refcursor) AS
$BODY$
DECLARE
v_refcursor refcursor;
BEGIN
OPEN v_refcursor FOR SELECT deptno FROM dept;
p := v_refcursor;
END;
$BODY$
  LANGUAGE 'plpgsql' VOLATILE;

[C#]

PgSqlCommand cmd = new PgSqlCommand("refcursorfunc");
cmd.Connection = myConnection;
cmd.CommandType = CommandType.StoredProcedure;
cmd.ParameterCheck = true;
myConnection.Open();
PgSqlTransaction t = myConnection.BeginTransaction();
try {
  cmd.ExecuteNonQuery();
PgSqlCursor cursor = cmd.Parameters["p"].PgSqlValue as PgSqlCursor;
  using (PgSqlDataReader rd = cursor.GetDataReader()) {
    while (rd.Read())
      Console.WriteLine(rd.GetValue(0));
  }
}
finally {
  t.Commit();
  myConnection.Close();
}

[Visual Basic]

Dim cmd As New PgSqlCommand("refcursorfunc")
cmd.Connection = (Me.myConnection)
cmd.CommandType = CommandType.StoredProcedure
cmd.ParameterCheck = True
Me.myConnection.Open()
Dim t As PgSqlTransaction = Me.myConnection.BeginTransaction
Try
    cmd.ExecuteNonQuery()
Dim cursor As PgSqlCursor = TryCast(cmd.Parameters("p").PgSqlValue, PgSqlCursor)
Using rd As PgSqlDataReader = cursor.GetDataReader
        Do While rd.Read
            Console.WriteLine(rd.GetValue(0))
        Loop
    End Using
Finally
    t.Commit()
    Me.myConnection.Close()
End Try

See Also

PgSqlCursor Class | PgSqlCursor Members | Overload List


%%PageItemTitle%%

PgSqlCursor Class | PgSqlCursor Members | Overload List

Language

Visual Basic

C#

Show All

behavior
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDataReader(CommandBehavior) Method

Devart.Data.PostgreSql Namespace > PgSqlCursor Class > GetDataReader Method : GetDataReader(CommandBehavior) Method
[Visual Basic]
Overloads Public Function GetDataReader( _
   ByVal behavior As CommandBehavior _
) As PgSqlDataReader
[C#]
public PgSqlDataReader GetDataReader(
   CommandBehavior behavior
);

Parameters

behavior

See Also

PgSqlCursor Class | PgSqlCursor Members | Overload List


%%PageItemTitle%%

PgSqlDataAdapter Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Class

Devart.Data.PostgreSql Namespace : PgSqlDataAdapter Class

Represents a set of data commands and a data source connection that are used to fill the DataSet and update a PostgreSQL data.

For a list of all members of this type, see PgSqlDataAdapter members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
Devart.Common.DbDataAdapter
Devart.Data.PostgreSql.PgSqlDataAdapter

Syntax

[Visual Basic]
Public Class PgSqlDataAdapter
   Inherits DbDataAdapter
   Implements IComponent, IDataAdapter, IDbDataAdapter, ICloneable, IDisposable
[C#]
public class PgSqlDataAdapter : DbDataAdapter, IComponent, IDataAdapter, IDbDataAdapter, ICloneable, IDisposable

Remarks

The PgSqlDataAdapter serves as a bridge between a DataSet and a data source for retrieving and saving data. The PgSqlDataAdapter provides this bridge by using Fill to load data from the data source into the DataSet, and using Update to send changes made in the DataSet back to the data source.

PgSqlDataAdapter is used in conjunction with PgSqlConnection and PgSqlCommand to increase performance when connecting to PostgreSQL.

The PgSqlDataAdapter also includes the PgSqlDataAdapter.SelectCommand, PgSqlDataAdapter.InsertCommand, PgSqlDataAdapter.DeleteCommand, PgSqlDataAdapter.UpdateCommand, and TableMappings properties to facilitate loading and updating of data.

Example

The following example demonstrates how to retrieve and manipulate data using PgSqlDataAdapter.

[C#]

public void UseDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Departments");
  object[] rowVals = new object[2];
  rowVals[0] = 40;
  rowVals[1] = "Operations";
  myDataSet.Tables["Departments"].Rows.Add(rowVals);
  myAdapter.InsertCommand = new PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName) " +
    "VALUES (:DeptNo, :DName)", pgConnection);
  myAdapter.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo");
  myAdapter.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName");
  myAdapter.Update(myDataSet,"Departments");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub UseDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Departments")
  Dim rowVals(1) As Object
  rowVals(0) = "40"
  rowVals(1) = "Operations"
  myDataSet.Tables("Departments").Rows.Add(rowVals)
  myAdapter.InsertCommand = New PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName) " & _
      "VALUES (:DeptNo, :DName)", pgConnection)
  myAdapter.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo")
  myAdapter.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName")
  myAdapter.Update(myDataSet, "Departments")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Class Members

Devart.Data.PostgreSql Namespace : PgSqlDataAdapter Class

PgSqlDataAdapter overview

Public Constructors

Public Constructor PgSqlDataAdapter Constructor Overloaded. Initializes a new instance of the PgSqlDataAdapter class.

Public Properties

Public Property AcceptChangesDuringFill (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations.
Public Property AcceptChangesDuringUpdate (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether AcceptChanges is called during a Update.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property ContinueUpdateOnError (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.
Public Property DeleteCommand | Gets or sets a PostgreSQL statement to delete records from the data set.
Public Property FillLoadOption (Inherited from System.Data.Common.DataAdapter) | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.
Public Property InsertCommand | Gets or sets a PostgreSQL statement to insert new records into the data source.
Public Property MissingMappingAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when incoming data does not have a matching table or column.
Public Property MissingSchemaAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property ReturnProviderSpecificTypes (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.
Public Property SelectCommand | Gets or sets a PostgreSQL statement used to select records in the data source.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableMappings | Gets a collection that provides the master mapping between a source table and a PgSqlDataTable.
Public Property UpdateBatchSize | Overridden. Gets or sets the number of rows that are processed in each round-trip to the server.
Public Property UpdateCommand | Gets or sets a PostgreSQL statement used to update records in the data source.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Fill (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Adds or refreshes rows in the DataSet.
Public Method FillPage (Inherited from Devart.Common.DbDataAdapter) | Fills associated DataSet with specified range of rows.
Public Method FillSchema (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Configures the schema of the specified DataTable based on the specified SchemaType.
Public Method GetFillParameters (Inherited from System.Data.Common.DbDataAdapter) | Gets the parameters set by the user when executing an SQL SELECT statement.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event FillError (Inherited from System.Data.Common.DataAdapter) | Returned when an error occurs during a fill operation.
Public Event RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

See Also

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Constructor

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : PgSqlDataAdapter Constructor (PgSqlDataAdapter)

Initializes a new instance of the PgSqlDataAdapter class.

Overload List

Initializes a new instance of the PgSqlDataAdapter class.

[Visual Basic] Public Sub New()

[C#] public PgSqlDataAdapter();

Initializes a new instance of the PgSqlDataAdapter class with the specified PgSqlCommand as the property.

[Visual Basic] Public Sub New(PgSqlCommand)

[C#] public PgSqlDataAdapter(PgSqlCommand);

Initializes a new instance of the PgSqlDataAdapter class with a PgSqlDataAdapter.SelectCommand and a connection string.

[Visual Basic] Public Sub New(String,String)

[C#] public PgSqlDataAdapter(string,string);

Initializes a new instance of the PgSqlDataAdapter class with a PgSqlDataAdapter.SelectCommand and a PgSqlConnection object.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlDataAdapter(string,PgSqlConnection);

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Constructor()

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class > PgSqlDataAdapter Constructor : PgSqlDataAdapter Constructor()

Initializes a new instance of the PgSqlDataAdapter class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDataAdapter();

Remarks

When you create an instance of PgSqlDataAdapter, the following read/write properties are set to their default values, as shown in the table.
Properties | Default Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Example

The following example creates a PgSqlDataAdapter, sets some of its properties, retrieves data from a table, and displays it.

[C#]

public void CreateDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter();
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.SelectCommand = new PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.Fill(myDataSet,"Dept");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub CreateDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.SelectCommand = New PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.Fill(myDataSet, "Dept")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

selectCommand
A PgSqlCommand that contains SQL SELECT statement, and is set as the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Constructor(PgSqlCommand)

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class > PgSqlDataAdapter Constructor : PgSqlDataAdapter Constructor(PgSqlCommand)

Initializes a new instance of the PgSqlDataAdapter class with the specified PgSqlCommand as the property.

[Visual Basic]
Public Function New( _
   ByVal selectCommand As PgSqlCommand _
)
[C#]
public PgSqlDataAdapter(
   PgSqlCommand selectCommand
);

Parameters

selectCommand
A PgSqlCommand that contains SQL SELECT statement, and is set as the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter.

Remarks

This implementation of the PgSqlDataAdapter constructor sets the PgSqlDataAdapter.SelectCommand property to the value specified in the selectCommand parameter.

When you create an instance of PgSqlDataAdapter, the following read/write properties are set to their default values, as shown in the table.

Properties | Default Value
MissingMappingAction | MissingMappingAction.Passthrough
MissingSchemaAction | MissingSchemaAction.Add

You can change the value of any of these properties through a separate call to the property.

Example

The following example creates a PgSqlDataAdapter, sets some of its properties, retrieves data from a table, and displays it.

[C#]

public void CreateDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter(pgCommand);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Dept");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub CreateDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter(pgCommand)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Dept")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

selectCommandText
A String that contains a SQL SELECT statement to be used as the CommandText of the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter.
selectConnection
A PgSqlConnection that represents the connection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class > PgSqlDataAdapter Constructor : PgSqlDataAdapter Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlDataAdapter class with a PgSqlDataAdapter.SelectCommand and a PgSqlConnection object.

[Visual Basic]
Public Function New( _
   ByVal selectCommandText As String, _
   ByVal selectConnection As PgSqlConnection _
)
[C#]
public PgSqlDataAdapter(
   string selectCommandText,
   PgSqlConnection selectConnection
);

Parameters

selectCommandText
A String that contains a SQL SELECT statement to be used as the CommandText of the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter.
selectConnection
A PgSqlConnection that represents the connection.

Remarks

This implementation of the PgSqlDataAdapter can be useful in an application that must call the Fill method for two or more PgSqlDataAdapter objects.

Example

The following example creates a PgSqlDataAdapter, sets some of its properties, retrieves data from a table, and displays it.

[C#]

public void CreateDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Dept");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub CreateDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Dept")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

selectCommandText
A String that is a SELECT statement to be used as the CommandText of the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter .
selectConnectionString
The connection string.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Constructor(String,String)

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class > PgSqlDataAdapter Constructor : PgSqlDataAdapter Constructor(String,String)

Initializes a new instance of the PgSqlDataAdapter class with a PgSqlDataAdapter.SelectCommand and a connection string.

[Visual Basic]
Public Function New( _
   ByVal selectCommandText As String, _
   ByVal selectConnectionString As String _
)
[C#]
public PgSqlDataAdapter(
   string selectCommandText,
   string selectConnectionString
);

Parameters

selectCommandText
A String that is a SELECT statement to be used as the CommandText of the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter .
selectConnectionString
The connection string.

Example

The following example creates a PgSqlDataAdapter, sets some of its properties, retrieves data from a table, and displays it.

[C#]

public void CreateDataAdapter()
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept",
      "host=server;database=test;user id=postgres;");
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Departments");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub CreateDataAdapter()
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", _
      "host=server;database=test;user id=postgres;")
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Departments")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | Overload List | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Properties$$

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDataAdapter Class

For a list of all members of this type, see PgSqlDataAdapter members.

Public Properties

Public Property AcceptChangesDuringFill (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations.
Public Property AcceptChangesDuringUpdate (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether AcceptChanges is called during a Update.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property ContinueUpdateOnError (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.
Public Property DeleteCommand | Gets or sets a PostgreSQL statement to delete records from the data set.
Public Property FillLoadOption (Inherited from System.Data.Common.DataAdapter) | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.
Public Property InsertCommand | Gets or sets a PostgreSQL statement to insert new records into the data source.
Public Property MissingMappingAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when incoming data does not have a matching table or column.
Public Property MissingSchemaAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property ReturnProviderSpecificTypes (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.
Public Property SelectCommand | Gets or sets a PostgreSQL statement used to select records in the data source.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableMappings | Gets a collection that provides the master mapping between a source table and a PgSqlDataTable.
Public Property UpdateBatchSize | Overridden. Gets or sets the number of rows that are processed in each round-trip to the server.
Public Property UpdateCommand | Gets or sets a PostgreSQL statement used to update records in the data source.

See Also

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DeleteCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : DeleteCommand Property (PgSqlDataAdapter)

Gets or sets a PostgreSQL statement to delete records from the data set.

[Visual Basic]
Public Property DeleteCommand As PgSqlCommand
[C#]
public PgSqlCommand DeleteCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to delete records in PostgreSQL that correspond to deleted rows in the DataSet.

Remarks

During an update operation, if DeleteCommand is not set and primary key information is present in the DataSet, you can use the PgSqlCommandBuilder class to automatically generate the DeleteCommand, and additional commands needed to reconcile the DataSet to the data source. To do this, set the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter. For more information see "Automatically Generated Commands" in the Microsoft .NET Framework SDK documentation.

Example

The following example demonstrates how to retrieve and manipulate data using PgSqlDataAdapter.

[C#]

public void UseDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Departments");
  myDataSet.Tables["Departments"].Rows[3].Delete();
  myAdapter.DeleteCommand = new PgSqlCommand("DELETE FROM Test.Dept WHERE DeptNo = :DeptNo", pgConnection);
  myAdapter.DeleteCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original;
  myAdapter.Update(myDataSet,"Departments");

  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub UseDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Departments")
  myDataSet.Tables("Departments").Rows(3).Delete()
  myAdapter.DeleteCommand = New PgSqlCommand("DELETE FROM Test.Dept WHERE DeptNo = :DeptNo", pgConnection)
  myAdapter.DeleteCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original
  myAdapter.Update(myDataSet, "Departments")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InsertCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : InsertCommand Property (PgSqlDataAdapter)

Gets or sets a PostgreSQL statement to insert new records into the data source.

[Visual Basic]
Public Property InsertCommand As PgSqlCommand
[C#]
public PgSqlCommand InsertCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to insert records in the data source that correspond to new rows in the DataSet.

Remarks

During an update operation, if InsertCommand is not set and primary key information is present in the DataSet, you can use the PgSqlCommandBuilder class to automatically generate InsertCommand, and additional commands needed to reconcile the DataSet to the data source. To do this, set the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter. For more information see "Automatically Generated Commands" in the Microsoft .NET Framework SDK documentation.

Note: If execution of this command returns rows, these rows may be added to the DataSet depending upon how you set the Devart.Common.DbCommandBase.UpdatedRowSource property of the PgSqlCommand object.

Example

The following example demonstrates how to retrieve and manipulate data using PgSqlDataAdapter.

[C#]

public void UseDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Departments");
  object[] rowVals = new object[2];
  rowVals[0] = 40;
  rowVals[1] = "Operations";
  myDataSet.Tables["Departments"].Rows.Add(rowVals);
  myAdapter.InsertCommand = new PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName) " +
    "VALUES (:DeptNo, :DName)", pgConnection);
    myAdapter.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo");
  myAdapter.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName");
  myAdapter.Update(myDataSet,"Departments");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub UseDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Departments")
  Dim rowVals(1) As Object
  rowVals(0) = "40"
  rowVals(1) = "Operations"
  myDataSet.Tables("Departments").Rows.Add(rowVals)
  myAdapter.InsertCommand = New PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName) " & _
      "VALUES (:DeptNo, :DName)", pgConnection)
  myAdapter.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo")
  myAdapter.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName")
  myAdapter.Update(myDataSet, "Departments")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : SelectCommand Property (PgSqlDataAdapter)

Gets or sets a PostgreSQL statement used to select records in the data source.

[Visual Basic]
Public Property SelectCommand As PgSqlCommand
[C#]
public PgSqlCommand SelectCommand {get; set;}

Return Type

A PgSqlCommand that is used during a fill operation to select records from the data source for placement in the DataSet.

Remarks

When SelectCommand is assigned to a previously created PgSqlCommand, the PgSqlCommand is not cloned. Instead, the SelectCommand maintains a reference to the previously created PgSqlCommand object.

If SelectCommand does not return any rows, no tables are added to the DataSet, and no exception is raised.

This property supports the InterForm technology.

Example

The following example creates a PgSqlDataAdapter, sets some of its properties, retrieves data from a table, and displays it.

[C#]

public void CreateDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter();
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.SelectCommand = new PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.Fill(myDataSet,"Dept");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub CreateDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.SelectCommand = New PgSqlCommand("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.Fill(myDataSet, "Dept")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableMappings Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : TableMappings Property

Gets a collection that provides the master mapping between a source table and a PgSqlDataTable.

[Visual Basic]
Public ReadOnly Property TableMappings As DataTableMappingCollection
[C#]
public DataTableMappingCollection TableMappings {get;}

Return Type

A collection that provides the master mapping between the returned records and the DataSet. The default value is an empty collection.

Remarks

When reconciling changes, the PgSqlDataAdapter uses the DataTableMappingCollection collection to associate the column names used by the data source with the column names used by the DataSet.

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdateBatchSize Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : UpdateBatchSize Property (PgSqlDataAdapter)

Gets or sets the number of rows that are processed in each round-trip to the server.

[Visual Basic]
Overrides Public Property UpdateBatchSize As Integer
[C#]
public override int UpdateBatchSize {get; set;}

Return Type

The number of rows to process per batch.

Value is | Effect
0 | There is no limit on the batch size.
1 | Disables batch updating.
more than 1 | Changes are sent using batches of UpdateBatchSize operations at a time.

When setting this to a value other than 1, all the commands associated with the PgSqlDataAdapter should have their Devart.Common.DbCommandBase.UpdatedRowSource property set to None or OutputParameters. An exception is thrown otherwise.

Remarks

Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.

Use the UpdateBatchSize property to update a data source with changes from a PgSqlDataSet. This can increase application performance by reducing the number of round-trips to the server.

Executing an extremely large batch could decrease performance. Therefore, you should test for the optimum batch size setting before implementing your application.

An ArgumentOutOfRangeException is thrown if the value is set to a number less than zero.

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdateCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : UpdateCommand Property (PgSqlDataAdapter)

Gets or sets a PostgreSQL statement used to update records in the data source.

[Visual Basic]
Public Property UpdateCommand As PgSqlCommand
[C#]
public PgSqlCommand UpdateCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to update records in the data source that correspond to modified rows in the DataSet.

Remarks

During an update operation, if UpdateCommand is not set and primary key information is present in the DataSet, you can use the PgSqlCommandBuilder class to automatically generate UpdateCommand, and additional commands needed to reconcile the DataSet to the data source. To do this, set the PgSqlDataAdapter.SelectCommand property of the PgSqlDataAdapter. For more information see "Automatically Generated Commands" in the Microsoft .NET Framework SDK documentation.

Note: If execution of this command returns rows, these rows may be merged with the DataSet depending upon how you set the Devart.Common.DbCommandBase.UpdatedRowSource property of the PgSqlCommand object.

Example

The following example demonstrates how to retrieve and manipulate data using PgSqlDataAdapter.

[C#]

public void UseDataAdapter(PgSqlConnection pgConnection)
{
  PgSqlDataAdapter myAdapter = new PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection);
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey;
  DataSet myDataSet = new DataSet();
  myAdapter.Fill(myDataSet,"Departments");
  myDataSet.Tables["Departments"].Rows[3]["DName"] = "Researches";
  myAdapter.UpdateCommand = new PgSqlCommand("UPDATE Test.Dept SET DeptNo = :DeptNo, DName = :DName " +
      "WHERE DeptNo = :oldDeptNo", pgConnection);
  myAdapter.UpdateCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo");
  myAdapter.UpdateCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName");
  myAdapter.UpdateCommand.Parameters.Add("oldDeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original;
  myAdapter.Update(myDataSet,"Departments");
  //Get all data from all tables within the dataset
  foreach(DataTable myTable in myDataSet.Tables)
  {
    foreach(DataRow myRow in myTable.Rows)
    {
      foreach (DataColumn myColumn in myTable.Columns)
      {
        Console.Write(myRow[myColumn]+"\t");
      }
      Console.WriteLine();
    }
    Console.WriteLine();
  }
}

[Visual Basic]

Public Sub UseDataAdapter(ByVal pgConnection As PgSqlConnection)
  Dim myAdapter As PgSqlDataAdapter = New PgSqlDataAdapter("SELECT DeptNo, DName FROM Test.Dept", pgConnection)
  myAdapter.MissingSchemaAction = MissingSchemaAction.AddWithKey
  Dim myDataSet As DataSet = New DataSet
  myAdapter.Fill(myDataSet, "Departments")
  myDataSet.Tables("Departments").Rows(3)("DName") = "Researches"
  myAdapter.UpdateCommand = New PgSqlCommand("UPDATE Test.Dept SET DeptNo = :DeptNo, DName = :DName " & _
        "WHERE DeptNo = :oldDeptNo", pgConnection)
  myAdapter.UpdateCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo")
  myAdapter.UpdateCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName")
  myAdapter.UpdateCommand.Parameters.Add("oldDeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original
  myAdapter.Update(myDataSet, "Departments")
  Dim myTable As DataTable
  Dim myRow As DataRow
  Dim myColumn As DataColumn
  ' Get all data from all tables within the dataset
  For Each myTable In myDataSet.Tables
    For Each myRow In myTable.Rows
      For Each myColumn In myTable.Columns
        Console.Write(myRow(myColumn) & Chr(9))
      Next myColumn
      Console.WriteLine()
    Next myRow
    Console.WriteLine()
  Next myTable
End Sub

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property


%%PageItemTitle%% $$Events$$

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Class Events

Devart.Data.PostgreSql Namespace : PgSqlDataAdapter Class

For a list of all members of this type, see PgSqlDataAdapter members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event FillError (Inherited from System.Data.Common.DataAdapter) | Returned when an error occurs during a fill operation.
Public Event RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

See Also

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowUpdated Event

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : RowUpdated Event (PgSqlDataAdapter)

Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.

[Visual Basic]
Public Event RowUpdated() As PgSqlRowUpdatedEventHandler
[C#]
public event PgSqlRowUpdatedEventHandler RowUpdated();

Remarks

The event handler receives an argument of type PgSqlRowUpdatedEventArgs containing data related to this event. The following PgSqlRowUpdatedEventArgs properties provide information specific to this event.
Property | Description
PgSqlRowUpdatedEventArgs.Command | Gets the PgSqlCommand executed when Update is called.
Errors (inherited from RowUpdatedEventArgs) | Gets any errors generated by the .NET data provider when the Command was executed.
RecordsAffected (inherited from RowUpdatedEventArgs) | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Row (inherited from RowUpdatedEventArgs) | Gets the DataRow sent through an Update.
StatementType (RowUpdatedEventArgs) | Gets the type of SQL statement executed.
Status (inherited from RowUpdatedEventArgs) | Gets the UpdateStatus of the Command.
TableMapping (inherited from RowUpdatedEventArgs) | Gets the DataTableMapping sent through an Update.

When using the Update method, there are two events that occur per data row updated. The order of execution is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The PgSqlDataAdapter.RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecord, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members


%%PageItemTitle%%

PgSqlDataAdapter Class | PgSqlDataAdapter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowUpdating Event

Devart.Data.PostgreSql Namespace > PgSqlDataAdapter Class : RowUpdating Event (PgSqlDataAdapter)

Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

[Visual Basic]
Public Event RowUpdating() As PgSqlRowUpdatingEventHandler
[C#]
public event PgSqlRowUpdatingEventHandler RowUpdating();

Remarks

The event handler receives an argument of type PgSqlRowUpdatingEventArgs containing data related to this event. The following PgSqlRowUpdatingEventArgs properties provide information specific to this event.
Property | Description
PgSqlRowUpdatedEventArgs.Command | Gets the PgSqlCommand executed when Update is called.
Errors (inherited from RowUpdatingEventArgs) | Gets any errors generated by the .NET data provider when the Command was executed.
Row (inherited from RowUpdatingEventArgs) | Gets the DataRow to sent through an Update.
StatementType (RowUpdatingEventArgs) | Gets the type of SQL statement to execute.
Status (inherited from RowUpdatingEventArgs) | Gets the UpdateStatus of the Command.
TableMapping (inherited from RowUpdatingEventArgs) | Gets the DataTableMapping to sent through an Update.

When using the Update method, there are two events that occur per data row updated. The order of execution is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecordS, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The PgSqlDataAdapter.RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlDataAdapter Class | PgSqlDataAdapter Members


%%PageItemTitle%%

PgSqlDataReader Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataReader Class

Devart.Data.PostgreSql Namespace : PgSqlDataReader Class

Reads a forward-only stream of rows from PostgreSQL.

For a list of all members of this type, see PgSqlDataReader members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbDataReader
Devart.Common.DbDataReaderBase
Devart.Data.PostgreSql.PgSqlDataReader

Syntax

[Visual Basic]
Public Class PgSqlDataReader
   Inherits DbDataReaderBase
   Implements IEnumerable, IDataReader, IDataRecord, IDisposable
[C#]
public class PgSqlDataReader : DbDataReaderBase, IEnumerable, IDataReader, IDataRecord, IDisposable

Remarks

To create a PgSqlDataReader, you must call the ExecuteReader method of the PgSqlCommand object, rather than directly using a constructor.

Devart.Common.DbDataReaderBase.IsClosed and RecordsAffected are the only properties that you can call after the PgSqlDataReader is closed. In some cases, you must call PgSqlDataReader.Close before you can call RecordsAffected.

When protocol is ProtocolVersion.Ver20, the following restriction takes place. While the PgSqlDataReader is in use, the associated PgSqlConnection is busy serving the PgSqlDataReader, and no other operations can be performed on the PgSqlConnection other than closing it. This is the case until the Close method of the PgSqlDataReader is called. For example, you cannot retrieve output parameters until you call Close.

Example

The following example creates a PgSqlConnection, a PgSqlCommand, and a PgSqlDataReader. The example reads through the data, writing it out to the console. Finally, the example closes the PgSqlDataReader, then the PgSqlConnection.

[C#]

public void ReadMyData(string myConnString)  {
    PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
    PgSqlCommand pgCommand = (PgSqlCommand)pgConnection.CreateCommand();
    pgCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept";
    pgConnection.Open();
    PgSqlDataReader pgReader = pgCommand.ExecuteReader();
    try {
        // Always call Read before accessing data.
        while (pgReader.Read()) {
        Console.WriteLine(pgReader.GetInt32(0).ToString() + " " +
        pgReader.GetString(1) + " " + pgReader.GetString(2));
    }
    }
    finally {
        // always call Close when done reading.
        pgReader.Close();

        // Close the connection when done with it.
        pgConnection.Close();
    }
}

[Visual Basic]

Public Sub ReadMyData(ByVal myConnString As String)
    Dim pgConnection As New PgSqlConnection(myConnString)
    Dim pgCommand As PgSqlCommand = pgConnection.CreateCommand()
        pgCommand.CommandText = "SELECT DeptNo, DName, Loc FROM Test.Dept"
    pgConnection.Open()
    Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
    Try
        ' Always call Read before accessing data.
        While pgReader.Read()
            Console.WriteLine(String.Concat(pgReader.GetInt32(0).ToString(), " ", _
            pgReader.GetString(1), " ", pgReader.GetString(2)))
        End While
    Finally
        ' always call Close when done reading.
        pgReader.Close()

            ' Close the connection when done with it.
            pgConnection.Close()
    End Try
End Sub

See Also

PgSqlDataReader Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataReader Class Members

Devart.Data.PostgreSql Namespace : PgSqlDataReader Class

PgSqlDataReader overview

Public Properties

Public Property Depth (Inherited from Devart.Common.DbDataReaderBase) | Gets a value indicating the depth of nesting for the current row.
Public Property EndOfData | Overridden. Indicates whether the PgSqlDataReader has been read completely.
Public Property FieldCount | Overridden. Gets the number of columns in the current row.
Public Property HasRows | Overridden. Gets a value indicating whether the PgSqlDataReader contains one or more rows.
Public Property IsClosed (Inherited from Devart.Common.DbDataReaderBase) | Gets a value indicating whether the data reader is closed.
Public Property Item (Inherited from Devart.Common.DbDataReaderBase) | Overloaded. Gets the value of the specified column in its native format given the column name.
Public Property RecordsAffected | Overridden. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property VisibleFieldCount (Inherited from System.Data.Common.DbDataReader) | Gets the number of fields in the DbDataReader that are not hidden.

Public Methods

Public Method Close | Overridden. Closes the PgSqlDataReader object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetBitArray | Overloaded. Gets the value of the specified column as a BitArray.
Public Method GetBoolean | Overloaded. Overridden. Gets the value of the specified column as a Boolean.
Public Method GetByte | Overloaded. Overridden. Gets the value of the specified column as a byte.
Public Method GetBytes | Overloaded. Overridden. Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetChar | Overloaded. Overridden. Gets the value of the specified column as a single character.
Public Method GetChars | Overloaded. Overridden. Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetDataTypeName | Overloaded. Overridden. Gets the name of the source data type.
Public Method GetDateTime | Overloaded. Overridden. Gets the value of the specified column as a DateTime object.
Public Method GetDateTimeOffset | Overloaded. Overridden. Gets the value of the specified column as an DateTimeOffset object.
Public Method GetDecimal | Overloaded. Overridden. Gets the value of the specified column as a Decimal object.
Public Method GetDouble | Overloaded. Overridden. Gets the value of the specified column as a double-precision floating point number.
Public Method GetEnumerator (Inherited from Devart.Common.DbDataReaderBase) | Fills IEnumerator object with data from Devart.Common.DbDataReaderBase.
Public Method GetFieldType | Overloaded. Overridden. Gets the Type that is the data type of the object.
Public Method GetFloat | Overloaded. Overridden. Gets the value of the specified column as a single-precision floating point number.
Public Method GetGuid | Overloaded. Overridden. Gets the value of the specified column as a universally unique identifier (UUID).
Public Method GetInt16 | Overloaded. Overridden. Gets the value of the specified column as a 16-bit signed integer.
Public Method GetInt32 | Overloaded. Overridden. Gets the value of the specified column as a 32-bit signed integer.
Public Method GetInt64 | Overloaded. Overridden. Gets the value of the specified column as a 64-bit signed integer.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetName | Overridden. Gets the name of the specified column.
Public Method GetOrdinal (Inherited from Devart.Common.DbDataReaderBase) | Gets the column ordinal, given the name of the column.
Public Method GetPgSqlArray | Overloaded.
Public Method GetPgSqlBigIntRange | Overloaded.
Public Method GetPgSqlBlob | Overloaded. Gets the value of the specified column as a PgSqlBlob object.
Public Method GetPgSqlBox | Overloaded. Gets the value of the specified column as a PgSqlBox object.
Public Method GetPgSqlCircle | Overloaded. Gets the value of the specified column as a PgSqlCircle object.
Public Method GetPgSqlCursor | Overloaded. Gets the value of the specified column as a PgSqlCursor object.
Public Method GetPgSqlDateRange | Overloaded. Gets the value of the specified column as a PgSqlDateRange object.
Public Method GetPgSqlInet | Overloaded.
Public Method GetPgSqlInterval | Overloaded. Gets the value of the specified column as a PgSqlInterval object.
Public Method GetPgSqlIntRange | Overloaded. Gets the value of the specified column as a PgSqlIntRange object.
Public Method GetPgSqlLargeObject | Overloaded.
Public Method GetPgSqlLSeg | Overloaded. Gets the value of the specified column as a PgSqlLSeg object.
Public Method GetPgSqlMacAddr | Overloaded.
Public Method GetPgSqlNumericRange | Overloaded. Gets the value of the specified column as a PgSqlNumericRange object.
Public Method GetPgSqlPath | Overloaded. Gets the value of the specified column as a PgSqlPath object.
Public Method GetPgSqlPoint | Overloaded. Gets the value of the specified column as a PgSqlPoint object.
Public Method GetPgSqlPolygon | Overloaded. Gets the value of the specified column as a PgSqlPolygon object.
Public Method GetPgSqlRow | Overloaded. Gets the value of the specified column as a PgSqlRow object.
Public Method GetPgSqlRowType | Overloaded. Gets the value of the specified column as a PgSqlRowType object.
Public Method GetPgSqlText | Overloaded. Gets the value of the specified column as a PgSqlText object.
Public Method GetPgSqlTime | Overloaded.
Public Method GetPgSqlTimeStamp | Overloaded. Gets the value of the specified column as a PgSqlTimeStamp object.
Public Method GetPgSqlTimeStampRange | Overloaded. Gets the value of the specified column as a PgSqlTimeStampRange object.
Public Method GetPgSqlTimeStampTZRange | Overloaded. Gets the value of the specified column as a PgSqlTimeStampTZRange object.
Public Method GetProviderSpecificFieldType | Overloaded. Overridden. Gets the Type that is the provider-specific data type of the object.
Public Method GetProviderSpecificValue | Overloaded. Overridden. Gets the value of the specified column. If possible, a provider-specific type is used.
Public Method GetProviderSpecificValues | Overridden. Gets all column values for the current row. If possible, a provider-specific type is used.
Public Method GetSchemaTable | Overridden. Returns a DataTable that describes the column metadata of the PgSqlDataReader.
Public Method GetString | Overloaded. Overridden. Gets the value of the specified column as a string.
Public Method GetTimeSpan | Overloaded. Gets the value of the specified column as a System.TimeSpan.
Public Method GetValue | Overloaded. Overridden. Gets the value of the specified column in its native format.
Public Method GetValues | Overridden. Gets all column values for the current row.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method IsDBNull | Overloaded. Overridden. Gets a value indicating whether the column contains non-existent or missing values.
Public Method NextResult | Overridden. Advances the data reader to the next result, when reading the results of batch SQL statements.
Public Method Read | Overridden. Advances the PgSqlDataReader to the next record.
Public Method SetCursorFetchModeIfOnlyRefcursorsResultSet |

See Also

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Properties$$

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataReader Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDataReader Class

For a list of all members of this type, see PgSqlDataReader members.

Public Properties

Public Property Depth (Inherited from Devart.Common.DbDataReaderBase) | Gets a value indicating the depth of nesting for the current row.
Public Property EndOfData | Overridden. Indicates whether the PgSqlDataReader has been read completely.
Public Property FieldCount | Overridden. Gets the number of columns in the current row.
Public Property HasRows | Overridden. Gets a value indicating whether the PgSqlDataReader contains one or more rows.
Public Property IsClosed (Inherited from Devart.Common.DbDataReaderBase) | Gets a value indicating whether the data reader is closed.
Public Property Item (Inherited from Devart.Common.DbDataReaderBase) | Overloaded. Gets the value of the specified column in its native format given the column name.
Public Property RecordsAffected | Overridden. Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property VisibleFieldCount (Inherited from System.Data.Common.DbDataReader) | Gets the number of fields in the DbDataReader that are not hidden.

See Also

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EndOfData Property

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : EndOfData Property (PgSqlDataReader)

Indicates whether the PgSqlDataReader has been read completely.

[Visual Basic]
Overrides Public ReadOnly Property EndOfData As Boolean
[C#]
public override bool EndOfData {get;}

Return Type

true if there is no more data in PgSqlDataReader. This property is false if there is more data to read, or there were no data at all.

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FieldCount Property

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : FieldCount Property (PgSqlDataReader)

Gets the number of columns in the current row.

[Visual Basic]
Overrides Public ReadOnly Property FieldCount As Integer
[C#]
public override int FieldCount {get;}

Return Type

When not positioned in a valid record set, 0; otherwise the number of columns in the current record. The default value is -1.

Remarks

After executing a query that does not return rows, FieldCount returns 0.

Example

This sample demonstrates how to iterate through fields in a row using FieldCount property.

[C#]

public void FetchResults(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.FetchSize = 100;
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    while (reader.Read())
    {
      for (int i=0;i<reader.FieldCount;i++)
      {
        Console.Write("\t"+reader[i]);
      }
      Console.WriteLine();
    }
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub FetchResults(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.FetchSize = 100
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    While reader.Read()
      Dim i
      For i = 0 To reader.FieldCount - 1
        Console.Write(String.Concat(" ", reader(i)))
      Next i
      Console.WriteLine()
    End While
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

HasRows Property

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : HasRows Property (PgSqlDataReader)

Gets a value indicating whether the PgSqlDataReader contains one or more rows.

[Visual Basic]
Overrides Public ReadOnly Property HasRows As Boolean
[C#]
public override bool HasRows {get;}

Return Type

true if the PgSqlDataReader contains one or more rows; otherwise, false.

Remarks

Note that this property returns true even if all rows were read out.

Example

This sample shows how to optimize reading from a data source using HasRows property.

[C#]

public void FetchResults(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.FetchSize = 100;
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    if (reader.HasRows)
    {
      while (reader.Read())
      {
        for (int i=0;i<reader.FieldCount;i++)
        {
          Console.Write("\t"+reader[i]);
        }
        Console.WriteLine();
      }
    }
    else
    {
      Console.WriteLine("No rows detected.");
    }
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub FetchResults(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.FetchSize = 100
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    If reader.HasRows Then
      While reader.Read()
        Dim i
        For i = 0 To reader.FieldCount - 1
          Console.Write(String.Concat(" ", reader(i)))
        Next i
        Console.WriteLine()
      End While
    Else
      Console.WriteLine("No rows detected.")
    End If
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | IsClosed Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RecordsAffected Property

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : RecordsAffected Property (PgSqlDataReader)

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

[Visual Basic]
Overrides Public ReadOnly Property RecordsAffected As Integer
[C#]
public override int RecordsAffected {get;}

Return Type

The number of rows changed, inserted, or deleted. -1 for SELECT statements; 0 if no rows were affected, or the statement failed.

Remarks

The value of this property is not cumulative. For example, if two records are inserted in the first statement in batch mode, and the second statement affected 3 records, the value of RecordsAffected will be 3.

Devart.Common.DbDataReaderBase.IsClosed and RecordsAffected are the only properties that you can call after the PgSqlDataReader is closed.

Example

This sample shows how to find out how many rows have been affected during last query. You can do it even if the PgSqlDataReader has been closed.

[C#]

public void ProcessReader (PgSqlDataReader pgReader)
{
  if (!pgReader.IsClosed)
  {
    while (pgReader.Read())
    {
      for (int i=0;i<pgReader.FieldCount;i++)
      {
        Console.Write("\t"+pgReader[i]);
      }
      Console.WriteLine();
    }
  }
  else
  {
    Console.WriteLine("The DataReader is closed. Rows affected in last action: "+pgReader.RecordsAffected);
  }
}

[Visual Basic]

Public Sub ProcessReader(ByVal pgReader As PgSqlDataReader)
  If Not pgReader.IsClosed Then
    Dim i As Integer
    While pgReader.Read()
      For i = 0 To pgReader.FieldCount - 1
        Console.Write(" " & pgReader(i))
      Next i
      Console.WriteLine()
    End While
  Else
    Console.WriteLine("The DataReader is closed. Rows affected in last action: " & pgReader.RecordsAffected)
  End If
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | IsClosed Property


%%PageItemTitle%% $$Methods$$

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataReader Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDataReader Class

For a list of all members of this type, see PgSqlDataReader members.

Public Methods

Public Method Close | Overridden. Closes the PgSqlDataReader object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetBitArray | Overloaded. Gets the value of the specified column as a BitArray.
Public Method GetBoolean | Overloaded. Overridden. Gets the value of the specified column as a Boolean.
Public Method GetByte | Overloaded. Overridden. Gets the value of the specified column as a byte.
Public Method GetBytes | Overloaded. Overridden. Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetChar | Overloaded. Overridden. Gets the value of the specified column as a single character.
Public Method GetChars | Overloaded. Overridden. Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.
Public Method GetDataTypeName | Overloaded. Overridden. Gets the name of the source data type.
Public Method GetDateTime | Overloaded. Overridden. Gets the value of the specified column as a DateTime object.
Public Method GetDateTimeOffset | Overloaded. Overridden. Gets the value of the specified column as an DateTimeOffset object.
Public Method GetDecimal | Overloaded. Overridden. Gets the value of the specified column as a Decimal object.
Public Method GetDouble | Overloaded. Overridden. Gets the value of the specified column as a double-precision floating point number.
Public Method GetEnumerator (Inherited from Devart.Common.DbDataReaderBase) | Fills IEnumerator object with data from Devart.Common.DbDataReaderBase.
Public Method GetFieldType | Overloaded. Overridden. Gets the Type that is the data type of the object.
Public Method GetFloat | Overloaded. Overridden. Gets the value of the specified column as a single-precision floating point number.
Public Method GetGuid | Overloaded. Overridden. Gets the value of the specified column as a universally unique identifier (UUID).
Public Method GetInt16 | Overloaded. Overridden. Gets the value of the specified column as a 16-bit signed integer.
Public Method GetInt32 | Overloaded. Overridden. Gets the value of the specified column as a 32-bit signed integer.
Public Method GetInt64 | Overloaded. Overridden. Gets the value of the specified column as a 64-bit signed integer.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method GetName | Overridden. Gets the name of the specified column.
Public Method GetOrdinal (Inherited from Devart.Common.DbDataReaderBase) | Gets the column ordinal, given the name of the column.
Public Method GetPgSqlArray | Overloaded.
Public Method GetPgSqlBigIntRange | Overloaded.
Public Method GetPgSqlBlob | Overloaded. Gets the value of the specified column as a PgSqlBlob object.
Public Method GetPgSqlBox | Overloaded. Gets the value of the specified column as a PgSqlBox object.
Public Method GetPgSqlCircle | Overloaded. Gets the value of the specified column as a PgSqlCircle object.
Public Method GetPgSqlCursor | Overloaded. Gets the value of the specified column as a PgSqlCursor object.
Public Method GetPgSqlDateRange | Overloaded. Gets the value of the specified column as a PgSqlDateRange object.
Public Method GetPgSqlInet | Overloaded.
Public Method GetPgSqlInterval | Overloaded. Gets the value of the specified column as a PgSqlInterval object.
Public Method GetPgSqlIntRange | Overloaded. Gets the value of the specified column as a PgSqlIntRange object.
Public Method GetPgSqlLargeObject | Overloaded.
Public Method GetPgSqlLSeg | Overloaded. Gets the value of the specified column as a PgSqlLSeg object.
Public Method GetPgSqlMacAddr | Overloaded.
Public Method GetPgSqlNumericRange | Overloaded. Gets the value of the specified column as a PgSqlNumericRange object.
Public Method GetPgSqlPath | Overloaded. Gets the value of the specified column as a PgSqlPath object.
Public Method GetPgSqlPoint | Overloaded. Gets the value of the specified column as a PgSqlPoint object.
Public Method GetPgSqlPolygon | Overloaded. Gets the value of the specified column as a PgSqlPolygon object.
Public Method GetPgSqlRow | Overloaded. Gets the value of the specified column as a PgSqlRow object.
Public Method GetPgSqlRowType | Overloaded. Gets the value of the specified column as a PgSqlRowType object.
Public Method GetPgSqlText | Overloaded. Gets the value of the specified column as a PgSqlText object.
Public Method GetPgSqlTime | Overloaded.
Public Method GetPgSqlTimeStamp | Overloaded. Gets the value of the specified column as a PgSqlTimeStamp object.
Public Method GetPgSqlTimeStampRange | Overloaded. Gets the value of the specified column as a PgSqlTimeStampRange object.
Public Method GetPgSqlTimeStampTZRange | Overloaded. Gets the value of the specified column as a PgSqlTimeStampTZRange object.
Public Method GetProviderSpecificFieldType | Overloaded. Overridden. Gets the Type that is the provider-specific data type of the object.
Public Method GetProviderSpecificValue | Overloaded. Overridden. Gets the value of the specified column. If possible, a provider-specific type is used.
Public Method GetProviderSpecificValues | Overridden. Gets all column values for the current row. If possible, a provider-specific type is used.
Public Method GetSchemaTable | Overridden. Returns a DataTable that describes the column metadata of the PgSqlDataReader.
Public Method GetString | Overloaded. Overridden. Gets the value of the specified column as a string.
Public Method GetTimeSpan | Overloaded. Gets the value of the specified column as a System.TimeSpan.
Public Method GetValue | Overloaded. Overridden. Gets the value of the specified column in its native format.
Public Method GetValues | Overridden. Gets all column values for the current row.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method IsDBNull | Overloaded. Overridden. Gets a value indicating whether the column contains non-existent or missing values.
Public Method NextResult | Overridden. Advances the data reader to the next result, when reading the results of batch SQL statements.
Public Method Read | Overridden. Advances the PgSqlDataReader to the next record.
Public Method SetCursorFetchModeIfOnlyRefcursorsResultSet |

See Also

PgSqlDataReader Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Close Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : Close Method (PgSqlDataReader)

Closes the PgSqlDataReader object.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

Remarks

You must explicitly call the Close method after you have finished working with the PgSqlDataReader in order to use the associated PgSqlConnection for any other purpose.

Example

The following example creates a PgSqlConnection, a PgSqlCommand, and a PgSqlDataReader. The example reads through the data, writing it out to the console. Finally, the example closes the PgSqlDataReader, then the PgSqlConnection.

[C#]

public void ReadMyData(string myConnString)
{
  string mySelectQuery = "SELECT DeptNo, DName FROM Test.Dept";
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery,pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader;
  pgReader = pgCommand.ExecuteReader();
  // Always call Read before accessing data.
  while (pgReader.Read()) {
    Console.WriteLine(pgReader.GetInt32(0) + ", " + pgReader.GetString(1));
  }
  // always call Close when done reading.
  pgReader.Close();
  // Close the connection when done with it.
  pgConnection.Close();
}

[Visual Basic]

Public Sub ReadMyData(myConnString As String)
  Dim mySelectQuery As String = "SELECT DeptNo, DName FROM Test.Dept"
  Dim pgConnection As New PgSqlConnection(myConnString)
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader
  pgReader = pgCommand.ExecuteReader()
  ' Always call Read before accessing data.
  While pgReader.Read()
    Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
      + pgReader.GetString(1))
  End While
  ' always call Close when done reading.
  pgReader.Close()
  ' Close the connection when done with it.
  pgConnection.Close()
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBitArray Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetBitArray Method

Gets the value of the specified column as a BitArray.

Overload List

Gets the value of the specified column as a BitArray.

[Visual Basic] Overloads Public Function GetBitArray(Integer) As BitArray

[C#] public BitArray GetBitArray(int);

Gets the value of the specified column as a BitArray.

[Visual Basic] Overloads Public Function GetBitArray(String) As BitArray

[C#] public BitArray GetBitArray(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBitArray(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetBitArray Method : GetBitArray(Int32) Method

Gets the value of the specified column as a BitArray.

[Visual Basic]
Overloads Public Function GetBitArray( _
   ByVal i As Integer _
) As BitArray
[C#]
public BitArray GetBitArray(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a BitArray.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBitArray(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetBitArray Method : GetBitArray(String) Method

Gets the value of the specified column as a BitArray.

[Visual Basic]
Overloads Public Function GetBitArray( _
   ByVal name As String _
) As BitArray
[C#]
public BitArray GetBitArray(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a BitArray.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBoolean Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetBoolean Method (PgSqlDataReader)

Gets the value of the specified column as a Boolean.

Overload List

Gets the value of the specified column as a Boolean.

[Visual Basic] Overloads Overrides Public Function GetBoolean(Integer) As Boolean

[C#] public override bool GetBoolean(int);

Gets the value of the specified column as a Boolean.

[Visual Basic] Overloads Public Function GetBoolean(String) As Boolean

[C#] public bool GetBoolean(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBoolean(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetBoolean Method : GetBoolean(Int32) Method

Gets the value of the specified column as a Boolean.

[Visual Basic]
Overloads Overrides Public Function GetBoolean( _
   ByVal i As Integer _
) As Boolean
[C#]
public override bool GetBoolean(
   int i
);

Parameters

i

Return Type

The value of the column.

Example

[C#]

static void GetMyBoolean(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    bool recievedBool = reader.GetBoolean(reader.GetOrdinal("BoolCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyBoolean(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedBool As Boolean = reader.GetBoolean(reader.GetOrdinal("BoolCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetByte Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetByte Method (PgSqlDataReader)

Gets the value of the specified column as a byte.

Overload List

Gets the value of the specified column as a byte.

[Visual Basic] Overloads Overrides Public Function GetByte(Integer) As Byte

[C#] public override byte GetByte(int);

Gets the value of the specified column as a byte.

[Visual Basic] Overloads Public Function GetByte(String) As Byte

[C#] public byte GetByte(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetByte(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetByte Method : GetByte(Int32) Method

Gets the value of the specified column as a byte.

[Visual Basic]
Overloads Overrides Public Function GetByte( _
   ByVal i As Integer _
) As Byte
[C#]
public override byte GetByte(
   int i
);

Parameters

i

Return Type

The value of the specified column as a byte.

Example

[C#]

static void GetMyByte(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    byte recievedByte = reader.GetByte(reader.GetOrdinal("ByteCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyByte(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedByte As Byte = reader.GetByte(reader.GetOrdinal("ByteCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBytes Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetBytes Method (PgSqlDataReader)

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

Overload List

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Overrides Public Function GetBytes(Integer,Long,Byte(),Integer,Integer) As Long

[C#] public override long GetBytes(int,long,byte[],int,int);

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Public Function GetBytes(String,Long,Byte(),Integer,Integer) As Long

[C#] public long GetBytes(string,long,byte[],int,int);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index within the buffer where the write operation is to begin.
length
The maximum length to copy into the buffer.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetBytes(Int32,Int64,Byte[],Int32,Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetBytes Method : GetBytes(Int32,Int64,Byte[],Int32,Int32) Method

Reads a stream of bytes from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Overrides Public Function GetBytes( _
   ByVal i As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Byte, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public override long GetBytes(
   int i,
   long fieldOffset,
   byte[] buffer,
   int bufferOffset,
   int length
);

Parameters

i
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to read the stream of bytes.
bufferOffset
The index within the buffer where the write operation is to begin.
length
The maximum length to copy into the buffer.

Return Type

The actual number of bytes read.

Remarks

GetBytes returns the number of available bytes in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetBytes has already been used to obtain bytes from the field. This may be the case, for example, if the PgSqlDataReader is reading a large data structure into a buffer.

If you pass a buffer that is a null value, GetBytes returns the length of the field in bytes.

Example

This sample shows how to obtain array of bytes from a table and save it to a file.

[C#]

static void GetThatBytes(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    byte[] myBytes = new byte[50];
    long bytesRead = reader.GetBytes(reader.GetOrdinal("DName"),0,myBytes,0,50);
    FileStream fs = new FileStream("D:\\Tmp\\1.txt", FileMode.Create);
    fs.Write(myBytes,0,(int)bytesRead);
    fs.Close();
    Console.WriteLine(bytesRead+ " bytes downloaded from table to file.");
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetThatBytes(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim myBytes(50) As Byte
    Dim bytesRead As Long = reader.GetBytes(reader.GetOrdinal("DName"), 0, myBytes, 0, 50)
    Dim fs As FileStream = New FileStream("D:\Tmp\1.txt", FileMode.Create)
    fs.Write(myBytes, 0, Convert.ToInt32(bytesRead))
    fs.Close()
    Console.WriteLine(bytesRead & " bytes downloaded from table to file.")
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetChar Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetChar Method (PgSqlDataReader)

Gets the value of the specified column as a single character.

Overload List

Gets the value of the specified column as a single character.

[Visual Basic] Overloads Overrides Public Function GetChar(Integer) As Char

[C#] public override char GetChar(int);

Gets the value of the specified column as a single character.

[Visual Basic] Overloads Public Function GetChar(String) As Char

[C#] public char GetChar(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetChar(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetChar Method : GetChar(Int32) Method

Gets the value of the specified column as a single character.

[Visual Basic]
Overloads Overrides Public Function GetChar( _
   ByVal i As Integer _
) As Char
[C#]
public override char GetChar(
   int i
);

Parameters

i

Return Type

The value of the specified column as a character.

Example

[C#]

static void GetMyChar(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    char recievedChar = reader.GetChar(reader.GetOrdinal("CharCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyChar(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedChar As Char = reader.GetChar(reader.GetOrdinal("CharCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetChars Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetChars Method (PgSqlDataReader)

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

Overload List

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Overrides Public Function GetChars(Integer,Long,Char(),Integer,Integer) As Long

[C#] public override long GetChars(int,long,char[],int,int);

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic] Overloads Public Function GetChars(String,Long,Char(),Integer,Integer) As Long

[C#] public long GetChars(string,long,char[],int,int);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index within the buffer where the write operation is to begin.
length
The maximum number of characters to read.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetChars(Int32,Int64,Char[],Int32,Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetChars Method : GetChars(Int32,Int64,Char[],Int32,Int32) Method

Reads a stream of characters from the specified column offset into the buffer as an array starting at the given buffer offset.

[Visual Basic]
Overloads Overrides Public Function GetChars( _
   ByVal i As Integer, _
   ByVal fieldOffset As Long, _
   ByVal buffer() As Char, _
   ByVal bufferOffset As Integer, _
   ByVal length As Integer _
) As Long
[C#]
public override long GetChars(
   int i,
   long fieldOffset,
   char[] buffer,
   int bufferOffset,
   int length
);

Parameters

i
The zero-based column ordinal.
fieldOffset
The index within the field where the read operation is to begin.
buffer
The buffer into which to copy data.
bufferOffset
The index within the buffer where the write operation is to begin.
length
The maximum number of characters to read.

Return Type

The actual number of characters read.

Remarks

GetChars returns the number of available characters in the field. In most cases this is the exact length of the field. However, the number returned may be less than the true length of the field if GetChars has already been used to obtain characters from the field. This may be the case, for example, if the PgSqlDataReader is reading a large data structure into a buffer.

If you pass a buffer that is a null value. GetChars returns the length of the field in characters.

Example

This sample shows how to read data from a field into array of chars.

[C#]

static void GetThatChars(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    char[] myChars = new char[50];
    long bytesRead = reader.GetChars(reader.GetOrdinal("DName"),0,myChars,0,50);
    Console.WriteLine(bytesRead+ " bytes read from the table.");
    Console.WriteLine(myChars);
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetThatChars(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim myChars(50) As Char
    Dim bytesRead As Long = reader.GetChars(reader.GetOrdinal("DName"), 0, myChars, 0, 50)
    Console.WriteLine(bytesRead & " bytes read from the table.")
    Console.WriteLine(myChars)
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDataTypeName Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetDataTypeName Method (PgSqlDataReader)

Gets the name of the source data type.

Overload List

Gets the name of the source data type.

[Visual Basic] Overloads Overrides Public Function GetDataTypeName(Integer) As String

[C#] public override string GetDataTypeName(int);

Gets the name of the source data type.

[Visual Basic] Overloads Public Function GetDataTypeName(String) As String

[C#] public string GetDataTypeName(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetFieldType Method | GetName Method

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDataTypeName(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetDataTypeName Method : GetDataTypeName(Int32) Method

Gets the name of the source data type.

[Visual Basic]
Overloads Overrides Public Function GetDataTypeName( _
   ByVal i As Integer _
) As String
[C#]
public override string GetDataTypeName(
   int i
);

Parameters

i

Return Type

The name of the back-end data type.

Example

This sample shows how to retrieve names and types of all columns in a table.

[C#]

public void GetFields(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    for (int i=0;i < reader.FieldCount;i++)
    {
      string fieldType = reader.GetDataTypeName(i);
      string fieldName = reader.GetName(i);
      string fieldType2 = reader.GetFieldType(i).FullName;
      Console.WriteLine(fieldName+"\t"+ fieldType+"\t"+ fieldType2);
    }
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetFields(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim i As Integer
    For i = 0 To reader.FieldCount - 1
      Dim fieldType As String = reader.GetDataTypeName(i)
      Dim fieldName As String = reader.GetName(i)
      Dim fieldType2 As String = reader.GetFieldType(i).FullName
      Console.WriteLine(fieldName & Chr(9) & fieldType & Chr(9) & fieldType2)
    Next i
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetFieldType Method | GetName Method


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDateTime Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetDateTime Method (PgSqlDataReader)

Gets the value of the specified column as a DateTime object.

Overload List

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Overrides Public Function GetDateTime(Integer) As Date

[C#] public override DateTime GetDateTime(int);

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Public Function GetDateTime(String) As Date

[C#] public DateTime GetDateTime(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDateTime(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetDateTime Method : GetDateTime(Int32) Method

Gets the value of the specified column as a DateTime object.

[Visual Basic]
Overloads Overrides Public Function GetDateTime( _
   ByVal i As Integer _
) As Date
[C#]
public override DateTime GetDateTime(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyDateTime(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    DateTime recievedDate = reader.GetDateTime(reader.GetOrdinal("DateCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyDateTime(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedDate As DateTime = reader.GetDateTime(reader.GetOrdinal("DateCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDateTimeOffset Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetDateTimeOffset Method (PgSqlDataReader)

Gets the value of the specified column as an DateTimeOffset object.

Overload List

Gets the value of the specified column as an DateTimeOffset object.

[Visual Basic] Overloads Overrides Public Function GetDateTimeOffset(Integer) As DateTimeOffset

[C#] public override DateTimeOffset GetDateTimeOffset(int);

Gets the value of the specified column as a DateTimeOffset object.

[Visual Basic] Overloads Public Function GetDateTimeOffset(String) As DateTimeOffset

[C#] public DateTimeOffset GetDateTimeOffset(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDateTimeOffset(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetDateTimeOffset Method : GetDateTimeOffset(Int32) Method

Gets the value of the specified column as an DateTimeOffset object.

[Visual Basic]
Overloads Overrides Public Function GetDateTimeOffset( _
   ByVal i As Integer _
) As DateTimeOffset
[C#]
public override DateTimeOffset GetDateTimeOffset(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as an DateTimeOffset object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDecimal Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetDecimal Method (PgSqlDataReader)

Gets the value of the specified column as a Decimal object.

Overload List

Gets the value of the specified column as a Decimal object.

[Visual Basic] Overloads Overrides Public Function GetDecimal(Integer) As Decimal

[C#] public override decimal GetDecimal(int);

Gets the value of the specified column as a DateTime object.

[Visual Basic] Overloads Public Function GetDecimal(String) As Decimal

[C#] public decimal GetDecimal(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDecimal(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetDecimal Method : GetDecimal(Int32) Method

Gets the value of the specified column as a Decimal object.

[Visual Basic]
Overloads Overrides Public Function GetDecimal( _
   ByVal i As Integer _
) As Decimal
[C#]
public override decimal GetDecimal(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Example

[C#]

static void GetMyDecimal(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    decimal recievedDecimal = reader.GetDecimal(reader.GetOrdinal("DecimalCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyDecimal(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedDecimal As Decimal = reader.GetDecimal(reader.GetOrdinal("DecimalCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDouble Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetDouble Method (PgSqlDataReader)

Gets the value of the specified column as a double-precision floating point number.

Overload List

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic] Overloads Overrides Public Function GetDouble(Integer) As Double

[C#] public override double GetDouble(int);

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic] Overloads Public Function GetDouble(String) As Double

[C#] public double GetDouble(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetDouble(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetDouble Method : GetDouble(Int32) Method

Gets the value of the specified column as a double-precision floating point number.

[Visual Basic]
Overloads Overrides Public Function GetDouble( _
   ByVal i As Integer _
) As Double
[C#]
public override double GetDouble(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyDouble(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    double recievedDouble = reader.GetDouble(reader.GetOrdinal("DoubleCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyDouble(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedDouble As Double = reader.GetDouble(reader.GetOrdinal("DoubleCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetFieldType Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetFieldType Method (PgSqlDataReader)

Gets the Type that is the data type of the object.

Overload List

Gets the Type that is the data type of the object.

[Visual Basic] Overloads Overrides Public Function GetFieldType(Integer) As Type

[C#] public override Type GetFieldType(int);

Gets the Type that is the data type of the object.

[Visual Basic] Overloads Public Function GetFieldType(String) As Type

[C#] public Type GetFieldType(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetName Method

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetFieldType(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetFieldType Method : GetFieldType(Int32) Method

Gets the Type that is the data type of the object.

[Visual Basic]
Overloads Overrides Public Function GetFieldType( _
   ByVal i As Integer _
) As Type
[C#]
public override Type GetFieldType(
   int i
);

Parameters

i

Return Type

The Type that is the data type of the object.

Example

This sample shows how to retrieve names and types of all columns in a table.

[C#]

public void GetFields(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    for (int i=0;i < reader.FieldCount;i++)
    {
      string fieldType = reader.GetDataTypeName(i);
      string fieldName = reader.GetName(i);
      string fieldType2 = reader.GetFieldType(i).FullName;
      Console.WriteLine(fieldName+"\t"+ fieldType+"\t"+ fieldType2);
    }
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetFields(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim i As Integer
    For i = 0 To reader.FieldCount - 1
      Dim fieldType As String = reader.GetDataTypeName(i)
      Dim fieldName As String = reader.GetName(i)
      Dim fieldType2 As String = reader.GetFieldType(i).FullName
      Console.WriteLine(fieldName & Chr(9) & fieldType & Chr(9) & fieldType2)
    Next i
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetName Method


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetFloat Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetFloat Method (PgSqlDataReader)

Gets the value of the specified column as a single-precision floating point number.

Overload List

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic] Overloads Overrides Public Function GetFloat(Integer) As Single

[C#] public override float GetFloat(int);

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic] Overloads Public Function GetFloat(String) As Single

[C#] public float GetFloat(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetFloat(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetFloat Method : GetFloat(Int32) Method

Gets the value of the specified column as a single-precision floating point number.

[Visual Basic]
Overloads Overrides Public Function GetFloat( _
   ByVal i As Integer _
) As Single
[C#]
public override float GetFloat(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyFloat(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    float recievedFloat = reader.GetFloat(reader.GetOrdinal("FloatCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyFloat(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedFloat As Single = reader.GetFloat(reader.GetOrdinal("FloatCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetGuid Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetGuid Method (PgSqlDataReader)

Gets the value of the specified column as a universally unique identifier (UUID).

Overload List

Gets the value of the specified column as a universally unique identifier (UUID).

[Visual Basic] Overloads Overrides Public Function GetGuid(Integer) As Guid

[C#] public override Guid GetGuid(int);

Gets the value of the specified column as a globally-unique identifier (GUID).

[Visual Basic] Overloads Public Function GetGuid(String) As Guid

[C#] public Guid GetGuid(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetGuid(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetGuid Method : GetGuid(Int32) Method

Gets the value of the specified column as a universally unique identifier (UUID).

[Visual Basic]
Overloads Overrides Public Function GetGuid( _
   ByVal i As Integer _
) As Guid
[C#]
public override Guid GetGuid(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Example

[C#]

static void GetMyGuid(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    Guid recievedGuid = reader.GetGuid(reader.GetOrdinal("GuidCol"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyGuid(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedGuid As Guid = reader.GetGuid(reader.GetOrdinal("GuidCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt16 Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetInt16 Method (PgSqlDataReader)

Gets the value of the specified column as a 16-bit signed integer.

Overload List

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic] Overloads Overrides Public Function GetInt16(Integer) As Short

[C#] public override short GetInt16(int);

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic] Overloads Public Function GetInt16(String) As Short

[C#] public short GetInt16(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt16(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetInt16 Method : GetInt16(Int32) Method

Gets the value of the specified column as a 16-bit signed integer.

[Visual Basic]
Overloads Overrides Public Function GetInt16( _
   ByVal i As Integer _
) As Short
[C#]
public override short GetInt16(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyInt16(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    short recievedShort = reader.GetInt16(reader.GetOrdinal("Int16Col"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyInt16(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedShort As Short = reader.GetInt16(reader.GetOrdinal("Int16Col"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt32 Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetInt32 Method (PgSqlDataReader)

Gets the value of the specified column as a 32-bit signed integer.

Overload List

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic] Overloads Overrides Public Function GetInt32(Integer) As Integer

[C#] public override int GetInt32(int);

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic] Overloads Public Function GetInt32(String) As Integer

[C#] public int GetInt32(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt32(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetInt32 Method : GetInt32(Int32) Method

Gets the value of the specified column as a 32-bit signed integer.

[Visual Basic]
Overloads Overrides Public Function GetInt32( _
   ByVal i As Integer _
) As Integer
[C#]
public override int GetInt32(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyInt32(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    int recievedInt = reader.GetInt32(reader.GetOrdinal("Int32Col"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt64 Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetInt64 Method (PgSqlDataReader)

Gets the value of the specified column as a 64-bit signed integer.

Overload List

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic] Overloads Overrides Public Function GetInt64(Integer) As Long

[C#] public override long GetInt64(int);

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic] Overloads Public Function GetInt64(String) As Long

[C#] public long GetInt64(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetInt64(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetInt64 Method : GetInt64(Int32) Method

Gets the value of the specified column as a 64-bit signed integer.

[Visual Basic]
Overloads Overrides Public Function GetInt64( _
   ByVal i As Integer _
) As Long
[C#]
public override long GetInt64(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyInt64(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    long recievedLong = reader.GetInt64(reader.GetOrdinal("Int64Col"));
    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | GetFieldType Method

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetName Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetName Method (PgSqlDataReader)

Gets the name of the specified column.

[Visual Basic]
Overrides Public Function GetName( _
   ByVal i As Integer _
) As String
[C#]
public override string GetName(
   int i
);

Parameters

i

Return Type

A string that is the name of the specified column.

Example

This sample shows how to retrieve names and types of all columns in a table.

[C#]

public void GetFields(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    for (int i=0;i < reader.FieldCount;i++)
    {
      string fieldType = reader.GetDataTypeName(i);
      string fieldName = reader.GetName(i);
      string fieldType2 = reader.GetFieldType(i).FullName;
      Console.WriteLine(fieldName+"\t"+ fieldType+"\t"+ fieldType2);
    }
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetFields(ByVal pgConnection As PgSqlConnection
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim i As Integer
    For i = 0 To reader.FieldCount - 1
      Dim fieldType As String = reader.GetDataTypeName(i)
      Dim fieldName As String = reader.GetName(i)
      Console.WriteLine(fieldName & " " & fieldType)
    Next i
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | GetFieldType Method


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlArray Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlArray Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlArray(Integer) As PgSqlArray

[C#] public PgSqlArray GetPgSqlArray(int);

[Visual Basic] Overloads Public Function GetPgSqlArray(String) As PgSqlArray

[C#] public PgSqlArray GetPgSqlArray(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlArray(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlArray Method : GetPgSqlArray(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlArray( _
   ByVal i As Integer _
) As PgSqlArray
[C#]
public PgSqlArray GetPgSqlArray(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlArray(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlArray Method : GetPgSqlArray(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlArray( _
   ByVal name As String _
) As PgSqlArray
[C#]
public PgSqlArray GetPgSqlArray(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBigIntRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlBigIntRange Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlBigIntRange(Integer) As PgSqlBigIntRange

[C#] public PgSqlBigIntRange GetPgSqlBigIntRange(int);

[Visual Basic] Overloads Public Function GetPgSqlBigIntRange(String) As PgSqlBigIntRange

[C#] public PgSqlBigIntRange GetPgSqlBigIntRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBigIntRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBigIntRange Method : GetPgSqlBigIntRange(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlBigIntRange( _
   ByVal i As Integer _
) As PgSqlBigIntRange
[C#]
public PgSqlBigIntRange GetPgSqlBigIntRange(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBigIntRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBigIntRange Method : GetPgSqlBigIntRange(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlBigIntRange( _
   ByVal name As String _
) As PgSqlBigIntRange
[C#]
public PgSqlBigIntRange GetPgSqlBigIntRange(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBlob Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlBlob Method

Gets the value of the specified column as a PgSqlBlob object.

Overload List

Gets the value of the specified column as a PgSqlBlob object.

[Visual Basic] Overloads Public Function GetPgSqlBlob(Integer) As PgSqlBlob

[C#] public PgSqlBlob GetPgSqlBlob(int);

Gets the value of the specified column as a PgSqlBlob object.

[Visual Basic] Overloads Public Function GetPgSqlBlob(String) As PgSqlBlob

[C#] public PgSqlBlob GetPgSqlBlob(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | PgSqlBlob Class

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBlob(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBlob Method : GetPgSqlBlob(Int32) Method

Gets the value of the specified column as a PgSqlBlob object.

[Visual Basic]
Overloads Public Function GetPgSqlBlob( _
   ByVal i As Integer _
) As PgSqlBlob
[C#]
public PgSqlBlob GetPgSqlBlob(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlBlob object.

Example

This example shows how to download a BLOB field from a table using PgSqlDataReader.GetPgSqlBlob method.

[C#]

public void DownloadBlob(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default);
  try
  {
    while (pgReader.Read())
    {
      PgSqlBlob myBlob = pgReader.GetPgSqlBlob(pgReader.GetOrdinal("Picture"));
      if(!myBlob.IsNull)
      {
        string FN = pgReader.GetString(pgReader.GetOrdinal("PicName"));
        FileStream fs = new FileStream("D:\\Tmp\\"+FN+".bmp", FileMode.Create);
        BinaryWriter w = new BinaryWriter(fs);
        w.Write(myBlob.Value);
        w.Close();
        fs.Close();
        Console.WriteLine(FN+" downloaded.");
      }
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub DownloadBlob(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default)
  Try
    While pgReader.Read()
      Dim myBlob As PgSqlBlob = pgReader.GetPgSqlBlob(pgReader.GetOrdinal("Picture"))
      If Not myBlob.IsNull Then
        Dim FN As String = pgReader.GetString(pgReader.GetOrdinal("PicName"))
        Dim fs As FileStream = New FileStream("D:\Tmp\" + FN + ".bmp", FileMode.Create)
        Dim w As BinaryWriter = New BinaryWriter(fs)
        w.Write(myBlob.Value)
        w.Close()
        fs.Close()
        Console.WriteLine(String.Concat(FN, " downloaded."))
      End If
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | PgSqlBlob Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | PgSqlBlob Class

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBlob(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBlob Method : GetPgSqlBlob(String) Method

Gets the value of the specified column as a PgSqlBlob object.

[Visual Basic]
Overloads Public Function GetPgSqlBlob( _
   ByVal name As String _
) As PgSqlBlob
[C#]
public PgSqlBlob GetPgSqlBlob(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlBlob object.

Example

This example shows how to download a BLOB field from a table using PgSqlDataReader.GetPgSqlBlob method.

[C#]

public void DownloadBlob(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default);
  try
  {
    while (pgReader.Read())
    {
      PgSqlBlob myBlob = pgReader.GetPgSqlBlob(pgReader.GetOrdinal("Picture"));
      if(!myBlob.IsNull)
      {
        string FN = pgReader.GetString(pgReader.GetOrdinal("PicName"));
        FileStream fs = new FileStream("D:\\Tmp\\"+FN+".bmp", FileMode.Create);
        BinaryWriter w = new BinaryWriter(fs);
        w.Write(myBlob.Value);
        w.Close();
        fs.Close();
        Console.WriteLine(FN+" downloaded.");
      }
    }
  }
  finally
  {
    pgReader.Close();
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub DownloadBlob(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As New PgSqlCommand("SELECT * FROM Test.Pictures", pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader(System.Data.CommandBehavior.Default)
  Try
    While pgReader.Read()
      Dim myBlob As PgSqlBlob = pgReader.GetPgSqlBlob(pgReader.GetOrdinal("Picture"))
      If Not myBlob.IsNull Then
        Dim FN As String = pgReader.GetString(pgReader.GetOrdinal("PicName"))
        Dim fs As FileStream = New FileStream("D:\Tmp\" + FN + ".bmp", FileMode.Create)
        Dim w As BinaryWriter = New BinaryWriter(fs)
        w.Write(myBlob.Value)
        w.Close()
        fs.Close()
        Console.WriteLine(String.Concat(FN, " downloaded."))
      End If
    End While
  Finally
    pgReader.Close()
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | PgSqlBlob Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBox Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlBox Method

Gets the value of the specified column as a PgSqlBox object.

Overload List

Gets the value of the specified column as a PgSqlBox object.

[Visual Basic] Overloads Public Function GetPgSqlBox(Integer) As PgSqlBox

[C#] public PgSqlBox GetPgSqlBox(int);

Gets the value of the specified column as a PgSqlBox object.

[Visual Basic] Overloads Public Function GetPgSqlBox(String) As PgSqlBox

[C#] public PgSqlBox GetPgSqlBox(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBox(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBox Method : GetPgSqlBox(Int32) Method

Gets the value of the specified column as a PgSqlBox object.

[Visual Basic]
Overloads Public Function GetPgSqlBox( _
   ByVal i As Integer _
) As PgSqlBox
[C#]
public PgSqlBox GetPgSqlBox(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlBox object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlBox(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlBox Method : GetPgSqlBox(String) Method

Gets the value of the specified column as a PgSqlBox object.

[Visual Basic]
Overloads Public Function GetPgSqlBox( _
   ByVal name As String _
) As PgSqlBox
[C#]
public PgSqlBox GetPgSqlBox(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlBox object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCircle Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlCircle Method

Gets the value of the specified column as a PgSqlCircle object.

Overload List

Gets the value of the specified column as a PgSqlCircle object.

[Visual Basic] Overloads Public Function GetPgSqlCircle(Integer) As PgSqlCircle

[C#] public PgSqlCircle GetPgSqlCircle(int);

Gets the value of the specified column as a PgSqlCircle object.

[Visual Basic] Overloads Public Function GetPgSqlCircle(String) As PgSqlCircle

[C#] public PgSqlCircle GetPgSqlCircle(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCircle(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlCircle Method : GetPgSqlCircle(Int32) Method

Gets the value of the specified column as a PgSqlCircle object.

[Visual Basic]
Overloads Public Function GetPgSqlCircle( _
   ByVal i As Integer _
) As PgSqlCircle
[C#]
public PgSqlCircle GetPgSqlCircle(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlCircle object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCircle(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlCircle Method : GetPgSqlCircle(String) Method

Gets the value of the specified column as a PgSqlCircle object.

[Visual Basic]
Overloads Public Function GetPgSqlCircle( _
   ByVal name As String _
) As PgSqlCircle
[C#]
public PgSqlCircle GetPgSqlCircle(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlCircle object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCursor Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlCursor Method

Gets the value of the specified column as a PgSqlCursor object.

Overload List

Gets the value of the specified column as a PgSqlCursor object.

[Visual Basic] Overloads Public Function GetPgSqlCursor(Integer) As PgSqlCursor

[C#] public PgSqlCursor GetPgSqlCursor(int);

Gets the value of the specified column as a PgSqlCursor object.

[Visual Basic] Overloads Public Function GetPgSqlCursor(String) As PgSqlCursor

[C#] public PgSqlCursor GetPgSqlCursor(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCursor(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlCursor Method : GetPgSqlCursor(Int32) Method

Gets the value of the specified column as a PgSqlCursor object.

[Visual Basic]
Overloads Public Function GetPgSqlCursor( _
   ByVal i As Integer _
) As PgSqlCursor
[C#]
public PgSqlCursor GetPgSqlCursor(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlCursor object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlCursor(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlCursor Method : GetPgSqlCursor(String) Method

Gets the value of the specified column as a PgSqlCursor object.

[Visual Basic]
Overloads Public Function GetPgSqlCursor( _
   ByVal name As String _
) As PgSqlCursor
[C#]
public PgSqlCursor GetPgSqlCursor(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlCursor object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlDateRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlDateRange Method

Gets the value of the specified column as a PgSqlDateRange object.

Overload List

Gets the value of the specified column as a PgSqlDateRange object.

[Visual Basic] Overloads Public Function GetPgSqlDateRange(Integer) As PgSqlDateRange

[C#] public PgSqlDateRange GetPgSqlDateRange(int);

Gets the value of the specified column as a PgSqlDateRange object.

[Visual Basic] Overloads Public Function GetPgSqlDateRange(String) As PgSqlDateRange

[C#] public PgSqlDateRange GetPgSqlDateRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlDateRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlDateRange Method : GetPgSqlDateRange(Int32) Method

Gets the value of the specified column as a PgSqlDateRange object.

[Visual Basic]
Overloads Public Function GetPgSqlDateRange( _
   ByVal i As Integer _
) As PgSqlDateRange
[C#]
public PgSqlDateRange GetPgSqlDateRange(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlDateRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlDateRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlDateRange Method : GetPgSqlDateRange(String) Method

Gets the value of the specified column as a PgSqlDateRange object.

[Visual Basic]
Overloads Public Function GetPgSqlDateRange( _
   ByVal name As String _
) As PgSqlDateRange
[C#]
public PgSqlDateRange GetPgSqlDateRange(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlDateRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInet Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlInet Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlInet(Integer) As PgSqlInet

[C#] public PgSqlInet GetPgSqlInet(int);

[Visual Basic] Overloads Public Function GetPgSqlInet(String) As PgSqlInet

[C#] public PgSqlInet GetPgSqlInet(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInet(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlInet Method : GetPgSqlInet(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlInet( _
   ByVal i As Integer _
) As PgSqlInet
[C#]
public PgSqlInet GetPgSqlInet(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInet(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlInet Method : GetPgSqlInet(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlInet( _
   ByVal name As String _
) As PgSqlInet
[C#]
public PgSqlInet GetPgSqlInet(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInterval Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlInterval Method

Gets the value of the specified column as a PgSqlInterval object.

Overload List

Gets the value of the specified column as a PgSqlInterval object.

[Visual Basic] Overloads Public Function GetPgSqlInterval(Integer) As PgSqlInterval

[C#] public PgSqlInterval GetPgSqlInterval(int);

Gets the value of the specified column as a PgSqlInterval object.

[Visual Basic] Overloads Public Function GetPgSqlInterval(String) As PgSqlInterval

[C#] public PgSqlInterval GetPgSqlInterval(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInterval(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlInterval Method : GetPgSqlInterval(Int32) Method

Gets the value of the specified column as a PgSqlInterval object.

[Visual Basic]
Overloads Public Function GetPgSqlInterval( _
   ByVal i As Integer _
) As PgSqlInterval
[C#]
public PgSqlInterval GetPgSqlInterval(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlInterval object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlInterval(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlInterval Method : GetPgSqlInterval(String) Method

Gets the value of the specified column as a PgSqlInterval object.

[Visual Basic]
Overloads Public Function GetPgSqlInterval( _
   ByVal name As String _
) As PgSqlInterval
[C#]
public PgSqlInterval GetPgSqlInterval(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlInterval object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlIntRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlIntRange Method

Gets the value of the specified column as a PgSqlIntRange object.

Overload List

Gets the value of the specified column as a PgSqlIntRange object.

[Visual Basic] Overloads Public Function GetPgSqlIntRange(Integer) As PgSqlIntRange

[C#] public PgSqlIntRange GetPgSqlIntRange(int);

Gets the value of the specified column as a PgSqlIntRange object.

[Visual Basic] Overloads Public Function GetPgSqlIntRange(String) As PgSqlIntRange

[C#] public PgSqlIntRange GetPgSqlIntRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlIntRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlIntRange Method : GetPgSqlIntRange(Int32) Method

Gets the value of the specified column as a PgSqlIntRange object.

[Visual Basic]
Overloads Public Function GetPgSqlIntRange( _
   ByVal i As Integer _
) As PgSqlIntRange
[C#]
public PgSqlIntRange GetPgSqlIntRange(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlIntRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlIntRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlIntRange Method : GetPgSqlIntRange(String) Method

Gets the value of the specified column as a PgSqlIntRange object.

[Visual Basic]
Overloads Public Function GetPgSqlIntRange( _
   ByVal name As String _
) As PgSqlIntRange
[C#]
public PgSqlIntRange GetPgSqlIntRange(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlIntRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLargeObject Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlLargeObject Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlLargeObject(Integer) As PgSqlLargeObject

[C#] public PgSqlLargeObject GetPgSqlLargeObject(int);

[Visual Basic] Overloads Public Function GetPgSqlLargeObject(String) As PgSqlLargeObject

[C#] public PgSqlLargeObject GetPgSqlLargeObject(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLargeObject(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlLargeObject Method : GetPgSqlLargeObject(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlLargeObject( _
   ByVal i As Integer _
) As PgSqlLargeObject
[C#]
public PgSqlLargeObject GetPgSqlLargeObject(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLargeObject(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlLargeObject Method : GetPgSqlLargeObject(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlLargeObject( _
   ByVal name As String _
) As PgSqlLargeObject
[C#]
public PgSqlLargeObject GetPgSqlLargeObject(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLSeg Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlLSeg Method

Gets the value of the specified column as a PgSqlLSeg object.

Overload List

Gets the value of the specified column as a PgSqlLSeg object.

[Visual Basic] Overloads Public Function GetPgSqlLSeg(Integer) As PgSqlLSeg

[C#] public PgSqlLSeg GetPgSqlLSeg(int);

Gets the value of the specified column as a PgSqlLSeg object.

[Visual Basic] Overloads Public Function GetPgSqlLSeg(String) As PgSqlLSeg

[C#] public PgSqlLSeg GetPgSqlLSeg(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLSeg(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlLSeg Method : GetPgSqlLSeg(Int32) Method

Gets the value of the specified column as a PgSqlLSeg object.

[Visual Basic]
Overloads Public Function GetPgSqlLSeg( _
   ByVal i As Integer _
) As PgSqlLSeg
[C#]
public PgSqlLSeg GetPgSqlLSeg(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlLSeg object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlLSeg(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlLSeg Method : GetPgSqlLSeg(String) Method

Gets the value of the specified column as a PgSqlLSeg object.

[Visual Basic]
Overloads Public Function GetPgSqlLSeg( _
   ByVal name As String _
) As PgSqlLSeg
[C#]
public PgSqlLSeg GetPgSqlLSeg(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlLSeg object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlMacAddr Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlMacAddr Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlMacAddr(Integer) As PgSqlMacAddr

[C#] public PgSqlMacAddr GetPgSqlMacAddr(int);

[Visual Basic] Overloads Public Function GetPgSqlMacAddr(String) As PgSqlMacAddr

[C#] public PgSqlMacAddr GetPgSqlMacAddr(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlMacAddr(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlMacAddr Method : GetPgSqlMacAddr(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlMacAddr( _
   ByVal i As Integer _
) As PgSqlMacAddr
[C#]
public PgSqlMacAddr GetPgSqlMacAddr(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlMacAddr(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlMacAddr Method : GetPgSqlMacAddr(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlMacAddr( _
   ByVal name As String _
) As PgSqlMacAddr
[C#]
public PgSqlMacAddr GetPgSqlMacAddr(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlNumericRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlNumericRange Method

Gets the value of the specified column as a PgSqlNumericRange object.

Overload List

Gets the value of the specified column as a PgSqlNumericRange object.

[Visual Basic] Overloads Public Function GetPgSqlNumericRange(Integer) As PgSqlNumericRange

[C#] public PgSqlNumericRange GetPgSqlNumericRange(int);

Gets the value of the specified column as a PgSqlNumericRange object.

[Visual Basic] Overloads Public Function GetPgSqlNumericRange(String) As PgSqlNumericRange

[C#] public PgSqlNumericRange GetPgSqlNumericRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlNumericRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlNumericRange Method : GetPgSqlNumericRange(Int32) Method

Gets the value of the specified column as a PgSqlNumericRange object.

[Visual Basic]
Overloads Public Function GetPgSqlNumericRange( _
   ByVal i As Integer _
) As PgSqlNumericRange
[C#]
public PgSqlNumericRange GetPgSqlNumericRange(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlNumericRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlNumericRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlNumericRange Method : GetPgSqlNumericRange(String) Method

Gets the value of the specified column as a PgSqlNumericRange object.

[Visual Basic]
Overloads Public Function GetPgSqlNumericRange( _
   ByVal name As String _
) As PgSqlNumericRange
[C#]
public PgSqlNumericRange GetPgSqlNumericRange(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlNumericRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPath Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlPath Method

Gets the value of the specified column as a PgSqlPath object.

Overload List

Gets the value of the specified column as a PgSqlPath object.

[Visual Basic] Overloads Public Function GetPgSqlPath(Integer) As PgSqlPath

[C#] public PgSqlPath GetPgSqlPath(int);

Gets the value of the specified column as a PgSqlPath object.

[Visual Basic] Overloads Public Function GetPgSqlPath(String) As PgSqlPath

[C#] public PgSqlPath GetPgSqlPath(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPath(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPath Method : GetPgSqlPath(Int32) Method

Gets the value of the specified column as a PgSqlPath object.

[Visual Basic]
Overloads Public Function GetPgSqlPath( _
   ByVal i As Integer _
) As PgSqlPath
[C#]
public PgSqlPath GetPgSqlPath(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlPath object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPath(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPath Method : GetPgSqlPath(String) Method

Gets the value of the specified column as a PgSqlPath object.

[Visual Basic]
Overloads Public Function GetPgSqlPath( _
   ByVal name As String _
) As PgSqlPath
[C#]
public PgSqlPath GetPgSqlPath(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlPath object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPoint Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlPoint Method

Gets the value of the specified column as a PgSqlPoint object.

Overload List

Gets the value of the specified column as a PgSqlPoint object.

[Visual Basic] Overloads Public Function GetPgSqlPoint(Integer) As PgSqlPoint

[C#] public PgSqlPoint GetPgSqlPoint(int);

Gets the value of the specified column as a PgSqlPoint object.

[Visual Basic] Overloads Public Function GetPgSqlPoint(String) As PgSqlPoint

[C#] public PgSqlPoint GetPgSqlPoint(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPoint(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPoint Method : GetPgSqlPoint(Int32) Method

Gets the value of the specified column as a PgSqlPoint object.

[Visual Basic]
Overloads Public Function GetPgSqlPoint( _
   ByVal i As Integer _
) As PgSqlPoint
[C#]
public PgSqlPoint GetPgSqlPoint(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlPoint object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPoint(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPoint Method : GetPgSqlPoint(String) Method

Gets the value of the specified column as a PgSqlPoint object.

[Visual Basic]
Overloads Public Function GetPgSqlPoint( _
   ByVal name As String _
) As PgSqlPoint
[C#]
public PgSqlPoint GetPgSqlPoint(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlPoint object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPolygon Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlPolygon Method

Gets the value of the specified column as a PgSqlPolygon object.

Overload List

Gets the value of the specified column as a PgSqlPolygon object.

[Visual Basic] Overloads Public Function GetPgSqlPolygon(Integer) As PgSqlPolygon

[C#] public PgSqlPolygon GetPgSqlPolygon(int);

Gets the value of the specified column as a PgSqlPolygon object.

[Visual Basic] Overloads Public Function GetPgSqlPolygon(String) As PgSqlPolygon

[C#] public PgSqlPolygon GetPgSqlPolygon(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPolygon(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPolygon Method : GetPgSqlPolygon(Int32) Method

Gets the value of the specified column as a PgSqlPolygon object.

[Visual Basic]
Overloads Public Function GetPgSqlPolygon( _
   ByVal i As Integer _
) As PgSqlPolygon
[C#]
public PgSqlPolygon GetPgSqlPolygon(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlPolygon object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlPolygon(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlPolygon Method : GetPgSqlPolygon(String) Method

Gets the value of the specified column as a PgSqlPolygon object.

[Visual Basic]
Overloads Public Function GetPgSqlPolygon( _
   ByVal name As String _
) As PgSqlPolygon
[C#]
public PgSqlPolygon GetPgSqlPolygon(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlPolygon object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRow Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlRow Method

Gets the value of the specified column as a PgSqlRow object.

Overload List

Gets the value of the specified column as a PgSqlRow object.

[Visual Basic] Overloads Public Function GetPgSqlRow(Integer) As PgSqlRow

[C#] public PgSqlRow GetPgSqlRow(int);

Gets the value of the specified column as a PgSqlRow object.

[Visual Basic] Overloads Public Function GetPgSqlRow(String) As PgSqlRow

[C#] public PgSqlRow GetPgSqlRow(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRow(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlRow Method : GetPgSqlRow(Int32) Method

Gets the value of the specified column as a PgSqlRow object.

[Visual Basic]
Overloads Public Function GetPgSqlRow( _
   ByVal i As Integer _
) As PgSqlRow
[C#]
public PgSqlRow GetPgSqlRow(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlRow object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRow(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlRow Method : GetPgSqlRow(String) Method

Gets the value of the specified column as a PgSqlRow object.

[Visual Basic]
Overloads Public Function GetPgSqlRow( _
   ByVal name As String _
) As PgSqlRow
[C#]
public PgSqlRow GetPgSqlRow(
   string name
);

Parameters

name

Return Type

The value of the specified column as a PgSqlRow object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRowType Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlRowType Method

Gets the value of the specified column as a PgSqlRowType object.

Overload List

Gets the value of the specified column as a PgSqlRowType object.

[Visual Basic] Overloads Public Function GetPgSqlRowType(Integer) As PgSqlRowType

[C#] public PgSqlRowType GetPgSqlRowType(int);

Gets the value of the specified column as a PgSqlRowType object.

[Visual Basic] Overloads Public Function GetPgSqlRowType(String) As PgSqlRowType

[C#] public PgSqlRowType GetPgSqlRowType(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRowType(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlRowType Method : GetPgSqlRowType(Int32) Method

Gets the value of the specified column as a PgSqlRowType object.

[Visual Basic]
Overloads Public Function GetPgSqlRowType( _
   ByVal i As Integer _
) As PgSqlRowType
[C#]
public PgSqlRowType GetPgSqlRowType(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlRowType object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlRowType(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlRowType Method : GetPgSqlRowType(String) Method

Gets the value of the specified column as a PgSqlRowType object.

[Visual Basic]
Overloads Public Function GetPgSqlRowType( _
   ByVal name As String _
) As PgSqlRowType
[C#]
public PgSqlRowType GetPgSqlRowType(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlRowType object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlText Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlText Method

Gets the value of the specified column as a PgSqlText object.

Overload List

Gets the value of the specified column as a PgSqlText object.

[Visual Basic] Overloads Public Function GetPgSqlText(Integer) As PgSqlText

[C#] public PgSqlText GetPgSqlText(int);

Gets the value of the specified column as a PgSqlText object.

[Visual Basic] Overloads Public Function GetPgSqlText(String) As PgSqlText

[C#] public PgSqlText GetPgSqlText(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlText(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlText Method : GetPgSqlText(Int32) Method

Gets the value of the specified column as a PgSqlText object.

[Visual Basic]
Overloads Public Function GetPgSqlText( _
   ByVal i As Integer _
) As PgSqlText
[C#]
public PgSqlText GetPgSqlText(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlText object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlText(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlText Method : GetPgSqlText(String) Method

Gets the value of the specified column as a PgSqlText object.

[Visual Basic]
Overloads Public Function GetPgSqlText( _
   ByVal name As String _
) As PgSqlText
[C#]
public PgSqlText GetPgSqlText(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlText object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTime Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlTime Method

Overload List

[Visual Basic] Overloads Public Function GetPgSqlTime(String) As PgSqlTime

[C#] public PgSqlTime GetPgSqlTime(string);

[Visual Basic] Overloads Public Function GetPgSqlTime(Integer) As PgSqlTime

[C#] public PgSqlTime GetPgSqlTime(int);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTime(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTime Method : GetPgSqlTime(String) Method
[Visual Basic]
Overloads Public Function GetPgSqlTime( _
   ByVal name As String _
) As PgSqlTime
[C#]
public PgSqlTime GetPgSqlTime(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTime(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTime Method : GetPgSqlTime(Int32) Method
[Visual Basic]
Overloads Public Function GetPgSqlTime( _
   ByVal i As Integer _
) As PgSqlTime
[C#]
public PgSqlTime GetPgSqlTime(
   int i
);

Parameters

i

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStamp Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlTimeStamp Method

Gets the value of the specified column as a PgSqlTimeStamp object.

Overload List

Gets the value of the specified column as a PgSqlTimeStamp object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStamp(String) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp GetPgSqlTimeStamp(string);

Gets the value of the specified column as a PgSqlTimeStamp object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStamp(Integer) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp GetPgSqlTimeStamp(int);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStamp(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStamp Method : GetPgSqlTimeStamp(String) Method

Gets the value of the specified column as a PgSqlTimeStamp object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStamp( _
   ByVal name As String _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp GetPgSqlTimeStamp(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlTimeStamp object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStamp(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStamp Method : GetPgSqlTimeStamp(Int32) Method

Gets the value of the specified column as a PgSqlTimeStamp object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStamp( _
   ByVal i As Integer _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp GetPgSqlTimeStamp(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlTimeStamp object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlTimeStampRange Method

Gets the value of the specified column as a PgSqlTimeStampRange object.

Overload List

Gets the value of the specified column as a PgSqlTimeStampRange object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStampRange(Integer) As PgSqlTimeStampRange

[C#] public PgSqlTimeStampRange GetPgSqlTimeStampRange(int);

Gets the value of the specified column as a PgSqlTimeStampRange object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStampRange(String) As PgSqlTimeStampRange

[C#] public PgSqlTimeStampRange GetPgSqlTimeStampRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStampRange Method : GetPgSqlTimeStampRange(Int32) Method

Gets the value of the specified column as a PgSqlTimeStampRange object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStampRange( _
   ByVal i As Integer _
) As PgSqlTimeStampRange
[C#]
public PgSqlTimeStampRange GetPgSqlTimeStampRange(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlTimeStampRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStampRange Method : GetPgSqlTimeStampRange(String) Method

Gets the value of the specified column as a PgSqlTimeStampRange object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStampRange( _
   ByVal name As String _
) As PgSqlTimeStampRange
[C#]
public PgSqlTimeStampRange GetPgSqlTimeStampRange(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlTimeStampRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampTZRange Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetPgSqlTimeStampTZRange Method

Gets the value of the specified column as a PgSqlTimeStampTZRange object.

Overload List

Gets the value of the specified column as a PgSqlTimeStampTZRange object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStampTZRange(Integer) As PgSqlTimeStampTZRange

[C#] public PgSqlTimeStampTZRange GetPgSqlTimeStampTZRange(int);

Gets the value of the specified column as a PgSqlTimeStampTZRange object.

[Visual Basic] Overloads Public Function GetPgSqlTimeStampTZRange(String) As PgSqlTimeStampTZRange

[C#] public PgSqlTimeStampTZRange GetPgSqlTimeStampTZRange(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampTZRange(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStampTZRange Method : GetPgSqlTimeStampTZRange(Int32) Method

Gets the value of the specified column as a PgSqlTimeStampTZRange object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStampTZRange( _
   ByVal i As Integer _
) As PgSqlTimeStampTZRange
[C#]
public PgSqlTimeStampTZRange GetPgSqlTimeStampTZRange(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a PgSqlTimeStampTZRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column to get value of.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlTimeStampTZRange(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetPgSqlTimeStampTZRange Method : GetPgSqlTimeStampTZRange(String) Method

Gets the value of the specified column as a PgSqlTimeStampTZRange object.

[Visual Basic]
Overloads Public Function GetPgSqlTimeStampTZRange( _
   ByVal name As String _
) As PgSqlTimeStampTZRange
[C#]
public PgSqlTimeStampTZRange GetPgSqlTimeStampTZRange(
   string name
);

Parameters

name
The name of the column to get value of.

Return Type

The value of the specified column as a PgSqlTimeStampTZRange object.

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetProviderSpecificFieldType Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetProviderSpecificFieldType Method (PgSqlDataReader)

Gets the Type that is the provider-specific data type of the object.

Overload List

Gets the Type that is the provider-specific data type of the object.

[Visual Basic] Overloads Overrides Public Function GetProviderSpecificFieldType(Integer) As Type

[C#] public override Type GetProviderSpecificFieldType(int);

Returns the provider-specific field type of the specified column.

[Visual Basic] Overloads Public Function GetProviderSpecificFieldType(String) As Type

[C#] public Type GetProviderSpecificFieldType(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetProviderSpecificFieldType(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetProviderSpecificFieldType Method : GetProviderSpecificFieldType(Int32) Method

Gets the Type that is the provider-specific data type of the object.

[Visual Basic]
Overloads Overrides Public Function GetProviderSpecificFieldType( _
   ByVal i As Integer _
) As Type
[C#]
public override Type GetProviderSpecificFieldType(
   int i
);

Parameters

i

Return Type

The Type that is the provider-specific data type of the object.

Example

[C#]

static void GetMyFieldType(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();

    for (short i = 0; i < reader.FieldCount; i++) {
      object someValue = reader.GetProviderSpecificValue(i);
      Console.Write(reader.GetProviderSpecificFieldType(i).FullName + " : ");
      Console.WriteLine(someValue.ToString());
    }

    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyFieldType(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    For i As Short = 0 To reader.FieldCount - 1
      Dim someValue As Object = reader.GetProviderSpecificValue(i)
      Console.Write((reader.GetProviderSpecificFieldType(i).FullName & " : "))
      Console.WriteLine(someValue.ToString)
    Next i
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetProviderSpecificValue Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetProviderSpecificValue Method (PgSqlDataReader)

Gets the value of the specified column. If possible, a provider-specific type is used.

Overload List

Gets the value of the specified column. If possible, a provider-specific type is used.

[Visual Basic] Overloads Overrides Public Function GetProviderSpecificValue(Integer) As Object

[C#] public override object GetProviderSpecificValue(int);

Gets the value of the specified column as an instance of Object

[Visual Basic] Overloads Public Function GetProviderSpecificValue(String) As Object

[C#] public object GetProviderSpecificValue(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetProviderSpecificValue(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetProviderSpecificValue Method : GetProviderSpecificValue(Int32) Method

Gets the value of the specified column. If possible, a provider-specific type is used.

[Visual Basic]
Overloads Overrides Public Function GetProviderSpecificValue( _
   ByVal i As Integer _
) As Object
[C#]
public override object GetProviderSpecificValue(
   int i
);

Parameters

i

Return Type

The value to return.

Remarks

This method returns DBNull for null data source columns.

Example

[C#]

static void GetMyFieldType(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();

    for (short i = 0; i < reader.FieldCount; i++) {
      object someValue = reader.GetProviderSpecificValue(i);
      Console.Write(reader.GetProviderSpecificFieldType(i).FullName + " : ");
      Console.WriteLine(someValue.ToString());
    }

    reader.Close();
  }
  finally {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyFieldType(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    For i As Short = 0 To reader.FieldCount - 1
      Dim someValue As Object = reader.GetProviderSpecificValue(i)
      Console.Write((reader.GetProviderSpecificFieldType(i).FullName & " : "))
      Console.WriteLine(someValue.ToString)
    Next i
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

values
An array of Object into which to copy the column values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetProviderSpecificValues Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetProviderSpecificValues Method

Gets all column values for the current row. If possible, a provider-specific type is used.

[Visual Basic]
Overrides Public Function GetProviderSpecificValues( _
   ByVal values() As Object _
) As Integer
[C#]
public override int GetProviderSpecificValues(
   object[] values
);

Parameters

values
An array of Object into which to copy the column values.

Return Type

The number of instances of Object in the array.

Remarks

This method is equivalent to the GetValues method, the only difference is that this method uses a provider-specific type whenever possible.

Example

[C#]

static void GetMyValues(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Dept");
  cmd.Connection = myConnection;
  myConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();

    object[] someValues = new object[5];
    int number = reader.GetProviderSpecificValues(someValues);

    for (short i = 0; i < number; i++)
    {
      Console.WriteLine(someValues[i].ToString());
    }

    reader.Close();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyValues(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim someValues As Object() = New Object() {}
    Dim number As Integer = reader.GetProviderSpecificValues(someValues)
    For i As Short = 0 To number - 1
      Console.WriteLine(someValues(i).ToString)
    Next i
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetSchemaTable Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetSchemaTable Method (PgSqlDataReader)

Returns a DataTable that describes the column metadata of the PgSqlDataReader.

[Visual Basic]
Overrides Public Function GetSchemaTable() As DataTable
[C#]
public override DataTable GetSchemaTable();

Return Type

A DataTable that describes the column metadata.

Remarks

The GetSchemaTable method returns metadata about each column in the following order:
DataReader Column | Description
ColumnName | The name of the column; this might not be unique. If the column name cannot be determined, a null value is returned. This name always reflects the most recent naming of the column in the current view or command text.
ColumnOrdinal | The ordinal of the column. This is zero for the bookmark column of the row, if any. Other columns are numbered starting with 1. This column cannot contain a null value.
ColumnSize | The maximum possible length of a value in the column. For columns that use a fixed-length data type, this is the size of the data type.
NumericPrecision | If DbType is a numeric data type, this is the maximum precision of the column. The precision depends on the definition of the column. If DbType is not a numeric data type, this is a null value.
NumericScale | If DbType is Decimal, the number of digits to the right of the decimal point. Otherwise, this is a null value.
DataType | Maps to the .Net Framework type of the column.
ProviderType | The indicator of the column's data type.
IsLong | true if the column contains a bytea that contains very long data.
AllowDBNull | true if the consumer can set the column to a null value. Otherwise, false. A column may contain null values, even if it cannot be set to a null value.
IsReadOnly | true if the column can be modified; otherwise, false.
IsRowVersion | Set if the column contains a persistent row identifier that cannot be written to, and has no meaningful value except to identity the row.
IsUnique | true: No two rows in the base table-the table returned in BaseTableName-can have the same value in this column. IsUnique is guaranteed to be true if the column constitutes a key by itself or if there is a constraint of type UNIQUE that applies only to this column. false: The column can contain duplicate values in the base table.The default for this column is false.
IsKey | true: The column is one of a set of columns in the rowset that, taken together, uniquely identify the row. The set of columns with IsKey set to true must uniquely identify a row in the rowset. There is no requirement that this set of columns is a minimal set of columns. This set of columns may be generated from a base table primary key, a unique constraint or a unique index. false: The column is not required to uniquely identify the row.
IsAutoIncrement | true if the column assigns values to new rows in fixed increments; otherwise, false. The default value for this column is false.
BaseSchemaName | The name of the schema in the database that contains the column. NULL if the base catalog name cannot be determined. The default for this column is a null value.
BaseCatalogName | The name of the catalog in the data store that contains the column. NULL if the base catalog name cannot be determined. The default value for this column is a null value.
BaseTableName | The name of the table or view in the data store that contains the column. A null value if the base table name cannot be determined. The default value of this column is a null value.
BaseColumnName | The name of the column in the data store. This might be different than the column name returned in the ColumnName column if an alias was used. A null value if the base column name cannot be determined or if the rowset column is derived, but not identical to, a column in the data store. The default value for this column is a null value.
IsAliased | true if the column name is an alias; otherwise, false.
IsExpression | true if the column is an expression; otherwise, false.

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetString Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetString Method (PgSqlDataReader)

Gets the value of the specified column as a string.

Overload List

Gets the value of the specified column as a string.

[Visual Basic] Overloads Overrides Public Function GetString(Integer) As String

[C#] public override string GetString(int);

Gets the value of the specified column as an instance of String

[Visual Basic] Overloads Public Function GetString(String) As String

[C#] public string GetString(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetString(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetString Method : GetString(Int32) Method

Gets the value of the specified column as a string.

[Visual Basic]
Overloads Overrides Public Function GetString( _
   ByVal i As Integer _
) As String
[C#]
public override string GetString(
   int i
);

Parameters

i

Return Type

The value of the specified column.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyString(PgSqlConnection myConnection) {
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    string recievedString = reader.GetString(reader.GetOrdinal("StringCol"));
    reader.Close();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyString(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedString As String = reader.GetString(reader.GetOrdinal("StringCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetTimeSpan Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetTimeSpan Method

Gets the value of the specified column as a System.TimeSpan.

Overload List

Gets the value of the specified column as a System.TimeSpan.

[Visual Basic] Overloads Public Function GetTimeSpan(Integer) As TimeSpan

[C#] public TimeSpan GetTimeSpan(int);

[Visual Basic] Overloads Public Function GetTimeSpan(String) As TimeSpan

[C#] public TimeSpan GetTimeSpan(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

i
The zero-based column ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetTimeSpan(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetTimeSpan Method : GetTimeSpan(Int32) Method

Gets the value of the specified column as a System.TimeSpan.

[Visual Basic]
Overloads Public Function GetTimeSpan( _
   ByVal i As Integer _
) As TimeSpan
[C#]
public TimeSpan GetTimeSpan(
   int i
);

Parameters

i
The zero-based column ordinal.

Return Type

The value of the specified column as a System.TimeSpan.

Remarks

Call IsDBNull to check for null values before calling this method.

Example

[C#]

static void GetMyTimeSpan(PgSqlConnection myConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    TimeSpan recievedTime = reader.GetTimeSpan(reader.GetOrdinal("TimeCol"));
    reader.Close();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyTimeSpan(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    Dim recievedTime As TimeSpan = reader.GetTimeSpan(reader.GetOrdinal("TimeCol"))
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

name
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetTimeSpan(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetTimeSpan Method : GetTimeSpan(String) Method
[Visual Basic]
Overloads Public Function GetTimeSpan( _
   ByVal name As String _
) As TimeSpan
[C#]
public TimeSpan GetTimeSpan(
   string name
);

Parameters

name

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetValue Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetValue Method (PgSqlDataReader)

Gets the value of the specified column in its native format.

Overload List

Gets the value of the specified column in its native format.

[Visual Basic] Overloads Overrides Public Function GetValue(Integer) As Object

[C#] public override object GetValue(int);

Gets the value of the specified column in its native format.

[Visual Basic] Overloads Public Function GetValue(String) As Object

[C#] public object GetValue(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetValues Method

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetValue(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > GetValue Method : GetValue(Int32) Method

Gets the value of the specified column in its native format.

[Visual Basic]
Overloads Overrides Public Function GetValue( _
   ByVal i As Integer _
) As Object
[C#]
public override object GetValue(
   int i
);

Parameters

i

Return Type

The value to return.

Remarks

This method returns DBNull for null data source columns.

Example

[C#]

static void GetMyValue(PgSqlConnection myConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();

    for (short i = 0; i < reader.FieldCount; i++)
    {
      if (reader.IsDBNull(i))
        Console.WriteLine("NULL");
      else
      {
        object someValue = reader.GetValue(i);
        Console.WriteLine(someValue.ToString());
      }
    }

    reader.Close();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyValue(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    For i As Short = 0 To reader.FieldCount - 1
      If reader.IsDBNull(i) Then
        Console.WriteLine("NULL")
      Else
        Console.WriteLine(reader.GetValue(i).ToString)
      End If
    Next i
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List | GetValues Method


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | GetValue Method

Language

Visual Basic

C#

Show All

values
An array of Object into which to copy the attribute column values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetValues Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : GetValues Method (PgSqlDataReader)

Gets all column values for the current row.

[Visual Basic]
Overrides Public Function GetValues( _
   ByVal values() As Object _
) As Integer
[C#]
public override int GetValues(
   object[] values
);

Parameters

values
An array of Object into which to copy the attribute column values.

Return Type

The number of instances of Object in the array.

Remarks

For most applications, the GetValues method provides an efficient way for retrieving all column values, rather than retrieving each column value individually.

You can pass an Object array that contains fewer than the number of column values contained in the resulting row. Only the amount of data the Object array holds is copied to the array. You can also pass an Object array whose length is more than the number of columns contained in the resulting row.

This method returns DBNull for redundant array elements.

Example

The example shows how to retrieve several fields at once. Note that only the first three fields are retrieved, though there may be more in the table.

[C#]

public void GetObjects(PgSqlConnection pgConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.Emp");
  cmd.Connection = pgConnection;
  pgConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();
    object[] objs = new object[3];
    int quant = reader.GetValues(objs);
    for (int i=0;i < quant;i++)
    {
      Console.WriteLine(objs[i]);
    }
    reader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetObjects(ByVal pgConnection As PgSqlConnection)
  Dim cmd As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  cmd.Connection = pgConnection
  pgConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader()
    reader.Read()
    Dim objs(3) As Object
    Dim quant As Integer = reader.GetValues(objs)
    Dim i As Integer
    For i = 0 To quant - 1
      Console.WriteLine(objs(i))
    Next i
    reader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | GetValue Method


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsDBNull Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : IsDBNull Method (PgSqlDataReader)

Gets a value indicating whether the column contains non-existent or missing values.

Overload List

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic] Overloads Overrides Public Function IsDBNull(Integer) As Boolean

[C#] public override bool IsDBNull(int);

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic] Overloads Public Function IsDBNull(String) As Boolean

[C#] public bool IsDBNull(string);

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | Overload List

Language

Visual Basic

C#

Show All

ordinal
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsDBNull(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class > IsDBNull Method : IsDBNull(Int32) Method

Gets a value indicating whether the column contains non-existent or missing values.

[Visual Basic]
Overloads Overrides Public Function IsDBNull( _
   ByVal ordinal As Integer _
) As Boolean
[C#]
public override bool IsDBNull(
   int ordinal
);

Parameters

ordinal

Return Type

true if the specified column value is equivalent to DBNull; otherwise, false.

Remarks

To avoid raising an error, call this method to check for null column values before calling the typed Get methods (for example, GetByte, GetChar, and so on).

Example

[C#]

static void GetMyValue(PgSqlConnection myConnection)
{
  PgSqlCommand cmd = new PgSqlCommand("SELECT * FROM Test.AllTypes");
  cmd.Connection = myConnection;
  myConnection.Open();
  try
  {
    PgSqlDataReader reader = cmd.ExecuteReader();
    reader.Read();

    for (short i = 0; i < reader.FieldCount; i++)
    {
      if (reader.IsDBNull(i))
        Console.WriteLine("NULL");
      else
      {
        object someValue = reader.GetValue(i);
        Console.WriteLine(someValue.ToString());
      }
    }

    reader.Close();
  }
  finally
  {
    myConnection.Close();
  }
}

[Visual Basic]

Shared Sub GetMyValue(ByVal myConnection As PgSqlConnection)
  Dim cmd As New PgSqlCommand("SELECT * FROM Test.AllTypes")
  cmd.Connection = myConnection
  myConnection.Open()
  Try
    Dim reader As PgSqlDataReader = cmd.ExecuteReader
    reader.Read()
    For i As Short = 0 To reader.FieldCount - 1
      If reader.IsDBNull(i) Then
        Console.WriteLine("NULL")
      Else
        Console.WriteLine(reader.GetValue(i).ToString)
      End If
    Next i
    reader.Close()
  Finally
    myConnection.Close()
  End Try
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | Overload List


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NextResult Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : NextResult Method (PgSqlDataReader)

Advances the data reader to the next result, when reading the results of batch SQL statements.

[Visual Basic]
Overrides Public Function NextResult() As Boolean
[C#]
public override bool NextResult();

Return Type

true if there are more result sets; otherwise, false.

Remarks

Used to process multiple results, which can be generated by executing batch SQL statements.

By default, the PgSqlDataReader is positioned on the first result.

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Read Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : Read Method (PgSqlDataReader)

Advances the PgSqlDataReader to the next record.

[Visual Basic]
Overrides Public Function Read() As Boolean
[C#]
public override bool Read();

Return Type

true if there are more rows; otherwise, false.

Remarks

The default position of the PgSqlDataReader is prior to the first record. Therefore, you must call Read to begin accessing any data.

While the PgSqlDataReader is in use, the associated PgSqlConnection is busy serving it until you call Close.

Example

The following example creates a PgSqlConnection, a PgSqlCommand, and a PgSqlDataReader. The example reads through the data, writing it out to the console. Finally, the example closes the PgSqlDataReader, then the PgSqlConnection.

[C#]

public void ReadMyData(string myConnString)
{
  string mySelectQuery = "SELECT DeptNo, DName FROM Test.Dept";
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  PgSqlCommand pgCommand = new PgSqlCommand(mySelectQuery,pgConnection);
  pgConnection.Open();
  PgSqlDataReader pgReader;
  pgReader = pgCommand.ExecuteReader();
  // Always call Read before accessing data.
  while (pgReader.Read()) {
    Console.WriteLine(pgReader.GetInt32(0) + ", " + pgReader.GetString(1));
  }
  // always call Close when done reading.
  pgReader.Close();
  // Close the connection when done with it.
  pgConnection.Close();
}

[Visual Basic]

Public Sub ReadMyData(myConnString As String)
  Dim mySelectQuery As String = "SELECT DeptNo, DName FROM Test.Dept"
  Dim pgConnection As New PgSqlConnection(myConnString)
  Dim pgCommand As New PgSqlCommand(mySelectQuery, pgConnection)
  pgConnection.Open()
  Dim pgReader As PgSqlDataReader
  pgReader = pgCommand.ExecuteReader()
  ' Always call Read before accessing data.
  While pgReader.Read()
    Console.WriteLine(pgReader.GetInt32(0).ToString() + ", " _
      + pgReader.GetString(1))
  End While
  ' always call Close when done reading.
  pgReader.Close()
  ' Close the connection when done with it.
  pgConnection.Close()
End Sub

See Also

PgSqlDataReader Class | PgSqlDataReader Members | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlDataReader Class | PgSqlDataReader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetCursorFetchModeIfOnlyRefcursorsResultSet Method

Devart.Data.PostgreSql Namespace > PgSqlDataReader Class : SetCursorFetchModeIfOnlyRefcursorsResultSet Method
[Visual Basic]
Public Function SetCursorFetchModeIfOnlyRefcursorsResultSet() As Boolean
[C#]
public bool SetCursorFetchModeIfOnlyRefcursorsResultSet();

See Also

PgSqlDataReader Class | PgSqlDataReader Members


%%PageItemTitle%%

PgSqlDataSet Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Class

Devart.Data.PostgreSql Namespace : PgSqlDataSet Class

Represents an in-memory cache of data with support for PostgreSQL-specific features.

For a list of all members of this type, see PgSqlDataSet members.

Inheritance Hierarchy

System.Object
System.ComponentModel.MarshalByValueComponent
System.Data.DataSet
Devart.Common.DbDataSet
Devart.Data.PostgreSql.PgSqlDataSet

Syntax

[Visual Basic]
Public Class PgSqlDataSet
   Inherits DbDataSet
   Implements IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable
[C#]
public class PgSqlDataSet : DbDataSet, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable

Remarks

Refer to topic General Concepts in Database Application Development for information on how to use the PgSqlDataSet class best.

This class supports cross-form data binding with the InterForm Technology.

To migrate from a standard typed DataSet, change its Custom Tool property to dcPgSqlDataSetGenerator. You will also need to delete all TableAdapters from the old DataSet.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlDataSet Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Class Members

Devart.Data.PostgreSql Namespace : PgSqlDataSet Class

PgSqlDataSet overview

Public Constructors

Public Constructor PgSqlDataSet Constructor Overloaded. Initializes a new instance of a PgSqlDataSet class with the given name.

Public Properties

Public Property CaseSensitive (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.
Public Property Connection | Associated PgSqlConnection.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSetName (Inherited from System.Data.DataSet) | Gets or sets the name of the current DataSet.
Public Property DefaultViewManager (Inherited from System.Data.DataSet) | Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property EnforceConstraints (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether constraint rules are followed when attempting any update operation.
Public Property ExtendedProperties (Inherited from System.Data.DataSet) | Gets the collection of customized user information associated with the DataSet.
Public Property HasErrors (Inherited from System.Data.DataSet) | Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet.
Public Property IsInitialized (Inherited from System.Data.DataSet) | Gets a value that indicates whether the DataSet is initialized.
Public Property Locale (Inherited from System.Data.DataSet) | Gets or sets the locale information used to compare strings within the table.
Public Property Name (Inherited from Devart.Common.DbDataSet) | Gets or sets name of the Devart.Common.DbDataSet.
Public Property Namespace (Inherited from System.Data.DataSet) | Gets or sets the namespace of the DataSet.
Public Property Owner (Inherited from Devart.Common.DbDataSet) | Gets or sets a form or other container that the Devart.Common.DbDataSet instance belongs to.
Public Property Prefix (Inherited from System.Data.DataSet) | Gets or sets an XML prefix that aliases the namespace of the DataSet.
Public Property Relations | Gets the collection of PgSqlDataSet relations.
Public Property RemotingFormat (Inherited from Devart.Common.DbDataSet) | Gets or sets a SerializationFormat for the Devart.Common.DbDataSet used during remoting.
Public Property SchemaSerializationMode (Inherited from System.Data.DataSet) | Gets or sets a SchemaSerializationMode for a DataSet.
Public Property Site (Inherited from System.Data.DataSet) | Gets or sets an ISite for the DataSet.
Public Property Tables | Gets collection of tables

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataSet) | Commits all the changes made to this DataSet since it was loaded or since the last time AcceptChanges was called.
Public Method BeginInit (Inherited from System.Data.DataSet) | Begins the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Clear (Inherited from Devart.Common.DbDataSet) | Clears the Devart.Common.DbDataSet of any data by removing all rows in all tables.
Public Method Clone (Inherited from Devart.Common.DbDataSet) | Copies the structure of the Devart.Common.DbDataSet, including all Devart.Common.DbDataTable schemas, relations, and constraints. Does not copy any data.
Public Method Copy (Inherited from System.Data.DataSet) | Copies both the structure and data for this DataSet.
Public Method CreateDataReader (Inherited from System.Data.DataSet) | Overloaded. Returns a DataTableReader with one result set per DataTable, in the same sequence as the tables appear in the Tables collection.
Public Method CreateDataTable | Overridden. Creates and returns new PgSqlDataTable object.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndInit (Inherited from System.Data.DataSet) | Ends the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Fill (Inherited from Devart.Common.DbDataSet) | Fills the Rows collection of the Devart.Common.DbDataSet with rows from the data source.
Public Method GetChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges was last called.
Public Method GetObjectData (Inherited from System.Data.DataSet) | Populates a serialization information object with the data needed to serialize the DataSet.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method GetXml (Inherited from System.Data.DataSet) | Returns the XML representation of the data stored in the DataSet.
Public Method GetXmlSchema (Inherited from System.Data.DataSet) | Returns the XML Schema for the XML representation of the data stored in the DataSet.
Public Method HasChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows.
Public Method InferXmlSchema (Inherited from System.Data.DataSet) | Overloaded.
Public Method Load (Inherited from System.Data.DataSet) | Overloaded.
Public Method Merge (Inherited from System.Data.DataSet) | Overloaded. Merges a specified DataSet and its schema into the current DataSet.
Public Method ReadXml (Inherited from Devart.Common.DbDataSet) | Overloaded. Reads XML schema and data into the Devart.Common.DbDataSet.
Public Method ReadXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Reads the XML schema from the specified Stream into the DataSet.
Public Method RejectChanges (Inherited from System.Data.DataSet) | Rolls back all the changes made to the DataSet since it was created, or since the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataSet) | Resets the DataSet to its original state. Subclasses should override Reset to restore a DataSet to its original state.
Public Method ToString (Inherited from System.ComponentModel.MarshalByValueComponent) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from Devart.Common.DbDataSet) | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataSet) | Overloaded. Writes the current data for the DataSet using the specified Stream.
Public Method WriteXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Writes the DataSet structure as an XML schema to the specified Stream object.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.MarshalByValueComponent) | Adds an event handler to listen to the Disposed event on the component.
Public Event Initialized (Inherited from System.Data.DataSet) | Occurs after the DataSet is initialized.
Public Event MergeFailed (Inherited from System.Data.DataSet) | Occurs when a target and source DataRow have the same primary key value, and EnforceConstraints is set to true.

See Also

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Constructor

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class : PgSqlDataSet Constructor (PgSqlDataSet)

Initializes a new instance of a PgSqlDataSet class with the given name.

Overload List

Initializes a new instance of a PgSqlDataSet class with the given name.

[Visual Basic] Public Sub New()

[C#] public PgSqlDataSet();

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[Visual Basic] Public Sub New(SerializationInfo,StreamingContext,Boolean)

[C#] public PgSqlDataSet(SerializationInfo,StreamingContext,bool);

See Also

PgSqlDataSet Class | PgSqlDataSet Members


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Constructor()

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class > PgSqlDataSet Constructor : PgSqlDataSet Constructor()

Initializes a new instance of a PgSqlDataSet class with the given name.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDataSet();

See Also

PgSqlDataSet Class | PgSqlDataSet Members | Overload List


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members | Overload List

Language

Visual Basic

C#

Show All

info
Contains the data needed to serialize or deserialize an PgSqlDataSet object.
context
Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.
ConstructSchema
Value that determines whether to construct schema or not.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Constructor(SerializationInfo,StreamingContext,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class > PgSqlDataSet Constructor : PgSqlDataSet Constructor(SerializationInfo,StreamingContext,Boolean)

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

[Visual Basic]
Public Function New( _
   ByVal info As SerializationInfo, _
   ByVal context As StreamingContext, _
   ByVal ConstructSchema As Boolean _
)
[C#]
public PgSqlDataSet(
   SerializationInfo info,
   StreamingContext context,
   bool ConstructSchema
);

Parameters

info
Contains the data needed to serialize or deserialize an PgSqlDataSet object.
context
Describes the source and destination of a given serialized stream, and provides an additional caller-defined context.
ConstructSchema
Value that determines whether to construct schema or not.

See Also

PgSqlDataSet Class | PgSqlDataSet Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDataSet Class

For a list of all members of this type, see PgSqlDataSet members.

Public Properties

Public Property CaseSensitive (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.
Public Property Connection | Associated PgSqlConnection.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSetName (Inherited from System.Data.DataSet) | Gets or sets the name of the current DataSet.
Public Property DefaultViewManager (Inherited from System.Data.DataSet) | Gets a custom view of the data contained in the DataSet to allow filtering, searching, and navigating using a custom DataViewManager.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property EnforceConstraints (Inherited from System.Data.DataSet) | Gets or sets a value indicating whether constraint rules are followed when attempting any update operation.
Public Property ExtendedProperties (Inherited from System.Data.DataSet) | Gets the collection of customized user information associated with the DataSet.
Public Property HasErrors (Inherited from System.Data.DataSet) | Gets a value indicating whether there are errors in any of the DataTable objects within this DataSet.
Public Property IsInitialized (Inherited from System.Data.DataSet) | Gets a value that indicates whether the DataSet is initialized.
Public Property Locale (Inherited from System.Data.DataSet) | Gets or sets the locale information used to compare strings within the table.
Public Property Name (Inherited from Devart.Common.DbDataSet) | Gets or sets name of the Devart.Common.DbDataSet.
Public Property Namespace (Inherited from System.Data.DataSet) | Gets or sets the namespace of the DataSet.
Public Property Owner (Inherited from Devart.Common.DbDataSet) | Gets or sets a form or other container that the Devart.Common.DbDataSet instance belongs to.
Public Property Prefix (Inherited from System.Data.DataSet) | Gets or sets an XML prefix that aliases the namespace of the DataSet.
Public Property Relations | Gets the collection of PgSqlDataSet relations.
Public Property RemotingFormat (Inherited from Devart.Common.DbDataSet) | Gets or sets a SerializationFormat for the Devart.Common.DbDataSet used during remoting.
Public Property SchemaSerializationMode (Inherited from System.Data.DataSet) | Gets or sets a SchemaSerializationMode for a DataSet.
Public Property Site (Inherited from System.Data.DataSet) | Gets or sets an ISite for the DataSet.
Public Property Tables | Gets collection of tables

See Also

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class : Connection Property (PgSqlDataSet)

Associated PgSqlConnection.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

PgSqlConnection used by PgSqlDataSet.

Remarks

This property supports the InterForm technology.

See Also

PgSqlDataSet Class | PgSqlDataSet Members


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Relations Property

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class : Relations Property

Gets the collection of PgSqlDataSet relations.

[Visual Basic]
Public ReadOnly Property Relations As DataRelationCollection
[C#]
public DataRelationCollection Relations {get;}

Return Type

The collection of PgSqlDataSet relations.

See Also

PgSqlDataSet Class | PgSqlDataSet Members


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Tables Property

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class : Tables Property (PgSqlDataSet)

Gets collection of tables

[Visual Basic]
Public ReadOnly Property Tables As DataTableCollection
[C#]
public DataTableCollection Tables {get;}

Return Type

Collection of tables in DataSet

See Also

PgSqlDataSet Class | PgSqlDataSet Members


%%PageItemTitle%% $$Methods$$

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDataSet Class

For a list of all members of this type, see PgSqlDataSet members.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataSet) | Commits all the changes made to this DataSet since it was loaded or since the last time AcceptChanges was called.
Public Method BeginInit (Inherited from System.Data.DataSet) | Begins the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Clear (Inherited from Devart.Common.DbDataSet) | Clears the Devart.Common.DbDataSet of any data by removing all rows in all tables.
Public Method Clone (Inherited from Devart.Common.DbDataSet) | Copies the structure of the Devart.Common.DbDataSet, including all Devart.Common.DbDataTable schemas, relations, and constraints. Does not copy any data.
Public Method Copy (Inherited from System.Data.DataSet) | Copies both the structure and data for this DataSet.
Public Method CreateDataReader (Inherited from System.Data.DataSet) | Overloaded. Returns a DataTableReader with one result set per DataTable, in the same sequence as the tables appear in the Tables collection.
Public Method CreateDataTable | Overridden. Creates and returns new PgSqlDataTable object.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndInit (Inherited from System.Data.DataSet) | Ends the initialization of a DataSet that is used on a form or used by another component. The initialization occurs at run time.
Public Method Fill (Inherited from Devart.Common.DbDataSet) | Fills the Rows collection of the Devart.Common.DbDataSet with rows from the data source.
Public Method GetChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a copy of the DataSet that contains all changes made to it since it was loaded or since AcceptChanges was last called.
Public Method GetObjectData (Inherited from System.Data.DataSet) | Populates a serialization information object with the data needed to serialize the DataSet.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method GetXml (Inherited from System.Data.DataSet) | Returns the XML representation of the data stored in the DataSet.
Public Method GetXmlSchema (Inherited from System.Data.DataSet) | Returns the XML Schema for the XML representation of the data stored in the DataSet.
Public Method HasChanges (Inherited from System.Data.DataSet) | Overloaded. Gets a value indicating whether the DataSet has changes, including new, deleted, or modified rows.
Public Method InferXmlSchema (Inherited from System.Data.DataSet) | Overloaded.
Public Method Load (Inherited from System.Data.DataSet) | Overloaded.
Public Method Merge (Inherited from System.Data.DataSet) | Overloaded. Merges a specified DataSet and its schema into the current DataSet.
Public Method ReadXml (Inherited from Devart.Common.DbDataSet) | Overloaded. Reads XML schema and data into the Devart.Common.DbDataSet.
Public Method ReadXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Reads the XML schema from the specified Stream into the DataSet.
Public Method RejectChanges (Inherited from System.Data.DataSet) | Rolls back all the changes made to the DataSet since it was created, or since the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataSet) | Resets the DataSet to its original state. Subclasses should override Reset to restore a DataSet to its original state.
Public Method ToString (Inherited from System.ComponentModel.MarshalByValueComponent) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from Devart.Common.DbDataSet) | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataSet) | Overloaded. Writes the current data for the DataSet using the specified Stream.
Public Method WriteXmlSchema (Inherited from System.Data.DataSet) | Overloaded. Writes the DataSet structure as an XML schema to the specified Stream object.

See Also

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDataSet Class | PgSqlDataSet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateDataTable Method

Devart.Data.PostgreSql Namespace > PgSqlDataSet Class : CreateDataTable Method (PgSqlDataSet)

Creates and returns new PgSqlDataTable object.

[Visual Basic]
Overrides Public Function CreateDataTable() As DbDataTable
[C#]
public override DbDataTable CreateDataTable();

Return Type

The new PgSqlDataTable object.

See Also

PgSqlDataSet Class | PgSqlDataSet Members


%%PageItemTitle%%

PgSqlDataSourceEnumerator Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSourceEnumerator Class

Devart.Data.PostgreSql Namespace : PgSqlDataSourceEnumerator Class

Retrieves list of available servers in the network.

For a list of all members of this type, see PgSqlDataSourceEnumerator members.

Inheritance Hierarchy

System.Object
System.Data.Common.DbDataSourceEnumerator
Devart.Common.DbDataSourceEnumerator
Devart.Data.PostgreSql.PgSqlDataSourceEnumerator

Syntax

[Visual Basic]
Public Class PgSqlDataSourceEnumerator
   Inherits DbDataSourceEnumerator
[C#]
public class PgSqlDataSourceEnumerator : DbDataSourceEnumerator

See Also

PgSqlDataSourceEnumerator Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSourceEnumerator Class Members

Devart.Data.PostgreSql Namespace : PgSqlDataSourceEnumerator Class

PgSqlDataSourceEnumerator overview

Public Constructors

Public Constructor PgSqlDataSourceEnumerator Constructor Creates an instance of PgSqlDataSourceEnumerator.

Public Properties

Public Property static (Shared in Visual Basic) Instance Returns the instance of PgSqlDataSourceEnumerator.

Public Methods

Public Method GetDataSources (Inherited from Devart.Common.DbDataSourceEnumerator) Retrieves a DataTable containing information about all visible instances of the server.

See Also

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDataSourceEnumerator Class | PgSqlDataSourceEnumerator Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSourceEnumerator Constructor

Devart.Data.PostgreSql Namespace > PgSqlDataSourceEnumerator Class : PgSqlDataSourceEnumerator Constructor (PgSqlDataSourceEnumerator)

Creates an instance of PgSqlDataSourceEnumerator.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDataSourceEnumerator();

Remarks

Only one instance of PgSqlDataSourceEnumerator can exist in the application.

See Also

PgSqlDataSourceEnumerator Class | PgSqlDataSourceEnumerator Members


%%PageItemTitle%% $$Properties$$

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSourceEnumerator Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDataSourceEnumerator Class

For a list of all members of this type, see PgSqlDataSourceEnumerator members.

Public Properties

Public Property static (Shared in Visual Basic) Instance Returns the instance of PgSqlDataSourceEnumerator.

See Also

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDataSourceEnumerator Class | PgSqlDataSourceEnumerator Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Instance Property

Devart.Data.PostgreSql Namespace > PgSqlDataSourceEnumerator Class : Instance Property (PgSqlDataSourceEnumerator)

Returns the instance of PgSqlDataSourceEnumerator.

[Visual Basic]
Public Shared ReadOnly Property Instance As PgSqlDataSourceEnumerator
[C#]
public static PgSqlDataSourceEnumerator Instance {get;}

Return Type

A PgSqlDataSourceEnumerator object.

See Also

PgSqlDataSourceEnumerator Class | PgSqlDataSourceEnumerator Members


%%PageItemTitle%%

PgSqlDataTable Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Class

Devart.Data.PostgreSql Namespace : PgSqlDataTable Class

Represents a single object that provides all of the functionality needed to retrieve and manipulate data from a PostgreSQL data source.

For a list of all members of this type, see PgSqlDataTable members.

Inheritance Hierarchy

System.Object
System.ComponentModel.MarshalByValueComponent
System.Data.DataTable
Devart.Common.DbDataTable
Devart.Data.PostgreSql.PgSqlDataTable

Syntax

[Visual Basic]
Public Class PgSqlDataTable
   Inherits DbDataTable
   Implements IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable
[C#]
public class PgSqlDataTable : DbDataTable, IComponent, IListSource, ISupportInitialize, ISupportInitializeNotification, IDisposable, IServiceProvider, ISerializable, IXmlSerializable

Remarks

The PgSqlDataTable class extends the Devart.Common.DbDataTable class to provide a single object that can be used to access and update data from a data source. Actually, PgSqlDataTable replaces PgSqlConnection, PgSqlCommand, PgSqlDataAdapter, and PgSqlCommandBuilder classes with all-in-one class. When a PgSqlDataTable object is created, the default values of its constituent parts are set to reasonable defaults, meaning that the programmer can create a single object and immediately use it to retrieve and manipulate data from a data source.

By using PgSqlDataTable you can avoid explicit creation of PgSqlConnection and PgSqlCommand objects. When appropriate form of constructor is used, these objects are created automatically when you retrieve data from a data source. It allows you to cut down the size of the written code.

PgSqlDataTable allows you to automate loading of subsets of data either by selecting StartRecord and Devart.Common.DbDataTable.MaxRecords properties or by using Devart.Common.DbDataTable.Fill or Devart.Common.DbDataTable.FillPage methods that support passing parameter values into the query text.

The PgSqlDataTable class is designed to employ both connected and disconnected data access models. It also provides functionality for asynchronous fill operations.

The PgSqlDataTable class can be fully adjusted at design-time. You may retrieve data at design-time from a data source by setting Active property to true.

For more information on advanced features of PgSqlDataTable please refer to topic PgSqlDataTable Advanced Features.

This class supports cross-form data binding with the InterForm Technology.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

Example

This sample shows easiness of use of PgSqlDataTable. The sample creates a PgSqlDataTable object, passing it SQL query text and connection string, retrieves data from a table and modifies it. Content of the table is printed to console then. Notice that no other component needs to be created by programmer.

[C#]

public void UseDataTable()
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept",
      "host=server;database=test;user id=postgres;");
  try
  {
    myDataTable.FetchAll = true;
    myDataTable.Active = true;
    myDataTable.Rows[3]["DName"] = "Researches";
    Console.WriteLine(myDataTable.Update()+" rows updated.");
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable()
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", _
      "host=server;database=test;user id=postgres;")
  Try
    myDataTable.FetchAll = True
    myDataTable.Active = True
    myDataTable.Rows(3)("DName") = "Researches"
    Console.WriteLine(myDataTable.Update() & " rows updated.")
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class


%%PageItemTitle%% $$Members$$

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Class Members

Devart.Data.PostgreSql Namespace : PgSqlDataTable Class

PgSqlDataTable overview

Public Constructors

Public Constructor PgSqlDataTable Constructor Overloaded. Initializes a new instance of the PgSqlDataTable class.

Public Properties

Public Property Active (Inherited from Devart.Common.DbDataTable) | Gets or sets whether a Devart.Common.DbDataTable is filled with data from a data source.
Public Property CachedUpdates (Inherited from Devart.Common.DbDataTable) | Enables or disables cached updates mode.
Public Property CaseSensitive (Inherited from System.Data.DataTable) | Indicates whether string comparisons within the table are case-sensitive.
Public Property ChildRelations (Inherited from System.Data.DataTable) | Gets the collection of child relations for this DataTable.
Public Property Columns (Inherited from Devart.Common.DbDataTable) | Gets the collection of columns that belong to this table.
Public Property ConflictOption (Inherited from Devart.Common.DbDataTable) | Specifies which ConflictOption is to be used by the Devart.Common.DbDataTable.
Public Property Connection | Gets or sets the PgSqlConnection used to connect to the data source.
Public Property Constraints (Inherited from Devart.Common.DbDataTable) | Gets the collection of constraints maintained by this table.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSet (Inherited from System.Data.DataTable) | Gets the DataSet to which this table belongs.
Public Property DefaultView (Inherited from System.Data.DataTable) | Gets a customized view of the table that may include a filtered view, or a cursor position.
Public Property DeleteCommand | Gets or sets a PostgreSQL statement to delete records from the data set.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property DisplayExpression (Inherited from System.Data.DataTable) | Gets or sets the expression that returns a value used to represent this table in the user interface. The DisplayExpression property lets you display the name of this table in a user interface.
Public Property ExtendedProperties (Inherited from System.Data.DataTable) | Gets the collection of customized user information.
Public Property FetchAll (Inherited from Devart.Common.DbDataTable) | Determines whether data is requested from server entirely or partially.
Public Property HasErrors (Inherited from System.Data.DataTable) | Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
Public Property InsertCommand | Gets or sets a PostgreSQL statement to insert new records into the data source.
Public Property IsInitialized (Inherited from System.Data.DataTable) | Gets a value that indicates whether the DataTable is initialized.
Public Property Locale (Inherited from System.Data.DataTable) | Gets or sets the locale information used to compare strings within the table.
Public Property MaxRecords (Inherited from Devart.Common.DbDataTable) | Gets or sets max number of records to fetch starting from Devart.Common.DbDataTable.StartRecord.
Public Property MinimumCapacity (Inherited from System.Data.DataTable) | Gets or sets the initial starting size for this table.
Public Property MissingSchemaAction (Inherited from Devart.Common.DbDataTable) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property Name (Inherited from Devart.Common.DbDataTable) | Gets or sets name of the component.
Public Property Namespace (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property NonBlocking (Inherited from Devart.Common.DbDataTable) | Gets or sets data request mode.
Public Property ObjectView | Indicates how PostgreSQL objects are represented in PgSqlDataTable and visual grids like DataGrid.
Public Property Owner (Inherited from Devart.Common.DbDataTable) | Gets or sets form that the component resides on.
Public Property ParentRelation (Inherited from Devart.Common.DbDataTable) | Gets or sets a Devart.Common.ParentDataRelation object that is used for server side master-detail relation.
Public Property ParentRelations (Inherited from System.Data.DataTable) | Gets the collection of parent relations for this DataTable.
Public Property Prefix (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property PrimaryKey (Inherited from Devart.Common.DbDataTable) | Gets or sets an array of columns that function as primary keys for the data table.
Public Property QueryRecordCount (Inherited from Devart.Common.DbDataTable) | Determines whether Devart.Common.DbDataTable should perfrom additional request to determine quantity of records in the result set.
Public Property Quoted (Inherited from Devart.Common.DbDataTable) | Gets or sets whether the Devart.Common.DbDataTable quotes all the names of data source objects.
Public Property RecordCount (Inherited from Devart.Common.DbDataTable) | Gets number of rows in the result set.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the PgSqlDataTable should retrieve field values adjusted by server after a database update.
Public Property RemotingFormat (Inherited from Devart.Common.DbDataTable) | Gets or sets a SerializationFormat for the Devart.Common.DbDataTable used during remoting.
Public Property ReturnProviderSpecificTypes (Inherited from Devart.Common.DbDataTable) | Determines whether to use provider-specific types whenever possible.
Public Property Rows (Inherited from System.Data.DataTable) | Gets the collection of rows that belong to this table.
Public Property SchemaTable (Inherited from Devart.Common.DbDataTable) | Gets the schema table corresponding to the Devart.Common.DbDataTable.SelectCommand query.
Public Property SelectCommand | Gets or sets a PostgreSQL statement used to select records in the data source.
Public Property Site (Inherited from System.Data.DataTable) | Gets or sets an ISite for the DataTable.
Public Property SplitObjects | Determines how attributes of PostgreSQL objects are stored and represented in PgSqlDataTable.
Public Property StartRecord (Inherited from Devart.Common.DbDataTable) | Gets or sets record number to start.
Public Property SyncRoot (Inherited from Devart.Common.DbDataTable) | Gets an object that can be used to synchronize access to the Devart.Common.DbDataTable.Rows collection.
Public Property TableMapping | Gets a DataTableMapping object that provides the master mapping between a source table and a PgSqlDataTable.
Public Property TableName (Inherited from System.Data.DataTable) | Gets or sets the name of the DataTable.
Public Property UpdateBatchSize (Inherited from Devart.Common.DbDataTable) | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand | Gets or sets a PostgreSQL statement used to update records in the data source.
Public Property UpdatingFields | Gets or sets string containing list of field names used to generate update commands.
Public Property UpdatingKeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataTable) | Commits all the changes made to this table since the last time AcceptChanges was called.
Public Method BeginFill (Inherited from Devart.Common.DbDataTable) | Starts an asynchronous invocation of the Devart.Common.DbDataTable.Fill() method.
Public Method BeginInit (Inherited from System.Data.DataTable) | Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method BeginLoadData (Inherited from System.Data.DataTable) | Turns off notifications, index maintenance, and constraints while loading data.
Public Method CancelFetch (Inherited from Devart.Common.DbDataTable) | Stops asynchronous fill operation.
Public Method Clear (Inherited from Devart.Common.DbDataTable) | Clears Devart.Common.DbDataTable and stops Fill operation.
Public Method Clone | Overridden. Clones the current instance of PgSqlDataTable.
Public Method Close (Inherited from Devart.Common.DbDataTable) | Disconnects Devart.Common.DbDataTable from the data source and frees server resources allocated for the query.
Public Method Compute (Inherited from System.Data.DataTable) | Computes the given expression on the current rows that pass the filter criteria.
Public Method Copy (Inherited from System.Data.DataTable) | Copies both the structure and data for this DataTable.
Public Method CreateDataReader (Inherited from System.Data.DataTable) | Returns a DataTableReader corresponding to the data within this DataTable.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndFill (Inherited from Devart.Common.DbDataTable) | Ends an asynchronous invocation of the Devart.Common.DbDataTable.Fill() method.
Public Method EndInit (Inherited from Devart.Common.DbDataTable) | Ends the initialization of a Devart.Common.DbDataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method EndLoadData (Inherited from System.Data.DataTable) | Turns on notifications, index maintenance, and constraints after loading data.
Public Method Fill (Inherited from Devart.Common.DbDataTable) | Overloaded. Fills the Rows collection of the Devart.Common.DbDataTable with rows from the data source.
Public Method FillPage (Inherited from Devart.Common.DbDataTable) | Overloaded. Fills the Rows collection of the Devart.Common.DbDataTable with rows from the data source starting at the row indicated by Devart.Common.DbDataTable.StartRecord and including up to the number of rows indicated by Devart.Common.DbDataTable.MaxRecords.
Public Method FillSchema (Inherited from Devart.Common.DbDataTable) | Configures the schema to match that in the data source.
Public Method GetChanges (Inherited from System.Data.DataTable) | Overloaded. Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges was last called.
Public Method GetErrors (Inherited from System.Data.DataTable) | Gets an array of DataRow objects that contain errors.
Public Method GetObjectData (Inherited from System.Data.DataTable) | Populates a serialization information object with the data needed to serialize the DataTable.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method ImportRow (Inherited from System.Data.DataTable) | Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.
Public Method Load (Inherited from System.Data.DataTable) | Overloaded. Fills a DataTable with values from a data source using the supplied IDataReader. If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows.
Public Method LoadDataRow (Inherited from System.Data.DataTable) | Overloaded.
Public Method Merge (Inherited from System.Data.DataTable) | Overloaded. Merge the specified DataTable with the current DataTable.
Public Method NewRow (Inherited from System.Data.DataTable) | Creates a new DataRow with the same schema as the table.
Public Method Open (Inherited from Devart.Common.DbDataTable) | Fetches data and sets the Devart.Common.DbDataTable.Active property to true.
Public Method Read (Inherited from Devart.Common.DbDataTable) | Reads the next data row when Devart.Common.DbDataTable operates in connected model.
Public Method ReadComplete (Inherited from Devart.Common.DbDataTable) | Fills a row with data not fetched in the initial fill operation.
Public Method ReadXml (Inherited from System.Data.DataTable) | Overloaded. Reads XML schema and data into the DataTable using the specified Stream.
Public Method ReadXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Reads an XML schema into the DataTable using the specified stream.
Public Method RefreshRow (Inherited from Devart.Common.DbDataTable) | Refreshes the specified row with values from server.
Public Method RejectChanges (Inherited from System.Data.DataTable) | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataTable) | Resets the DataTable to its original state.
Public Method Select (Inherited from Devart.Common.DbDataTable) | Overloaded. Gets an array of DataRow objects.
Public Method SuspendFill (Inherited from Devart.Common.DbDataTable) | Overloaded. Suspends asynchronous fill operation.
Public Method ToString (Inherited from System.Data.DataTable) | Gets the TableName and DisplayExpression, if there is one as a concatenated string.
Public Method Update (Inherited from Devart.Common.DbDataTable) | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method UpdateRows (Inherited from Devart.Common.DbDataTable) | Executes the appropriate commands to delete, insert, or update the specified rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataTable) | Overloaded. Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. To write the schema, set the value for the mode parameter to WriteSchema.
Public Method WriteXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Writes the current data structure of the DataTable as an XML schema to the specified stream.

Public Events

Public Event ColumnChanged (Inherited from System.Data.DataTable) | Occurs after a value has been changed for the specified DataColumn in a DataRow.
Public Event ColumnChanging (Inherited from System.Data.DataTable) | Occurs when a value is being changed for the specified DataColumn in a DataRow.
Public Event Disposed (Inherited from Devart.Common.DbDataTable) | Adds an event handler to listen to the Disposed event on the component.
Public Event FetchFinished (Inherited from Devart.Common.DbDataTable) | Occurs when a result set is completely fetched.
Public Event FillError (Inherited from Devart.Common.DbDataTable) | Occurs when an error is raised during a fill operation.
Public Event Initialized (Inherited from System.Data.DataTable) | Occurs after the DataTable is initialized.
Public Event RowChanged (Inherited from System.Data.DataTable) | Occurs after a DataRow has been changed successfully.
Public Event RowChanging (Inherited from System.Data.DataTable) | Occurs when a DataRow is changing.
Public Event RowDeleted (Inherited from System.Data.DataTable) | Occurs after a row in the table has been deleted.
Public Event RowDeleting (Inherited from System.Data.DataTable) | Occurs before a row in the table is about to be deleted.
Public Event RowFetched (Inherited from Devart.Common.DbDataTable) | Occurs when another row is completely fetched.
Public Event RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event TableCleared (Inherited from System.Data.DataTable) | Occurs after a DataTable is cleared.
Public Event TableClearing (Inherited from System.Data.DataTable) | Occurs when a DataTable is cleared.
Public Event TableNewRow (Inherited from System.Data.DataTable) | Occurs when a new DataRow is inserted.

See Also

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : PgSqlDataTable Constructor (PgSqlDataTable)

Initializes a new instance of the PgSqlDataTable class.

Overload List

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New()

[C#] public PgSqlDataTable();

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlDataTable(string);

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New(PgSqlCommand)

[C#] public PgSqlDataTable(PgSqlCommand);

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New(PgSqlCommand,PgSqlConnection)

[C#] public PgSqlDataTable(PgSqlCommand,PgSqlConnection);

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlDataTable(string,PgSqlConnection);

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic] Public Sub New(String,String)

[C#] public PgSqlDataTable(string,string);

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor()

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor()

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDataTable();

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

selectCommand
A PgSqlCommand object used to select rows from the data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor(PgSqlCommand)

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor(PgSqlCommand)

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New( _
   ByVal selectCommand As PgSqlCommand _
)
[C#]
public PgSqlDataTable(
   PgSqlCommand selectCommand
);

Parameters

selectCommand
A PgSqlCommand object used to select rows from the data source.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept",pgConnection);
  PgSqlDataTable myDataTable = new PgSqlDataTable(pgCommand);
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept", pgConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable(pgCommand)
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

selectCommand
A PgSqlCommand object used to select rows from the data source.
connection
A PgSqlConnection used to connect to the data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor(PgSqlCommand,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor(PgSqlCommand,PgSqlConnection)

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New( _
   ByVal selectCommand As PgSqlCommand, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlDataTable(
   PgSqlCommand selectCommand,
   PgSqlConnection connection
);

Parameters

selectCommand
A PgSqlCommand object used to select rows from the data source.
connection
A PgSqlConnection used to connect to the data source.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept");
  PgSqlDataTable myDataTable = new PgSqlDataTable(pgCommand,pgConnection);
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable(pgCommand, pgConnection)
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

tableName
Name of the table to work with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor(String)

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New( _
   ByVal tableName As String _
)
[C#]
public PgSqlDataTable(
   string tableName
);

Parameters

tableName
Name of the table to work with.

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

selectCommandText
The text of the selection command.
connection
A PgSqlConnection used to connect to the data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New( _
   ByVal selectCommandText As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlDataTable(
   string selectCommandText,
   PgSqlConnection connection
);

Parameters

selectCommandText
The text of the selection command.
connection
A PgSqlConnection used to connect to the data source.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection);
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection)
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | Overload List

Language

Visual Basic

C#

Show All

selectCommandText
The text of the selection command.
connectionString
Connection string used to connect to the data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Constructor(String,String)

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class > PgSqlDataTable Constructor : PgSqlDataTable Constructor(String,String)

Initializes a new instance of the PgSqlDataTable class.

[Visual Basic]
Public Function New( _
   ByVal selectCommandText As String, _
   ByVal connectionString As String _
)
[C#]
public PgSqlDataTable(
   string selectCommandText,
   string connectionString
);

Parameters

selectCommandText
The text of the selection command.
connectionString
Connection string used to connect to the data source.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable()
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept",
      "host=server;database=test;user id=postgres;");
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable()
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", _
      "host=server;database=test;user id=postgres;")
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDataTable Class

For a list of all members of this type, see PgSqlDataTable members.

Public Properties

Public Property Active (Inherited from Devart.Common.DbDataTable) | Gets or sets whether a Devart.Common.DbDataTable is filled with data from a data source.
Public Property CachedUpdates (Inherited from Devart.Common.DbDataTable) | Enables or disables cached updates mode.
Public Property CaseSensitive (Inherited from System.Data.DataTable) | Indicates whether string comparisons within the table are case-sensitive.
Public Property ChildRelations (Inherited from System.Data.DataTable) | Gets the collection of child relations for this DataTable.
Public Property Columns (Inherited from Devart.Common.DbDataTable) | Gets the collection of columns that belong to this table.
Public Property ConflictOption (Inherited from Devart.Common.DbDataTable) | Specifies which ConflictOption is to be used by the Devart.Common.DbDataTable.
Public Property Connection | Gets or sets the PgSqlConnection used to connect to the data source.
Public Property Constraints (Inherited from Devart.Common.DbDataTable) | Gets the collection of constraints maintained by this table.
Public Property Container (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the container for the component.
Public Property DataSet (Inherited from System.Data.DataTable) | Gets the DataSet to which this table belongs.
Public Property DefaultView (Inherited from System.Data.DataTable) | Gets a customized view of the table that may include a filtered view, or a cursor position.
Public Property DeleteCommand | Gets or sets a PostgreSQL statement to delete records from the data set.
Public Property DesignMode (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets a value indicating whether the component is currently in design mode.
Public Property DisplayExpression (Inherited from System.Data.DataTable) | Gets or sets the expression that returns a value used to represent this table in the user interface. The DisplayExpression property lets you display the name of this table in a user interface.
Public Property ExtendedProperties (Inherited from System.Data.DataTable) | Gets the collection of customized user information.
Public Property FetchAll (Inherited from Devart.Common.DbDataTable) | Determines whether data is requested from server entirely or partially.
Public Property HasErrors (Inherited from System.Data.DataTable) | Gets a value indicating whether there are errors in any of the rows in any of the tables of the DataSet to which the table belongs.
Public Property InsertCommand | Gets or sets a PostgreSQL statement to insert new records into the data source.
Public Property IsInitialized (Inherited from System.Data.DataTable) | Gets a value that indicates whether the DataTable is initialized.
Public Property Locale (Inherited from System.Data.DataTable) | Gets or sets the locale information used to compare strings within the table.
Public Property MaxRecords (Inherited from Devart.Common.DbDataTable) | Gets or sets max number of records to fetch starting from Devart.Common.DbDataTable.StartRecord.
Public Property MinimumCapacity (Inherited from System.Data.DataTable) | Gets or sets the initial starting size for this table.
Public Property MissingSchemaAction (Inherited from Devart.Common.DbDataTable) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property Name (Inherited from Devart.Common.DbDataTable) | Gets or sets name of the component.
Public Property Namespace (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property NonBlocking (Inherited from Devart.Common.DbDataTable) | Gets or sets data request mode.
Public Property ObjectView | Indicates how PostgreSQL objects are represented in PgSqlDataTable and visual grids like DataGrid.
Public Property Owner (Inherited from Devart.Common.DbDataTable) | Gets or sets form that the component resides on.
Public Property ParentRelation (Inherited from Devart.Common.DbDataTable) | Gets or sets a Devart.Common.ParentDataRelation object that is used for server side master-detail relation.
Public Property ParentRelations (Inherited from System.Data.DataTable) | Gets the collection of parent relations for this DataTable.
Public Property Prefix (Inherited from System.Data.DataTable) | Gets or sets the namespace for the XML representation of the data stored in the DataTable.
Public Property PrimaryKey (Inherited from Devart.Common.DbDataTable) | Gets or sets an array of columns that function as primary keys for the data table.
Public Property QueryRecordCount (Inherited from Devart.Common.DbDataTable) | Determines whether Devart.Common.DbDataTable should perfrom additional request to determine quantity of records in the result set.
Public Property Quoted (Inherited from Devart.Common.DbDataTable) | Gets or sets whether the Devart.Common.DbDataTable quotes all the names of data source objects.
Public Property RecordCount (Inherited from Devart.Common.DbDataTable) | Gets number of rows in the result set.
Public Property RefreshingFields | Gets or sets list of fields whose values should be retrieved after a DML statement execution.
Public Property RefreshMode | Gets or sets a value that indicates whether and how the PgSqlDataTable should retrieve field values adjusted by server after a database update.
Public Property RemotingFormat (Inherited from Devart.Common.DbDataTable) | Gets or sets a SerializationFormat for the Devart.Common.DbDataTable used during remoting.
Public Property ReturnProviderSpecificTypes (Inherited from Devart.Common.DbDataTable) | Determines whether to use provider-specific types whenever possible.
Public Property Rows (Inherited from System.Data.DataTable) | Gets the collection of rows that belong to this table.
Public Property SchemaTable (Inherited from Devart.Common.DbDataTable) | Gets the schema table corresponding to the Devart.Common.DbDataTable.SelectCommand query.
Public Property SelectCommand | Gets or sets a PostgreSQL statement used to select records in the data source.
Public Property Site (Inherited from System.Data.DataTable) | Gets or sets an ISite for the DataTable.
Public Property SplitObjects | Determines how attributes of PostgreSQL objects are stored and represented in PgSqlDataTable.
Public Property StartRecord (Inherited from Devart.Common.DbDataTable) | Gets or sets record number to start.
Public Property SyncRoot (Inherited from Devart.Common.DbDataTable) | Gets an object that can be used to synchronize access to the Devart.Common.DbDataTable.Rows collection.
Public Property TableMapping | Gets a DataTableMapping object that provides the master mapping between a source table and a PgSqlDataTable.
Public Property TableName (Inherited from System.Data.DataTable) | Gets or sets the name of the DataTable.
Public Property UpdateBatchSize (Inherited from Devart.Common.DbDataTable) | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand | Gets or sets a PostgreSQL statement used to update records in the data source.
Public Property UpdatingFields | Gets or sets string containing list of field names used to generate update commands.
Public Property UpdatingKeyFields | Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.
Public Property UpdatingTable | Gets or sets table name to generate update statements for.

See Also

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : Connection Property (PgSqlDataTable)

Gets or sets the PgSqlConnection used to connect to the data source.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

A PgSqlConnection object which provides a connection to the data source.

Remarks

This property is used by DeleteCommand, InsertCommand, SelectCommand, and UpdateCommand, in case when these properties do not have own created connection.

This property supports the InterForm technology.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable();
  myDataTable.Connection = pgConnection;
  myDataTable.SelectCommand = new PgSqlCommand("SELECT * FROM Test.Dept");
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable
  myDataTable.Connection = pgConnection
  myDataTable.SelectCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DeleteCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : DeleteCommand Property (PgSqlDataTable)

Gets or sets a PostgreSQL statement to delete records from the data set.

[Visual Basic]
Public Property DeleteCommand As PgSqlCommand
[C#]
public PgSqlCommand DeleteCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to delete records in the data source that correspond to deleted rows in the DataSet.

Remarks

Typically you do not need to use DeleteCommand when working with PgSqlDataTable. All simple update operations are performed automatically using embedded CommandBuilder. DeleteCommand enables you to perform specific operations like shown in the sample below.

DeleteCommand uses its own Connection if it is created. Otherwise DeleteCommand uses Connection.

Example

This sample shows how to modify and display data using PgSqlDataTable.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection);
  try
  {
    myDataTable.Active = true;
    myDataTable.Rows[1].Delete();
    myDataTable.DeleteCommand = new PgSqlCommand("DELETE FROM Test.Emp WHERE DeptNo = :DeptNo;DELETE FROM Test.Dept WHERE DeptNo = :DeptNo", pgConnection);
    myDataTable.DeleteCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original;
    myDataTable.Update();

    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection)
  Try
    myDataTable.Active = True
    myDataTable.Rows(2).Delete()
    myDataTable.DeleteCommand = New PgSqlCommand("DELETE FROM Test.Emp WHERE DeptNo = :DeptNo;DELETE FROM Test.Dept WHERE DeptNo = :DeptNo", pgConnection)
    myDataTable.DeleteCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original
    myDataTable.Update()

    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | InsertCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InsertCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : InsertCommand Property (PgSqlDataTable)

Gets or sets a PostgreSQL statement to insert new records into the data source.

[Visual Basic]
Public Property InsertCommand As PgSqlCommand
[C#]
public PgSqlCommand InsertCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to insert records in the data source that correspond to new rows in the DataSet.

Remarks

InsertCommand uses its own Connection if it is created. Otherwise InsertCommand uses Connection.

Example

This sample shows how to modify and display data using PgSqlDataTable.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection);
  try
  {
    myDataTable.Active = true;
    myDataTable.Rows.Add(new object[] {30,"Sales2"});
    myDataTable.InsertCommand = new PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName, Loc) " +
      "VALUES (:DeptNo, :DName, 'Unverified')", pgConnection);
    myDataTable.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo");
    myDataTable.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName");
    Console.WriteLine(myDataTable.Update()+" rows updated.");
    myDataTable.Active = false;
    //Refresh the table to check custom updates
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection)
  Try
    myDataTable.Active = True
    Dim rowVals() As Object = {30, "Sales2"}
    myDataTable.Rows.Add(rowVals)
    myDataTable.InsertCommand = New PgSqlCommand("INSERT INTO Test.Dept (DeptNo, DName, Loc) " & _
        "VALUES (:DeptNo, :DName, 'Unverified')", pgConnection)
    myDataTable.InsertCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo")
    myDataTable.InsertCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName")
    Console.WriteLine(myDataTable.Update() & " rows updated.")
    myDataTable.Active = False
    ' Refresh the table to check custom updates
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | SelectCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | SplitObjects Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ObjectView Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : ObjectView Property

Indicates how PostgreSQL objects are represented in PgSqlDataTable and visual grids like DataGrid.

[Visual Basic]
Public Property ObjectView As Boolean
[C#]
public bool ObjectView {get; set;}

Return Type

If true, PostgreSQL objects are shown as expandable secondary rows; otherwise the appearance depends on SplitObjects property.

Remarks

This feature is not supported in some grids, for example, GridView.

See Also

PgSqlDataTable Class | PgSqlDataTable Members | SplitObjects Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RefreshingFields Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : RefreshingFields Property (PgSqlDataTable)

Gets or sets list of fields whose values should be retrieved after a DML statement execution.

[Visual Basic]
Public Property RefreshingFields As String
[C#]
public string RefreshingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

Remarks

This property is used in conjunction with Devart.Common.DbDataTable.RefreshMode.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RefreshMode Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : RefreshMode Property (PgSqlDataTable)

Gets or sets a value that indicates whether and how the PgSqlDataTable should retrieve field values adjusted by server after a database update.

[Visual Basic]
Public Property RefreshMode As RefreshRowMode
[C#]
public RefreshRowMode RefreshMode {get; set;}

Return Type

One of the RefreshRowMode values.

Remarks

This feature is supported for PostgreSQL server versions 8.2 and higher.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SelectCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : SelectCommand Property (PgSqlDataTable)

Gets or sets a PostgreSQL statement used to select records in the data source.

[Visual Basic]
Public Property SelectCommand As PgSqlCommand
[C#]
public PgSqlCommand SelectCommand {get; set;}

Return Type

A PgSqlCommand that is used during a fill operation to select records from the data source for placement in the DataSet.

Remarks

SelectCommand uses its own Connection if it is created. Otherwise SelectCommand uses Connection.

This property supports the InterForm technology.

Example

This sample shows how to create a PgSqlDataTable and retrieve data from a table.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable();
  myDataTable.Connection = pgConnection;
  myDataTable.SelectCommand = new PgSqlCommand("SELECT * FROM Test.Dept");
  try
  {
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable
  myDataTable.Connection = pgConnection
  myDataTable.SelectCommand = New PgSqlCommand("SELECT * FROM Test.Dept")
  Try
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | InsertCommand Property | UpdateCommand Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | ObjectView Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SplitObjects Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : SplitObjects Property

Determines how attributes of PostgreSQL objects are stored and represented in PgSqlDataTable.

[Visual Basic]
Public Property SplitObjects As Boolean
[C#]
public bool SplitObjects {get; set;}

Return Type

If true, PostgreSQL objects are decomposed to individual attributes. Otherwise objects are represented as PgSqlRow.

Remarks

This property has no effect when ObjectView property is true.

See Also

PgSqlDataTable Class | PgSqlDataTable Members | ObjectView Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableMapping Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : TableMapping Property (PgSqlDataTable)

Gets a DataTableMapping object that provides the master mapping between a source table and a PgSqlDataTable.

[Visual Basic]
Public ReadOnly Property TableMapping As DataTableMapping
[C#]
public DataTableMapping TableMapping {get;}

Return Type

A DataTableMapping object that provides the master mapping between the returned records and the PgSqlDataTable.

Remarks

When reconciling changes, the PgSqlDataAdapter uses the DataTableMapping to associate the column names used by the data source with the column names used by the PgSqlDataTable.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdateCommand Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : UpdateCommand Property (PgSqlDataTable)

Gets or sets a PostgreSQL statement used to update records in the data source.

[Visual Basic]
Public Property UpdateCommand As PgSqlCommand
[C#]
public PgSqlCommand UpdateCommand {get; set;}

Return Type

A PgSqlCommand used during an update operation to update records in the data source that correspond to modified rows in the DataSet.

Remarks

UpdateCommand uses its own Connection if it is created. Otherwise UpdateCommand uses Connection.

Example

This sample shows how to modify and display data using PgSqlDataTable.

[C#]

public void UseDataTable(PgSqlConnection pgConnection)
{
  PgSqlDataTable myDataTable = new PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection);
  try
  {
    myDataTable.Active = true;
    myDataTable.Rows[3]["DName"] = "Researches";
    myDataTable.UpdateCommand = new PgSqlCommand("UPDATE Test.Dept SET DeptNo = :DeptNo, DName = :DName, Loc = 'Modified' " +
        "WHERE DeptNo = :oldDeptNo", pgConnection);
    myDataTable.UpdateCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo");
    myDataTable.UpdateCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName");
    myDataTable.UpdateCommand.Parameters.Add("oldDeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original;
    Console.WriteLine(myDataTable.Update()+" rows updated.");
    myDataTable.Active = false;
    //Refresh the table to check custom updates
    myDataTable.Active = true;
    foreach(DataRow myRow in myDataTable.Rows)
    {
      foreach(DataColumn myCol in myDataTable.Columns)
      {
        Console.Write(myRow[myCol]+"\t");
      }
      Console.WriteLine();
    }
  }
  finally
  {
    myDataTable.Active = false;
  }
}

[Visual Basic]

Public Sub UseDataTable(ByVal pgConnection As PgSqlConnection)
  Dim myDataTable As PgSqlDataTable = New PgSqlDataTable("SELECT * FROM Test.Dept", pgConnection)
  Try
    myDataTable.Active = True
    myDataTable.Rows(3)("DName") = "Researches"
    myDataTable.UpdateCommand = New PgSqlCommand("UPDATE Test.Dept SET DeptNo = :DeptNo, DName = :DName, Loc='Modified' " & _
        "WHERE DeptNo = :oldDeptNo", pgConnection)
    myDataTable.UpdateCommand.Parameters.Add("DeptNo", PgSqlType.Int, 0, "DeptNo")
    myDataTable.UpdateCommand.Parameters.Add("DName", PgSqlType.VarChar, 15, "DName")
    myDataTable.UpdateCommand.Parameters.Add("oldDeptNo", PgSqlType.Int, 0, "DeptNo").SourceVersion = DataRowVersion.Original
    Console.WriteLine(myDataTable.Update() & " rows updated.")
    myDataTable.Active = False
    ' Refresh the table to check custom updates
    myDataTable.Active = True
    Dim myRow As DataRow
    Dim myCol As DataColumn
    For Each myRow In myDataTable.Rows
      For Each myCol In myDataTable.Columns
        Console.Write(myRow(myCol) & Chr(9))
      Next myCol
      Console.WriteLine()
    Next myRow
  Finally
    myDataTable.Active = False
  End Try
End Sub

See Also

PgSqlDataTable Class | PgSqlDataTable Members | DeleteCommand Property | InsertCommand Property | SelectCommand Property


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdatingFields Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : UpdatingFields Property (PgSqlDataTable)

Gets or sets string containing list of field names used to generate update commands.

[Visual Basic]
Public Property UpdatingFields As String
[C#]
public string UpdatingFields {get; set;}

Return Type

The string containing list of field names separated by semicolon.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdatingKeyFields Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : UpdatingKeyFields Property (PgSqlDataTable)

Gets or sets string containing list of key field names separated by semicolon. They are used to generate update commands.

[Visual Basic]
Public Property UpdatingKeyFields As String
[C#]
public string UpdatingKeyFields {get; set;}

Return Type

The string containing list of key field names separated by semicolon.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpdatingTable Property

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : UpdatingTable Property (PgSqlDataTable)

Gets or sets table name to generate update statements for.

[Visual Basic]
Public Property UpdatingTable As String
[C#]
public string UpdatingTable {get; set;}

Return Type

The name of the table.

Remarks

Use the UpdatingTable property to generate SQL statements for specific table in a complicated query.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%% $$Methods$$

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDataTable Class

For a list of all members of this type, see PgSqlDataTable members.

Public Methods

Public Method AcceptChanges (Inherited from System.Data.DataTable) | Commits all the changes made to this table since the last time AcceptChanges was called.
Public Method BeginFill (Inherited from Devart.Common.DbDataTable) | Starts an asynchronous invocation of the Devart.Common.DbDataTable.Fill() method.
Public Method BeginInit (Inherited from System.Data.DataTable) | Begins the initialization of a DataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method BeginLoadData (Inherited from System.Data.DataTable) | Turns off notifications, index maintenance, and constraints while loading data.
Public Method CancelFetch (Inherited from Devart.Common.DbDataTable) | Stops asynchronous fill operation.
Public Method Clear (Inherited from Devart.Common.DbDataTable) | Clears Devart.Common.DbDataTable and stops Fill operation.
Public Method Clone | Overridden. Clones the current instance of PgSqlDataTable.
Public Method Close (Inherited from Devart.Common.DbDataTable) | Disconnects Devart.Common.DbDataTable from the data source and frees server resources allocated for the query.
Public Method Compute (Inherited from System.Data.DataTable) | Computes the given expression on the current rows that pass the filter criteria.
Public Method Copy (Inherited from System.Data.DataTable) | Copies both the structure and data for this DataTable.
Public Method CreateDataReader (Inherited from System.Data.DataTable) | Returns a DataTableReader corresponding to the data within this DataTable.
Public Method Dispose (Inherited from System.ComponentModel.MarshalByValueComponent) | Releases all resources used by the MarshalByValueComponent.
Public Method EndFill (Inherited from Devart.Common.DbDataTable) | Ends an asynchronous invocation of the Devart.Common.DbDataTable.Fill() method.
Public Method EndInit (Inherited from Devart.Common.DbDataTable) | Ends the initialization of a Devart.Common.DbDataTable that is used on a form or used by another component. The initialization occurs at run time.
Public Method EndLoadData (Inherited from System.Data.DataTable) | Turns on notifications, index maintenance, and constraints after loading data.
Public Method Fill (Inherited from Devart.Common.DbDataTable) | Overloaded. Fills the Rows collection of the Devart.Common.DbDataTable with rows from the data source.
Public Method FillPage (Inherited from Devart.Common.DbDataTable) | Overloaded. Fills the Rows collection of the Devart.Common.DbDataTable with rows from the data source starting at the row indicated by Devart.Common.DbDataTable.StartRecord and including up to the number of rows indicated by Devart.Common.DbDataTable.MaxRecords.
Public Method FillSchema (Inherited from Devart.Common.DbDataTable) | Configures the schema to match that in the data source.
Public Method GetChanges (Inherited from System.Data.DataTable) | Overloaded. Gets a copy of the DataTable that contains all changes made to it since it was loaded or AcceptChanges was last called.
Public Method GetErrors (Inherited from System.Data.DataTable) | Gets an array of DataRow objects that contain errors.
Public Method GetObjectData (Inherited from System.Data.DataTable) | Populates a serialization information object with the data needed to serialize the DataTable.
Public Method GetService (Inherited from System.ComponentModel.MarshalByValueComponent) | Gets the implementer of the IServiceProvider.
Public Method ImportRow (Inherited from System.Data.DataTable) | Copies a DataRow into a DataTable, preserving any property settings, as well as original and current values.
Public Method Load (Inherited from System.Data.DataTable) | Overloaded. Fills a DataTable with values from a data source using the supplied IDataReader. If the DataTable already contains rows, the incoming data from the data source is merged with the existing rows.
Public Method LoadDataRow (Inherited from System.Data.DataTable) | Overloaded.
Public Method Merge (Inherited from System.Data.DataTable) | Overloaded. Merge the specified DataTable with the current DataTable.
Public Method NewRow (Inherited from System.Data.DataTable) | Creates a new DataRow with the same schema as the table.
Public Method Open (Inherited from Devart.Common.DbDataTable) | Fetches data and sets the Devart.Common.DbDataTable.Active property to true.
Public Method Read (Inherited from Devart.Common.DbDataTable) | Reads the next data row when Devart.Common.DbDataTable operates in connected model.
Public Method ReadComplete (Inherited from Devart.Common.DbDataTable) | Fills a row with data not fetched in the initial fill operation.
Public Method ReadXml (Inherited from System.Data.DataTable) | Overloaded. Reads XML schema and data into the DataTable using the specified Stream.
Public Method ReadXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Reads an XML schema into the DataTable using the specified stream.
Public Method RefreshRow (Inherited from Devart.Common.DbDataTable) | Refreshes the specified row with values from server.
Public Method RejectChanges (Inherited from System.Data.DataTable) | Rolls back all changes that have been made to the table since it was loaded, or the last time AcceptChanges was called.
Public Method Reset (Inherited from System.Data.DataTable) | Resets the DataTable to its original state.
Public Method Select (Inherited from Devart.Common.DbDataTable) | Overloaded. Gets an array of DataRow objects.
Public Method SuspendFill (Inherited from Devart.Common.DbDataTable) | Overloaded. Suspends asynchronous fill operation.
Public Method ToString (Inherited from System.Data.DataTable) | Gets the TableName and DisplayExpression, if there is one as a concatenated string.
Public Method Update (Inherited from Devart.Common.DbDataTable) | Executes the appropriate commands to delete, insert, or update rows in the data source.
Public Method UpdateRows (Inherited from Devart.Common.DbDataTable) | Executes the appropriate commands to delete, insert, or update the specified rows in the data source.
Public Method WriteXml (Inherited from System.Data.DataTable) | Overloaded. Writes the current data, and optionally the schema, for the DataTable using the specified TextWriter and XmlWriteMode. To write the schema, set the value for the mode parameter to WriteSchema.
Public Method WriteXmlSchema (Inherited from System.Data.DataTable) | Overloaded. Writes the current data structure of the DataTable as an XML schema to the specified stream.

See Also

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clone Method

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : Clone Method (PgSqlDataTable)

Clones the current instance of PgSqlDataTable.

[Visual Basic]
Overrides Public Function Clone() As DataTable
[C#]
public override DataTable Clone();

Return Type

A new instance of PgSqlDataTable.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%% $$Events$$

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataTable Class Events

Devart.Data.PostgreSql Namespace : PgSqlDataTable Class

For a list of all members of this type, see PgSqlDataTable members.

Public Events

Public Event ColumnChanged (Inherited from System.Data.DataTable) | Occurs after a value has been changed for the specified DataColumn in a DataRow.
Public Event ColumnChanging (Inherited from System.Data.DataTable) | Occurs when a value is being changed for the specified DataColumn in a DataRow.
Public Event Disposed (Inherited from Devart.Common.DbDataTable) | Adds an event handler to listen to the Disposed event on the component.
Public Event FetchFinished (Inherited from Devart.Common.DbDataTable) | Occurs when a result set is completely fetched.
Public Event FillError (Inherited from Devart.Common.DbDataTable) | Occurs when an error is raised during a fill operation.
Public Event Initialized (Inherited from System.Data.DataTable) | Occurs after the DataTable is initialized.
Public Event RowChanged (Inherited from System.Data.DataTable) | Occurs after a DataRow has been changed successfully.
Public Event RowChanging (Inherited from System.Data.DataTable) | Occurs when a DataRow is changing.
Public Event RowDeleted (Inherited from System.Data.DataTable) | Occurs after a row in the table has been deleted.
Public Event RowDeleting (Inherited from System.Data.DataTable) | Occurs before a row in the table is about to be deleted.
Public Event RowFetched (Inherited from Devart.Common.DbDataTable) | Occurs when another row is completely fetched.
Public Event RowUpdated | Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event RowUpdating | Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.
Public Event TableCleared (Inherited from System.Data.DataTable) | Occurs after a DataTable is cleared.
Public Event TableClearing (Inherited from System.Data.DataTable) | Occurs when a DataTable is cleared.
Public Event TableNewRow (Inherited from System.Data.DataTable) | Occurs when a new DataRow is inserted.

See Also

PgSqlDataTable Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlDataReader Class


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowUpdated Event

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : RowUpdated Event (PgSqlDataTable)

Occurs during Update after a command is executed against the data source. The attempt to update is made, so the event fires.

[Visual Basic]
Public Event RowUpdated() As PgSqlRowUpdatedEventHandler
[C#]
public event PgSqlRowUpdatedEventHandler RowUpdated();

Remarks

The event handler receives an argument of type PgSqlRowUpdatedEventArgs containing data related to this event. The following PgSqlRowUpdatedEventArgs properties provide information specific to this event.
Property | Description
PgSqlRowUpdatedEventArgs.Command | Gets the PgSqlCommand executed when Update is called.
Errors (inherited from RowUpdatedEventArgs) | Gets any errors generated by the .NET data provider when the Command was executed.
RecordsAffected (inherited from RowUpdatedEventArgs) | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Row (inherited from RowUpdatedEventArgs) | Gets the DataRow sent through an Update.
StatementType (RowUpdatedEventArgs) | Gets the type of SQL statement executed.
Status (inherited from RowUpdatedEventArgs) | Gets the UpdateStatus of the Command.
TableMapping (inherited from RowUpdatedEventArgs) | Gets the DataTableMapping sent through an Update.

When using the Update method, there are two events that occur per data row updated. The order of execution is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The PgSqlDataAdapter.RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecordS, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The PgSqlDataAdapter.RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDataTable Class | PgSqlDataTable Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowUpdating Event

Devart.Data.PostgreSql Namespace > PgSqlDataTable Class : RowUpdating Event (PgSqlDataTable)

Occurs during Update before a command is executed against the data source. The attempt to update is made, so the event fires.

[Visual Basic]
Public Event RowUpdating() As PgSqlRowUpdatingEventHandler
[C#]
public event PgSqlRowUpdatingEventHandler RowUpdating();

Remarks

The event handler receives an argument of type PgSqlRowUpdatingEventArgs containing data related to this event. The following PgSqlRowUpdatingEventArgs properties provide information specific to this event.
Property | Description
PgSqlRowUpdatedEventArgs.Command | Gets the PgSqlCommand executed when Update is called.
Errors (inherited from RowUpdatingEventArgs) | Gets any errors generated by the .NET data provider when the Command was executed.
Row (inherited from RowUpdatingEventArgs) | Gets the DataRow to sent through an Update.
StatementType (RowUpdatingEventArgs) | Gets the type of SQL statement to execute.
Status (inherited from RowUpdatingEventArgs) | Gets the UpdateStatus of the Command.
TableMapping (inherited from RowUpdatingEventArgs) | Gets the DataTableMapping to sent through an Update.

When using the Update method, there are two events that occur per data row updated. The order of execution is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The PgSqlDataAdapter.RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecordS, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The PgSqlDataAdapter.RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlDataTable Class | PgSqlDataTable Members


%%PageItemTitle%%

PgSqlDateRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Class

Devart.Data.PostgreSql Namespace : PgSqlDateRange Class

Represents the PostgreSQL daterange type. Each object of the PgSqlDateRange class stores a range of date values.

For a list of all members of this type, see PgSqlDateRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>
Devart.Data.PostgreSql.PgSqlDateRange

Syntax

[Visual Basic]
Public Class PgSqlDateRange
   Inherits PgSqlRangeType(Of PgSqlTimeStamp)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlDateRange : PgSqlRangeType<PgSqlTimeStamp>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlDateRange object call the PgSqlDataReader.GetPgSqlDateRange method of the PgSqlDataReader class.

See Also

PgSqlDateRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlDateRange Class

PgSqlDateRange overview

Public Constructors

Public Constructor PgSqlDateRange Constructor Overloaded. Initializes a new instance of the PgSqlDateRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlDateRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlDateRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class : PgSqlDateRange Constructor (PgSqlDateRange)

Initializes a new instance of the PgSqlDateRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlDateRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,PgSqlTimeStamp)

[C#] public PgSqlDateRange(PgSqlTimeStamp,PgSqlTimeStamp);

Initializes a new instance of the PgSqlDateRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

[C#] public PgSqlDateRange(PgSqlTimeStamp,bool,PgSqlTimeStamp,bool);

See Also

PgSqlDateRange Class | PgSqlDateRange Members


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class > PgSqlDateRange Constructor : PgSqlDateRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Initializes a new instance of the PgSqlDateRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As PgSqlTimeStamp, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlDateRange(
   PgSqlTimeStamp lowerBound,
   bool isLowerBoundInclusive,
   PgSqlTimeStamp upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlDateRange Class | PgSqlDateRange Members | Overload List | #ctor


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class > PgSqlDateRange Constructor : PgSqlDateRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Initializes a new instance of the PgSqlDateRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal upperBound As PgSqlTimeStamp _
)
[C#]
public PgSqlDateRange(
   PgSqlTimeStamp lowerBound,
   PgSqlTimeStamp upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlDateRange Class | PgSqlDateRange Members | Overload List | #ctor


%%PageItemTitle%% $$Fields$$

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlDateRange Class

For a list of all members of this type, see PgSqlDateRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlDateRange object.

See Also

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class : Empty Field (PgSqlDateRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlDateRange
[C#]
public static readonly PgSqlDateRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlDateRange Class | PgSqlDateRange Members


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class : Null Field (PgSqlDateRange)

Represents a null PgSqlDateRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlDateRange
[C#]
public static readonly PgSqlDateRange Null

Return Type

An object that represents a null PgSqlDateRange value.

See Also

PgSqlDateRange Class | PgSqlDateRange Members | IsNull Property


%%PageItemTitle%% $$Methods$$

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDateRange Class

For a list of all members of this type, see PgSqlDateRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlDateRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class : ContainsElement Method (PgSqlDateRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As PgSqlTimeStamp _
) As Boolean
[C#]
public override bool ContainsElement(
   PgSqlTimeStamp element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlDateRange Class | PgSqlDateRange Members


%%PageItemTitle%%

PgSqlDateRange Class | PgSqlDateRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlDateRange Class : Parse Method (PgSqlDateRange)

Converts the specified String representation of a date to its PgSqlDateRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlDateRange
[C#]
public static PgSqlDateRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlDateRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlDateRange Class | PgSqlDateRange Members


%%PageItemTitle%%

PgSqlDependency Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Class

Devart.Data.PostgreSql Namespace : PgSqlDependency Class

Tracks changes on the server.

For a list of all members of this type, see PgSqlDependency members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlDependency

Syntax

[Visual Basic]
Public Class PgSqlDependency
   Implements IDisposable
[C#]
public class PgSqlDependency : IDisposable

Remarks

The PgSqlDependency class is designed to watch for changes in tables on the server. This is accomplished using LISTEN ... NOTIFY server side mechanism and recurring check requests.

To start watching for a table in a schema perform the following steps:

  1. Create a stored function on the server. This function should issue NOTIFY "table_changed_schemaname.tablename" command, where schemaname and tablename represent names of the schema and the table you want to watch.
  2. Create a trigger that executes the stored function every time the table is altered.
  3. Create a PgSqlCommand object with CommandText property set to SQL statement like SELECT * FROM schemaname.tablename.
  4. Create a PgSqlDependency object and connect it to the PgSqlCommand object (for example, with the AddCommandDependency method).
  5. Assign a handler to the PgSqlDependency.OnChange event.
  6. Prepare a PgSqlConnection object (or a connection string) to use by the PgSqlDependency object and call the Start method.

Once you perform these steps the the PgSqlDependency object will poll the server periodically, and if the table is modified since the last call, it will invoke your event handler.

Note that you can use single PgSqlDependency instance to watch for several tables. To do this, specify all necessary tables in the FROM clause of command's SQL statement.

Note also that PgSqlDependency can watch for whole tables only. If you restrict the SELECT statement with WHERE clause, it will not affect notifications.

This class is not available in Mobile Edition.

Example

This sample demonstrates using PgSqlDependency object to watch for modifications in the table test.dept. It is assumed that you have the following objects created on the server:

CREATE OR REPLACE FUNCTION test.note_dept()
  RETURNS TRIGGER AS $$
  BEGIN
  NOTIFY "table_changed_test.dept";
  RETURN NULL;
  END;
$$ LANGUAGE plpgsql

CREATE TRIGGER notify_dept AFTER INSERT OR UPDATE OR DELETE
  ON test.dept
  EXECUTE PROCEDURE test.note_dept();

[C#]

PgSqlConnection connection = new PgSqlConnection("User Id = postgres; Password = postgres; host = localhost; Port = 5432; database = testdb;");
PgSqlDependency depend = new PgSqlDependency();
depend.OnChange += new OnChangeEventHandler(dependency_OnChange);
PgSqlCommand selectCommand = new PgSqlCommand("SELECT * FROM test.dept", connection);
depend.AddCommandDependency(selectCommand);
depend.CheckTimeout = 500;
connection.Open();
try {
  depend.Start(connection);

  //different actions with data and check correct depend work
  PgSqlCommand commandInsert = new PgSqlCommand("INSERT INTO test.dept VALUES (111, 'test', 'test');", connection);
  PgSqlCommand commandUpdate = new PgSqlCommand("UPDATE test.dept SET dname = 'test' WHERE deptno = 10;", connection);
  PgSqlCommand commandDelete = new PgSqlCommand("DELETE FROM test.dept WHERE dname = 'test';", connection);
  commandInsert.ExecuteNonQuery();
  System.Threading.Thread.Sleep(600);
  commandUpdate.ExecuteNonQuery();
  System.Threading.Thread.Sleep(600);
  commandDelete.ExecuteNonQuery();
  System.Threading.Thread.Sleep(600);
}
finally {
  depend.Stop();
  connection.Close();
   }

...

private void dependency_OnChange(object sender, PgSqlTableChangeEventArgs e) {

  MessageBox.Show("Table changed: " + e.TableName);
}

[Visual Basic]

Dim connection As New PgSqlConnection("User Id = postgres; Password = postgres; host = localhost; Port = 5432; database = postgres;")
Dim depend As New PgSqlDependency
AddHandler depend.OnChange, New OnChangeEventHandler(AddressOf Me.dependency_OnChange)
Dim selectCommand As New PgSqlCommand("SELECT * FROM test.dept", connection)
depend.AddCommandDependency(selectCommand)
depend.CheckTimeout = 500
connection.Open()
Try
    depend.Start(connection)
    Dim commandInsert As New PgSqlCommand("INSERT INTO test.dept VALUES (111, 'test', 'test');", connection)
    Dim commandUpdate As New PgSqlCommand("UPDATE test.dept SET dname = 'test' WHERE deptno = 10;", connection)
    Dim commandDelete As New PgSqlCommand("DELETE FROM test.dept WHERE dname = 'test';", connection)
    commandInsert.ExecuteNonQuery()
    System.Threading.Thread.Sleep(600)
    commandUpdate.ExecuteNonQuery()
    System.Threading.Thread.Sleep(600)
    commandDelete.ExecuteNonQuery()
    System.Threading.Thread.Sleep(600)
Finally
    depend.Stop()
    connection.Close()
End Try

...

Private Sub dependency_OnChange(ByVal sender As Object, ByVal e As PgSqlTableChangeEventArgs)

    MessageBox.Show("Table changed " & e.TableName)
End Sub

See Also

PgSqlDependency Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlDependency Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Class Members

Devart.Data.PostgreSql Namespace : PgSqlDependency Class

PgSqlDependency overview

Public Constructors

Public Constructor PgSqlDependency Constructor Overloaded. Creates a new instance of the PgSqlDependency class.

Public Properties

Public Property CheckTimeout | Interval in milliseconds between two consequent checks.
Public Property HasChanges | Gets a value that indicates whether one of the tables associated with the dependency has changed.

Public Methods

Public Method AddCommandDependency | Associates a PgSqlCommand object with this PgSqlDependency instance.
Public Method Dispose | Excludes this instance of PgSqlDependency from list of polled items.
Public Method Start | Overloaded. Starts the listener for receiving dependency change notifications from an instance of PostgreSQL Server.
Public Method Stop | Stops a listener for a connection specified in a previous Start call.

Public Events

Public Event OnChange Occurs when a notification is received for any of the commands associated with this PgSqlDependency object.

See Also

PgSqlDependency Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Constructor

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : PgSqlDependency Constructor (PgSqlDependency)

Creates a new instance of the PgSqlDependency class.

Overload List

Creates a new instance of the PgSqlDependency class.

[Visual Basic] Public Sub New()

[C#] public PgSqlDependency();

Creates a new instance of the PgSqlDependency class, associates it with the PgSqlCommand parameter, and specifies a timeout value.

[Visual Basic] Public Sub New(PgSqlCommand,Integer)

[C#] public PgSqlDependency(PgSqlCommand,int);

See Also

PgSqlDependency Class | PgSqlDependency Members


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Constructor()

Devart.Data.PostgreSql Namespace > PgSqlDependency Class > PgSqlDependency Constructor : PgSqlDependency Constructor()

Creates a new instance of the PgSqlDependency class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDependency();

See Also

PgSqlDependency Class | PgSqlDependency Members | Overload List


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Overload List

Language

Visual Basic

C#

Show All

command
The PgSqlCommand object to associate with this PgSqlDependency object.
checkTimeout
A positive integer that represents server check interval in milliseconds. The default value is 30000 (30 seconds).
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Constructor(PgSqlCommand,Int32)

Devart.Data.PostgreSql Namespace > PgSqlDependency Class > PgSqlDependency Constructor : PgSqlDependency Constructor(PgSqlCommand,Int32)

Creates a new instance of the PgSqlDependency class, associates it with the PgSqlCommand parameter, and specifies a timeout value.

[Visual Basic]
Public Function New( _
   ByVal command As PgSqlCommand, _
   ByVal checkTimeout As Integer _
)
[C#]
public PgSqlDependency(
   PgSqlCommand command,
   int checkTimeout
);

Parameters

command
The PgSqlCommand object to associate with this PgSqlDependency object.
checkTimeout
A positive integer that represents server check interval in milliseconds. The default value is 30000 (30 seconds).

See Also

PgSqlDependency Class | PgSqlDependency Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlDependency Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDependency Class

For a list of all members of this type, see PgSqlDependency members.

Public Properties

Public Property CheckTimeout | Interval in milliseconds between two consequent checks.
Public Property HasChanges | Gets a value that indicates whether one of the tables associated with the dependency has changed.

See Also

PgSqlDependency Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | OnChange Event

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CheckTimeout Property

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : CheckTimeout Property

Interval in milliseconds between two consequent checks.

[Visual Basic]
Public Property CheckTimeout As Integer
[C#]
public int CheckTimeout {get; set;}

Return Type

A positive integer that represents server check interval in milliseconds. The default value is 30000 (30 seconds).

Remarks

Be careful in setting this property. If you set a too big interval, the notifications will be significantly delayed. If this interval is too small, there will be redundant network and server load.

See Also

PgSqlDependency Class | PgSqlDependency Members | OnChange Event


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

HasChanges Property

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : HasChanges Property

Gets a value that indicates whether one of the tables associated with the dependency has changed.

[Visual Basic]
Public ReadOnly Property HasChanges As Boolean
[C#]
public bool HasChanges {get;}

Return Type

true if there were changes in the tables since the listening has started.

Remarks

If you are not using the PgSqlDependency.OnChange event, you can check the HasChanges property to determine if the query results have changed.

Note that once the value of this property is set to true, it remains true forever. In other words, to continue tracking for changes you have to use the PgSqlDependency.OnChange event or create another instance of the PgSqlDependency class.

See Also

PgSqlDependency Class | PgSqlDependency Members


%%PageItemTitle%% $$Methods$$

PgSqlDependency Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDependency Class

For a list of all members of this type, see PgSqlDependency members.

Public Methods

Public Method AddCommandDependency | Associates a PgSqlCommand object with this PgSqlDependency instance.
Public Method Dispose | Excludes this instance of PgSqlDependency from list of polled items.
Public Method Start | Overloaded. Starts the listener for receiving dependency change notifications from an instance of PostgreSQL Server.
Public Method Stop | Stops a listener for a connection specified in a previous Start call.

See Also

PgSqlDependency Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Start Method

Language

Visual Basic

C#

Show All

command
A PgSqlCommand object containing a statement that is valid for notifications.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddCommandDependency Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : AddCommandDependency Method

Associates a PgSqlCommand object with this PgSqlDependency instance.

[Visual Basic]
Public Sub AddCommandDependency( _
   ByVal command As PgSqlCommand _
)
[C#]
public void AddCommandDependency(
   PgSqlCommand command
);

Parameters

command
A PgSqlCommand object containing a statement that is valid for notifications.

Remarks

You can attach more than one PgSqlCommand object to PgSqlDependency.

See Also

PgSqlDependency Class | PgSqlDependency Members | Start Method


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Start Method | Stop Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Dispose Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : Dispose Method (PgSqlDependency)

Excludes this instance of PgSqlDependency from list of polled items.

[Visual Basic]
Public Sub Dispose()
[C#]
public void Dispose();

Remarks

The method is designed to remove single instance of PgSqlDependency class from the list of dependency checks. To stop the whole process rather than removing one item, use the Stop method.

See Also

PgSqlDependency Class | PgSqlDependency Members | Start Method | Stop Method


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Start Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : Start Method (PgSqlDependency)

Starts the listener for receiving dependency change notifications from an instance of PostgreSQL Server.

Overload List

Starts the listener for receiving dependency change notifications from the instance of PostgreSQL server specified by the connection string.

[Visual Basic] Overloads Public Sub Start(String)

[C#] public void Start(string);

Starts the listener for receiving dependency change notifications from the instance of PostgreSQL server specified by the PgSqlConnection object.

[Visual Basic] Overloads Public Sub Start(PgSqlConnection)

[C#] public void Start(PgSqlConnection);

See Also

PgSqlDependency Class | PgSqlDependency Members


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Overload List | Stop Method | AddCommandDependency Method

Language

Visual Basic

C#

Show All

connectionString
A connection string that describes PostgreSQL server.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Start(String) Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class > Start Method : Start(String) Method

Starts the listener for receiving dependency change notifications from the instance of PostgreSQL server specified by the connection string.

[Visual Basic]
Overloads Public Sub Start( _
   ByVal connectionString As String _
)
[C#]
public void Start(
   string connectionString
);

Parameters

connectionString
A connection string that describes PostgreSQL server.

Remarks

In the moment of invoking the Start method corresponding triggers and functions must be already created on the server.

See Also

PgSqlDependency Class | PgSqlDependency Members | Overload List | Stop Method | AddCommandDependency Method


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Overload List | Stop Method | AddCommandDependency Method

Language

Visual Basic

C#

Show All

connection
A PgSqlConnection object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Start(PgSqlConnection) Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class > Start Method : Start(PgSqlConnection) Method

Starts the listener for receiving dependency change notifications from the instance of PostgreSQL server specified by the PgSqlConnection object.

[Visual Basic]
Overloads Public Sub Start( _
   ByVal connection As PgSqlConnection _
)
[C#]
public void Start(
   PgSqlConnection connection
);

Parameters

connection
A PgSqlConnection object.

Remarks

In the moment of invoking the Start method corresponding triggers and functions must be already created on the server.

See Also

PgSqlDependency Class | PgSqlDependency Members | Overload List | Stop Method | AddCommandDependency Method


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | Start Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Stop Method

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : Stop Method (PgSqlDependency)

Stops a listener for a connection specified in a previous Start call.

[Visual Basic]
Public Sub Stop()
[C#]
public void Stop();

See Also

PgSqlDependency Class | PgSqlDependency Members | Start Method


%%PageItemTitle%% $$Events$$

PgSqlDependency Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDependency Class Events

Devart.Data.PostgreSql Namespace : PgSqlDependency Class

For a list of all members of this type, see PgSqlDependency members.

Public Events

Public Event OnChange Occurs when a notification is received for any of the commands associated with this PgSqlDependency object.

See Also

PgSqlDependency Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDependency Class | PgSqlDependency Members | CheckTimeout Property | PgSqlTableChangeEventArgs Class | OnChangeEventHandler Delegate

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

OnChange Event

Devart.Data.PostgreSql Namespace > PgSqlDependency Class : OnChange Event

Occurs when a notification is received for any of the commands associated with this PgSqlDependency object.

[Visual Basic]
Public Event OnChange() As OnChangeEventHandler
[C#]
public event OnChangeEventHandler OnChange();

Event Data

The event handler receives an argument of type PgSqlTableChangeEventArgs containing data related to this event. The following PgSqlTableChangeEventArgs properties provide information specific to this event.

Property | Description
Command | Gets PgSqlCommand object associated with the table that was modified on the server.
TableName | Gets name of the table that was modified on the server.

Remarks

Keep in mind that this event is fired not when the tables are actually modified, but when PgSqlDependency checks for modifications.

The event invokes a __Delegates.OnChangeEventHandler with an argument of type PgSqlTableChangeEventArgs.

See Also

PgSqlDependency Class | PgSqlDependency Members | CheckTimeout Property | PgSqlTableChangeEventArgs Class | OnChangeEventHandler Delegate


%%PageItemTitle%%

PgSqlDump Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Class

Devart.Data.PostgreSql Namespace : PgSqlDump Class

Serves to store a database or its parts as a script and also to restore database from the received script.

For a list of all members of this type, see PgSqlDump members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbDump
Devart.Data.PostgreSql.PgSqlDump

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlDump
   Inherits DbDump
   Implements IComponent, IDisposable
[C#]
public sealed class PgSqlDump : DbDump, IComponent, IDisposable

Remarks

PgSqlDump by its behaviour is similar to pg_dump program.

Use Schema property to specify server schema from database objects will be stored. If Schema property is an empty string all schema will be included into searching condition.

Use Tables property to specify a list of tables to be stored. If Tables property is an empty string all tables will be included into the dump text. To generate a script call Devart.Common.DbDump.Backup method. The produced script can be viewed in DumpText. To execute the dump script call the Devart.Common.DbDump.Restore method.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

Example

The first example creates a PgSqlDump component and executes backup of the tables 'dept','emp' from specified database and schema 'test' using Devart.Common.DbDump.Backup() method. After execution of backup operation the result is saved to the d:\sqldump1.dmp file using the DumpText property.

The second example creates a PgSqlDump component and executes backup of the specified database using Devart.Common.DbDump.Backup(String) method. After execution of backup operation the result is saved directly to the file, specified with the Devart.Common.DbDump.Backup(String) method parameter.

Note: If you want to backup a database, containing a large amount of data, it is not recommended to use the DumpText property for storing the backup script. Better use Devart.Common.DbDump.Backup(Stream), Devart.Common.DbDump.Backup(TextWriter), Devart.Common.DbDump.Backup(String) overloaded methods.

[C#]

// First example

PgSqlConnection conn = new PgSqlConnection("user id = postgres;password=postgres;host=localhost;port=5432;database =testbase;schema=test");
conn.Open();

PgSqlDump pgSqlDump = new PgSqlDump();
pgSqlDump.Connection = conn;
pgSqlDump.Schema = "test";
pgSqlDump.Tables = "dept;emp";
pgSqlDump.IncludeDrop = true;
pgSqlDump.Backup();

StreamWriter stream = new StreamWriter("d:\\sqldump1.dmp");
stream.WriteLine(pgSqlDump.DumpText);
stream.Close();
conn.Close();

// Second example

PgSqlConnection conn = new PgSqlConnection("user id = postgres;password=postgres;host=localhost;port=5432;database =testbase;schema=test");
conn.Open();
PgSqlDump pgSqlDump = new PgSqlDump();
pgSqlDump.Connection = conn;
pgSqlDump.Backup("d:\\sqldump1.dmp");
conn.Close();

[Visual Basic]

' First example

Dim conn As PgSqlConnection = New PgSqlConnection("user id = postgres;password=postgres;host=localhost;port=5432;database =testbase;schema=test")
conn.Open()

Dim pgDump As PgSqlDump = New PgSqlDump
pgDump.Connection = conn
pgDump.Schema = "test"
pgDump.Tables = "dept;emp"
pgDump.IncludeDrop = True
pgDump.Backup()

Dim stream As StreamWriter = New StreamWriter("d:\\sqldump1.dmp")
stream.WriteLine(pgDump.DumpText)
stream.Close()
conn.Close()

' Second example

Dim conn As PgSqlConnection = New PgSqlConnection("user id = postgres;password=postgres;host=localhost;port=5432;database =testbase;schema=test")
conn.Open()

Dim pgDump As PgSqlDump = New PgSqlDump
pgDump.Connection = conn
pgSqlDump.Backup("d:\\sqldump1.dmp")
conn.Close()

See Also

PgSqlDump Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlDump Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Class Members

Devart.Data.PostgreSql Namespace : PgSqlDump Class

PgSqlDump overview

Public Constructors

Public Constructor PgSqlDump Constructor Overloaded. Initializes a new instance of the PgSqlDump class.

Public Properties

Public Property BlockSize | Gets or sets the size of a data block for reading from the large object and dumping to a single INSERT statement (SELECT LOWRITE...). Default value is 0 (large objects will not be split when dumping).
Public Property CommitBatchSize | Gets or sets the max size in bytes of a single insert statement with multiple values in the script. Ignored if UseMultirowSyntax is set to false.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlDump.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property CreateConstraints | Gets or sets a value that determines whether to add statements that create table constraints in the dump.
Public Property DumpText | Overridden. Gets as a result of Devart.Common.DbDump.Backup() execution, or sets data needed to execute Devart.Common.DbDump.Restore() method.
Public Property GenerateHeader (Inherited from Devart.Common.DbDump) | Gets or sets a value that determines whether to add some extra information in the script header.
Public Property IncludeBlob | Include large objects, associated with Oid filed values of dumped tables, in the dump.
Public Property IncludeDrop (Inherited from Devart.Common.DbDump) | Determines whether to recreate database objects.
Public Property IncludeTablespace |
Public Property IncludeUsers | Determines whether to include information about users into the dump text.
Public Property Mode (Inherited from Devart.Common.DbDump) | Determines whether to include data from tables into the dump text, script to create database objects or both.
Public Property ObjectTypes | Gets or sets a value that indicates which objects will be included in the dump.
Public Property QuoteIdentifier (Inherited from Devart.Common.DbDump) | Determines whether to quote all identifiers present in the database.
Public Property Schema | Specifies server schema that will be dumped.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Tables | Overridden. Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.
Public Property UseMultirowSyntax | Determines whether to use the multirow VALUES syntax when generating INSERT statements.

Public Methods

Public Method Backup (Inherited from Devart.Common.DbDump) | Overloaded. Generates a script for further restoring with the Devart.Common.DbDump.Restore method.
Public Method BackupQuery (Inherited from Devart.Common.DbDump) | Overloaded. Generates a script with a backup of the data, returned by the specified query, for further restoring with the Devart.Common.DbDump.Restore method.
Public Method BeginBackup (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.Backup method.
Public Method BeginBackupQuery (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.BackupQuery method.
Public Method BeginRestore (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.Restore method.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndBackup (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.Backup method.
Public Method EndBackupQuery (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.BackupQuery method.
Public Method EndRestore (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.Restore method.
Public Method ExportFromFile | Serves to store dump text into the file.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method ImportToFile | Serves to import database dump from the file for further execution Devart.Common.DbDump.Restore() method.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Restore (Inherited from Devart.Common.DbDump) | Overloaded. Executes the previously dumped script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlDump Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Constructor

Devart.Data.PostgreSql Namespace > PgSqlDump Class : PgSqlDump Constructor (PgSqlDump)

Initializes a new instance of the PgSqlDump class.

Overload List

Initializes a new instance of the PgSqlDump class.

[Visual Basic] Public Sub New()

[C#] public PgSqlDump();

Initializes a new instance of the PgSqlDump class with a object.

[Visual Basic] Public Sub New(PgSqlConnection)

[C#] public PgSqlDump(PgSqlConnection);

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Constructor()

Devart.Data.PostgreSql Namespace > PgSqlDump Class > PgSqlDump Constructor : PgSqlDump Constructor()

Initializes a new instance of the PgSqlDump class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlDump();

Remarks

The base constructor initializes all fields to their default values.

See Also

PgSqlDump Class | PgSqlDump Members | Overload List


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members | Overload List

Language

Visual Basic

C#

Show All

connection
A PgSqlConnection object that represents the connection to a data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Constructor(PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlDump Class > PgSqlDump Constructor : PgSqlDump Constructor(PgSqlConnection)

Initializes a new instance of the PgSqlDump class with a object.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlDump(
   PgSqlConnection connection
);

Parameters

connection
A PgSqlConnection object that represents the connection to a data source.

See Also

PgSqlDump Class | PgSqlDump Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlDump Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDump Class

For a list of all members of this type, see PgSqlDump members.

Public Properties

Public Property BlockSize | Gets or sets the size of a data block for reading from the large object and dumping to a single INSERT statement (SELECT LOWRITE...). Default value is 0 (large objects will not be split when dumping).
Public Property CommitBatchSize | Gets or sets the max size in bytes of a single insert statement with multiple values in the script. Ignored if UseMultirowSyntax is set to false.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlDump.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property CreateConstraints | Gets or sets a value that determines whether to add statements that create table constraints in the dump.
Public Property DumpText | Overridden. Gets as a result of Devart.Common.DbDump.Backup() execution, or sets data needed to execute Devart.Common.DbDump.Restore() method.
Public Property GenerateHeader (Inherited from Devart.Common.DbDump) | Gets or sets a value that determines whether to add some extra information in the script header.
Public Property IncludeBlob | Include large objects, associated with Oid filed values of dumped tables, in the dump.
Public Property IncludeDrop (Inherited from Devart.Common.DbDump) | Determines whether to recreate database objects.
Public Property IncludeTablespace |
Public Property IncludeUsers | Determines whether to include information about users into the dump text.
Public Property Mode (Inherited from Devart.Common.DbDump) | Determines whether to include data from tables into the dump text, script to create database objects or both.
Public Property ObjectTypes | Gets or sets a value that indicates which objects will be included in the dump.
Public Property QuoteIdentifier (Inherited from Devart.Common.DbDump) | Determines whether to quote all identifiers present in the database.
Public Property Schema | Specifies server schema that will be dumped.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Tables | Overridden. Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.
Public Property UseMultirowSyntax | Determines whether to use the multirow VALUES syntax when generating INSERT statements.

See Also

PgSqlDump Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

BlockSize Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : BlockSize Property

Gets or sets the size of a data block for reading from the large object and dumping to a single INSERT statement (SELECT LOWRITE...). Default value is 0 (large objects will not be split when dumping).

[Visual Basic]
Public Property BlockSize As Integer
[C#]
public int BlockSize {get; set;}

Return Type

The size of a data block for dumping large objects.

Remarks

If the size of a large object is less than the value of this property, all the dataof this large object are placed to a single INSERT statement. Otherwise, PgSqlDump reads the large object data in parts of the BlockSize size and generates a separate statement for each part.

If your large objects are not too big, it is better to keep the default value. For bigger large objects it is better to dump data into several statements with less data than in one huge statement, because such statement can cause insufficient memory errors.

Note that decreasing BlockSize value causes increasing the number of round-trips to the server and longer dump duration.

We recommend the values for this property from 64Kb to 1Mb.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CommitBatchSize Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : CommitBatchSize Property

Gets or sets the max size in bytes of a single insert statement with multiple values in the script. Ignored if UseMultirowSyntax is set to false.

[Visual Basic]
Public Property CommitBatchSize As Integer
[C#]
public int CommitBatchSize {get; set;}

Return Type

The max size in bytes of a single insert statement with multiple values in the script.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : Connection Property (PgSqlDump)

Gets or sets the PgSqlConnection used by this instance of the PgSqlDump.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateConstraints Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : CreateConstraints Property

Gets or sets a value that determines whether to add statements that create table constraints in the dump.

[Visual Basic]
Public Property CreateConstraints As Boolean
[C#]
public bool CreateConstraints {get; set;}

Return Type

true, if PgSqlDump should add table constraints to the script; otherwise, false.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members | Backup Method | Restore Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DumpText Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : DumpText Property (PgSqlDump)

Gets as a result of Devart.Common.DbDump.Backup() execution, or sets data needed to execute Devart.Common.DbDump.Restore() method.

[Visual Basic]
Overrides Public NotOverridable Property DumpText As String
[C#]
public override string DumpText {get; set;}

Return Type

SQL commands separated by ';' symbols.

Remarks

Use DumpText property to store generated by Devart.Common.DbDump.Backup() script. Also use this property as a source on execution Devart.Common.DbDump.Restore() operation.

See Also

PgSqlDump Class | PgSqlDump Members | Backup Method | Restore Method


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IncludeBlob Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : IncludeBlob Property

Include large objects, associated with Oid filed values of dumped tables, in the dump.

[Visual Basic]
Public Property IncludeBlob As Boolean
[C#]
public bool IncludeBlob {get; set;}

Return Type

true, if large objects will be added to database dump; otherwise, false. The default value is false.

Remarks

Only the large objects with oids (object identifier) from the dumped tables are dumped. That means that if a dumped table has an oid column and IncludeBlob=true, then all the oid values are verified for the existance of the corresponding large object, and these large objects are dumped. Don't forget that large objects oids should be stored in the oid type fields. Here is a simple DDL script that creates a table for storing oid references to the large objects.

 CREATE TABLE test.largeobj_table
(
  loid oid
)

Setting this property to true may significant increase size of the dump and make difficult its representation because of great amount of binary data.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IncludeTablespace Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : IncludeTablespace Property
[Visual Basic]
Public Property IncludeTablespace As Boolean
[C#]
public bool IncludeTablespace {get; set;}

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members | ObjectTypes Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IncludeUsers Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : IncludeUsers Property

Determines whether to include information about users into the dump text.

[Visual Basic]
Public Property IncludeUsers As Boolean
[C#]
public bool IncludeUsers {get; set;}

Return Type

true, if information about users should be added into dump text; otherwise, false. The default value is false.

See Also

PgSqlDump Class | PgSqlDump Members | ObjectTypes Property


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ObjectTypes Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : ObjectTypes Property

Gets or sets a value that indicates which objects will be included in the dump.

[Visual Basic]
Public Property ObjectTypes As PgSqlDumpObjects
[C#]
public PgSqlDumpObjects ObjectTypes {get; set;}

Return Type

A combination of PgSqlDumpObjects values.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schema Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : Schema Property (PgSqlDump)

Specifies server schema that will be dumped.

[Visual Basic]
Public Property Schema As String
[C#]
public string Schema {get; set;}

Return Type

Name of the schema on the server.

Remarks

Use this property to set the name of schema all objects of which will be included into dump. Objects out of the specified schema will be ignored.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Tables Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : Tables Property (PgSqlDump)

Gets or sets a list of the tables which will be used in the script. Table names are separated by semicolon.

[Visual Basic]
Overrides Public NotOverridable Property Tables As String
[C#]
public override string Tables {get; set;}

Return Type

String containing a list of the tables separated by semicolon.

Remarks

If an empty value, all the tables present in the database will be processed.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members | CommitBatchSize Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UseMultirowSyntax Property

Devart.Data.PostgreSql Namespace > PgSqlDump Class : UseMultirowSyntax Property

Determines whether to use the multirow VALUES syntax when generating INSERT statements.

[Visual Basic]
Public Property UseMultirowSyntax As Boolean
[C#]
public bool UseMultirowSyntax {get; set;}

Return Type

true, if PgSqlDump should generate INSERT statements for table data using the multirow VALUES syntax; otherwise, false.

See Also

PgSqlDump Class | PgSqlDump Members | CommitBatchSize Property


%%PageItemTitle%% $$Methods$$

PgSqlDump Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDump Class

For a list of all members of this type, see PgSqlDump members.

Public Methods

Public Method Backup (Inherited from Devart.Common.DbDump) | Overloaded. Generates a script for further restoring with the Devart.Common.DbDump.Restore method.
Public Method BackupQuery (Inherited from Devart.Common.DbDump) | Overloaded. Generates a script with a backup of the data, returned by the specified query, for further restoring with the Devart.Common.DbDump.Restore method.
Public Method BeginBackup (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.Backup method.
Public Method BeginBackupQuery (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.BackupQuery method.
Public Method BeginRestore (Inherited from Devart.Common.DbDump) | Overloaded. Starts an asynchronous invocation of a Devart.Common.DbDump.Restore method.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method EndBackup (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.Backup method.
Public Method EndBackupQuery (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.BackupQuery method.
Public Method EndRestore (Inherited from Devart.Common.DbDump) | Ends an asynchronous invocation of the Devart.Common.DbDump.Restore method.
Public Method ExportFromFile | Serves to store dump text into the file.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method ImportToFile | Serves to import database dump from the file for further execution Devart.Common.DbDump.Restore() method.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Restore (Inherited from Devart.Common.DbDump) | Overloaded. Executes the previously dumped script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlDump Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

fileName
A full name of the file where to store database dump.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ExportFromFile Method

Devart.Data.PostgreSql Namespace > PgSqlDump Class : ExportFromFile Method

Serves to store dump text into the file.

[Visual Basic]
Public Sub ExportFromFile( _
   ByVal fileName As String _
)
[C#]
public void ExportFromFile(
   string fileName
);

Parameters

fileName
A full name of the file where to store database dump.

Remarks

This method is deprecated. Use one of the Devart.Common.DbDump.Backup overloads instead.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlDump Class | PgSqlDump Members

Language

Visual Basic

C#

Show All

fileName
A full name of the file from which to restore database dump.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ImportToFile Method

Devart.Data.PostgreSql Namespace > PgSqlDump Class : ImportToFile Method

Serves to import database dump from the file for further execution Devart.Common.DbDump.Restore() method.

[Visual Basic]
Public Sub ImportToFile( _
   ByVal fileName As String _
)
[C#]
public void ImportToFile(
   string fileName
);

Parameters

fileName
A full name of the file from which to restore database dump.

Remarks

This method is deprecated. Use one of the Devart.Common.DbDump.Restore overloads instead.

See Also

PgSqlDump Class | PgSqlDump Members


%%PageItemTitle%%

PgSqlError Members | Devart.Data.PostgreSql Namespace | Severity Enumeration

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlError Class

Devart.Data.PostgreSql Namespace : PgSqlError Class

Represents a PostgreSQL notice, warning, and error messages.

For a list of all members of this type, see PgSqlError members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlError

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlError
   Implements ISerializable
[C#]
public sealed class PgSqlError : ISerializable

Remarks

The PgSqlError object contains information that the server returns in the form of error, warning, log, notice etc. messages. The primary text is located in the Message property; other properties are rather supplementary.

See Also

PgSqlError Members | Devart.Data.PostgreSql Namespace | Severity Enumeration


%%PageItemTitle%% $$Members$$

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlError Class Members

Devart.Data.PostgreSql Namespace : PgSqlError Class

PgSqlError overview

Public Properties

Public Property CallStack | Gets an indication of the context in which the error occurred.
Public Property ColumnName | Gets the name of the column, the error is associated with.
Public Property ConstraintName | Gets the name of the constraint, the error is associated with.
Public Property DataTypeName | Gets the name of the data type, the error is associated with.
Public Property DetailMessage | Gets an optional secondary error message carrying more detail about the problem.
Public Property ErrorCode | Gets the SQLSTATE code for the error.
Public Property ErrorSql | Gets the query that caused the error.
Public Property FileName | Gets the file name of the source-code location where the error was reported.
Public Property Hint | Gets an optional suggestion on what to do about the problem.
Public Property InternalPosition | Gets the error cursor position as 1-based index in the InternalQuery string.
Public Property InternalQuery | Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.
Public Property LineNumber | Gets the line number of the source-code location where the error was reported.
Public Property Message | Gets the message text.
Public Property Position | Gets the error cursor position as 1-based index in the original query string.
Public Property ProcedureName | Gets the name of the source-code routine reporting the error.
Public Property SchemaName | Gets the name of the schema containing the object, the error is associated with.
Public Property Severity | Gets the of message severity.
Public Property TableName | Gets the name of the table, the error is associated with.

Public Methods

Public Method GetObjectData | Gets object data.
Public Method ToString | Overridden. Returns string representation of the PgSqlError object.

See Also

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration


%%PageItemTitle%% $$Properties$$

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlError Class Properties

Devart.Data.PostgreSql Namespace : PgSqlError Class

For a list of all members of this type, see PgSqlError members.

Public Properties

Public Property CallStack | Gets an indication of the context in which the error occurred.
Public Property ColumnName | Gets the name of the column, the error is associated with.
Public Property ConstraintName | Gets the name of the constraint, the error is associated with.
Public Property DataTypeName | Gets the name of the data type, the error is associated with.
Public Property DetailMessage | Gets an optional secondary error message carrying more detail about the problem.
Public Property ErrorCode | Gets the SQLSTATE code for the error.
Public Property ErrorSql | Gets the query that caused the error.
Public Property FileName | Gets the file name of the source-code location where the error was reported.
Public Property Hint | Gets an optional suggestion on what to do about the problem.
Public Property InternalPosition | Gets the error cursor position as 1-based index in the InternalQuery string.
Public Property InternalQuery | Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.
Public Property LineNumber | Gets the line number of the source-code location where the error was reported.
Public Property Message | Gets the message text.
Public Property Position | Gets the error cursor position as 1-based index in the original query string.
Public Property ProcedureName | Gets the name of the source-code routine reporting the error.
Public Property SchemaName | Gets the name of the schema containing the object, the error is associated with.
Public Property Severity | Gets the of message severity.
Public Property TableName | Gets the name of the table, the error is associated with.

See Also

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CallStack Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : CallStack Property (PgSqlError)

Gets an indication of the context in which the error occurred.

[Visual Basic]
Public ReadOnly Property CallStack As String
[C#]
public string CallStack {get;}

Return Type

The error context.

Remarks

Presently this includes a call stack traceback of active procedural language functions and internally-generated queries. The trace is one entry per line, most recent first.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ColumnName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : ColumnName Property (PgSqlError)

Gets the name of the column, the error is associated with.

[Visual Basic]
Public ReadOnly Property ColumnName As String
[C#]
public string ColumnName {get;}

Return Type

The name of the column, the error is associated with, if the error is associated with a specific column; otherwise, an empty string.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConstraintName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : ConstraintName Property (PgSqlError)

Gets the name of the constraint, the error is associated with.

[Visual Basic]
Public ReadOnly Property ConstraintName As String
[C#]
public string ConstraintName {get;}

Return Type

The name of the constraint, the error is associated with, if the error is associated with a specific constraint; otherwise, an empty string.

Remarks

Indexes are treated as constraints in this case.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataTypeName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : DataTypeName Property (PgSqlError)

Gets the name of the data type, the error is associated with.

[Visual Basic]
Public ReadOnly Property DataTypeName As String
[C#]
public string DataTypeName {get;}

Return Type

The name of the data type, the error is associated with, if the error is associated with a specific data type; otherwise, an empty string.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members | Message Property | Hint Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DetailMessage Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : DetailMessage Property (PgSqlError)

Gets an optional secondary error message carrying more detail about the problem.

[Visual Basic]
Public ReadOnly Property DetailMessage As String
[C#]
public string DetailMessage {get;}

Return Type

The secondary error message.

See Also

PgSqlError Class | PgSqlError Members | Message Property | Hint Property


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ErrorCode Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : ErrorCode Property (PgSqlError)

Gets the SQLSTATE code for the error.

[Visual Basic]
Public ReadOnly Property ErrorCode As String
[C#]
public string ErrorCode {get;}

Return Type

The SQLSTATE code.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ErrorSql Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : ErrorSql Property (PgSqlError)

Gets the query that caused the error.

[Visual Basic]
Public ReadOnly Property ErrorSql As String
[C#]
public string ErrorSql {get;}

Return Type

The query that caused the error.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FileName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : FileName Property (PgSqlError)

Gets the file name of the source-code location where the error was reported.

[Visual Basic]
Public ReadOnly Property FileName As String
[C#]
public string FileName {get;}

Return Type

The file name of the source-code location.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members | Message Property | DetailMessage Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Hint Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : Hint Property (PgSqlError)

Gets an optional suggestion on what to do about the problem.

[Visual Basic]
Public ReadOnly Property Hint As String
[C#]
public string Hint {get;}

Return Type

The suggestion text.

Remarks

This property is intended to differ from Message in that it offers advice (potentially inappropriate) rather than hard facts.

See Also

PgSqlError Class | PgSqlError Members | Message Property | DetailMessage Property


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InternalPosition Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : InternalPosition Property (PgSqlError)

Gets the error cursor position as 1-based index in the InternalQuery string.

[Visual Basic]
Public ReadOnly Property InternalPosition As String
[C#]
public string InternalPosition {get;}

Return Type

The error cursor position in InternalQuery.

Remarks

The position is measured in characters, not bytes.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InternalQuery Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : InternalQuery Property (PgSqlError)

Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.

[Visual Basic]
Public ReadOnly Property InternalQuery As String
[C#]
public string InternalQuery {get;}

Return Type

The text of an internally-generated command that caused the error.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LineNumber Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : LineNumber Property (PgSqlError)

Gets the line number of the source-code location where the error was reported.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

The line number of the source-code location.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members | DetailMessage Property | Hint Property | ToString Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Message Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : Message Property (PgSqlError)

Gets the message text.

[Visual Basic]
Public ReadOnly Property Message As String
[C#]
public string Message {get;}

Return Type

The message text.

Remarks

This property contains primary information about the event, i.e. error description, notice text and so on.

See Also

PgSqlError Class | PgSqlError Members | DetailMessage Property | Hint Property | ToString Method


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Position Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : Position Property (PgSqlError)

Gets the error cursor position as 1-based index in the original query string.

[Visual Basic]
Public ReadOnly Property Position As Integer
[C#]
public int Position {get;}

Return Type

The error cursor position.

Remarks

The position is measured in characters, not bytes.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProcedureName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : ProcedureName Property (PgSqlError)

Gets the name of the source-code routine reporting the error.

[Visual Basic]
Public ReadOnly Property ProcedureName As String
[C#]
public string ProcedureName {get;}

Return Type

The name of the routine.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SchemaName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : SchemaName Property (PgSqlError)

Gets the name of the schema containing the object, the error is associated with.

[Visual Basic]
Public ReadOnly Property SchemaName As String
[C#]
public string SchemaName {get;}

Return Type

The name of the schema containing the object, the error is associated with, if the error is associated with a specific database object; otherwise, an empty string.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Severity Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : Severity Property (PgSqlError)

Gets the of message severity.

[Visual Basic]
Public ReadOnly Property Severity As Severity
[C#]
public Severity Severity {get;}

Return Type

One of the Severity values.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableName Property

Devart.Data.PostgreSql Namespace > PgSqlError Class : TableName Property (PgSqlError)

Gets the name of the table, the error is associated with.

[Visual Basic]
Public ReadOnly Property TableName As String
[C#]
public string TableName {get;}

Return Type

The name of the table, the error is associated with, if the error is associated with a specific table; otherwise, an empty string.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%% $$Methods$$

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlError Class Methods

Devart.Data.PostgreSql Namespace : PgSqlError Class

For a list of all members of this type, see PgSqlError members.

Public Methods

Public Method GetObjectData | Gets object data.
Public Method ToString | Overridden. Returns string representation of the PgSqlError object.

See Also

PgSqlError Class | Devart.Data.PostgreSql Namespace | Severity Enumeration


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

info
context
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetObjectData Method

Devart.Data.PostgreSql Namespace > PgSqlError Class : GetObjectData Method (PgSqlError)

Gets object data.

[Visual Basic]
Public Sub GetObjectData( _
   ByVal info As SerializationInfo, _
   ByVal context As StreamingContext _
)
[C#]
public void GetObjectData(
   SerializationInfo info,
   StreamingContext context
);

Parameters

info
context

Remarks

This method is for internal use only.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlError Class | PgSqlError Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlError Class : ToString Method (PgSqlError)

Returns string representation of the PgSqlError object.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

The string representation of the PgSqlError object, which consists of Severity, ErrorCode (if present), and Message.

See Also

PgSqlError Class | PgSqlError Members


%%PageItemTitle%%

PgSqlErrorCollection Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorCollection Class

Devart.Data.PostgreSql Namespace : PgSqlErrorCollection Class

Represents a collection of PgSqlError objects.

For a list of all members of this type, see PgSqlErrorCollection members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlErrorCollection

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlErrorCollection
   Implements ICollection, IEnumerable
[C#]
public sealed class PgSqlErrorCollection : ICollection, IEnumerable

See Also

PgSqlErrorCollection Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorCollection Class Members

Devart.Data.PostgreSql Namespace : PgSqlErrorCollection Class

PgSqlErrorCollection overview

Public Properties

Public Property Count
Public Property Item

Public Methods

Public Method Clear |
Public Method CopyTo | Overloaded.
Public Method GetEnumerator |

See Also

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorCollection Class Properties

Devart.Data.PostgreSql Namespace : PgSqlErrorCollection Class

For a list of all members of this type, see PgSqlErrorCollection members.

Public Properties

Public Property Count
Public Property Item

See Also

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Count Property

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class : Count Property (PgSqlErrorCollection)
[Visual Basic]
Public ReadOnly Property Count As Integer
[C#]
public int Count {get;}

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members

Language

Visual Basic

C#

Show All

i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class : Item Property (PgSqlErrorCollection)
[Visual Basic]
Public ReadOnly Default Property Item( _
   ByVal i As Integer _
) As PgSqlError
[C#]
public PgSqlError this[
   int i
]; {get;}

Parameters

i

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members


%%PageItemTitle%% $$Methods$$

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorCollection Class Methods

Devart.Data.PostgreSql Namespace : PgSqlErrorCollection Class

For a list of all members of this type, see PgSqlErrorCollection members.

Public Methods

Public Method Clear |
Public Method CopyTo | Overloaded.
Public Method GetEnumerator |

See Also

PgSqlErrorCollection Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class : Clear Method (PgSqlErrorCollection)
[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CopyTo Method

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class : CopyTo Method (PgSqlErrorCollection)

Overload List

[Visual Basic] Overloads Public Sub CopyTo(Array,Integer)

[C#] public void CopyTo(Array,int);

[Visual Basic] Overloads Public Sub CopyTo(PgSqlError(),Integer)

[C#] public void CopyTo(PgSqlError[],int);

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members | Overload List

Language

Visual Basic

C#

Show All

array
i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CopyTo(Array,Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class > CopyTo Method : CopyTo(Array,Int32) Method
[Visual Basic]
Overloads Public Sub CopyTo( _
   ByVal array As Array, _
   ByVal i As Integer _
)
[C#]
public void CopyTo(
   Array array,
   int i
);

Parameters

array
i

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members | Overload List


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members | Overload List

Language

Visual Basic

C#

Show All

array
i
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CopyTo(PgSqlError[],Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class > CopyTo Method : CopyTo(PgSqlError[],Int32) Method
[Visual Basic]
Overloads Public Sub CopyTo( _
   ByVal array() As PgSqlError, _
   ByVal i As Integer _
)
[C#]
public void CopyTo(
   PgSqlError[] array,
   int i
);

Parameters

array
i

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members | Overload List


%%PageItemTitle%%

PgSqlErrorCollection Class | PgSqlErrorCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetEnumerator Method

Devart.Data.PostgreSql Namespace > PgSqlErrorCollection Class : GetEnumerator Method (PgSqlErrorCollection)
[Visual Basic]
Public Function GetEnumerator() As IEnumerator
[C#]
public IEnumerator GetEnumerator();

See Also

PgSqlErrorCollection Class | PgSqlErrorCollection Members


%%PageItemTitle%%

PgSqlErrorEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlErrorEventArgs Class

Provides data for the PgSqlConnection.Error event.

For a list of all members of this type, see PgSqlErrorEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlErrorEventArgs

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlErrorEventArgs
   Inherits EventArgs
[C#]
public sealed class PgSqlErrorEventArgs : EventArgs

Remarks

The PgSqlErrorEventArgs object contains the error sent from the database.

See Also

PgSqlErrorEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlErrorEventArgs Class

PgSqlErrorEventArgs overview

Public Properties

Public Property Error Gets the PgSqlError sent from the database.

See Also

PgSqlErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlErrorEventArgs Class

For a list of all members of this type, see PgSqlErrorEventArgs members.

Public Properties

Public Property Error Gets the PgSqlError sent from the database.

See Also

PgSqlErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlErrorEventArgs Class | PgSqlErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Error Property

Devart.Data.PostgreSql Namespace > PgSqlErrorEventArgs Class : Error Property (PgSqlErrorEventArgs)

Gets the PgSqlError sent from the database.

[Visual Basic]
Public ReadOnly Property Error As PgSqlError
[C#]
public PgSqlError Error {get;}

Return Type

A PgSqlError object.

See Also

PgSqlErrorEventArgs Class | PgSqlErrorEventArgs Members


%%PageItemTitle%%

PgSqlException Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlException Class

Devart.Data.PostgreSql Namespace : PgSqlException Class

The exception that is generated when PostgreSQL returns a warning or error.

For a list of all members of this type, see PgSqlException members.

Inheritance Hierarchy

System.Object
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Data.Common.DbException
Devart.Data.PostgreSql.PgSqlException

Syntax

[Visual Basic]
Public Class PgSqlException
   Inherits DbException
   Implements _Exception, ISerializable
[C#]
public class PgSqlException : DbException, _Exception, ISerializable

Remarks

This class is created whenever dotConnect for PostgreSQL encounters an error generated by the server.

If the severity of the error is too great, the server may close the PgSqlConnection. However, the user can reopen the connection and continue.

Example

The following example generates a PgSqlException due to a missing database, and then displays the exception.

[C#]

public void ThrowPgSqlException()
{
  string mySelectQuery = "SELECT * FROM Test.Dept";
  PgSqlConnection myConnection =
    new PgSqlConnection("host=server;database=test;user id=postgres");
  PgSqlCommand myCommand = new PgSqlCommand(mySelectQuery,myConnection);
  try
  {
    myCommand.Connection.Open();
  }
  catch (PgSqlException myException)
  {
    MessageBox.Show("Message: " + myException.Message + "\n");
  }
}

[Visual Basic]

Public Sub ThrowPgSqlException()
  Dim mySelectQuery As String = "SELECT * FROM Test.Dept"
  Dim myConnection As New PgSqlConnection _
    ("host=server;database=test;user id=postgres")
  Dim myCommand As New PgSqlCommand(mySelectQuery, myConnection)
  Try
    myCommand.Connection.Open()
  Catch myException As PgSqlException
    MessageBox.Show("Message: " + myException.Message + ControlChars.Cr)
  End Try
End Sub

See Also

PgSqlException Members | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlException Class Members

Devart.Data.PostgreSql Namespace : PgSqlException Class

PgSqlException overview

Public Properties

Public Property CallStack | Gets an indication of the context in which the error occurred.
Public Property ColumnName | Gets the name of the column, the error is associated with.
Public Property ConstraintName | Gets the name of the constraint, the error is associated with.
Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property DataTypeName | Gets the name of the data type, the error is associated with.
Public Property DetailMessage | Gets a secondary error message.
Public Property Error | Gets the PgSqlError that caused the exception.
Public Property ErrorCode | Gets the SQLSTATE code for the error.
Public Property ErrorSql | Gets the query that caused the error.
Public Property FileName | Gets the file name of the source-code location where the error occurred.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property Hint | Gets an optional suggestion what to do about the problem.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property InternalPosition | Gets the error cursor position as 1-based index in the InternalQuery string.
Public Property InternalQuery | Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.
Public Property LineNumber | Gets the line number of the source-code location where the error occurred.
Public Property Message | Overridden. Returns a string representation of the error message information.
Public Property Position | Gets an error cursor position as index into the original query string.
Public Property ProcedureName | Gets the name of the source-code routine reporting the error.
Public Property SchemaName | Gets the name of the schema containing the object, the error is associated with.
Public Property Severity | Gets a value indicating a severity of the error.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TableName | Gets the name of the table, the error is associated with.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData | Overridden. Populates a SerializationInfo with the data needed to serialize the target object.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Properties$$

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlException Class Properties

Devart.Data.PostgreSql Namespace : PgSqlException Class

For a list of all members of this type, see PgSqlException members.

Public Properties

Public Property CallStack | Gets an indication of the context in which the error occurred.
Public Property ColumnName | Gets the name of the column, the error is associated with.
Public Property ConstraintName | Gets the name of the constraint, the error is associated with.
Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property DataTypeName | Gets the name of the data type, the error is associated with.
Public Property DetailMessage | Gets a secondary error message.
Public Property Error | Gets the PgSqlError that caused the exception.
Public Property ErrorCode | Gets the SQLSTATE code for the error.
Public Property ErrorSql | Gets the query that caused the error.
Public Property FileName | Gets the file name of the source-code location where the error occurred.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property Hint | Gets an optional suggestion what to do about the problem.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property InternalPosition | Gets the error cursor position as 1-based index in the InternalQuery string.
Public Property InternalQuery | Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.
Public Property LineNumber | Gets the line number of the source-code location where the error occurred.
Public Property Message | Overridden. Returns a string representation of the error message information.
Public Property Position | Gets an error cursor position as index into the original query string.
Public Property ProcedureName | Gets the name of the source-code routine reporting the error.
Public Property SchemaName | Gets the name of the schema containing the object, the error is associated with.
Public Property Severity | Gets a value indicating a severity of the error.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TableName | Gets the name of the table, the error is associated with.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

See Also

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CallStack Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : CallStack Property (PgSqlException)

Gets an indication of the context in which the error occurred.

[Visual Basic]
Public ReadOnly Property CallStack As String
[C#]
public string CallStack {get;}

Return Type

String indicating where error occurred.

Remarks

This property includes a call stack traceback of active PL functions.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ColumnName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : ColumnName Property (PgSqlException)

Gets the name of the column, the error is associated with.

[Visual Basic]
Public ReadOnly Property ColumnName As String
[C#]
public string ColumnName {get;}

Return Type

The name of the column, the error is associated with, if the error is associated with a specific column; otherwise, an empty string.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ConstraintName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : ConstraintName Property (PgSqlException)

Gets the name of the constraint, the error is associated with.

[Visual Basic]
Public ReadOnly Property ConstraintName As String
[C#]
public string ConstraintName {get;}

Return Type

The name of the constraint, the error is associated with, if the error is associated with a specific constraint; otherwise, an empty string.

Remarks

Indexes are treated as constraints in this case.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataTypeName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : DataTypeName Property (PgSqlException)

Gets the name of the data type, the error is associated with.

[Visual Basic]
Public ReadOnly Property DataTypeName As String
[C#]
public string DataTypeName {get;}

Return Type

The name of the data type, the error is associated with, if the error is associated with a specific data type; otherwise, an empty string.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DetailMessage Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : DetailMessage Property (PgSqlException)

Gets a secondary error message.

[Visual Basic]
Public ReadOnly Property DetailMessage As String
[C#]
public string DetailMessage {get;}

Return Type

A secondary error message.

Remarks

Use this property to get an optional secondary error message carrying more details about the problem.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Error Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : Error Property (PgSqlException)

Gets the PgSqlError that caused the exception.

[Visual Basic]
Public ReadOnly Property Error As PgSqlError
[C#]
public PgSqlError Error {get;}

Return Type

The PgSqlError that caused the exception.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ErrorCode Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : ErrorCode Property (PgSqlException)

Gets the SQLSTATE code for the error.

[Visual Basic]
Public ReadOnly Property ErrorCode As String
[C#]
public string ErrorCode {get;}

Return Type

The SQLSTATE code of the error.

Remarks

All messages emitted by the PostgreSQL server are assigned five-character error codes that follow the SQL standard conventions for "SQLSTATE" codes. The first two characters of an error code denote a class of errors, while the last three characters indicate a specific condition within that class.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ErrorSql Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : ErrorSql Property (PgSqlException)

Gets the query that caused the error.

[Visual Basic]
Public ReadOnly Property ErrorSql As String
[C#]
public string ErrorSql {get;}

Return Type

The query that caused the error.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

FileName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : FileName Property (PgSqlException)

Gets the file name of the source-code location where the error occurred.

[Visual Basic]
Public ReadOnly Property FileName As String
[C#]
public string FileName {get;}

Return Type

The name of the file where the error was reported.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Hint Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : Hint Property (PgSqlException)

Gets an optional suggestion what to do about the problem.

[Visual Basic]
Public ReadOnly Property Hint As String
[C#]
public string Hint {get;}

Return Type

An optional suggestion what to do.

Remarks

This property differs from DetailMessage as it offers advice (potentially inappropriate) rather than hard facts.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InternalPosition Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : InternalPosition Property (PgSqlException)

Gets the error cursor position as 1-based index in the InternalQuery string.

[Visual Basic]
Public ReadOnly Property InternalPosition As String
[C#]
public string InternalPosition {get;}

Return Type

The error cursor position in InternalQuery.

Remarks

The position is measured in characters, not bytes.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

InternalQuery Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : InternalQuery Property (PgSqlException)

Gets the text of an internally-generated command that caused the error, for example, a SQL query performed by a PL/pgSQL function.

[Visual Basic]
Public ReadOnly Property InternalQuery As String
[C#]
public string InternalQuery {get;}

Return Type

The text of an internally-generated command that caused the error.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LineNumber Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : LineNumber Property (PgSqlException)

Gets the line number of the source-code location where the error occurred.

[Visual Basic]
Public ReadOnly Property LineNumber As Integer
[C#]
public int LineNumber {get;}

Return Type

The number of the line where the error was reported.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Message Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : Message Property (PgSqlException)

Returns a string representation of the error message information.

[Visual Basic]
Overrides Public ReadOnly Property Message As String
[C#]
public override string Message {get;}

Return Type

A string representation of the error.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Position Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : Position Property (PgSqlException)

Gets an error cursor position as index into the original query string.

[Visual Basic]
Public ReadOnly Property Position As Integer
[C#]
public int Position {get;}

Return Type

An error cursor position in the query string.

Remarks

This property indicates an error cursor position as index into the original query string. The first character has index 1, and positions are measured in characters not bytes.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProcedureName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : ProcedureName Property (PgSqlException)

Gets the name of the source-code routine reporting the error.

[Visual Basic]
Public ReadOnly Property ProcedureName As String
[C#]
public string ProcedureName {get;}

Return Type

The name of the source-code routine where the error occurred.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SchemaName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : SchemaName Property (PgSqlException)

Gets the name of the schema containing the object, the error is associated with.

[Visual Basic]
Public ReadOnly Property SchemaName As String
[C#]
public string SchemaName {get;}

Return Type

The name of the schema containing the object, the error is associated with, if the error is associated with a specific database object; otherwise, an empty string.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Severity Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : Severity Property (PgSqlException)

Gets a value indicating a severity of the error.

[Visual Basic]
Public ReadOnly Property Severity As Severity
[C#]
public Severity Severity {get;}

Return Type

One of the Severity value.

Remarks

This property contents are Error, Fatal, or Panic (in an error message), or Warning, Notice, Debug, Info, or Log (in a notice message), or a localized translation of one of these.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableName Property

Devart.Data.PostgreSql Namespace > PgSqlException Class : TableName Property (PgSqlException)

Gets the name of the table, the error is associated with.

[Visual Basic]
Public ReadOnly Property TableName As String
[C#]
public string TableName {get;}

Return Type

The name of the table, the error is associated with, if the error is associated with a specific table; otherwise, an empty string.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%% $$Methods$$

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlException Class Methods

Devart.Data.PostgreSql Namespace : PgSqlException Class

For a list of all members of this type, see PgSqlException members.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData | Overridden. Populates a SerializationInfo with the data needed to serialize the target object.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

PgSqlException Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlException Class | PgSqlException Members

Language

Visual Basic

C#

Show All

info
A SerializationInfo object to populate.
context
The StreamingContext that contains contextual information about the source or destination.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetObjectData Method

Devart.Data.PostgreSql Namespace > PgSqlException Class : GetObjectData Method (PgSqlException)

Populates a SerializationInfo with the data needed to serialize the target object.

[Visual Basic]
Overrides Public Sub GetObjectData( _
   ByVal info As SerializationInfo, _
   ByVal context As StreamingContext _
)
[C#]
public override void GetObjectData(
   SerializationInfo info,
   StreamingContext context
);

Parameters

info
A SerializationInfo object to populate.
context
The StreamingContext that contains contextual information about the source or destination.

See Also

PgSqlException Class | PgSqlException Members


%%PageItemTitle%%

PgSqlInfoMessageEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInfoMessageEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlInfoMessageEventArgs Class

Provides data for the PgSqlConnection.InfoMessage event.

For a list of all members of this type, see PgSqlInfoMessageEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlInfoMessageEventArgs

Syntax

[Visual Basic]
Public Class PgSqlInfoMessageEventArgs
   Inherits EventArgs
[C#]
public class PgSqlInfoMessageEventArgs : EventArgs

Remarks

The PgSqlConnection.InfoMessage event is fired when a warning is sent from PostgreSQL.

See Also

PgSqlInfoMessageEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlInfoMessageEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInfoMessageEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlInfoMessageEventArgs Class

PgSqlInfoMessageEventArgs overview

Public Properties

Public Property Errors | Gets the collection of messages sent from server.
Public Property Message | Gets the text describing the message.

See Also

PgSqlInfoMessageEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlInfoMessageEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInfoMessageEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlInfoMessageEventArgs Class

For a list of all members of this type, see PgSqlInfoMessageEventArgs members.

Public Properties

Public Property Errors | Gets the collection of messages sent from server.
Public Property Message | Gets the text describing the message.

See Also

PgSqlInfoMessageEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInfoMessageEventArgs Class | PgSqlInfoMessageEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Errors Property

Devart.Data.PostgreSql Namespace > PgSqlInfoMessageEventArgs Class : Errors Property

Gets the collection of messages sent from server.

[Visual Basic]
Public ReadOnly Property Errors As PgSqlErrorCollection
[C#]
public PgSqlErrorCollection Errors {get;}

Return Type

A PgSqlErrorCollection object.

See Also

PgSqlInfoMessageEventArgs Class | PgSqlInfoMessageEventArgs Members


%%PageItemTitle%%

PgSqlInfoMessageEventArgs Class | PgSqlInfoMessageEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Message Property

Devart.Data.PostgreSql Namespace > PgSqlInfoMessageEventArgs Class : Message Property (PgSqlInfoMessageEventArgs)

Gets the text describing the message.

[Visual Basic]
Public ReadOnly Property Message As String
[C#]
public string Message {get;}

Remarks

This property is deprecated. Use Errors instead.

See Also

PgSqlInfoMessageEventArgs Class | PgSqlInfoMessageEventArgs Members


%%PageItemTitle%%

PgSqlIntRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Class

Devart.Data.PostgreSql Namespace : PgSqlIntRange Class

Represents the PostgreSQL int4range type. Each object of the PgSqlIntRange class stores a range of integer values.

For a list of all members of this type, see PgSqlIntRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<Int32>
Devart.Data.PostgreSql.PgSqlIntRange

Syntax

[Visual Basic]
Public Class PgSqlIntRange
   Inherits PgSqlRangeType(Of Integer)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlIntRange : PgSqlRangeType<int>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlIntRange object call the PgSqlDataReader.GetPgSqlIntRange method of the PgSqlDataReader class.

See Also

PgSqlIntRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlIntRange Class

PgSqlIntRange overview

Public Constructors

Public Constructor PgSqlIntRange Constructor Overloaded. Initializes a new instance of the PgSqlIntRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlIntRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlIntRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class : PgSqlIntRange Constructor (PgSqlIntRange)

Initializes a new instance of the PgSqlIntRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlIntRange structure with the specified range bounds. The left bound is considered inclusive, the right one is considered exclusive.

[Visual Basic] Public Sub New(Integer,Integer)

[C#] public PgSqlIntRange(int,int);

Initializes a new instance of the PgSqlIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(Integer,Boolean,Integer,Boolean)

[C#] public PgSqlIntRange(int,bool,int,bool);

See Also

PgSqlIntRange Class | PgSqlIntRange Members


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members | Overload List | PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class > PgSqlIntRange Constructor : PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)

Initializes a new instance of the PgSqlIntRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Integer, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As Integer, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlIntRange(
   int lowerBound,
   bool isLowerBoundInclusive,
   int upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlIntRange Class | PgSqlIntRange Members | Overload List | PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members | Overload List | PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Constructor(Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class > PgSqlIntRange Constructor : PgSqlIntRange Constructor(Int32,Int32)

Initializes a new instance of the PgSqlIntRange structure with the specified range bounds. The left bound is considered inclusive, the right one is considered exclusive.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Integer, _
   ByVal upperBound As Integer _
)
[C#]
public PgSqlIntRange(
   int lowerBound,
   int upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlIntRange Class | PgSqlIntRange Members | Overload List | PgSqlIntRange Constructor(Int32,Boolean,Int32,Boolean)


%%PageItemTitle%% $$Fields$$

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlIntRange Class

For a list of all members of this type, see PgSqlIntRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlIntRange object.

See Also

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class : Empty Field (PgSqlIntRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlIntRange
[C#]
public static readonly PgSqlIntRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlIntRange Class | PgSqlIntRange Members


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class : Null Field (PgSqlIntRange)

Represents a null PgSqlIntRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlIntRange
[C#]
public static readonly PgSqlIntRange Null

Return Type

An object that represents a null PgSqlIntRange value.

See Also

PgSqlIntRange Class | PgSqlIntRange Members


%%PageItemTitle%% $$Methods$$

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlIntRange Class

For a list of all members of this type, see PgSqlIntRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlIntRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class : ContainsElement Method (PgSqlIntRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As Integer _
) As Boolean
[C#]
public override bool ContainsElement(
   int element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlIntRange Class | PgSqlIntRange Members


%%PageItemTitle%%

PgSqlIntRange Class | PgSqlIntRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlIntRange Class : Parse Method (PgSqlIntRange)

Converts the specified String representation of a date to its PgSqlIntRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlIntRange
[C#]
public static PgSqlIntRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlIntRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlIntRange Class | PgSqlIntRange Members


%%PageItemTitle%%

PgSqlLargeObject Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Class

Devart.Data.PostgreSql Namespace : PgSqlLargeObject Class

Represents a PostgreSQL large object.

For a list of all members of this type, see PgSqlLargeObject members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Devart.Data.PostgreSql.PgSqlLargeObject

Syntax

[Visual Basic]
Public Class PgSqlLargeObject
   Inherits Stream
   Implements INullable, IDisposable
[C#]
public class PgSqlLargeObject : Stream, INullable, IDisposable

Remarks

The PgSqlLargeObject class is used to work with PostgreSQL large objects. An instance of PgSqlLargeObject holds an OID of large object and can be used for operations with this large object.

Note: all operations with large objects require an active transaction.

Example

The following example shows how to create and manage large objects with PgSqlLargeObject.

[C#]

public static void Main(string[] args) {

    PgSqlConnection connection = new PgSqlConnection("user id=postgres;password=postgres;port=5432;host=localhost;");
    connection.Open();

    int oid = CreateLargeObject(connection);
    WriteToLargeObject(connection, oid);
    ReadFromLargeObject(connection, oid);

    Console.ReadLine();
}

public static int CreateLargeObject(PgSqlConnection connection) {

    PgSqlLargeObject lo = new PgSqlLargeObject(connection);
    // Create a new large object in the database.
    lo.Create();
    Console.WriteLine("Created new large object with OID = {0}", lo.Oid);

    return lo.Oid;
}

public static void WriteToLargeObject(PgSqlConnection connection, int oid) {
    // All operations with large objects require an active transaction.
    connection.BeginTransaction();
    string str = "Hello, world!";
    PgSqlLargeObject lo = new PgSqlLargeObject(connection, oid);
    lo.Open();

    if (lo.CanWrite) {
        byte[] buffer = Encoding.UTF8.GetBytes(str);
        lo.Write(buffer, 0, buffer.Length);
    }
    lo.Close();

    Console.WriteLine("Written to the large object : {0}", str);
    connection.Commit();
}

public static void ReadFromLargeObject(PgSqlConnection connection, int oid) {
    // All operations with large objects require an active transaction.
    connection.BeginTransaction();
    string str = string.Empty;
    PgSqlLargeObject lo = new PgSqlLargeObject(connection, oid);
    lo.Open();

    if (lo.CanWrite) {
        byte[] buffer = new byte[lo.Length];
        lo.Read(buffer, 0, buffer.Length);
        str = Encoding.UTF8.GetString(buffer);
    }
    lo.Close();

    Console.WriteLine("Read from the large object : {0}", str);
    connection.Commit();
}

[Visual Basic]

Public Sub Main()
    Dim connection As New PgSqlConnection("user id=postgres;password=postgres;port=5432;host=localhost;")
    connection.Open()

    Dim oid As Integer = CreateLargeObject(connection)
    WriteToLargeObject(connection, oid)
    ReadFromLargeObject(connection, oid)
    Console.ReadLine()
End Sub

Public Function CreateLargeObject(ByVal connection As PgSqlConnection) As Integer
    Dim lo As New PgSqlLargeObject(connection)
    ' Create a new large object in the database.
    lo.Create()
    Console.WriteLine("Created new large object with OID = {0}", lo.Oid)
    Return lo.Oid
End Function

Public Sub WriteToLargeObject(ByVal connection As PgSqlConnection, ByVal oid As Integer)
    ' All operations with large objects require an active transaction.
    connection.BeginTransaction()
    Dim str As String = "Hello, world!"
    Dim lo As New PgSqlLargeObject(connection, oid)
    lo.Open()
    If lo.CanWrite Then
        Dim buffer As Byte() = Encoding.UTF8.GetBytes(str)
        lo.Write(buffer, 0, buffer.Length)
    End If
    lo.Close()
    Console.WriteLine("Written to the large object : {0}", str)
    connection.Commit()
End Sub

Public Sub ReadFromLargeObject(ByVal connection As PgSqlConnection, ByVal oid As Integer)
    ' All operations with large objects require an active transaction.
    connection.BeginTransaction()
    Dim str As String = String.Empty
    Dim lo As New PgSqlLargeObject(connection, oid)
    lo.Open()
    If lo.CanWrite Then
        Dim buffer As Byte() = New Byte(lo.Length - 1) {}
        lo.Read(buffer, 0, buffer.Length)
        str = Encoding.UTF8.GetString(buffer)
    End If
    lo.Close()
    Console.WriteLine("Read from the large object : {0}", str)
    connection.Commit()
End Sub

See Also

PgSqlLargeObject Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Class Members

Devart.Data.PostgreSql Namespace : PgSqlLargeObject Class

PgSqlLargeObject overview

Public Constructors

Public Constructor PgSqlLargeObject Constructor Overloaded. Initializes a new instance of the PgSqlLargeObject class.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlLargeObject object.

Public Properties

Public Property Cached | Gets a value indicating whether the PgSqlLargeObject is cached on the client.
Public Property CanRead | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports reading.
Public Property CanSeek | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports seeking.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports writing.
Public Property IsEmpty | Gets a value indicating whether the PgSqlLargeObject has any data.
Public Property IsNull | Gets a value indicating whether the PgSqlLargeObject is a Null.
Public Property Length | Overridden. Gets the length of the PgSqlLargeObject in bytes.
Public Property Oid | Gets the OID of the PgSqlLargeObject.
Public Property Position | Overridden. Gets the current position of the PgSqlLargeObject.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Close | Overridden. Closes the large object specified by the Oid property.
Public Method Create | Creates a new large object in the database.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.IO.Stream) | Releases all resources used by the Stream.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Flush | Overridden. Writes all changes cached on the client to the database.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overloaded. Opens the large object specified by the Oid property.
Public Method Read | Overridden. Reads a sequence of bytes from the large object.
Public Method ReadByte | Overridden. Reads a byte from the PgSqlLargeObject and advances the position by one byte.
Public Method Remove | Deletes the large object specified by the Oid property from the database.
Public Method Seek | Overridden. Changes the current read or write location associated with the large object.
Public Method SetLength | Overridden. Sets the length of the large object.
Public Method Write | Overridden. Writes an array of bytes to PgSqlLargeObject.
Public Method WriteByte | Overridden. Writes a byte to the current position in the PgSqlLargeObject and advances the position by one byte.

See Also

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : PgSqlLargeObject Constructor (PgSqlLargeObject)

Initializes a new instance of the PgSqlLargeObject class.

Overload List

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic] Public Sub New(PgSqlConnection)

[C#] public PgSqlLargeObject(PgSqlConnection);

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic] Public Sub New(PgSqlConnection,Integer)

[C#] public PgSqlLargeObject(PgSqlConnection,int);

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic] Public Sub New(PgSqlConnection,Integer,Boolean)

[C#] public PgSqlLargeObject(PgSqlConnection,int,bool);

[Visual Basic] Public Sub New(PgSqlConnection,Long)

[C#] public PgSqlLargeObject(PgSqlConnection,long);

[Visual Basic] Public Sub New(PgSqlConnection,Long,Boolean)

[C#] public PgSqlLargeObject(PgSqlConnection,long,bool);

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List

Language

Visual Basic

C#

Show All

connection
A PgSqlConnection to be used by PgSqlLargeObject.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor(PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > PgSqlLargeObject Constructor : PgSqlLargeObject Constructor(PgSqlConnection)

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlLargeObject(
   PgSqlConnection connection
);

Parameters

connection
A PgSqlConnection to be used by PgSqlLargeObject.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List

Language

Visual Basic

C#

Show All

connection
A PgSqlConnection to be used by PgSqlLargeObject.
oid
The OID of an existing large object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor(PgSqlConnection,Int32)

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > PgSqlLargeObject Constructor : PgSqlLargeObject Constructor(PgSqlConnection,Int32)

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal oid As Integer _
)
[C#]
public PgSqlLargeObject(
   PgSqlConnection connection,
   int oid
);

Parameters

connection
A PgSqlConnection to be used by PgSqlLargeObject.
oid
The OID of an existing large object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List

Language

Visual Basic

C#

Show All

connection
A PgSqlConnection to be used by PgSqlLargeObject.
oid
The OID of an existing large object.
cached
If true, the contents of the large object is cached on the client. If false, the value is stored on server only.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor(PgSqlConnection,Int32,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > PgSqlLargeObject Constructor : PgSqlLargeObject Constructor(PgSqlConnection,Int32,Boolean)

Initializes a new instance of the PgSqlLargeObject class with the specified PgSqlConnection.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal oid As Integer, _
   ByVal cached As Boolean _
)
[C#]
public PgSqlLargeObject(
   PgSqlConnection connection,
   int oid,
   bool cached
);

Parameters

connection
A PgSqlConnection to be used by PgSqlLargeObject.
oid
The OID of an existing large object.
cached
If true, the contents of the large object is cached on the client. If false, the value is stored on server only.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List

Language

Visual Basic

C#

Show All

connection
oid
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor(PgSqlConnection,Int64)

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > PgSqlLargeObject Constructor : PgSqlLargeObject Constructor(PgSqlConnection,Int64)
[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal oid As Long _
)
[C#]
public PgSqlLargeObject(
   PgSqlConnection connection,
   long oid
);

Parameters

connection
oid

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List

Language

Visual Basic

C#

Show All

connection
oid
cached
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Constructor(PgSqlConnection,Int64,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > PgSqlLargeObject Constructor : PgSqlLargeObject Constructor(PgSqlConnection,Int64,Boolean)
[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal oid As Long, _
   ByVal cached As Boolean _
)
[C#]
public PgSqlLargeObject(
   PgSqlConnection connection,
   long oid,
   bool cached
);

Parameters

connection
oid
cached

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Class Fields

Devart.Data.PostgreSql Namespace : PgSqlLargeObject Class

For a list of all members of this type, see PgSqlLargeObject members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlLargeObject object.

See Also

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Null Field (PgSqlLargeObject)

Represents a null PgSqlLargeObject object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlLargeObject
[C#]
public static readonly PgSqlLargeObject Null

Return Type

An object that represents a null PgSqlLargeObject value.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | IsNull Property


%%PageItemTitle%% $$Properties$$

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLargeObject Class

For a list of all members of this type, see PgSqlLargeObject members.

Public Properties

Public Property Cached | Gets a value indicating whether the PgSqlLargeObject is cached on the client.
Public Property CanRead | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports reading.
Public Property CanSeek | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports seeking.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite | Overridden. Gets a value indicating whether the PgSqlLargeObject is opened and supports writing.
Public Property IsEmpty | Gets a value indicating whether the PgSqlLargeObject has any data.
Public Property IsNull | Gets a value indicating whether the PgSqlLargeObject is a Null.
Public Property Length | Overridden. Gets the length of the PgSqlLargeObject in bytes.
Public Property Oid | Gets the OID of the PgSqlLargeObject.
Public Property Position | Overridden. Gets the current position of the PgSqlLargeObject.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

See Also

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Flush Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Cached Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Cached Property

Gets a value indicating whether the PgSqlLargeObject is cached on the client.

[Visual Basic]
Public ReadOnly Property Cached As Boolean
[C#]
public bool Cached {get;}

Return Type

true if the object's contents is cached; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Flush Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | CanWrite Property | CanSeek Property | Read Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanRead Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : CanRead Property (PgSqlLargeObject)

Gets a value indicating whether the PgSqlLargeObject is opened and supports reading.

[Visual Basic]
Overrides Public ReadOnly Property CanRead As Boolean
[C#]
public override bool CanRead {get;}

Return Type

true if the PgSqlLargeObject can be read from; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | CanWrite Property | CanSeek Property | Read Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | CanRead Property | CanWrite Property | Seek Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanSeek Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : CanSeek Property (PgSqlLargeObject)

Gets a value indicating whether the PgSqlLargeObject is opened and supports seeking.

[Visual Basic]
Overrides Public ReadOnly Property CanSeek As Boolean
[C#]
public override bool CanSeek {get;}

Return Type

true if the PgSqlLargeObject can be sought; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | CanRead Property | CanWrite Property | Seek Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | CanRead Property | CanSeek Property | Write Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanWrite Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : CanWrite Property (PgSqlLargeObject)

Gets a value indicating whether the PgSqlLargeObject is opened and supports writing.

[Visual Basic]
Overrides Public ReadOnly Property CanWrite As Boolean
[C#]
public override bool CanWrite {get;}

Return Type

true if the PgSqlLargeObject can be written to; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | CanRead Property | CanSeek Property | Write Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsEmpty Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : IsEmpty Property (PgSqlLargeObject)

Gets a value indicating whether the PgSqlLargeObject has any data.

[Visual Basic]
Public ReadOnly Property IsEmpty As Boolean
[C#]
public bool IsEmpty {get;}

Return Type

true if the PgSqlLargeObject is empty, and its length is 0; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | IsNull Property


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | IsEmpty Property | Null Field

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : IsNull Property (PgSqlLargeObject)

Gets a value indicating whether the PgSqlLargeObject is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlLargeObject is a Null; otherwise, false.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | IsEmpty Property | Null Field


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Position Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Length Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Length Property (PgSqlLargeObject)

Gets the length of the PgSqlLargeObject in bytes.

[Visual Basic]
Overrides Public ReadOnly Property Length As Long
[C#]
public override long Length {get;}

Return Type

The length of the object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Position Property


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Oid Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Oid Property

Gets the OID of the PgSqlLargeObject.

[Visual Basic]
Public ReadOnly Property Oid As Integer
[C#]
public int Oid {get;}

Return Type

The OID of the large object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Length Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Position Property

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Position Property (PgSqlLargeObject)

Gets the current position of the PgSqlLargeObject.

[Visual Basic]
Overrides Public Property Position As Long
[C#]
public override long Position {get; set;}

Return Type

The current position of the large object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Length Property


%%PageItemTitle%% $$Methods$$

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObject Class Methods

Devart.Data.PostgreSql Namespace : PgSqlLargeObject Class

For a list of all members of this type, see PgSqlLargeObject members.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Close | Overridden. Closes the large object specified by the Oid property.
Public Method Create | Creates a new large object in the database.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.IO.Stream) | Releases all resources used by the Stream.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Flush | Overridden. Writes all changes cached on the client to the database.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open | Overloaded. Opens the large object specified by the Oid property.
Public Method Read | Overridden. Reads a sequence of bytes from the large object.
Public Method ReadByte | Overridden. Reads a byte from the PgSqlLargeObject and advances the position by one byte.
Public Method Remove | Deletes the large object specified by the Oid property from the database.
Public Method Seek | Overridden. Changes the current read or write location associated with the large object.
Public Method SetLength | Overridden. Sets the length of the large object.
Public Method Write | Overridden. Writes an array of bytes to PgSqlLargeObject.
Public Method WriteByte | Overridden. Writes a byte to the current position in the PgSqlLargeObject and advances the position by one byte.

See Also

PgSqlLargeObject Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Open() Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Close Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Close Method (PgSqlLargeObject)

Closes the large object specified by the Oid property.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Open() Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Remove Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Create Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Create Method

Creates a new large object in the database.

[Visual Basic]
Public Function Create() As Integer
[C#]
public int Create();

Return Type

The OID that was assigned to the new large object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Remove Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Cached Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Flush Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Flush Method (PgSqlLargeObject)

Writes all changes cached on the client to the database.

[Visual Basic]
Overrides Public Sub Flush()
[C#]
public override void Flush();

Remarks

This method can be used when the Cached property is true.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Cached Property


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Open Method (PgSqlLargeObject)

Opens the large object specified by the Oid property.

Overload List

Opens the large object specified by the Oid property.

[Visual Basic] Overloads Public Sub Open()

[C#] public void Open();

Opens the large object specified by the Oid property with the specified mode - for reading or writing.

[Visual Basic] Overloads Public Sub Open(PgSqlLargeObjectOpenMode)

[C#] public void Open(PgSqlLargeObjectOpenMode);

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List | Close Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open() Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > Open Method : Open() Method

Opens the large object specified by the Oid property.

[Visual Basic]
Overloads Public Sub Open()
[C#]
public void Open();

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List | Close Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List | Close Method

Language

Visual Basic

C#

Show All

mode
One of the PgSqlLargeObjectOpenMode values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open(PgSqlLargeObjectOpenMode) Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class > Open Method : Open(PgSqlLargeObjectOpenMode) Method

Opens the large object specified by the Oid property with the specified mode - for reading or writing.

[Visual Basic]
Overloads Public Sub Open( _
   ByVal mode As PgSqlLargeObjectOpenMode _
)
[C#]
public void Open(
   PgSqlLargeObjectOpenMode mode
);

Parameters

mode
One of the PgSqlLargeObjectOpenMode values.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Overload List | Close Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | ReadByte Method | Write Method | CanRead Property

Language

Visual Basic

C#

Show All

buffer
An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offset
The zero-based byte offset in buffer at which to begin storing the data read from the large object.
count
The maximum number of bytes to be read from the large object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Read Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Read Method (PgSqlLargeObject)

Reads a sequence of bytes from the large object.

[Visual Basic]
Overrides Public Function Read( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public override int Read(
   byte[] buffer,
   int offset,
   int count
);

Parameters

buffer
An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offset
The zero-based byte offset in buffer at which to begin storing the data read from the large object.
count
The maximum number of bytes to be read from the large object.

Return Type

The total number of bytes read into the buffer.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | ReadByte Method | Write Method | CanRead Property


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Read Method | WriteByte Method | CanRead Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ReadByte Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : ReadByte Method

Reads a byte from the PgSqlLargeObject and advances the position by one byte.

[Visual Basic]
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();

Return Type

The unsigned byte cast to an Int32, or -1 if at the end of the PgSqlLargeObject.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Read Method | WriteByte Method | CanRead Property


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | Create Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Remove Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Remove Method (PgSqlLargeObject)

Deletes the large object specified by the Oid property from the database.

[Visual Basic]
Public Sub Remove()
[C#]
public void Remove();

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | Create Method


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

offset
A byte offset relative to the origin parameter.
origin
A value of type SeekOrigin indicating the reference point used to obtain the new position.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Seek Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Seek Method (PgSqlLargeObject)

Changes the current read or write location associated with the large object.

[Visual Basic]
Overrides Public Function Seek( _
   ByVal offset As Long, _
   ByVal origin As SeekOrigin _
) As Long
[C#]
public override long Seek(
   long offset,
   SeekOrigin origin
);

Parameters

offset
A byte offset relative to the origin parameter.
origin
A value of type SeekOrigin indicating the reference point used to obtain the new position.

Return Type

The new location.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

value
The desired length of the current large object in bytes.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetLength Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : SetLength Method (PgSqlLargeObject)

Sets the length of the large object.

[Visual Basic]
Overrides Public Sub SetLength( _
   ByVal value As Long _
)
[C#]
public override void SetLength(
   long value
);

Parameters

value
The desired length of the current large object in bytes.

Remarks

If the new length is less than the current length, the PgSqlLargeObject is truncated.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members

Language

Visual Basic

C#

Show All

buffer
The array of bytes to copy data from.
offset
The zero-based byte offset in buffer at which to begin copying bytes to the large object.
count
The number of bytes to be written to the large object.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Write Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : Write Method (PgSqlLargeObject)

Writes an array of bytes to PgSqlLargeObject.

[Visual Basic]
Overrides Public Sub Write( _
   ByVal buffer() As Byte, _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public override void Write(
   byte[] buffer,
   int offset,
   int count
);

Parameters

buffer
The array of bytes to copy data from.
offset
The zero-based byte offset in buffer at which to begin copying bytes to the large object.
count
The number of bytes to be written to the large object.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members


%%PageItemTitle%%

PgSqlLargeObject Class | PgSqlLargeObject Members | ReadByte Method | Write Method | CanWrite Property

Language

Visual Basic

C#

Show All

value
The byte to write.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

WriteByte Method

Devart.Data.PostgreSql Namespace > PgSqlLargeObject Class : WriteByte Method

Writes a byte to the current position in the PgSqlLargeObject and advances the position by one byte.

[Visual Basic]
Overrides Public Sub WriteByte( _
   ByVal value As Byte _
)
[C#]
public override void WriteByte(
   byte value
);

Parameters

value
The byte to write.

See Also

PgSqlLargeObject Class | PgSqlLargeObject Members | ReadByte Method | Write Method | CanWrite Property


%%PageItemTitle%%

PgSqlLoader Members | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Class

Devart.Data.PostgreSql Namespace : PgSqlLoader Class

Serves to load external data into PostgreSQL.

For a list of all members of this type, see PgSqlLoader members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbLoader
Devart.Data.PostgreSql.PgSqlLoader

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlLoader
   Inherits DbLoader
   Implements IComponent, IDisposable
[C#]
public sealed class PgSqlLoader : DbLoader, IComponent, IDisposable

Remarks

PgSqlLoader uses special capabilities of PostgreSQL server (the COPY command) to speed up loading of many rows into a table.

To specify the name of loading table set TableName property. Use Columns property to access individual columns.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

Example

The following example creates an OracleLoader, then populates Columns collection from table description, loads data, flushes the buffer and disposes internal OracleLoader structures. The OracleLoader requires open connection.

The following table is used in this example:

CREATE TABLE load_table
(
 id integer NOT NULL,
 text_field text,
 date_field date,
 CONSTRAINT load_table_pkey PRIMARY KEY (id)
)

[C#]

public void LoadData(PgSqlConnection conn)
{
    // PgSqlLoader requires open connection
    if (conn.State == ConnectionState.Closed)
        conn.Open();
    PgSqlLoader loader = new PgSqlLoader();
    // Specify connection that PgSqlLoader will use for loading
    loader.Connection = conn;
    // Set table name that will be loaded into
    loader.TableName = "load_table";
    // Populate Columns collection from table description
    loader.CreateColumns();
    // Prepare PgSqlLoader for loading
    loader.Open();
    for (int i = 0; i < 10000; i++)
    {
        loader.SetValue("id", i);
        loader.SetValue("text_field", "test string");
        loader.SetValue("date_field", DateTime.Now);
        loader.NextRow();
    }
    // Flush buffer and dispose internal PgSqlLoader structures
    loader.Close();
}

[Visual Basic]

Public Sub LoadData(conn As PgSqlConnection)
    ' PgSqlLoader requires open connection
    If conn.State = ConnectionState.Closed Then
        conn.Open()
    End If
    Dim loader As PgSqlLoader
    loader = New PgSqlLoader
    ' Specify connection that PgSqlLoader will use for loading
    loader.Connection = conn
    ' Set table name that will be loaded into
    loader.TableName = "load_table"
    ' Populate Columns collection from table description
    loader.CreateColumns()
    ' Prepare PgSqlLoader for loading
    loader.Open()
    Dim i As Integer
    For i = 0 To 9999
        loader.SetValue("id", i)
        loader.SetValue("text_field", "test string")
        loader.SetValue("date_field", DateTime.Now)
        loader.NextRow()
    Next i
    ' Flush buffer and dispose internal PgSqlLoader structures
    loader.Close()
End Sub

See Also

PgSqlLoader Members | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%% $$Members$$

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Class Members

Devart.Data.PostgreSql Namespace : PgSqlLoader Class

PgSqlLoader overview

Public Constructors

Public Constructor PgSqlLoader Constructor Overloaded. Initializes a new instance of the PgSqlLoader class.

Public Properties

Public Property BufferSize (Inherited from Devart.Common.DbLoader) | Gets or sets a size of data packet loaded to the server.
Public Property Columns | Gets the PgSqlLoaderColumnCollection collection.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlLoader.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Freeze | Enables freezeing of the loaded rows. Rows will be frozen only if the table being loaded has been created or truncated in the current subtransaction, there are no cursors open and there are no older snapshots held by this transaction.
Public Property Item (Inherited from Devart.Common.DbLoader) | Overloaded. Sets the value of the column with the specified name for PgSqlLoaderColumnCollection.
Public Property Mode | Gets or sets the operating mode of the PgSqlLoader
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableName | Gets or sets table name that will be loaded.

Public Methods

Public Method Close | Overridden. Closes loading session and flushes remaining rows to the table.
Public Method CreateColumns | Overridden. Retrieves table columns information from the table specified in the TableName property and populates columns collection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method LoadTable (Inherited from Devart.Common.DbLoader) | Overloaded. Loads data into the table from the specified DataTable.
Public Method NextRow | Overridden. Advances PgSqlLoader to the next row.
Public Method Open | Overridden. Prepares PgSqlLoader for the loading.
Public Method SetNull (Inherited from Devart.Common.DbLoader) | Overloaded. Sets the value of the column with the specified name or ordinal to NULL.
Public Method SetValue | Overloaded. Overridden. Sets the value of the column at the specified ordinal and name.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | The event is raised when an error occurs during a load operation.

See Also

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Constructor

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : PgSqlLoader Constructor (PgSqlLoader)

Initializes a new instance of the PgSqlLoader class.

Overload List

Creates an PgSqlLoader object without Connection and with empty TableName.

[Visual Basic] Public Sub New()

[C#] public PgSqlLoader();

Initializes a new instance of the PgSqlLoader class with table name that will be loaded.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlLoader(string);

Initializes a new instance of the PgSqlLoader class with table name that will be loaded and a PgSqlConnection object.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlLoader(string,PgSqlConnection);

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Constructor()

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > PgSqlLoader Constructor : PgSqlLoader Constructor()

Creates an PgSqlLoader object without Connection and with empty TableName.

[Visual Basic]
Public Function New()
[C#]
public PgSqlLoader();

Remarks

To use an PgSqlLoader object created with this constructor you must set Connection and TableName properties.

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

Language

Visual Basic

C#

Show All

tableName
Name of the table that will be loaded.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > PgSqlLoader Constructor : PgSqlLoader Constructor(String)

Initializes a new instance of the PgSqlLoader class with table name that will be loaded.

[Visual Basic]
Public Function New( _
   ByVal tableName As String _
)
[C#]
public PgSqlLoader(
   string tableName
);

Parameters

tableName
Name of the table that will be loaded.

Remarks

The constructor initializes all fields to their default values and set TableName to tableName parameter.

Example

The following example creates a PgSqlLoader and sets some of its properties. Then prepares data and loads it into the table.

[C#]

public void CreateMyLoader()
{
  // Create and open connection
  PgSqlConnection conn = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  conn.Open();

  // Create loader instance
  PgSqlLoader loader = new PgSqlLoader("loader_test");
  // Set loader properties
  loader.Connection = conn;

  // Prepare for loading
  loader.Open();

  // Set row values
  for (int i = 0; i < 10000; i++) {
    loader.SetValue(0, i);
    loader.SetValue(1, "test string");
    loader.SetValue(2, DateTime.Now);
    // Load next table row
    loader.NextRow();
  }

  // Flush buffer and finish loading
  loader.Close();
}

[Visual Basic]

Public Sub CreateMyLoader()
  ' Create and open connection
  Dim conn As PgSqlConnection = new PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  conn.Open()

  ' Create loader instance
  Dim loader As PgSqlLoader = new PgSqlLoader("loader_test")
  ' Set loader properties
  loader.Connection = conn

  ' Prepare for loading
  loader.Open()

  ' Set row values
  Dim i As Integer
  For i = 0 To 10000
    loader.SetValue(0, i)
    loader.SetValue(1, "test string")
    loader.SetValue(2, DateTime.Now)
    ' Load next table row
    loader.NextRow()
  next

  ' Flush buffer and finish loading
  loader.Close()
End Sub

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

Language

Visual Basic

C#

Show All

tableName
Name of the table that will be loaded.
connection
A PgSqlConnection object that represents the connection to a data source.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > PgSqlLoader Constructor : PgSqlLoader Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlLoader class with table name that will be loaded and a PgSqlConnection object.

[Visual Basic]
Public Function New( _
   ByVal tableName As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlLoader(
   string tableName,
   PgSqlConnection connection
);

Parameters

tableName
Name of the table that will be loaded.
connection
A PgSqlConnection object that represents the connection to a data source.

Remarks

Use this constructor to set TableName and Connection properties at the time of initialization.

Example

The following example creates a PgSqlLoader and sets some of its properties. Then prepares data and loads it into the table.

[C#]

public void CreateMyLoader()
{
  // Create and open connection
  PgSqlConnection conn = new PgSqlConnection(
      "host=server;database=test;user id=postgres;");
  conn.Open();

  // Create loader instance
  PgSqlLoader loader = new PgSqlLoader("loader_test", conn);

  // Prepare for loading
  loader.Open();

  // Set row values
  for (int i = 0; i < 10000; i++) {
    loader.SetValue(0, i);
    loader.SetValue(1, "test string");
    loader.SetValue(2, DateTime.Now);
    // Load next table row
    loader.NextRow();
  }

  // Flush buffer and finish loading
  loader.Close();
}

[Visual Basic]

Public Sub CreateMyLoader()
  ' Create and open connection
  Dim conn As PgSqlConnection = new PgSqlConnection( _
      "host=server;database=test;user id=postgres;")
  conn.Open()

  ' Create loader instance
  Dim loader As PgSqlLoader = new PgSqlLoader("loader_test", conn)

  ' Prepare for loading
  loader.Open()

  ' Set row values
  Dim i As Integer
  For i = 0 To 10000
    loader.SetValue(0, i)
    loader.SetValue(1, "test string")
    loader.SetValue(2, DateTime.Now)
    ' Load next table row
    loader.NextRow()
  next

  ' Flush buffer and finish loading
  loader.Close()
End Sub

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%% $$Properties$$

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLoader Class

For a list of all members of this type, see PgSqlLoader members.

Public Properties

Public Property BufferSize (Inherited from Devart.Common.DbLoader) | Gets or sets a size of data packet loaded to the server.
Public Property Columns | Gets the PgSqlLoaderColumnCollection collection.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlLoader.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Freeze | Enables freezeing of the loaded rows. Rows will be frozen only if the table being loaded has been created or truncated in the current subtransaction, there are no cursors open and there are no older snapshots held by this transaction.
Public Property Item (Inherited from Devart.Common.DbLoader) | Overloaded. Sets the value of the column with the specified name for PgSqlLoaderColumnCollection.
Public Property Mode | Gets or sets the operating mode of the PgSqlLoader
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableName | Gets or sets table name that will be loaded.

See Also

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Columns Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Columns Property (PgSqlLoader)

Gets the PgSqlLoaderColumnCollection collection.

[Visual Basic]
Public ReadOnly Property Columns As PgSqlLoaderColumnCollection
[C#]
public PgSqlLoaderColumnCollection Columns {get;}

Return Type

Columns which loaded table consist of.

Remarks

You may manually add columns to the PgSqlLoaderColumnCollection or call CreateColumns method to populate columns collection from the table description.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Connection Property (PgSqlLoader)

Gets or sets the PgSqlConnection used by this instance of the PgSqlLoader.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

Remarks

PgSqlLoader instance uses PgSqlConnection during loading and for populating columns collection when CreateColumns method is called. For these operations PgSqlLoader requires open connection.

This property supports the InterForm technology.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Freeze Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Freeze Property

Enables freezeing of the loaded rows. Rows will be frozen only if the table being loaded has been created or truncated in the current subtransaction, there are no cursors open and there are no older snapshots held by this transaction.

[Visual Basic]
Public Property Freeze As Boolean
[C#]
public bool Freeze {get; set;}

Return Type

true, if the loaded rows should be frozen; otherwise false. Default valuse if false.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Mode Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Mode Property (PgSqlLoader)

Gets or sets the operating mode of the PgSqlLoader

[Visual Basic]
Public Property Mode As PgSqlLoaderMode
[C#]
public PgSqlLoaderMode Mode {get; set;}

Return Type

One of the PgSqlLoaderMode values.

Remarks

This property is ignored for protocol 2.0 connections, as this protocol supports text operating mode only.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | SetValue Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableName Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : TableName Property (PgSqlLoader)

Gets or sets table name that will be loaded.

[Visual Basic]
Public Property TableName As String
[C#]
public string TableName {get; set;}

Return Type

Name of the table that will be loaded.

Remarks

TableName property must be specified before beginning of loading data.

See Also

PgSqlLoader Class | PgSqlLoader Members | SetValue Method


%%PageItemTitle%% $$Methods$$

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Class Methods

Devart.Data.PostgreSql Namespace : PgSqlLoader Class

For a list of all members of this type, see PgSqlLoader members.

Public Methods

Public Method Close | Overridden. Closes loading session and flushes remaining rows to the table.
Public Method CreateColumns | Overridden. Retrieves table columns information from the table specified in the TableName property and populates columns collection.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method LoadTable (Inherited from Devart.Common.DbLoader) | Overloaded. Loads data into the table from the specified DataTable.
Public Method NextRow | Overridden. Advances PgSqlLoader to the next row.
Public Method Open | Overridden. Prepares PgSqlLoader for the loading.
Public Method SetNull (Inherited from Devart.Common.DbLoader) | Overloaded. Sets the value of the column with the specified name or ordinal to NULL.
Public Method SetValue | Overloaded. Overridden. Sets the value of the column at the specified ordinal and name.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Close Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Close Method (PgSqlLoader)

Closes loading session and flushes remaining rows to the table.

[Visual Basic]
Overrides Public NotOverridable Sub Close()
[C#]
public override void Close();

Remarks

You must call Close method after finishing of loading session. If rows exist in the loader internal buffer, they will be flushed to the table.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateColumns Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : CreateColumns Method (PgSqlLoader)

Retrieves table columns information from the table specified in the TableName property and populates columns collection.

[Visual Basic]
Overrides Public NotOverridable Sub CreateColumns()
[C#]
public override void CreateColumns();

Remarks

If Columns property consists of some columns they will be deleted before calling CreateColumns method. TableName property must be set before calling this method.

CreateColumns retrieves all columns from the table. It means that when inserting the data, SQL INSERT statement is generated for all of the columns, regardless of how many you have assigned with SetValue method. The columns you have omitted are considered to be of NULL value. If you want to generate the statements for chosen columns only, you have to manually edit the collection.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NextRow Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : NextRow Method (PgSqlLoader)

Advances PgSqlLoader to the next row.

[Visual Basic]
Overrides Public NotOverridable Sub NextRow()
[C#]
public override void NextRow();

Remarks

Call this method after you put the row to the PgSqlLoader internal buffer. If PgSqlLoader rows buffer is full NextRow method flushes rows buffer to the loading table.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Open Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Open Method (PgSqlLoader)

Prepares PgSqlLoader for the loading.

[Visual Basic]
Overrides Public NotOverridable Sub Open()
[C#]
public override void Open();

Remarks

Use Open method to prepare internal PgSqlLoader structures for loading. If you do not call this method explicitly it will be called automatically.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetValue Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : SetValue Method (PgSqlLoader)

Sets the value of the column at the specified ordinal and name.

Overload List

Sets the value of the column at the specified ordinal.

[Visual Basic] Overloads Overrides Public NotOverridable Sub SetValue(Integer,Object)

[C#] public override void SetValue(int,object);

Sets the value of the column with the specified name.

[Visual Basic] Overloads Public Sub SetValue(String,Object)

[C#] public void SetValue(string,object);

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List | SetNull Method

Language

Visual Basic

C#

Show All

i
Zero-based index of the column.
value
Column value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetValue(Int32,Object) Method

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > SetValue Method : SetValue(Int32,Object) Method

Sets the value of the column at the specified ordinal.

[Visual Basic]
Overloads Overrides Public NotOverridable Sub SetValue( _
   ByVal i As Integer, _
   ByVal value As Object _
)
[C#]
public override void SetValue(
   int i,
   object value
);

Parameters

i
Zero-based index of the column.
value
Column value.

Remarks

Use SetValue method to set column with specific index in the current row to the value. To assign a column NULL value use Devart.Common.DbLoader.SetNull method instead.

The columns that you did not explicitly assign a value are considered to be NULL.

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List | SetNull Method


%%PageItemTitle%% $$Events$$

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoader Class Events

Devart.Data.PostgreSql Namespace : PgSqlLoader Class

For a list of all members of this type, see PgSqlLoader members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error | The event is raised when an error occurs during a load operation.

See Also

PgSqlLoader Class | Devart.Data.PostgreSql Namespace | PgSqlLoaderColumn Class | PgSqlLoaderColumnCollection Class


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Error Event

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Error Event (PgSqlLoader)

The event is raised when an error occurs during a load operation.

[Visual Basic]
Public Event Error() As PgSqlLoaderErrorEventHandler
[C#]
public event PgSqlLoaderErrorEventHandler Error();

Event Data

The event handler receives an argument of type PgSqlLoaderErrorEventArgs containing data related to this event. The following PgSqlLoaderErrorEventArgs properties provide information specific to this event.

Property | Description
Exception | Gets the PgSqlException instance that a PgSqlLoader throws.
Ignore | Gets or sets whether the current error will be ignored or not.

Remarks

The event handler receives an argument of PgSqlLoaderErrorEventArgs type containing data related to this event. The following PgSqlLoaderErrorEventArgs properties provide information specific to this event:
Property | Description
PgSqlLoaderErrorEventArgs.Exception | Gets PgSqlException object with error specific information.
PgSqlLoaderErrorEventArgs.Ignore | Specifies whether current error will be ignored.

Clients that want to process errors raised by the server should create a __Delegates.PgSqlLoaderErrorEventHandler delegate to listen to this event.

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoaderColumn Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Class

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumn Class

Represents the attributes for column loading.

For a list of all members of this type, see PgSqlLoaderColumn members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
Devart.Common.DbLoaderColumn
Devart.Data.PostgreSql.PgSqlLoaderColumn

Syntax

[Visual Basic]
Public Class PgSqlLoaderColumn
   Inherits DbLoaderColumn
[C#]
public class PgSqlLoaderColumn : DbLoaderColumn

Remarks

Each PgSqlLoader uses a Columns to maintain a collection of PgSqlLoaderColumn objects. The PgSqlLoaderColumn object represents the attributes for column loading. Every PgSqlLoaderColumn object corresponds to one of the table fields with the same name as its Devart.Common.DbLoaderColumn.Name property.

You can manually make changes to the Columns collection to exclude some columns from INSERT statement generated by PgSqlLoader object.

Example

This sample shows how to perform loading of data into a table with the last column set to default value.

[C#]

public void LoadData(PgSqlConnection pgConnection)
{
  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  try
  {
    loader.CreateColumns();
    //Do not insert data in the last column
    loader.Columns.RemoveAt(loader.Columns.Count-1);
    loader.Open();
    for (int i = 1; i <= 100; i++)
    {
      loader.SetValue("id", i);
      loader.SetValue(1, "test string");
      loader.SetValue("date_field", DateTime.Now);
      loader.NextRow();
    }
    loader.Close();
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub LoadData(ByVal pgConnection As PgSqlConnection)
  pgConnection.Open()
  Dim loader As PgSqlLoader
  loader = New PgSqlLoader
  loader.Connection = pgConnection
  loader.TableName = "load_table"
  Try
    loader.CreateColumns()
    ' Do not insert data in the last column
    loader.Columns.RemoveAt(loader.Columns.Count - 1)
    loader.Open()
    Dim i As Integer
    For i = 1 To 100
      loader.SetValue("id", i)
      loader.SetValue(1, "test string")
      loader.SetValue("date_field", DateTime.Now)
      loader.NextRow()
    Next i
    loader.Close()
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlLoaderColumn Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Class Members

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumn Class

PgSqlLoaderColumn overview

Public Constructors

Public Constructor PgSqlLoaderColumn Constructor Overloaded. Initializes a new instance of the PgSqlLoaderColumn class.

Public Properties

Public Property Name (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the name of the Devart.Common.DbLoaderColumn.
Public Property PgSqlType | Gets or sets the PgSqlType of the column.
Public Property Precision (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the maximum number of digits used to represent the column value.
Public Property Scale (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the number of decimal places to which column value is resolved.
Public Property Size | Overridden. Gets or sets the maximum size, in bytes, of the data within the column.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from Devart.Common.DbLoaderColumn) | Returns the name of the Devart.Common.DbLoaderColumn.

See Also

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Constructor

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class : PgSqlLoaderColumn Constructor (PgSqlLoaderColumn)

Initializes a new instance of the PgSqlLoaderColumn class.

Overload List

Initializes a new instance of the PgSqlLoaderColumn class.

[Visual Basic] Public Sub New()

[C#] public PgSqlLoaderColumn();

Initializes a new instance of the PgSqlLoaderColumn class with the column name and column data type.

[Visual Basic] Public Sub New(String,PgSqlType)

[C#] public PgSqlLoaderColumn(string,PgSqlType);

Initializes a new instance of the PgSqlLoaderColumn class with the column name, column data type and column size.

[Visual Basic] Public Sub New(String,PgSqlType,Integer)

[C#] public PgSqlLoaderColumn(string,PgSqlType,int);

Initializes a new instance of the PgSqlLoaderColumn class with the column name, column data type, column size, precision and scale.

[Visual Basic] Public Sub New(String,PgSqlType,Integer,Integer,Integer)

[C#] public PgSqlLoaderColumn(string,PgSqlType,int,int,int);

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Constructor()

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class > PgSqlLoaderColumn Constructor : PgSqlLoaderColumn Constructor()

Initializes a new instance of the PgSqlLoaderColumn class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlLoaderColumn();

Remarks

Use this constructor to create an PgSqlLoaderColumn instance

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
dbType
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Constructor(String,PgSqlType)

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class > PgSqlLoaderColumn Constructor : PgSqlLoaderColumn Constructor(String,PgSqlType)

Initializes a new instance of the PgSqlLoaderColumn class with the column name and column data type.

[Visual Basic]
Public Function New( _
   ByVal name As String, _
   ByVal dbType As PgSqlType _
)
[C#]
public PgSqlLoaderColumn(
   string name,
   PgSqlType dbType
);

Parameters

name
The name of the column.
dbType

Remarks

Use this constructor to create a PgSqlLoaderColumn instance with column name and column data type.

Example

The following example creates a PgSqlLoaderColumn and sets some of its properties.

[C#]

public void CreateMyLoaderColumn()
{
  PgSqlLoaderColumn column = new PgSqlLoaderColumn("DName", PgSqlType.VarChar);
  column.Size = 15;
}

[Visual Basic]

Public Sub CreateMyLoaderColumn()
  Dim column As PgSqlLoaderColumn
  column = New PgSqlLoaderColumn("DName", PgSqlType.VarChar)
  column.Size = 15
End Sub

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of column data (only for strings).
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Constructor(String,PgSqlType,Int32)

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class > PgSqlLoaderColumn Constructor : PgSqlLoaderColumn Constructor(String,PgSqlType,Int32)

Initializes a new instance of the PgSqlLoaderColumn class with the column name, column data type and column size.

[Visual Basic]
Public Function New( _
   ByVal name As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer _
)
[C#]
public PgSqlLoaderColumn(
   string name,
   PgSqlType dbType,
   int size
);

Parameters

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of column data (only for strings).

Remarks

Use this constructor to create a PgSqlLoaderColumn instance with column name, column data type and column data size.

Example

The following example creates a PgSqlLoaderColumn and sets some of its properties.

[C#]

public void CreateMyLoaderColumn(PgSqlLoader loader)
{
  ...
  PgSqlLoaderColumn column = new PgSqlLoaderColumn("dname", PgSqlType.VarChar, 25);
  loader.Add(column);
  ...
}

[Visual Basic]

Public Sub CreateMyLoaderColumn(loader as PgSqlLoader)
  ...
  Dim column as PgSqlLoaderColumn = new PgSqlLoaderColumn("dname", PgSqlType.VarChar, 25)
  loader.Add(column)
  ...
End Sub

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of column data.
precision
The precision of the column.
scale
The scale of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Constructor(String,PgSqlType,Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class > PgSqlLoaderColumn Constructor : PgSqlLoaderColumn Constructor(String,PgSqlType,Int32,Int32,Int32)

Initializes a new instance of the PgSqlLoaderColumn class with the column name, column data type, column size, precision and scale.

[Visual Basic]
Public Function New( _
   ByVal name As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal precision As Integer, _
   ByVal scale As Integer _
)
[C#]
public PgSqlLoaderColumn(
   string name,
   PgSqlType dbType,
   int size,
   int precision,
   int scale
);

Parameters

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of column data.
precision
The precision of the column.
scale
The scale of the column.

Remarks

Use this constructor to create a PgSqlLoaderColumn instance with custom column name, data type, data size, precision and scale.

Example

The following example creates a PgSqlLoaderColumn and sets some of its properties.

[C#]

public void CreateMyLoaderColumn(PgSqlLoader loader)
{
  ...
  PgSqlLoaderColumn column = new PgSqlLoaderColumn("deptno", PgSqlType.Int, 0, 6, 0);
  loader.Add(column);
  ...
}

[Visual Basic]

Public Sub CreateMyLoaderColumn(loader as PgSqlLoader)
  ...
  Dim column as PgSqlLoaderColumn = new PgSqlLoaderColumn("deptno", PgSqlType.Int, 0, 6, 0)
  loader.Add(column)
  ...
End Sub

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumn Class

For a list of all members of this type, see PgSqlLoaderColumn members.

Public Properties

Public Property Name (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the name of the Devart.Common.DbLoaderColumn.
Public Property PgSqlType | Gets or sets the PgSqlType of the column.
Public Property Precision (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the maximum number of digits used to represent the column value.
Public Property Scale (Inherited from Devart.Common.DbLoaderColumn) | Gets or sets the number of decimal places to which column value is resolved.
Public Property Size | Overridden. Gets or sets the maximum size, in bytes, of the data within the column.

See Also

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | CreateColumns Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlType Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class : PgSqlType Property (PgSqlLoaderColumn)

Gets or sets the PgSqlType of the column.

[Visual Basic]
Public Property PgSqlType As PgSqlType
[C#]
public PgSqlType PgSqlType {get; set;}

Return Type

A PgSqlType value of the column. The default value is PgSqlType.VarChar.

Remarks

Use PgSqlType property to specify PostgreSQL data type for the column.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{
  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetDataColumns(ByVal pgConnection As PgSqlConnection)
  pgConnection.Open()
  Dim loader As PgSqlLoader
  loader = New PgSqlLoader
  loader.Connection = pgConnection
  loader.TableName = "load_table"
  Dim myColumn As PgSqlLoaderColumn
  Try
    loader.CreateColumns()
    Dim i As Integer
    For i = 0 To loader.Columns.Count - 1
      myColumn = loader.Columns(i)
      Console.WriteLine(myColumn.Name)
      Console.WriteLine(myColumn.PgSqlType.ToString())
      Console.WriteLine(myColumn.Size)
      Console.WriteLine(myColumn.Scale)
      Console.WriteLine(myColumn.Precision)
      Console.WriteLine()
    Next i
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | CreateColumns Method


%%PageItemTitle%%

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | CreateColumns Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Size Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumn Class : Size Property (PgSqlLoaderColumn)

Gets or sets the maximum size, in bytes, of the data within the column.

[Visual Basic]
Overrides Public Property Size As Integer
[C#]
public override int Size {get; set;}

Return Type

The maximum size, in bytes, of the data within the column.

Remarks

Use Size property to set maximum size in bytes of data for the column. Size is used only for string columns.

Example

[C#]

public void GetDataColumns(PgSqlConnection pgConnection)
{
  pgConnection.Open();
  PgSqlLoader loader = new PgSqlLoader();
  loader.Connection = pgConnection;
  loader.TableName = "load_table";
  PgSqlLoaderColumn myColumn;
  try
  {
    loader.CreateColumns();
    for (int i = 0; i < loader.Columns.Count; i++)
    {
      myColumn = loader.Columns[i];
      Console.WriteLine(myColumn.Name);
      Console.WriteLine(myColumn.PgSqlType.ToString());
      Console.WriteLine(myColumn.Size);
      Console.WriteLine(myColumn.Scale);
      Console.WriteLine(myColumn.Precision);
      Console.WriteLine();
    }
   }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub GetDataColumns(ByVal pgConnection As PgSqlConnection)
  pgConnection.Open()
  Dim loader As PgSqlLoader
  loader = New PgSqlLoader
  loader.Connection = pgConnection
  loader.TableName = "load_table"
  Dim myColumn As PgSqlLoaderColumn
  Try
    loader.CreateColumns()
    Dim i As Integer
    For i = 0 To loader.Columns.Count - 1
      myColumn = loader.Columns(i)
      Console.WriteLine(myColumn.Name)
      Console.WriteLine(myColumn.PgSqlType.ToString())
      Console.WriteLine(myColumn.Size)
      Console.WriteLine(myColumn.Scale)
      Console.WriteLine(myColumn.Precision)
      Console.WriteLine()
    Next i
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlLoaderColumn Class | PgSqlLoaderColumn Members | CreateColumns Method


%%PageItemTitle%%

PgSqlLoaderColumnCollection Members | Devart.Data.PostgreSql Namespace | PgSqlLoader Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumnCollection Class

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumnCollection Class

Represents a collection of columns relevant to a PgSqlLoader.

For a list of all members of this type, see PgSqlLoaderColumnCollection members.

Inheritance Hierarchy

System.Object
System.Collections.CollectionBase
Devart.Common.DbLoaderColumnCollection
Devart.Data.PostgreSql.PgSqlLoaderColumnCollection

Syntax

[Visual Basic]
Public Class PgSqlLoaderColumnCollection
   Inherits DbLoaderColumnCollection
   Implements ICollection, IEnumerable, IList
[C#]
public class PgSqlLoaderColumnCollection : DbLoaderColumnCollection, ICollection, IEnumerable, IList

Remarks

Use PgSqlLoaderColumnCollection class to add or remove columns that will be loaded. Order and number of columns in the collection must be equal to the order and number of columns in the loaded table.

Example

Following example displays all loader columns.

[C#]

public void DisplayColumns(string tableName, PgSqlConnection conn) {

  // Create loader instance
  PgSqlLoader loader = new PgSqlLoader();

  // Set up working connection
  // Connection must be opened
  loader.Connection = conn;

  // Set up table name for loading
  loader.TableName = tableName;

  // Create column collection for loading table
  loader.CreateColumns();

  // Iterate through column collection
  foreach (PgSqlLoaderColumn column in loader.Columns)
    Console.WriteLine(column.Name);
}

[Visual Basic]

Public Sub DisplayColumns(tableName as string, conn as PgSqlConnection)

  ' Create loader instance
  Dim loader as PgSqlLoader = new PgSqlLoader()

  ' Set up working connection
  ' Connection must be opened
  loader.Connection = conn

  ' Set up table name for loading
  loader.TableName = tableName

  ' Create column collection for loading table
  loader.CreateColumns()

  ' Iterate through column collection
  Dim column as PgSqlLoaderColumn
  For Each column in loader.Columns
    Console.WriteLine(column.Name)
  Next
End Sub

See Also

PgSqlLoaderColumnCollection Members | Devart.Data.PostgreSql Namespace | PgSqlLoader Class


%%PageItemTitle%% $$Members$$

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumnCollection Class Members

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumnCollection Class

PgSqlLoaderColumnCollection overview

Public Constructors

Public Constructor PgSqlLoaderColumnCollection Constructor Initializes a new instance of the PgSqlLoaderColumnCollection class.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets or sets the PgSqlLoaderColumn at the specified index.

Public Methods

Public Method Add | Overloaded. Adds the specified PgSqlLoaderColumn to the PgSqlLoaderColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains (Inherited from Devart.Common.DbLoaderColumnCollection) | Overloaded. Gets a value indicating whether a Devart.Common.DbLoaderColumn object exists in the collection.
Public Method CopyTo (Inherited from Devart.Common.DbLoaderColumnCollection) | Copies Devart.Common.DbLoaderColumn objects from the Devart.Common.DbLoaderColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf (Inherited from Devart.Common.DbLoaderColumnCollection) | Overloaded. Gets the location in the collection of the Devart.Common.DbLoaderColumn object.
Public Method Insert (Inherited from Devart.Common.DbLoaderColumnCollection) | Inserts a Devart.Common.DbLoaderColumn into the collection at the specified index.
Public Method Remove (Inherited from Devart.Common.DbLoaderColumnCollection) | Removes the specified Devart.Common.DbLoaderColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumnCollection Constructor

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class : PgSqlLoaderColumnCollection Constructor (PgSqlLoaderColumnCollection)

Initializes a new instance of the PgSqlLoaderColumnCollection class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlLoaderColumnCollection();

Remarks

The base constructor initializes all fields to their default values.

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members


%%PageItemTitle%% $$Properties$$

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumnCollection Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumnCollection Class

For a list of all members of this type, see PgSqlLoaderColumnCollection members.

Public Properties

Public Property Capacity (Inherited from System.Collections.CollectionBase) | Gets or sets the number of elements that the CollectionBase can contain.
Public Property Count (Inherited from System.Collections.CollectionBase) | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden.
Public Property Item | Overloaded. Gets or sets the PgSqlLoaderColumn at the specified index.

See Also

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class : Item Property (PgSqlLoaderColumnCollection)

Gets or sets the PgSqlLoaderColumn at the specified index.

Overload List

Gets or sets the PgSqlLoaderColumn at the specified index.

[Visual Basic] Overloads Public Item(Integer) As PgSqlLoaderColumn

[C#] public PgSqlLoaderColumn Item(int);

Gets or sets the PgSqlLoaderColumn with the specified name.

[Visual Basic] Overloads Public Item(String) As PgSqlLoaderColumn

[C#] public PgSqlLoaderColumn Item(string);

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

index
The zero-based index of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(Int32) Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class > Item Property : Item(Int32) Property

Gets or sets the PgSqlLoaderColumn at the specified index.

[Visual Basic]
Overloads Public Property Item( _
   ByVal index As Integer _
) As PgSqlLoaderColumn
[C#]
public PgSqlLoaderColumn Item(
   int index
); {get; set;}

Parameters

index
The zero-based index of the column.

Return Type

The PgSqlLoaderColumn at the specified index.

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(String) Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class > Item Property : Item(String) Property

Gets or sets the PgSqlLoaderColumn with the specified name.

[Visual Basic]
Overloads Public Property Item( _
   ByVal name As String _
) As PgSqlLoaderColumn
[C#]
public PgSqlLoaderColumn Item(
   string name
); {get; set;}

Parameters

name
The name of the column.

Return Type

The PgSqlLoaderColumn with the specified name.

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List


%%PageItemTitle%% $$Methods$$

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumnCollection Class Methods

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumnCollection Class

For a list of all members of this type, see PgSqlLoaderColumnCollection members.

Public Methods

Public Method Add | Overloaded. Adds the specified PgSqlLoaderColumn to the PgSqlLoaderColumnCollection.
Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method Contains (Inherited from Devart.Common.DbLoaderColumnCollection) | Overloaded. Gets a value indicating whether a Devart.Common.DbLoaderColumn object exists in the collection.
Public Method CopyTo (Inherited from Devart.Common.DbLoaderColumnCollection) | Copies Devart.Common.DbLoaderColumn objects from the Devart.Common.DbLoaderColumnCollection to the specified array.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method IndexOf (Inherited from Devart.Common.DbLoaderColumnCollection) | Overloaded. Gets the location in the collection of the Devart.Common.DbLoaderColumn object.
Public Method Insert (Inherited from Devart.Common.DbLoaderColumnCollection) | Inserts a Devart.Common.DbLoaderColumn into the collection at the specified index.
Public Method Remove (Inherited from Devart.Common.DbLoaderColumnCollection) | Removes the specified Devart.Common.DbLoaderColumn object from the collection.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

PgSqlLoaderColumnCollection Class | Devart.Data.PostgreSql Namespace | PgSqlLoader Class


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class : Add Method (PgSqlLoaderColumnCollection)

Adds the specified PgSqlLoaderColumn to the PgSqlLoaderColumnCollection.

Overload List

Adds a PgSqlLoaderColumn to the PgSqlLoaderColumnCollection given the column name, column data type, column size, precision, and scale.

[Visual Basic] Overloads Public Function Add(String,PgSqlType,Integer,Integer,Integer) As Integer

[C#] public int Add(string,PgSqlType,int,int,int);

Adds the specified Devart.Common.DbLoaderColumn to the Devart.Common.DbLoaderColumnCollection.

[Visual Basic] Overloads Public Function Add(DbLoaderColumn) As Integer

[C#] public int Add(DbLoaderColumn);

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members


%%PageItemTitle%%

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List

Language

Visual Basic

C#

Show All

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of the column data (only for strings).
precision
The precision of the column.
scale
The scale of the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,PgSqlType,Int32,Int32,Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlLoaderColumnCollection Class > Add Method : Add(String,PgSqlType,Int32,Int32,Int32) Method

Adds a PgSqlLoaderColumn to the PgSqlLoaderColumnCollection given the column name, column data type, column size, precision, and scale.

[Visual Basic]
Overloads Public Function Add( _
   ByVal name As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal precision As Integer, _
   ByVal scale As Integer _
) As Integer
[C#]
public int Add(
   string name,
   PgSqlType dbType,
   int size,
   int precision,
   int scale
);

Parameters

name
The name of the column.
dbType
One of the PgSqlType values.
size
Maximum size of the column data (only for strings).
precision
The precision of the column.
scale
The scale of the column.

Return Type

The new column's ordinal.

Example

The following example creates a PgSqlLoaderColumnCollection, adds an instance of PgSqlLoaderColumn to the collection, and returns a reference to the new PgSqlLoaderColumn.

[C#]

public void CreatePgLoaderColumnColl(PgSqlLoader myLoader)
{
  PgSqlLoaderColumnCollection myColumnCollection = myLoader.Columns;
  myColumnCollection.Add("DeptNo", PgSqlType.Int);
  myColumnCollection.Add("DName", PgSqlType.VarChar);
  myColumnCollection.Add("Loc", PgSqlType.VarChar);
}

[Visual Basic]

Public Sub CreatePgLoaderColumnColl(myLoader As PgSqlLoader)
  Dim myColumnCollection As PgSqlLoaderColumnCollection = myLoader.Columns
  myColumnCollection.Add("DeptNo", PgSqlType.Int)
  myColumnCollection.Add("DName", PgSqlType.VarChar)
  myColumnCollection.Add("Loc", PgSqlType.VarChar)
End Sub 'CreatePgSqlLoaderColumnColl

See Also

PgSqlLoaderColumnCollection Class | PgSqlLoaderColumnCollection Members | Overload List


%%PageItemTitle%%

PgSqlLoaderErrorEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderErrorEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlLoaderErrorEventArgs Class

Provides data for the PgSqlLoader.Error event of the PgSqlLoader class.

For a list of all members of this type, see PgSqlLoaderErrorEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlLoaderErrorEventArgs

Syntax

[Visual Basic]
Public Class PgSqlLoaderErrorEventArgs
   Inherits EventArgs
[C#]
public class PgSqlLoaderErrorEventArgs : EventArgs

Remarks

The PgSqlLoader.Error event contains all information about an error and properties that allow to ignore the error or throw an exception.

See Also

PgSqlLoaderErrorEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlLoaderErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderErrorEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlLoaderErrorEventArgs Class

PgSqlLoaderErrorEventArgs overview

Public Properties

Public Property Exception | Gets the PgSqlException instance that a PgSqlLoader throws.
Public Property Ignore | Gets or sets whether the current error will be ignored or not.

See Also

PgSqlLoaderErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlLoaderErrorEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderErrorEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLoaderErrorEventArgs Class

For a list of all members of this type, see PgSqlLoaderErrorEventArgs members.

Public Properties

Public Property Exception | Gets the PgSqlException instance that a PgSqlLoader throws.
Public Property Ignore | Gets or sets whether the current error will be ignored or not.

See Also

PgSqlLoaderErrorEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLoaderErrorEventArgs Class | PgSqlLoaderErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Exception Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderErrorEventArgs Class : Exception Property (PgSqlLoaderErrorEventArgs)

Gets the PgSqlException instance that a PgSqlLoader throws.

[Visual Basic]
Public ReadOnly Property Exception As PgSqlException
[C#]
public PgSqlException Exception {get;}

Return Type

A PgSqlException instance that contains information specific to the PgSqlLoader error.

Remarks

If set the Exception property in PgSqlLoader.Error event handler to false, PgSqlLoader throws this PgSqlException instance.

See Also

PgSqlLoaderErrorEventArgs Class | PgSqlLoaderErrorEventArgs Members


%%PageItemTitle%%

PgSqlLoaderErrorEventArgs Class | PgSqlLoaderErrorEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Ignore Property

Devart.Data.PostgreSql Namespace > PgSqlLoaderErrorEventArgs Class : Ignore Property (PgSqlLoaderErrorEventArgs)

Gets or sets whether the current error will be ignored or not.

[Visual Basic]
Public Property Ignore As Boolean
[C#]
public bool Ignore {get; set;}

Return Type

If the value is true current error will be ignored, otherwise an exception will be thrown.

Remarks

You may use Ignore property to ignore all or some errors during table loading.

See Also

PgSqlLoaderErrorEventArgs Class | PgSqlLoaderErrorEventArgs Members


%%PageItemTitle%%

PgSqlLocalization Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLocalization Class

Devart.Data.PostgreSql Namespace : PgSqlLocalization Class

This static class allows configuring localization settings.

For a list of all members of this type, see PgSqlLocalization members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlLocalization

Syntax

[Visual Basic]
Public MustInherit NotInheritable Class PgSqlLocalization
[C#]
public static class PgSqlLocalization

Remarks

Currently the only setting is available - TimeZone. It allows you to define time zone to convert the queried PostgreSQL date/time values to.

See Also

PgSqlLocalization Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlLocalization Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLocalization Class Members

Devart.Data.PostgreSql Namespace : PgSqlLocalization Class

PgSqlLocalization overview

Public Properties

Public Property static (Shared in Visual Basic) TimeZone Determines the time zone to convert the queried PostgreSQL date/time values to.

See Also

PgSqlLocalization Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlLocalization Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLocalization Class Properties

Devart.Data.PostgreSql Namespace : PgSqlLocalization Class

For a list of all members of this type, see PgSqlLocalization members.

Public Properties

Public Property static (Shared in Visual Basic) TimeZone Determines the time zone to convert the queried PostgreSQL date/time values to.

See Also

PgSqlLocalization Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLocalization Class | PgSqlLocalization Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TimeZone Property

Devart.Data.PostgreSql Namespace > PgSqlLocalization Class : TimeZone Property (PgSqlLocalization)

Determines the time zone to convert the queried PostgreSQL date/time values to.

[Visual Basic]
Public Shared Property TimeZone As String
[C#]
public static string TimeZone {get; set;}

Return Type

A string with a time zone in the format "HH:MM" optionally preceded by a sign - "+" or "-".

Remarks

By default, when data is queried from the PostgreSQL, date/time values are recalculated according to the local time zone setting. This property allows you to change this behavior and recalculate date/time values according to the time zone specified with this property.

See Also

PgSqlLocalization Class | PgSqlLocalization Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMetaDataCollectionNames Class

Devart.Data.PostgreSql Namespace : PgSqlMetaDataCollectionNames Class

Enumerates collection names you can use for metadata retrieval purposes.

For a list of all members of this type, see PgSqlMetaDataCollectionNames members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlMetaDataCollectionNames

Syntax

[Visual Basic]
Public Class PgSqlMetaDataCollectionNames
[C#]
public class PgSqlMetaDataCollectionNames

Remarks

These strings can be used as arguments for Devart.Common.DbConnectionBase.GetSchema overloads.

See Also

PgSqlMetaDataCollectionNames Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlMetaDataCollectionNames Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMetaDataCollectionNames Class Members

Devart.Data.PostgreSql Namespace : PgSqlMetaDataCollectionNames Class

PgSqlMetaDataCollectionNames overview

Public Constructors

Public Constructor PgSqlMetaDataCollectionNames Constructor Creates a PgSqlMetaDataCollectionNames instance.

Public Fields

Public Field static (Shared in Visual Basic) AggregateFunctions | The name of the metadata collection for aggregate functions available.
Public Field static (Shared in Visual Basic) Arguments | The name of the metadata collection for stored procedure/function arguments.
Public Field static (Shared in Visual Basic) Casts | The name of the metadata collection for data type casts available.
Public Field static (Shared in Visual Basic) Columns | The name of the metadata collection for table columns.
Public Field static (Shared in Visual Basic) CompositeTypeAttributes | The name of the metadata collection for attributes of composite types.
Public Field static (Shared in Visual Basic) Conversions | The name of the metadata collection for type conversions.
Public Field static (Shared in Visual Basic) Databases | The name of the metadata collection for databases.
Public Field static (Shared in Visual Basic) DataSourceInformation | The name of the metadata collection for the data source.
Public Field static (Shared in Visual Basic) DataTypes | The name of the metadata collection for PostgreSQL data types.
Public Field static (Shared in Visual Basic) Domains | The name of the metadata collection for PostgreSQL domains.
Public Field static (Shared in Visual Basic) ForeignKeyColumns | The name of the metadata collection for columns used in foreign keys.
Public Field static (Shared in Visual Basic) ForeignKeys | The name of the metadata collection for foreign keys.
Public Field static (Shared in Visual Basic) Functions | The name of the metadata collection for functions.
Public Field static (Shared in Visual Basic) Groups | The name of the metadata collection for group roles available.
Public Field static (Shared in Visual Basic) IndexColumns | The name of the metadata collection for columns used in indexes.
Public Field static (Shared in Visual Basic) Indexes | The name of the metadata collection for table indexes.
Public Field static (Shared in Visual Basic) Languages | The name of the metadata collection for programming languages available.
Public Field static (Shared in Visual Basic) MetadataCollections | The name of the metadata collection for metadata collection definitions.
Public Field static (Shared in Visual Basic) NestedTables | The name of the metadata collection for nested tables.
Public Field static (Shared in Visual Basic) OperatorClasses | The name of the metadata collection for PostgreSQL operator classes.
Public Field static (Shared in Visual Basic) Operators | The name of the metadata collection for PostgreSQL operators.
Public Field static (Shared in Visual Basic) PrimaryKeys | The name of the metadata collection for primary keys.
Public Field static (Shared in Visual Basic) Procedures | The name of the metadata collection for stored procedures.
Public Field static (Shared in Visual Basic) ReservedWords | The name of metadata collection for the reserved words.
Public Field static (Shared in Visual Basic) Restrictions | The name of the metadata collection for metadata restrictions.
Public Field static (Shared in Visual Basic) Rules | The name of the metadata collection for PostgreSQL rules.
Public Field static (Shared in Visual Basic) Schemas | The name of the metadata collection for PostgreSQL schemas.
Public Field static (Shared in Visual Basic) Sequences | The name of the metadata collection for PostgreSQL sequences.
Public Field static (Shared in Visual Basic) Tables | The name of the metadata collection for PostgreSQL tables.
Public Field static (Shared in Visual Basic) Triggers | The name of the metadata collection for triggers.
Public Field static (Shared in Visual Basic) Types | The name of the metadata collection for user-defined types.
Public Field static (Shared in Visual Basic) UniqueKeys | The name of the metadata collection for unique keys.
Public Field static (Shared in Visual Basic) UserPrivileges | The name of the metadata collection for privileges available.
Public Field static (Shared in Visual Basic) Users | The name of the metadata collection for database users.
Public Field static (Shared in Visual Basic) Views | The name of the metadata collection for database views.

See Also

PgSqlMetaDataCollectionNames Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMetaDataCollectionNames Constructor

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : PgSqlMetaDataCollectionNames Constructor (PgSqlMetaDataCollectionNames)

Creates a PgSqlMetaDataCollectionNames instance.

[Visual Basic]
Public Function New()
[C#]
public PgSqlMetaDataCollectionNames();

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%% $$Fields$$

PgSqlMetaDataCollectionNames Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMetaDataCollectionNames Class Fields

Devart.Data.PostgreSql Namespace : PgSqlMetaDataCollectionNames Class

For a list of all members of this type, see PgSqlMetaDataCollectionNames members.

Public Fields

Public Field static (Shared in Visual Basic) AggregateFunctions | The name of the metadata collection for aggregate functions available.
Public Field static (Shared in Visual Basic) Arguments | The name of the metadata collection for stored procedure/function arguments.
Public Field static (Shared in Visual Basic) Casts | The name of the metadata collection for data type casts available.
Public Field static (Shared in Visual Basic) Columns | The name of the metadata collection for table columns.
Public Field static (Shared in Visual Basic) CompositeTypeAttributes | The name of the metadata collection for attributes of composite types.
Public Field static (Shared in Visual Basic) Conversions | The name of the metadata collection for type conversions.
Public Field static (Shared in Visual Basic) Databases | The name of the metadata collection for databases.
Public Field static (Shared in Visual Basic) DataSourceInformation | The name of the metadata collection for the data source.
Public Field static (Shared in Visual Basic) DataTypes | The name of the metadata collection for PostgreSQL data types.
Public Field static (Shared in Visual Basic) Domains | The name of the metadata collection for PostgreSQL domains.
Public Field static (Shared in Visual Basic) ForeignKeyColumns | The name of the metadata collection for columns used in foreign keys.
Public Field static (Shared in Visual Basic) ForeignKeys | The name of the metadata collection for foreign keys.
Public Field static (Shared in Visual Basic) Functions | The name of the metadata collection for functions.
Public Field static (Shared in Visual Basic) Groups | The name of the metadata collection for group roles available.
Public Field static (Shared in Visual Basic) IndexColumns | The name of the metadata collection for columns used in indexes.
Public Field static (Shared in Visual Basic) Indexes | The name of the metadata collection for table indexes.
Public Field static (Shared in Visual Basic) Languages | The name of the metadata collection for programming languages available.
Public Field static (Shared in Visual Basic) MetadataCollections | The name of the metadata collection for metadata collection definitions.
Public Field static (Shared in Visual Basic) NestedTables | The name of the metadata collection for nested tables.
Public Field static (Shared in Visual Basic) OperatorClasses | The name of the metadata collection for PostgreSQL operator classes.
Public Field static (Shared in Visual Basic) Operators | The name of the metadata collection for PostgreSQL operators.
Public Field static (Shared in Visual Basic) PrimaryKeys | The name of the metadata collection for primary keys.
Public Field static (Shared in Visual Basic) Procedures | The name of the metadata collection for stored procedures.
Public Field static (Shared in Visual Basic) ReservedWords | The name of metadata collection for the reserved words.
Public Field static (Shared in Visual Basic) Restrictions | The name of the metadata collection for metadata restrictions.
Public Field static (Shared in Visual Basic) Rules | The name of the metadata collection for PostgreSQL rules.
Public Field static (Shared in Visual Basic) Schemas | The name of the metadata collection for PostgreSQL schemas.
Public Field static (Shared in Visual Basic) Sequences | The name of the metadata collection for PostgreSQL sequences.
Public Field static (Shared in Visual Basic) Tables | The name of the metadata collection for PostgreSQL tables.
Public Field static (Shared in Visual Basic) Triggers | The name of the metadata collection for triggers.
Public Field static (Shared in Visual Basic) Types | The name of the metadata collection for user-defined types.
Public Field static (Shared in Visual Basic) UniqueKeys | The name of the metadata collection for unique keys.
Public Field static (Shared in Visual Basic) UserPrivileges | The name of the metadata collection for privileges available.
Public Field static (Shared in Visual Basic) Users | The name of the metadata collection for database users.
Public Field static (Shared in Visual Basic) Views | The name of the metadata collection for database views.

See Also

PgSqlMetaDataCollectionNames Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AggregateFunctions Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : AggregateFunctions Field

The name of the metadata collection for aggregate functions available.

[Visual Basic]
Public Shared ReadOnly AggregateFunctions As String
[C#]
public static readonly string AggregateFunctions

Return Type

The value is "AggregateFunctions".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Arguments Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Arguments Field

The name of the metadata collection for stored procedure/function arguments.

[Visual Basic]
Public Shared ReadOnly Arguments As String
[C#]
public static readonly string Arguments

Return Type

The value is "Arguments".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Casts Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Casts Field

The name of the metadata collection for data type casts available.

[Visual Basic]
Public Shared ReadOnly Casts As String
[C#]
public static readonly string Casts

Return Type

The value is "Casts".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Columns Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Columns Field (PgSqlMetaDataCollectionNames)

The name of the metadata collection for table columns.

[Visual Basic]
Public Shared ReadOnly Columns As String
[C#]
public static readonly string Columns

Return Type

The value is "Columns".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompositeTypeAttributes Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : CompositeTypeAttributes Field

The name of the metadata collection for attributes of composite types.

[Visual Basic]
Public Shared ReadOnly CompositeTypeAttributes As String
[C#]
public static readonly string CompositeTypeAttributes

Return Type

The value is "CompositeTypeAttributes".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Conversions Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Conversions Field

The name of the metadata collection for type conversions.

[Visual Basic]
Public Shared ReadOnly Conversions As String
[C#]
public static readonly string Conversions

Return Type

The value is "Conversions".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Databases Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Databases Field

The name of the metadata collection for databases.

[Visual Basic]
Public Shared ReadOnly Databases As String
[C#]
public static readonly string Databases

Return Type

The value is Databases".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataSourceInformation Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : DataSourceInformation Field

The name of the metadata collection for the data source.

[Visual Basic]
Public Shared ReadOnly DataSourceInformation As String
[C#]
public static readonly string DataSourceInformation

Return Type

The value is "DataSourceInformation".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DataTypes Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : DataTypes Field

The name of the metadata collection for PostgreSQL data types.

[Visual Basic]
Public Shared ReadOnly DataTypes As String
[C#]
public static readonly string DataTypes

Return Type

The value is "DataTypes".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Domains Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Domains Field

The name of the metadata collection for PostgreSQL domains.

[Visual Basic]
Public Shared ReadOnly Domains As String
[C#]
public static readonly string Domains

Return Type

The value is "Domains".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ForeignKeyColumns Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : ForeignKeyColumns Field

The name of the metadata collection for columns used in foreign keys.

[Visual Basic]
Public Shared ReadOnly ForeignKeyColumns As String
[C#]
public static readonly string ForeignKeyColumns

Return Type

The value is "ForeignKeyColumns".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ForeignKeys Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : ForeignKeys Field

The name of the metadata collection for foreign keys.

[Visual Basic]
Public Shared ReadOnly ForeignKeys As String
[C#]
public static readonly string ForeignKeys

Return Type

The value is "ForeignKeys".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Functions Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Functions Field

The name of the metadata collection for functions.

[Visual Basic]
Public Shared ReadOnly Functions As String
[C#]
public static readonly string Functions

Return Type

The value is "Functions".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Groups Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Groups Field

The name of the metadata collection for group roles available.

[Visual Basic]
Public Shared ReadOnly Groups As String
[C#]
public static readonly string Groups

Return Type

The value is "Groups".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IndexColumns Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : IndexColumns Field

The name of the metadata collection for columns used in indexes.

[Visual Basic]
Public Shared ReadOnly IndexColumns As String
[C#]
public static readonly string IndexColumns

Return Type

The value is "IndexColumns".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Indexes Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Indexes Field

The name of the metadata collection for table indexes.

[Visual Basic]
Public Shared ReadOnly Indexes As String
[C#]
public static readonly string Indexes

Return Type

The value is "Indexes".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Languages Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Languages Field

The name of the metadata collection for programming languages available.

[Visual Basic]
Public Shared ReadOnly Languages As String
[C#]
public static readonly string Languages

Return Type

The value is "Languages".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MetadataCollections Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : MetadataCollections Field

The name of the metadata collection for metadata collection definitions.

[Visual Basic]
Public Shared ReadOnly MetadataCollections As String
[C#]
public static readonly string MetadataCollections

Return Type

The value is "MetadataCollections".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NestedTables Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : NestedTables Field

The name of the metadata collection for nested tables.

[Visual Basic]
Public Shared ReadOnly NestedTables As String
[C#]
public static readonly string NestedTables

Return Type

The value is "NestedTables".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

OperatorClasses Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : OperatorClasses Field

The name of the metadata collection for PostgreSQL operator classes.

[Visual Basic]
Public Shared ReadOnly OperatorClasses As String
[C#]
public static readonly string OperatorClasses

Return Type

The value is "OperatorClasses".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Operators Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Operators Field

The name of the metadata collection for PostgreSQL operators.

[Visual Basic]
Public Shared ReadOnly Operators As String
[C#]
public static readonly string Operators

Return Type

The value is "Operators".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PrimaryKeys Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : PrimaryKeys Field

The name of the metadata collection for primary keys.

[Visual Basic]
Public Shared ReadOnly PrimaryKeys As String
[C#]
public static readonly string PrimaryKeys

Return Type

The value is "PrimaryKeys".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Procedures Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Procedures Field

The name of the metadata collection for stored procedures.

[Visual Basic]
Public Shared ReadOnly Procedures As String
[C#]
public static readonly string Procedures

Return Type

The value is "Procedures".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ReservedWords Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : ReservedWords Field

The name of metadata collection for the reserved words.

[Visual Basic]
Public Shared ReadOnly ReservedWords As String
[C#]
public static readonly string ReservedWords

Return Type

The value is "ReservedWords".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Restrictions Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Restrictions Field

The name of the metadata collection for metadata restrictions.

[Visual Basic]
Public Shared ReadOnly Restrictions As String
[C#]
public static readonly string Restrictions

Return Type

The value is "Restrictions".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rules Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Rules Field

The name of the metadata collection for PostgreSQL rules.

[Visual Basic]
Public Shared ReadOnly Rules As String
[C#]
public static readonly string Rules

Return Type

The value is "Rules".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Schemas Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Schemas Field

The name of the metadata collection for PostgreSQL schemas.

[Visual Basic]
Public Shared ReadOnly Schemas As String
[C#]
public static readonly string Schemas

Return Type

The value is "Schemas".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Sequences Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Sequences Field

The name of the metadata collection for PostgreSQL sequences.

[Visual Basic]
Public Shared ReadOnly Sequences As String
[C#]
public static readonly string Sequences

Return Type

The value is "Sequences".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Tables Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Tables Field (PgSqlMetaDataCollectionNames)

The name of the metadata collection for PostgreSQL tables.

[Visual Basic]
Public Shared ReadOnly Tables As String
[C#]
public static readonly string Tables

Return Type

The value is "Tables".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Triggers Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Triggers Field

The name of the metadata collection for triggers.

[Visual Basic]
Public Shared ReadOnly Triggers As String
[C#]
public static readonly string Triggers

Return Type

The value is "Triggers".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Types Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Types Field

The name of the metadata collection for user-defined types.

[Visual Basic]
Public Shared ReadOnly Types As String
[C#]
public static readonly string Types

Return Type

The value is "Types".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UniqueKeys Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : UniqueKeys Field

The name of the metadata collection for unique keys.

[Visual Basic]
Public Shared ReadOnly UniqueKeys As String
[C#]
public static readonly string UniqueKeys

Return Type

The value is "UniqueKeys".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UserPrivileges Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : UserPrivileges Field

The name of the metadata collection for privileges available.

[Visual Basic]
Public Shared ReadOnly UserPrivileges As String
[C#]
public static readonly string UserPrivileges

Return Type

The value is "UserPrivileges".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Users Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Users Field

The name of the metadata collection for database users.

[Visual Basic]
Public Shared ReadOnly Users As String
[C#]
public static readonly string Users

Return Type

The value is "Users".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Views Field

Devart.Data.PostgreSql Namespace > PgSqlMetaDataCollectionNames Class : Views Field

The name of the metadata collection for database views.

[Visual Basic]
Public Shared ReadOnly Views As String
[C#]
public static readonly string Views

Return Type

The value is "Views".

See Also

PgSqlMetaDataCollectionNames Class | PgSqlMetaDataCollectionNames Members


%%PageItemTitle%%

PgSqlMonitor Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Class

Devart.Data.PostgreSql Namespace : PgSqlMonitor Class

Monitors dynamic SQL execution in applications that use dotConnect for PostgreSQL.

For a list of all members of this type, see PgSqlMonitor members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbMonitor
Devart.Common.DbMonitorHelper
Devart.Data.PostgreSql.PgSqlMonitor

Syntax

[Visual Basic]
Public Class PgSqlMonitor
   Inherits DbMonitorHelper
   Implements IComponent, IDisposable
[C#]
public class PgSqlMonitor : DbMonitorHelper, IComponent, IDisposable

Remarks

To enable monitoring just drop PgSqlMonitor component to the form and set IsActive property to true. If dbMonitor application has already been started you can see messages and SQL statements that your application executes. For monitoring you need only one PgSqlMonitor component on any of the forms your application consists of.

For example on how to trap SQL events in your application please refer to description of Devart.Common.DbMonitor.TraceEvent event of Devart.Common.DbMonitor.

For monitoring multithreaded applications with dbMonitor tool you have to specify ApartmentState.MTA attribute as shown in the example below.

See also Using dbMonitor topic.

Example

This sample shows how to enable SQL monitoring in console and web applications. To activate monitoring for web applications, a Devart.Data.PostgreSql.PgSqlMonitor object may be added to the Application collection at the first load of the default page.

[C#]

// Console application
[MTAThread]
static void Main(string[] args)
{
  PgSqlMonitor pgMonitor = new PgSqlMonitor();
  pgMonitor.IsActive = true;
  ...
}

// Web application
void Page_Load(object sender, EventArgs e)
{
    if (Application["mon"] == null)
    Application.Add("mon", new Devart.Data.PostgreSql.PgSqlMonitor() {IsActive = true});
}

[Visual Basic]

' Console application
<MTAThread()> _
Sub Main()
  Dim pgMonitor As PgSqlMonitor = New PgSqlMonitor
  pgMonitor.IsActive = True
  ...
End Sub

// Web application
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    If Application("mon") Is Nothing Then
        Application.Add("mon", New Devart.Data.PostgreSql.PgSqlMonitor() With {.IsActive = True})
    End If
End Sub

See Also

PgSqlMonitor Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Class Members

Devart.Data.PostgreSql Namespace : PgSqlMonitor Class

PgSqlMonitor overview

Public Constructors

Public Constructor PgSqlMonitor Constructor Initializes a new instance of the PgSqlMonitor class.

Public Properties

Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property EventQueueLimit (Inherited from Devart.Common.DbMonitor) | Gets or sets the maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.
Public Property Host (Inherited from Devart.Common.DbMonitor) | Gets or sets the host where the dbMonitor application is running, 'localhost' by default.
Public Property IsActive | Overridden. Gets or sets whether PgSqlMonitor should watch SQL execution.
Public Property Port (Inherited from Devart.Common.DbMonitor) | Gets or sets the port of the dbMonitor application to which to connect, 1000 by default.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UseApp (Inherited from Devart.Common.DbMonitor) | Disables or enables sending database interaction events to dbMonitor application.
Public Property UseIdeOutput (Inherited from Devart.Common.DbMonitor) | Enables or disables writing log messages to the IDE output window.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event TraceEvent (Inherited from Devart.Common.DbMonitor) | Occurs when Devart.Common.DbMonitor object signals about some database activity.

See Also

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMonitor Class | PgSqlMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Constructor

Devart.Data.PostgreSql Namespace > PgSqlMonitor Class : PgSqlMonitor Constructor (PgSqlMonitor)

Initializes a new instance of the PgSqlMonitor class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlMonitor();

Remarks

The base constructor initializes all fields to their default values. To activate monitoring after PgSqlMonitor construction set IsActive property to true. To disable monitoring set this property to false. Monitoring will be automatically deactivated after PgSqlMonitor instance destruction.

See Also

PgSqlMonitor Class | PgSqlMonitor Members


%%PageItemTitle%% $$Properties$$

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Class Properties

Devart.Data.PostgreSql Namespace : PgSqlMonitor Class

For a list of all members of this type, see PgSqlMonitor members.

Public Properties

Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property EventQueueLimit (Inherited from Devart.Common.DbMonitor) | Gets or sets the maximal number of events that may be placed to a queue waiting to be processed by the dbMonitor application.
Public Property Host (Inherited from Devart.Common.DbMonitor) | Gets or sets the host where the dbMonitor application is running, 'localhost' by default.
Public Property IsActive | Overridden. Gets or sets whether PgSqlMonitor should watch SQL execution.
Public Property Port (Inherited from Devart.Common.DbMonitor) | Gets or sets the port of the dbMonitor application to which to connect, 1000 by default.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property UseApp (Inherited from Devart.Common.DbMonitor) | Disables or enables sending database interaction events to dbMonitor application.
Public Property UseIdeOutput (Inherited from Devart.Common.DbMonitor) | Enables or disables writing log messages to the IDE output window.

See Also

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMonitor Class | PgSqlMonitor Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsActive Property

Devart.Data.PostgreSql Namespace > PgSqlMonitor Class : IsActive Property (PgSqlMonitor)

Gets or sets whether PgSqlMonitor should watch SQL execution.

[Visual Basic]
Overrides Public Property IsActive As Boolean
[C#]
public override bool IsActive {get; set;}

Return Type

true if the PgSqlMonitor object should detect SQL queries peformed by the application; false otherwise.

Remarks

Set this property to true to enable monitoring of SQL statements.

See Also

PgSqlMonitor Class | PgSqlMonitor Members


%%PageItemTitle%%

PgSqlNotificationEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNotificationEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlNotificationEventArgs Class

Provides data for the PgSqlConnection.Notification event of the PgSqlConnection class.

For a list of all members of this type, see PgSqlNotificationEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlNotificationEventArgs

Syntax

[Visual Basic]
Public Class PgSqlNotificationEventArgs
   Inherits EventArgs
[C#]
public class PgSqlNotificationEventArgs : EventArgs

See Also

PgSqlNotificationEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlNotificationEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNotificationEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlNotificationEventArgs Class

PgSqlNotificationEventArgs overview

Public Properties

Public Property AdditionalMessage | Gets the additional information passed from the notifying process.
Public Property Condition | Gets the name of the notify condition.
Public Property ProcessId | Gets the ID of the notifying back-end process.

See Also

PgSqlNotificationEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlNotificationEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNotificationEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlNotificationEventArgs Class

For a list of all members of this type, see PgSqlNotificationEventArgs members.

Public Properties

Public Property AdditionalMessage | Gets the additional information passed from the notifying process.
Public Property Condition | Gets the name of the notify condition.
Public Property ProcessId | Gets the ID of the notifying back-end process.

See Also

PgSqlNotificationEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AdditionalMessage Property

Devart.Data.PostgreSql Namespace > PgSqlNotificationEventArgs Class : AdditionalMessage Property

Gets the additional information passed from the notifying process.

[Visual Basic]
Public ReadOnly Property AdditionalMessage As String
[C#]
public string AdditionalMessage {get;}

Return Type

The additional information.

See Also

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members


%%PageItemTitle%%

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Condition Property

Devart.Data.PostgreSql Namespace > PgSqlNotificationEventArgs Class : Condition Property

Gets the name of the notify condition.

[Visual Basic]
Public ReadOnly Property Condition As String
[C#]
public string Condition {get;}

Return Type

The name of the condition that the notify has been raised on.

See Also

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members


%%PageItemTitle%%

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProcessId Property

Devart.Data.PostgreSql Namespace > PgSqlNotificationEventArgs Class : ProcessId Property

Gets the ID of the notifying back-end process.

[Visual Basic]
Public ReadOnly Property ProcessId As Integer
[C#]
public int ProcessId {get;}

Return Type

The ID of the notifying back-end process.

See Also

PgSqlNotificationEventArgs Class | PgSqlNotificationEventArgs Members


%%PageItemTitle%%

PgSqlNumericRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Class

Devart.Data.PostgreSql Namespace : PgSqlNumericRange Class

Represents the PostgreSQL numrange type. Each object of the PgSqlNumericRange class stores a range of integer values.

For a list of all members of this type, see PgSqlNumericRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<Decimal>
Devart.Data.PostgreSql.PgSqlNumericRange

Syntax

[Visual Basic]
Public Class PgSqlNumericRange
   Inherits PgSqlRangeType(Of Decimal)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlNumericRange : PgSqlRangeType<decimal>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlNumericRange object call the PgSqlDataReader.GetPgSqlNumericRange method of the PgSqlDataReader class.

See Also

PgSqlNumericRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlNumericRange Class

PgSqlNumericRange overview

Public Constructors

Public Constructor PgSqlNumericRange Constructor Overloaded. Initializes a new instance of the PgSqlNumericRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlNumericRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlNumericRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class : PgSqlNumericRange Constructor (PgSqlNumericRange)

Initializes a new instance of the PgSqlNumericRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlNumericRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(Decimal,Decimal)

[C#] public PgSqlNumericRange(decimal,decimal);

Initializes a new instance of the PgSqlNumericRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(Decimal,Boolean,Decimal,Boolean)

[C#] public PgSqlNumericRange(decimal,bool,decimal,bool);

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Constructor(Decimal,Boolean,Decimal,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class > PgSqlNumericRange Constructor : PgSqlNumericRange Constructor(Decimal,Boolean,Decimal,Boolean)

Initializes a new instance of the PgSqlNumericRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Decimal, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As Decimal, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlNumericRange(
   decimal lowerBound,
   bool isLowerBoundInclusive,
   decimal upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members | Overload List | #ctor


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Constructor(Decimal,Decimal)

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class > PgSqlNumericRange Constructor : PgSqlNumericRange Constructor(Decimal,Decimal)

Initializes a new instance of the PgSqlNumericRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As Decimal, _
   ByVal upperBound As Decimal _
)
[C#]
public PgSqlNumericRange(
   decimal lowerBound,
   decimal upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members | Overload List | #ctor


%%PageItemTitle%% $$Fields$$

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlNumericRange Class

For a list of all members of this type, see PgSqlNumericRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlNumericRange object.

See Also

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class : Empty Field (PgSqlNumericRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlNumericRange
[C#]
public static readonly PgSqlNumericRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class : Null Field (PgSqlNumericRange)

Represents a null PgSqlNumericRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlNumericRange
[C#]
public static readonly PgSqlNumericRange Null

Return Type

An object that represents a null PgSqlNumericRange value.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members | IsNull Property


%%PageItemTitle%% $$Methods$$

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlNumericRange Class

For a list of all members of this type, see PgSqlNumericRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlNumericRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class : ContainsElement Method (PgSqlNumericRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As Decimal _
) As Boolean
[C#]
public override bool ContainsElement(
   decimal element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members


%%PageItemTitle%%

PgSqlNumericRange Class | PgSqlNumericRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlNumericRange Class : Parse Method (PgSqlNumericRange)

Converts the specified String representation of a date to its PgSqlNumericRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlNumericRange
[C#]
public static PgSqlNumericRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlNumericRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlNumericRange Class | PgSqlNumericRange Members


%%PageItemTitle%%

PgSqlParameter Members | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Class

Devart.Data.PostgreSql Namespace : PgSqlParameter Class

Represents a parameter to a PgSqlCommand, and optionally, its mapping to DataSet columns.

For a list of all members of this type, see PgSqlParameter members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameter
Devart.Common.DbParameterBase
Devart.Data.PostgreSql.PgSqlParameter

Syntax

[Visual Basic]
Public Class PgSqlParameter
   Inherits DbParameterBase
   Implements IDataParameter, IDbDataParameter, ICloneable
[C#]
public class PgSqlParameter : DbParameterBase, IDataParameter, IDbDataParameter, ICloneable

Remarks

Parameter names are not case-sensitive.

Refer to article Using Parameters in dotConnect for PostgreSQL to obtain detailed information on the matter together with some advanced examples.

Example

The following example creates multiple instances of PgSqlParameter through the PgSqlParameterCollection within the PgSqlDataAdapter. These parameters are used to select data from PostgreSQL and place the data in the DataSet. This example assumes that a DataSet and a PgSqlDataAdapter have already been created with the appropriate schema, commands, and connection.

[C#]

public void AddPgSqlParameters()
{
  // ...
  // create myDataSet and myDataAdapter
  // ...
  myDataAdapter.SelectCommand.Parameters.Add("DName", PgSqlType.VarChar, 15).Value = "DEVELOPMENT";
  myDataAdapter.SelectCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50;
  myDataAdapter.Fill(myDataSet);
}

[Visual Basic]

Public Sub AddPgSqlParameters()
  ' ...
  ' create myDataSet and myDataAdapter
  ' ...
  myDataAdapter.SelectCommand.Parameters.Add("DName", PgSqlType.VarChar, 15).Value = "DEVELOPMENT"
  myDataAdapter.SelectCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50
  myDataAdapter.Fill(myDataSet)
End Sub

See Also

PgSqlParameter Members | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class


%%PageItemTitle%% $$Members$$

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Class Members

Devart.Data.PostgreSql Namespace : PgSqlParameter Class

PgSqlParameter overview

Public Constructors

Public Constructor PgSqlParameter Constructor Overloaded. Initializes a new instance of the PgSqlParameter class.

Public Properties

Public Property DbType | Overridden. Gets or sets the DbType of the parameter.
Public Property Direction | Overridden. Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.
Public Property IsNullable (Inherited from Devart.Common.DbParameterBase) | Gets or sets a value indicating whether the parameter accepts null values.
Public Property ParameterName (Inherited from Devart.Common.DbParameterBase) | Gets or sets the name of the Devart.Common.DbParameterBase.
Public Property PgSqlType | Gets or sets the PgSqlType of the parameter.
Public Property PgSqlValue | Gets or sets provider-specific value of the parameter.
Public Property Precision | Gets or sets the maximum number of digits used to represent the Value property.
Public Property RowType | Sets type of parameter in case of PostgreSQL composite value passed as string.
Public Property RowTypeName | Sets name of parameter type in case of PostgreSQL composite value passed as string.
Public Property Scale | Gets or sets the number of decimal places to which Value is resolved.
Public Property Size (Inherited from Devart.Common.DbParameterBase) | Gets or sets the maximum size, in bytes, of the data within the column.
Public Property SourceColumn (Inherited from Devart.Common.DbParameterBase) | Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Devart.Common.DbParameterBase.Value. For internal use.
Public Property SourceColumnNullMapping (Inherited from Devart.Common.DbParameterBase) | Sets or gets a value which indicates whether the source column is nullable.
Public Property SourceVersion (Inherited from Devart.Common.DbParameterBase) | Gets or sets the DataRowVersion to use when loading Devart.Common.DbParameterBase.Value.
Public Property Value (Inherited from Devart.Common.DbParameterBase) | Gets or sets the value of the parameter.

Public Methods

Public Method Clone | Creates a new object that is a copy of the current PgSqlParameter instance.
Public Method CopyTo (Inherited from Devart.Common.DbParameterBase) | Copies all properties of a Devart.Common.DbParameterBase object to another Devart.Common.DbParameterBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ResetDbType | Overridden. Clears explicit PgSqlType assignment.
Public Method ToString | Overridden. Gets a string containing the ParameterName.

See Also

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : PgSqlParameter Constructor (PgSqlParameter)

Initializes a new instance of the PgSqlParameter class.

Overload List

Initializes a new instance of the PgSqlParameter class.

[Visual Basic] Public Sub New()

[C#] public PgSqlParameter();

Initializes a new instance of the PgSqlParameter class with the parameter name and data type.

[Visual Basic] Public Sub New(String,PgSqlType)

[C#] public PgSqlParameter(string,PgSqlType);

Initializes a new instance of the PgSqlParameter class with the parameter name and a PgSqlParameter object.

[Visual Basic] Public Sub New(String,Object)

[C#] public PgSqlParameter(string,object);

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, and width.

[Visual Basic] Public Sub New(String,PgSqlType,Integer)

[C#] public PgSqlParameter(string,PgSqlType,int);

Initializes a new instance of the PgSqlParameter class with the parameter name and a PgSqlRowType object.

[Visual Basic] Public Sub New(String,PgSqlRowType)

[C#] public PgSqlParameter(string,PgSqlRowType);

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, and source column name. For internal use.

[Visual Basic] Public Sub New(String,PgSqlType,Integer,String)

[C#] public PgSqlParameter(string,PgSqlType,int,string);

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.

[Visual Basic] Public Sub New(String,PgSqlType,Integer,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Object)

[C#] public PgSqlParameter(string,PgSqlType,int,ParameterDirection,bool,byte,byte,string,DataRowVersion,object);

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.

[Visual Basic] Public Sub New(String,PgSqlType,Integer,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Boolean,Object)

[C#] public PgSqlParameter(string,PgSqlType,int,ParameterDirection,bool,byte,byte,string,DataRowVersion,bool,object);

Initializes a new instance of the PgSqlParameter class with the parameter name and other initial values.

[Visual Basic] Public Sub New(String,String,ParameterDirection,Boolean,String,DataRowVersion,Object)

[C#] public PgSqlParameter(string,string,ParameterDirection,bool,string,DataRowVersion,object);

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor()

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor()

Initializes a new instance of the PgSqlParameter class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlParameter();

Remarks

The base constructor initializes all fields to their default values.

Example

The following example creates a new PgSqlParameter and sets some of its properties.

[C#]

public void CreatePgSqlParameter()
{
  PgSqlParameter myParameter = new PgSqlParameter();
  myParameter.ParameterName = "DName";
  myParameter.PgSqlType = PgSqlType.VarChar;
  myParameter.Direction = ParameterDirection.Input;
  myParameter.Size = 15;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
  Dim myParameter As New PgSqlParameter()
  myParameter.ParameterName = "DName"
  myParameter.PgSqlType = PgSqlType.VarChar
  myParameter.Direction = ParameterDirection.Input
  myParameter.Size = 15
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
value
An Object that is the value of the PgSqlParameter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,Object)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,Object)

Initializes a new instance of the PgSqlParameter class with the parameter name and a PgSqlParameter object.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal value As Object _
)
[C#]
public PgSqlParameter(
   string parameterName,
   object value
);

Parameters

parameterName
The name of the parameter.
value
An Object that is the value of the PgSqlParameter.

Example

The following example creates a new PgSqlParameter and sets some of its properties.

[C#]

public void CreatePgSqlParameter()
{
    PgSqlParameter myParameter = new PgSqlParameter("DName", "e.g.: some string value");
    myParameter.Direction = ParameterDirection.Input;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
    Dim myParameter As New PgSqlParameter("DName", "e.g.: some string value")
    myParameter.Direction = ParameterDirection.Input
End Sub 'CreatePgSqlParameter

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
Name of the parameter.
rowType
A PgSqlRowType object that describes Devart.Common.DbParameterBase.Value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlRowType)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlRowType)

Initializes a new instance of the PgSqlParameter class with the parameter name and a PgSqlRowType object.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal rowType As PgSqlRowType _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlRowType rowType
);

Parameters

parameterName
Name of the parameter.
rowType
A PgSqlRowType object that describes Devart.Common.DbParameterBase.Value.

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlType)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlType)

Initializes a new instance of the PgSqlParameter class with the parameter name and data type.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlType dbType
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.

Example

The following example creates a new PgSqlParameter and sets some of its properties.

[C#]

public void CreatePgSqlParameter()
{
  PgSqlParameter myParameter = new PgSqlParameter("DName", PgSqlType.VarChar);
  myParameter.Direction = ParameterDirection.Input;
  myParameter.Size = 15;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
    Dim myParameter As New PgSqlParameter("DName", PgSqlType.VarChar)
    myParameter.Direction = ParameterDirection.Input
    myParameter.Size = 15
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlType,Int32)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlType,Int32)

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, and width.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlType dbType,
   int size
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.

Example

The following example creates a new PgSqlParameter and sets some of its properties.

[C#]

public void CreatePgSqlParameter()
{
  PgSqlParameter myParameter = new PgSqlParameter("DName", PgSqlType.VarChar, 15);
  myParameter.Direction = ParameterDirection.Input;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
    Dim myParameter As New PgSqlParameter("DName", PgSqlType.VarChar, 15)
    myParameter.Direction = ParameterDirection.Input
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to the left and right of the decimal point to which Devart.Common.DbParameterBase.Value is resolved.
scale
The total number of decimal places to which Devart.Common.DbParameterBase.Value is resolved.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
sourceColumnNullMapping
Specifies whether the source column is nullable.
value
An Object that is the value of the PgSqlParameter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlType,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Boolean,Object)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlType,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Boolean,Object)

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal direction As ParameterDirection, _
   ByVal isNullable As Boolean, _
   ByVal precision As Byte, _
   ByVal scale As Byte, _
   ByVal sourceColumn As String, _
   ByVal sourceVersion As DataRowVersion, _
   ByVal sourceColumnNullMapping As Boolean, _
   ByVal value As Object _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlType dbType,
   int size,
   ParameterDirection direction,
   bool isNullable,
   byte precision,
   byte scale,
   string sourceColumn,
   DataRowVersion sourceVersion,
   bool sourceColumnNullMapping,
   object value
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to the left and right of the decimal point to which Devart.Common.DbParameterBase.Value is resolved.
scale
The total number of decimal places to which Devart.Common.DbParameterBase.Value is resolved.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
sourceColumnNullMapping
Specifies whether the source column is nullable.
value
An Object that is the value of the PgSqlParameter.

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to the left and right of the decimal point to which Devart.Common.DbParameterBase.Value is resolved.
scale
The total number of decimal places to which Devart.Common.DbParameterBase.Value is resolved.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
value
An Object that is the value of the PgSqlParameter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlType,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Object)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlType,Int32,ParameterDirection,Boolean,Byte,Byte,String,DataRowVersion,Object)

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, source column name, parameter direction, numeric precision, and other properties.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal direction As ParameterDirection, _
   ByVal isNullable As Boolean, _
   ByVal precision As Byte, _
   ByVal scale As Byte, _
   ByVal sourceColumn As String, _
   ByVal sourceVersion As DataRowVersion, _
   ByVal value As Object _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlType dbType,
   int size,
   ParameterDirection direction,
   bool isNullable,
   byte precision,
   byte scale,
   string sourceColumn,
   DataRowVersion sourceVersion,
   object value
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
precision
The total number of digits to the left and right of the decimal point to which Devart.Common.DbParameterBase.Value is resolved.
scale
The total number of decimal places to which Devart.Common.DbParameterBase.Value is resolved.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
value
An Object that is the value of the PgSqlParameter.

Example

The following example creates a new PgSqlParameter and displays the Devart.Common.DbParameterBase.ParameterName.

[C#]

public void CreatePgSqlParameter()
{
    PgSqlParameter myParameter = new PgSqlParameter("DName", PgSqlType.VarChar, 15, ParameterDirection.Output, true, 0, 0, "DName", DataRowVersion.Current, "DEVELOPMENT");
  MessageBox.Show(myParameter.ToString());
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
  Dim myParameter As New PgSqlParameter("DName", PgSqlType.VarChar, 15, ParameterDirection.Output, True, 0, 0, "DName", DataRowVersion.Current, "DEVELOPMENT")
  MessageBox.Show(myParameter.ToString())
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
sourceColumn
The name of the source column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,PgSqlType,Int32,String)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,PgSqlType,Int32,String)

Initializes a new instance of the PgSqlParameter class with the parameter name, data type, width, and source column name. For internal use.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal sourceColumn As String _
)
[C#]
public PgSqlParameter(
   string parameterName,
   PgSqlType dbType,
   int size,
   string sourceColumn
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data within the column.
sourceColumn
The name of the source column.

Example

The following example creates a new PgSqlParameter and sets some of its properties.

[C#]

public void CreatePgSqlParameter()
{
  PgSqlParameter myParameter = new PgSqlParameter("DName", PgSqlType.VarChar, 15, "DName");
  myParameter.Direction = ParameterDirection.Input;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
    Dim myParameter As New PgSqlParameter("DName", PgSqlType.VarChar, 15, "DName")
    myParameter.Direction = ParameterDirection.Input
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
Name of the parameter.
rowTypeName
Name of composite type of Devart.Common.DbParameterBase.Value.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
value
An Object that is the value of the PgSqlParameter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Constructor(String,String,ParameterDirection,Boolean,String,DataRowVersion,Object)

Devart.Data.PostgreSql Namespace > PgSqlParameter Class > PgSqlParameter Constructor : PgSqlParameter Constructor(String,String,ParameterDirection,Boolean,String,DataRowVersion,Object)

Initializes a new instance of the PgSqlParameter class with the parameter name and other initial values.

[Visual Basic]
Public Function New( _
   ByVal parameterName As String, _
   ByVal rowTypeName As String, _
   ByVal direction As ParameterDirection, _
   ByVal isNullable As Boolean, _
   ByVal sourceColumn As String, _
   ByVal sourceVersion As DataRowVersion, _
   ByVal value As Object _
)
[C#]
public PgSqlParameter(
   string parameterName,
   string rowTypeName,
   ParameterDirection direction,
   bool isNullable,
   string sourceColumn,
   DataRowVersion sourceVersion,
   object value
);

Parameters

parameterName
Name of the parameter.
rowTypeName
Name of composite type of Devart.Common.DbParameterBase.Value.
direction
One of the ParameterDirection values.
isNullable
true if the value of the field can be null; otherwise, false.
sourceColumn
The name of the source column.
sourceVersion
One of the DataRowVersion values.
value
An Object that is the value of the PgSqlParameter.

See Also

PgSqlParameter Class | PgSqlParameter Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Class Properties

Devart.Data.PostgreSql Namespace : PgSqlParameter Class

For a list of all members of this type, see PgSqlParameter members.

Public Properties

Public Property DbType | Overridden. Gets or sets the DbType of the parameter.
Public Property Direction | Overridden. Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.
Public Property IsNullable (Inherited from Devart.Common.DbParameterBase) | Gets or sets a value indicating whether the parameter accepts null values.
Public Property ParameterName (Inherited from Devart.Common.DbParameterBase) | Gets or sets the name of the Devart.Common.DbParameterBase.
Public Property PgSqlType | Gets or sets the PgSqlType of the parameter.
Public Property PgSqlValue | Gets or sets provider-specific value of the parameter.
Public Property Precision | Gets or sets the maximum number of digits used to represent the Value property.
Public Property RowType | Sets type of parameter in case of PostgreSQL composite value passed as string.
Public Property RowTypeName | Sets name of parameter type in case of PostgreSQL composite value passed as string.
Public Property Scale | Gets or sets the number of decimal places to which Value is resolved.
Public Property Size (Inherited from Devart.Common.DbParameterBase) | Gets or sets the maximum size, in bytes, of the data within the column.
Public Property SourceColumn (Inherited from Devart.Common.DbParameterBase) | Gets or sets the name of the source column mapped to the DataSet and used for loading or returning the Devart.Common.DbParameterBase.Value. For internal use.
Public Property SourceColumnNullMapping (Inherited from Devart.Common.DbParameterBase) | Sets or gets a value which indicates whether the source column is nullable.
Public Property SourceVersion (Inherited from Devart.Common.DbParameterBase) | Gets or sets the DataRowVersion to use when loading Devart.Common.DbParameterBase.Value.
Public Property Value (Inherited from Devart.Common.DbParameterBase) | Gets or sets the value of the parameter.

See Also

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members |

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DbType Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : DbType Property (PgSqlParameter)

Gets or sets the DbType of the parameter.

[Visual Basic]
Overrides Public Property DbType As DbType
[C#]
public override DbType DbType {get; set;}

Return Type

One of the DbType values. The default value is String.

Remarks

The PgSqlType and DbType are linked. Therefore, setting the changes the PgSqlType to a supporting PgSqlType.

For a list of the supported data types, see the appropriate PgSqlType member.

Example

The following example creates a PgSqlParameter and sets some of its properties, including the DbType property.

[C#]

public void CreatePgSqlParameter()
{
  PgSqlParameter myParameter = new PgSqlParameter();
  myParameter.ParameterName = "DName";
  myParameter.DbType = DbType.String;
  myParameter.Direction = ParameterDirection.Output;
  myParameter.Size = 15;
}

[Visual Basic]

Public Sub CreatePgSqlParameter()
  Dim myParameter As New PgSqlParameter()
  myParameter.ParameterName = "DName"
  myParameter.DbType = DbType.String
  myParameter.Direction = ParameterDirection.Output
  myParameter.Size = 15
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members |


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Direction Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : Direction Property (PgSqlParameter)

Gets or sets a value indicating whether the parameter is input-only, output-only, or bidirectional parameter.

[Visual Basic]
Overrides Public Property Direction As ParameterDirection
[C#]
public override ParameterDirection Direction {get; set;}

Return Type

One of the ParameterDirection values. The default value is Input.

Remarks

Set Direction to ReturnValue to obtain query result as parameter.

If the ParameterDirection is Output or InputOutput, an exception is thrown.

Please refer to article Using Parameters for more information about parameters in dotConnect for PostgreSQL.

Example

This sample demonstrates how to retrieve the return value of a stored procedure with PgSqlParameter

[C#]

using System;
using System.Data;
using Devart.Data.PostgreSql;

namespace ConsoleApplication4 {

  class Class1 {

    [STAThread]
    static void Main(string[] args) {

      PgSqlConnection connection = new PgSqlConnection("host=server;database=testdb;user=postgres;");
      PgSqlCommand command = connection.CreateCommand();
      PgSqlParameter pDeptNo, pDeptName, pDeptLoc;

      command.CommandText = "getdept";
      command.CommandType = CommandType.StoredProcedure;

      pDeptNo = command.Parameters.Add("deptno", PgSqlType.Int);
      pDeptName = command.Parameters.Add("deptname", PgSqlType.VarChar, 12);
      pDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13);

      pDeptNo.Direction = ParameterDirection.ReturnValue;
      pDeptName.Direction = ParameterDirection.ReturnValue;
      pDeptLoc.Direction = ParameterDirection.ReturnValue;

      command.ExecuteNonQuery();
      connection.Close();

      Console.Write("deptno = {0}, deptname = {1}, loc = {2}", pDeptNo.Value, pDeptName.Value, pDeptLoc.Value);
      Console.ReadLine();
    }
  }
}

[Visual Basic]

Imports Devart.Data.PostgreSql

Module Module1

  Sub Main()
    Dim connection As PgSqlConnection = New PgSqlConnection("host=server;database=testdb;user=postgres;")
    Dim command As PgSqlCommand
    Dim pDeptNo, pDeptName, pDeptLoc As PgSqlParameter

    connection.Open()
    command = connection.CreateCommand()
    command.CommandText = "getdept"
    command.CommandType = CommandType.StoredProcedure

    pDeptNo = command.Parameters.Add("deptno", PgSqlType.Int)
    pDeptName = command.Parameters.Add("deptname", PgSqlType.VarChar, 12)
    pDeptLoc = command.Parameters.Add("loc", PgSqlType.VarChar, 13)

    pDeptNo.Direction = ParameterDirection.ReturnValue
    pDeptName.Direction = ParameterDirection.ReturnValue
    pDeptLoc.Direction = ParameterDirection.ReturnValue

    command.ExecuteNonQuery()
    connection.Close()

    Console.Write("deptno = {0}, deptname = {1}, loc = {2}", pDeptNo.Value, pDeptName.Value, pDeptLoc.Value)
    Console.ReadLine()
  End Sub
End Module

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | DbType Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlType Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : PgSqlType Property (PgSqlParameter)

Gets or sets the PgSqlType of the parameter.

[Visual Basic]
Public Property PgSqlType As PgSqlType
[C#]
public PgSqlType PgSqlType {get; set;}

Return Type

A PgSqlType value that is the PgSqlType of the parameter.

Remarks

The PgSqlType and DbType are linked. Therefore, setting the DbType changes the PgSqlType to a supporting PgSqlType.

For a list of the supported data types, see the appropriate PgSqlType member. For more information, see "Using Parameters with a DataAdapter" in the Microsoft .NET Framework SDK documentation.

See Also

PgSqlParameter Class | PgSqlParameter Members | DbType Property


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | PgSqlDataReader Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlValue Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : PgSqlValue Property

Gets or sets provider-specific value of the parameter.

[Visual Basic]
Public Property PgSqlValue As Object
[C#]
public object PgSqlValue {get; set;}

Return Type

The provider-specific value of the parameter.

See Also

PgSqlParameter Class | PgSqlParameter Members | PgSqlDataReader Class


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Precision Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : Precision Property (PgSqlParameter)

Gets or sets the maximum number of digits used to represent the Value property.

[Visual Basic]
Public Property Precision As Byte
[C#]
public byte Precision {get; set;}

Return Type

The maximum number of digits used to represent the Value property. The default value is 0.

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | RowTypeName Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowType Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : RowType Property (PgSqlParameter)

Sets type of parameter in case of PostgreSQL composite value passed as string.

[Visual Basic]
Public Property RowType As PgSqlRowType
[C#]
public PgSqlRowType RowType {get; set;}

Return Type

Composite type of Devart.Common.DbParameterBase.Value.

Remarks

The RowType and RowTypeName properties are linked. Therefore, setting the RowType changes the RowTypeName to value of PgSqlRowType.Name property. When you set RowTypeName property, RowType becomes a null reference (Nothing in Visual Basic).

The RowType property can be used when you provide data as string and want to have it parsed as certain composite type. The other way to pass a PgSqlRow as parameter value is to assign a PgSqlRow object directly to Devart.Common.DbParameterBase.Value property.

Example

The following example demonstrates how to construct a PgSqlRow object and use it as parameter value.

CREATE TYPE tperson AS (name text, age integer)

CREATE TABLE personnel (id integer, person tperson)

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and fill with data
  PgSqlRow pgRow = new PgSqlRow("tperson",conn);
  pgRow[0] = "Fred";
  pgRow[1] = 24;
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",3);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  Dim pgRow As PgSqlRow = New PgSqlRow("tperson", conn)
  pgRow(0) = "Fred"
  pgRow(1) = 24
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

See Also

PgSqlParameter Class | PgSqlParameter Members | RowTypeName Property


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members | RowType Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowTypeName Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : RowTypeName Property

Sets name of parameter type in case of PostgreSQL composite value passed as string.

[Visual Basic]
Public Property RowTypeName As String
[C#]
public string RowTypeName {get; set;}

Return Type

Name of composite type of Devart.Common.DbParameterBase.Value.

Remarks

The RowType and RowTypeName properties are linked. Therefore, setting the RowType changes the RowTypeName to value of PgSqlRowType.Name property. When you set RowTypeName property, RowType becomes a null reference (Nothing in Visual Basic).

The RowType property can be used when you provide data as string and want to have it parsed as certain composite type. The other way to pass a PgSqlRow as parameter value is to assign a PgSqlRow object directly to Devart.Common.DbParameterBase.Value property.

See Also

PgSqlParameter Class | PgSqlParameter Members | RowType Property


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Scale Property

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : Scale Property (PgSqlParameter)

Gets or sets the number of decimal places to which Value is resolved.

[Visual Basic]
Public Property Scale As Byte
[C#]
public byte Scale {get; set;}

Return Type

The number of decimal places to which Value is resolved. The default value is 0.

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%% $$Methods$$

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameter Class Methods

Devart.Data.PostgreSql Namespace : PgSqlParameter Class

For a list of all members of this type, see PgSqlParameter members.

Public Methods

Public Method Clone | Creates a new object that is a copy of the current PgSqlParameter instance.
Public Method CopyTo (Inherited from Devart.Common.DbParameterBase) | Copies all properties of a Devart.Common.DbParameterBase object to another Devart.Common.DbParameterBase object.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ResetDbType | Overridden. Clears explicit PgSqlType assignment.
Public Method ToString | Overridden. Gets a string containing the ParameterName.

See Also

PgSqlParameter Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class | PgSqlDataAdapter Class


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clone Method

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : Clone Method (PgSqlParameter)

Creates a new object that is a copy of the current PgSqlParameter instance.

[Visual Basic]
Public Function Clone() As Object
[C#]
public object Clone();

Return Type

A new PgSqlParameter object in which all property values are the same as the original.

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ResetDbType Method

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : ResetDbType Method

Clears explicit PgSqlType assignment.

[Visual Basic]
Overrides Public Sub ResetDbType()
[C#]
public override void ResetDbType();

Remarks

After calling this method parameter's type is defined by Devart.Common.DbParameterBase.Value property.

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameter Class | PgSqlParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlParameter Class : ToString Method (PgSqlParameter)

Gets a string containing the ParameterName.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

A string containing the ParameterName.

See Also

PgSqlParameter Class | PgSqlParameter Members


%%PageItemTitle%%

PgSqlParameterCollection Members | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameterCollection Class

Devart.Data.PostgreSql Namespace : PgSqlParameterCollection Class

Collects all parameters relevant to a PgSqlCommand as well as their respective mappings to DataSet columns.

For a list of all members of this type, see PgSqlParameterCollection members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
Devart.Common.DbParameterBaseCollection
Devart.Data.PostgreSql.PgSqlParameterCollection

Syntax

[Visual Basic]
Public Class PgSqlParameterCollection
   Inherits DbParameterBaseCollection
   Implements ICollection, IEnumerable, IList, IDataParameterCollection
[C#]
public class PgSqlParameterCollection : DbParameterBaseCollection, ICollection, IEnumerable, IList, IDataParameterCollection

Remarks

The number of parameters in the collection must be equal to the number of parameter placeholders within the command text, or PostgreSQL raises an error.

Example

The following example adds instance of PgSqlParameter to collection.

[C#]

public void AddPgSqlParameters()
{
  // Create pgConnection and pgCommand.

  pgCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo";
  pgCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50;
  pgCommand.ExecuteNonQuery();
}

[Visual Basic]

Public Sub AddPgSqlParameters()
  // Create pgConnection and pgCommand.

  pgCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo"
  pgCommand.Parameters.Add("DeptNo", PgSqlType.Int).Value = 50
  pgCommand.ExecuteNonQuery()

End Sub 'AddPgSqlParameters

See Also

PgSqlParameterCollection Members | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameterCollection Class Members

Devart.Data.PostgreSql Namespace : PgSqlParameterCollection Class

PgSqlParameterCollection overview

Public Properties

Public Property Count (Inherited from Devart.Common.DbParameterBaseCollection) | Gets the number of Devart.Common.DbParameterBase objects in the collection.
Public Property IsFixedSize (Inherited from Devart.Common.DbParameterBaseCollection) | Indicating whether the collection has a fixed size.
Public Property IsReadOnly (Inherited from Devart.Common.DbParameterBaseCollection) | Indicates whether the collection is read-only.
Public Property IsSynchronized (Inherited from Devart.Common.DbParameterBaseCollection) | Indicates whether access to the collection is synchronized (thread-safe).
Public Property Item | Overloaded. Gets or sets the PgSqlParameter at the specified index.
Public Property SyncRoot (Inherited from Devart.Common.DbParameterBaseCollection) | Gets an object that can be used to synchronize access to the Devart.Common.DbParameterBaseCollection.

Public Methods

Public Method Add | Overloaded. Adds the specified PgSqlParameter to the PgSqlParameterCollection.
Public Method AddRange | Overridden. Adds the specified array of DbParameter objects to the DbParameterCollection.
Public Method AddWithValue | Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and value.
Public Method Clear | Overridden. Removes all items from the collection.
Public Method Contains (Inherited from Devart.Common.DbParameterBaseCollection) | Overloaded. Gets a value indicating whether a Devart.Common.DbParameterBase object exists in the collection.
Public Method CopyTo (Inherited from Devart.Common.DbParameterBaseCollection) | Copies a Devart.Common.DbParameterBase objects from the Devart.Common.DbParameterBaseCollection to the specified array.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetEnumerator (Inherited from Devart.Common.DbParameterBaseCollection) | Returns an enumerator for the Devart.Common.DbParameterBaseCollection.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method IndexOf (Inherited from Devart.Common.DbParameterBaseCollection) | Overloaded. Gets the location in the collection of the Devart.Common.DbParameterBase objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert | Overridden. Inserts a PgSqlParameter into the collection at the specified index.
Public Method Remove | Overridden. Removes the specified PgSqlParameter from the collection.
Public Method RemoveAt | Overloaded. Overridden. Removes the specified PgSqlParameter from the collection.

See Also

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class


%%PageItemTitle%% $$Properties$$

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameterCollection Class Properties

Devart.Data.PostgreSql Namespace : PgSqlParameterCollection Class

For a list of all members of this type, see PgSqlParameterCollection members.

Public Properties

Public Property Count (Inherited from Devart.Common.DbParameterBaseCollection) | Gets the number of Devart.Common.DbParameterBase objects in the collection.
Public Property IsFixedSize (Inherited from Devart.Common.DbParameterBaseCollection) | Indicating whether the collection has a fixed size.
Public Property IsReadOnly (Inherited from Devart.Common.DbParameterBaseCollection) | Indicates whether the collection is read-only.
Public Property IsSynchronized (Inherited from Devart.Common.DbParameterBaseCollection) | Indicates whether access to the collection is synchronized (thread-safe).
Public Property Item | Overloaded. Gets or sets the PgSqlParameter at the specified index.
Public Property SyncRoot (Inherited from Devart.Common.DbParameterBaseCollection) | Gets an object that can be used to synchronize access to the Devart.Common.DbParameterBaseCollection.

See Also

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : Item Property (PgSqlParameterCollection)

Gets or sets the PgSqlParameter at the specified index.

Overload List

Gets or sets the PgSqlParameter at the specified index.

[Visual Basic] Overloads Public Item(Integer) As PgSqlParameter

[C#] public PgSqlParameter Item(int);

Gets or sets the PgSqlParameter with the specified name.

[Visual Basic] Overloads Public Item(String) As PgSqlParameter

[C#] public PgSqlParameter Item(string);

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

index
The zero-based index of the parameter to retrieve.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(Int32) Property

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Item Property : Item(Int32) Property

Gets or sets the PgSqlParameter at the specified index.

[Visual Basic]
Overloads Public Property Item( _
   ByVal index As Integer _
) As PgSqlParameter
[C#]
public PgSqlParameter Item(
   int index
); {get; set;}

Parameters

index
The zero-based index of the parameter to retrieve.

Return Type

The PgSqlParameter at the specified index.

Example

The following example creates a PgSqlParameterCollection, adds instances of PgSqlParameter to the collection, displays the names of its PgSqlParameter objects, and then clears the collection.

[C#]

public void CreatePgSqlParamColl(PgSqlCommand pgCommand) {
  PgSqlParameterCollection myParamCollection = pgCommand.Parameters;
  myParamCollection.Add("DeptNo", PgSqlType.Integer);
  myParamCollection.Add("DName", PgSqlType.VarChar);
  myParamCollection.Add("Loc", PgSqlType.VarChar);
  string myParamNames = "";
  for (int i=0; i < myParamCollection.Count; i++)
    myParamNames += myParamCollection[i].ToString() + "\n";
  MessageBox.Show(myParamNames);
  myParamCollection.Clear();
}

[Visual Basic]

Public Sub CreatePgSqlParamColl(pgCommand As PgSqlCommand)
  Dim myParamCollection As PgSqlParameterCollection = pgCommand.Parameters
  myParamCollection.Add("DeptNo", PgSqlType.Integer)
  myParamCollection.Add("DName", PgSqlType.VarChar)
  myParamCollection.Add("Loc", PgSqlType.VarChar)
  Dim myParamNames As String = ""
  Dim i As Integer
  For i = 0 To myParamCollection.Count - 1
    myParamNames += myParamCollection(i).ToString() + ControlChars.Cr
  Next i
  MessageBox.Show(myParamNames)
  myParamCollection.Clear()
End Sub

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter to retrieve.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(String) Property

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Item Property : Item(String) Property

Gets or sets the PgSqlParameter with the specified name.

[Visual Basic]
Overloads Public Property Item( _
   ByVal parameterName As String _
) As PgSqlParameter
[C#]
public PgSqlParameter Item(
   string parameterName
); {get; set;}

Parameters

parameterName
The name of the parameter to retrieve.

Return Type

The PgSqlParameter with the specified name.

Example

The following example searches for a PgSqlParameter with a given Devart.Common.DbParameterBase.ParameterName within a PgSqlParameterCollection. If the parameter exists, the example displays the name and index of the parameter. If the parameter does not exist, the example displays an error. This example assumes that a PgSqlParameterCollection has already been created.

[C#]

public void SearchPgSqlParams() {
  // ...
  // create PgSqlParameterCollection myParameters
  // ...
  if (!myParameters.Contains("DName"))
    MessageBox.Show("ERROR: no such parameter in the collection");
  else
    MessageBox.Show("Name: " + myParameters["DName"].ToString() +
      "Index: " + myParameters.IndexOf("DName").ToString());
}

[Visual Basic]

Public Sub SearchPgSqlParams()
  ' ...
  ' create PgSqlParameterCollection myParameters
  ' ...
  If Not myParameters.Contains("DName") Then
    MessageBox.Show("ERROR: no such parameter in the collection")
  Else
    MessageBox.Show("Name: " & myParameters("DName").ToString() & _
      "Index: " & myParameters.IndexOf("DName").ToString())
  End If
End Sub

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%% $$Methods$$

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlParameterCollection Class Methods

Devart.Data.PostgreSql Namespace : PgSqlParameterCollection Class

For a list of all members of this type, see PgSqlParameterCollection members.

Public Methods

Public Method Add | Overloaded. Adds the specified PgSqlParameter to the PgSqlParameterCollection.
Public Method AddRange | Overridden. Adds the specified array of DbParameter objects to the DbParameterCollection.
Public Method AddWithValue | Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and value.
Public Method Clear | Overridden. Removes all items from the collection.
Public Method Contains (Inherited from Devart.Common.DbParameterBaseCollection) | Overloaded. Gets a value indicating whether a Devart.Common.DbParameterBase object exists in the collection.
Public Method CopyTo (Inherited from Devart.Common.DbParameterBaseCollection) | Copies a Devart.Common.DbParameterBase objects from the Devart.Common.DbParameterBaseCollection to the specified array.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetEnumerator (Inherited from Devart.Common.DbParameterBaseCollection) | Returns an enumerator for the Devart.Common.DbParameterBaseCollection.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method IndexOf (Inherited from Devart.Common.DbParameterBaseCollection) | Overloaded. Gets the location in the collection of the Devart.Common.DbParameterBase objects.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Insert | Overridden. Inserts a PgSqlParameter into the collection at the specified index.
Public Method Remove | Overridden. Removes the specified PgSqlParameter from the collection.
Public Method RemoveAt | Overloaded. Overridden. Removes the specified PgSqlParameter from the collection.

See Also

PgSqlParameterCollection Class | Devart.Data.PostgreSql Namespace | PgSqlParameter Class | PgSqlCommand Class


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : Add Method (PgSqlParameterCollection)

Adds the specified PgSqlParameter to the PgSqlParameterCollection.

Overload List

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and data type.

[Visual Basic] Overloads Public Function Add(String,PgSqlType) As PgSqlParameter

[C#] public PgSqlParameter Add(string,PgSqlType);

Adds a PgSqlParameter to the PgSqlParameterCollection given the the parameter name, data type, and data size.

[Visual Basic] Overloads Public Function Add(String,PgSqlType,Integer) As PgSqlParameter

[C#] public PgSqlParameter Add(string,PgSqlType,int);

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name, data type, column width, and source column name. For internal use.

[Visual Basic] Overloads Public Function Add(String,PgSqlType,Integer,String) As PgSqlParameter

[C#] public PgSqlParameter Add(string,PgSqlType,int,string);

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and value.

[Visual Basic] Overloads Public Function Add(String,Object) As PgSqlParameter

[C#] public PgSqlParameter Add(string,object);

Adds the specified PgSqlParameter to the PgSqlParameterCollection.

[Visual Basic] Overloads Public Function Add(PgSqlParameter) As PgSqlParameter

[C#] public PgSqlParameter Add(PgSqlParameter);

Adds the specified DbParameter to the DbParameterCollection.

[Visual Basic] Overloads Overrides Public Function Add(Object) As Integer

[C#] public override int Add(object);

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
type
One of the PgSqlType values.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,PgSqlType) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(String,PgSqlType) Method

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and data type.

[Visual Basic]
Overloads Public Function Add( _
   ByVal parameterName As String, _
   ByVal type As PgSqlType _
) As PgSqlParameter
[C#]
public PgSqlParameter Add(
   string parameterName,
   PgSqlType type
);

Parameters

parameterName
The name of the parameter.
type
One of the PgSqlType values.

Return Type

The new PgSqlParameter object.

Example

The following example creates a PgSqlParameterCollection, adds instances of PgSqlParameter to the collection, and returns a reference to the new PgSqlParameter.

[C#]

public void CreatePgSqlParamColl(PgSqlConnection myConn) {
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn);
  PgSqlParameterCollection myParamCollection = pgCommand.Parameters;
  object myParm = new PgSqlParameter("DeptNo", PgSqlType.Int);
  int pIndex = myParamCollection.Add(myParm);
}

[Visual Basic]

Public Sub CreatePgSqlParamColl(myConn As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn)
  Dim myParamCollection As PgSqlParameterCollection = pgCommand.Parameters
  Dim myParm As Object = New PgSqlParameter("DeptNo", PgSqlType.Int)
  Dim pIndex As Integer = myParamCollection.Add(myParm)
End Sub

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data the parameter can contain.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,PgSqlType,Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(String,PgSqlType,Int32) Method

Adds a PgSqlParameter to the PgSqlParameterCollection given the the parameter name, data type, and data size.

[Visual Basic]
Overloads Public Function Add( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer _
) As PgSqlParameter
[C#]
public PgSqlParameter Add(
   string parameterName,
   PgSqlType dbType,
   int size
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data the parameter can contain.

Return Type

The new PgSqlParameter object.

Example

The following example creates a PgSqlParameterCollection, adds instances of PgSqlParameter to the collection, and returns a reference to the new PgSqlParameter.

[C#]

public void CreatePgSqlParamColl(PgSqlConnection myConn) {
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn);
  PgSqlParameterCollection myParamCollection = pgCommand.Parameters;
  PgSqlParameter myNewParameter = myParamCollection.Add("DeptNo", PgSqlType.Int, 40);
}

[Visual Basic]

Public Sub CreatePgSqlParamColl(myConn As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn)
  Dim myParamCollection As PgSqlParameterCollection = pgCommand.Parameters
  Dim myNewParameter As PgSqlParameter = myParamCollection.Add("DeptNo", PgSqlType.Int, 40)
End Sub

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data the parameter can contain.
sourceColumn
The name of the source column.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,PgSqlType,Int32,String) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(String,PgSqlType,Int32,String) Method

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name, data type, column width, and source column name. For internal use.

[Visual Basic]
Overloads Public Function Add( _
   ByVal parameterName As String, _
   ByVal dbType As PgSqlType, _
   ByVal size As Integer, _
   ByVal sourceColumn As String _
) As PgSqlParameter
[C#]
public PgSqlParameter Add(
   string parameterName,
   PgSqlType dbType,
   int size,
   string sourceColumn
);

Parameters

parameterName
The name of the parameter.
dbType
One of the PgSqlType values.
size
The maximum size, in bytes, of the data the parameter can contain.
sourceColumn
The name of the source column.

Return Type

The new PgSqlParameter object.

Example

The following example creates a PgSqlParameterCollection, adds instances of PgSqlParameter to the collection, and returns a reference to the new PgSqlParameter.

[C#]

public void CreatePgSqlParamColl(PgSqlConnection myConn) {
  PgSqlCommand pgCommand = new PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn);
  PgSqlParameterCollection myParamCollection = pgCommand.Parameters;
  PgSqlParameter myNewParameter = myParamCollection.Add("DeptNo", PgSqlType.Int, 40, "DeptNo");
}

[Visual Basic]

Public Sub CreatePgSqlParamColl(myConn As PgSqlConnection)
  Dim pgCommand As PgSqlCommand = New PgSqlCommand("SELECT * FROM Test.Dept WHERE DeptNo = :DeptNo", myConn)
  Dim myParamCollection As PgSqlParameterCollection = pgCommand.Parameters
  Dim myNewParameter As PgSqlParameter = myParamCollection.Add("DeptNo", PgSqlType.Int, 40, "DeptNo")
End Sub

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter.
value
The Devart.Common.DbParameterBase.Value of the PgSqlParameter to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(String,Object) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(String,Object) Method

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and value.

[Visual Basic]
Overloads Public Function Add( _
   ByVal parameterName As String, _
   ByVal value As Object _
) As PgSqlParameter
[C#]
public PgSqlParameter Add(
   string parameterName,
   object value
);

Parameters

parameterName
The name of the parameter.
value
The Devart.Common.DbParameterBase.Value of the PgSqlParameter to add to the collection.

Return Type

The new PgSqlParameter object.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The PgSqlParameter to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlParameter) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(PgSqlParameter) Method

Adds the specified PgSqlParameter to the PgSqlParameterCollection.

[Visual Basic]
Overloads Public Function Add( _
   ByVal value As PgSqlParameter _
) As PgSqlParameter
[C#]
public PgSqlParameter Add(
   PgSqlParameter value
);

Parameters

value
The PgSqlParameter to add to the collection.

Return Type

The new PgSqlParameter object.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

value
The DbParameter to add to the DbParameterCollection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > Add Method : Add(Object) Method

Adds the specified DbParameter to the DbParameterCollection.

[Visual Basic]
Overloads Overrides Public Function Add( _
   ByVal value As Object _
) As Integer
[C#]
public override int Add(
   object value
);

Parameters

value
The DbParameter to add to the DbParameterCollection.

Return Type

Index of the new DbParameter object.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

values
Array of DbParameter objects to be added to the DbParameterCollection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddRange Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : AddRange Method (PgSqlParameterCollection)

Adds the specified array of DbParameter objects to the DbParameterCollection.

[Visual Basic]
Overrides Public Sub AddRange( _
   ByVal values As Array _
)
[C#]
public override void AddRange(
   Array values
);

Parameters

values
Array of DbParameter objects to be added to the DbParameterCollection.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

parameterName
Name of the parameter.
value
Value of the parameter.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddWithValue Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : AddWithValue Method

Adds a PgSqlParameter to the PgSqlParameterCollection given the parameter name and value.

[Visual Basic]
Public Function AddWithValue( _
   ByVal parameterName As String, _
   ByVal value As Object _
) As PgSqlParameter
[C#]
public PgSqlParameter AddWithValue(
   string parameterName,
   object value
);

Parameters

parameterName
Name of the parameter.
value
Value of the parameter.

Return Type

A new PgSqlParameter object.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : Clear Method (PgSqlParameterCollection)

Removes all items from the collection.

[Visual Basic]
Overrides Public Sub Clear()
[C#]
public override void Clear();

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

index
The zero-based index where the parameter is to be inserted within the collection.
value
The PgSqlParameter object to add to the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Insert Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : Insert Method (PgSqlParameterCollection)

Inserts a PgSqlParameter into the collection at the specified index.

[Visual Basic]
Overrides Public Sub Insert( _
   ByVal index As Integer, _
   ByVal value As Object _
)
[C#]
public override void Insert(
   int index,
   object value
);

Parameters

index
The zero-based index where the parameter is to be inserted within the collection.
value
The PgSqlParameter object to add to the collection.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

value
The PgSqlParameter object to remove from the collection.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Remove Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : Remove Method (PgSqlParameterCollection)

Removes the specified PgSqlParameter from the collection.

[Visual Basic]
Overrides Public Sub Remove( _
   ByVal value As Object _
)
[C#]
public override void Remove(
   object value
);

Parameters

value
The PgSqlParameter object to remove from the collection.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RemoveAt Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class : RemoveAt Method (PgSqlParameterCollection)

Removes the specified PgSqlParameter from the collection.

Overload List

Removes the PgSqlParameter at the specified index from the collection.

[Visual Basic] Overloads Overrides Public Sub RemoveAt(Integer)

[C#] public override void RemoveAt(int);

Removes the PgSqlParameter with the specified name from the collection.

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

[C#] public override void RemoveAt(string);

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

index
The zero-based index of the parameter to remove.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RemoveAt(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > RemoveAt Method : RemoveAt(Int32) Method

Removes the PgSqlParameter at the specified index from the collection.

[Visual Basic]
Overloads Overrides Public Sub RemoveAt( _
   ByVal index As Integer _
)
[C#]
public override void RemoveAt(
   int index
);

Parameters

index
The zero-based index of the parameter to remove.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter to remove.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RemoveAt(String) Method

Devart.Data.PostgreSql Namespace > PgSqlParameterCollection Class > RemoveAt Method : RemoveAt(String) Method

Removes the PgSqlParameter with the specified name from the collection.

[Visual Basic]
Overloads Overrides Public Sub RemoveAt( _
   ByVal parameterName As String _
)
[C#]
public override void RemoveAt(
   string parameterName
);

Parameters

parameterName
The name of the parameter to remove.

See Also

PgSqlParameterCollection Class | PgSqlParameterCollection Members | Overload List


%%PageItemTitle%%

PgSqlProviderFactory Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Class

Devart.Data.PostgreSql Namespace : PgSqlProviderFactory Class

Represents a factory required to create inheritors of generic base classes to use with dotConnect for PostgreSQL.

For a list of all members of this type, see PgSqlProviderFactory members.

Inheritance Hierarchy

System.Object
System.Data.Common.DbProviderFactory
Devart.Data.PostgreSql.PgSqlProviderFactory

Syntax

[Visual Basic]
Public Class PgSqlProviderFactory
   Inherits DbProviderFactory
   Implements IServiceProvider
[C#]
public class PgSqlProviderFactory : DbProviderFactory, IServiceProvider

Remarks

You can use PgSqlProviderFactory class to implement a code where user chooses which DBMS to use.

To obtain an instance of the class you can use the DbProviderFactories.GetFactory method with the invariant name Devart.Data.PostgreSql.

Example

This sample routine creates and returns DbConnection object.

[C#]

public DbConnection GetConnectionBaseClass2(DbProviderFactory factory)
{
// if our factory supports creating a DbConnection, return it.
if ((factory.SupportedClasses & DbProviderSupportedClasses.DbConnection) > 0)
  return factory.CreateConnection();
else
  return null;
}

[Visual Basic]

Public Function GetConnectionBaseClass2(ByVal factory As DbProviderFactory) As DbConnection
  'if our factory supports creating a DbConnection, return it.
  If ((factory.SupportedClasses And DbProviderSupportedClasses.DbConnection) > 0) Then
    Return factory.CreateConnection()
  Else
    Return Nothing
  End If
End Function

See Also

PgSqlProviderFactory Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Class Members

Devart.Data.PostgreSql Namespace : PgSqlProviderFactory Class

PgSqlProviderFactory overview

Public Constructors

Public Constructor PgSqlProviderFactory Constructor Creates an instance of PgSqlProviderFactory.

Public Fields

Public Field static (Shared in Visual Basic) Instance Returns the instance of PgSqlProviderFactory.

Public Properties

Public Property CanCreateDataSourceEnumerator Overridden. Gets a value indicating whether the PgSqlProviderFactory can create a DbDataSourceEnumerator object.

Public Methods

Public Method CreateCommand | Overridden. Creates and returns a PgSqlCommand object.
Public Method CreateCommandBuilder | Overridden. Creates and returns a PgSqlCommandBuilder object.
Public Method CreateConnection | Overridden. Creates and returns a PgSqlConnection object.
Public Method CreateConnectionStringBuilder | Overridden. Creates and returns a PgSqlConnectionStringBuilder object.
Public Method CreateDataAdapter | Overridden. Creates and returns a PgSqlDataAdapter object.
Public Method CreateDataSourceEnumerator | Overridden. Creates and returns a DbDataSourceEnumerator object.
Public Method CreateParameter | Overridden. Creates and returns a PgSqlParameter object.
Public Method CreatePermission (Inherited from System.Data.Common.DbProviderFactory) | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class.

See Also

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Constructor

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : PgSqlProviderFactory Constructor (PgSqlProviderFactory)

Creates an instance of PgSqlProviderFactory.

[Visual Basic]
Public Function New()
[C#]
public PgSqlProviderFactory();

Remarks

Only one instance of PgSqlProviderFactory can exist in the application.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%% $$Fields$$

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Class Fields

Devart.Data.PostgreSql Namespace : PgSqlProviderFactory Class

For a list of all members of this type, see PgSqlProviderFactory members.

Public Fields

Public Field static (Shared in Visual Basic) Instance Returns the instance of PgSqlProviderFactory.

See Also

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Instance Field

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : Instance Field (PgSqlProviderFactory)

Returns the instance of PgSqlProviderFactory.

[Visual Basic]
Public Shared Instance As PgSqlProviderFactory
[C#]
public static PgSqlProviderFactory Instance

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%% $$Properties$$

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Class Properties

Devart.Data.PostgreSql Namespace : PgSqlProviderFactory Class

For a list of all members of this type, see PgSqlProviderFactory members.

Public Properties

Public Property CanCreateDataSourceEnumerator Overridden. Gets a value indicating whether the PgSqlProviderFactory can create a DbDataSourceEnumerator object.

See Also

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CanCreateDataSourceEnumerator Property

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CanCreateDataSourceEnumerator Property

Gets a value indicating whether the PgSqlProviderFactory can create a DbDataSourceEnumerator object.

[Visual Basic]
Overrides Public ReadOnly Property CanCreateDataSourceEnumerator As Boolean
[C#]
public override bool CanCreateDataSourceEnumerator {get;}

Return Type

true, if a DbDataSourceEnumerator object can be created; otherwise, false.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%% $$Methods$$

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlProviderFactory Class Methods

Devart.Data.PostgreSql Namespace : PgSqlProviderFactory Class

For a list of all members of this type, see PgSqlProviderFactory members.

Public Methods

Public Method CreateCommand | Overridden. Creates and returns a PgSqlCommand object.
Public Method CreateCommandBuilder | Overridden. Creates and returns a PgSqlCommandBuilder object.
Public Method CreateConnection | Overridden. Creates and returns a PgSqlConnection object.
Public Method CreateConnectionStringBuilder | Overridden. Creates and returns a PgSqlConnectionStringBuilder object.
Public Method CreateDataAdapter | Overridden. Creates and returns a PgSqlDataAdapter object.
Public Method CreateDataSourceEnumerator | Overridden. Creates and returns a DbDataSourceEnumerator object.
Public Method CreateParameter | Overridden. Creates and returns a PgSqlParameter object.
Public Method CreatePermission (Inherited from System.Data.Common.DbProviderFactory) | Returns a new instance of the provider's class that implements the provider's version of the CodeAccessPermission class.

See Also

PgSqlProviderFactory Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateCommand Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateCommand Method (PgSqlProviderFactory)

Creates and returns a PgSqlCommand object.

[Visual Basic]
Overrides Public Function CreateCommand() As DbCommand
[C#]
public override DbCommand CreateCommand();

Return Type

A PgSqlCommand object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateCommandBuilder Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateCommandBuilder Method

Creates and returns a PgSqlCommandBuilder object.

[Visual Basic]
Overrides Public Function CreateCommandBuilder() As DbCommandBuilder
[C#]
public override DbCommandBuilder CreateCommandBuilder();

Return Type

A PgSqlCommandBuilder object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateConnection Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateConnection Method

Creates and returns a PgSqlConnection object.

[Visual Basic]
Overrides Public Function CreateConnection() As DbConnection
[C#]
public override DbConnection CreateConnection();

Return Type

A PgSqlConnection object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateConnectionStringBuilder Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateConnectionStringBuilder Method

Creates and returns a PgSqlConnectionStringBuilder object.

[Visual Basic]
Overrides Public Function CreateConnectionStringBuilder() As DbConnectionStringBuilder
[C#]
public override DbConnectionStringBuilder CreateConnectionStringBuilder();

Return Type

A PgSqlConnectionStringBuilder object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateDataAdapter Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateDataAdapter Method

Creates and returns a PgSqlDataAdapter object.

[Visual Basic]
Overrides Public Function CreateDataAdapter() As DbDataAdapter
[C#]
public override DbDataAdapter CreateDataAdapter();

Return Type

A PgSqlDataAdapter object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateDataSourceEnumerator Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateDataSourceEnumerator Method

Creates and returns a DbDataSourceEnumerator object.

[Visual Basic]
Overrides Public Function CreateDataSourceEnumerator() As DbDataSourceEnumerator
[C#]
public override DbDataSourceEnumerator CreateDataSourceEnumerator();

Return Type

A DbDataSourceEnumerator object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

PgSqlProviderFactory Class | PgSqlProviderFactory Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateParameter Method

Devart.Data.PostgreSql Namespace > PgSqlProviderFactory Class : CreateParameter Method (PgSqlProviderFactory)

Creates and returns a PgSqlParameter object.

[Visual Basic]
Overrides Public Function CreateParameter() As DbParameter
[C#]
public override DbParameter CreateParameter();

Return Type

A PgSqlParameter object.

See Also

PgSqlProviderFactory Class | PgSqlProviderFactory Members


%%PageItemTitle%%

Generic PgSqlRangeType Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

T
Range element type.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Generic PgSqlRangeType Class

Devart.Data.PostgreSql Namespace : Generic PgSqlRangeType Class

Generic base type for classes, representing PostgreSQL range types.

For a list of all members of this type, see Generic PgSqlRangeType members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType
Devart.Data.PostgreSql.PgSqlBigIntRange
Devart.Data.PostgreSql.PgSqlDateRange
Devart.Data.PostgreSql.PgSqlIntRange
Devart.Data.PostgreSql.PgSqlNumericRange
Devart.Data.PostgreSql.PgSqlTimeStampRange
Devart.Data.PostgreSql.PgSqlTimeStampTZRange

Syntax

[Visual Basic]
Public MustInherit Class PgSqlRangeType(Of T)
   Implements INullable, IXmlSerializable
[C#]
public abstract class PgSqlRangeType<T> : INullable, IXmlSerializable

Type Parameters

T
Range element type.

See Also

Generic PgSqlRangeType Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

Generic PgSqlRangeType Class Members

Devart.Data.PostgreSql Namespace : Generic PgSqlRangeType Class

Generic PgSqlRangeType overview

Public Properties

Public Property IsEmpty | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound | Gets or sets the lower bound of the range.
Public Property UpperBound | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Determines whether the specified value is contained by the range.
Public Method Equals | Overridden. Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode | Overridden. Returns a hash code for the Generic PgSqlRangeType type.
Public Method ToString | Overridden. Converts the current PgSqlPath structure to a String.

Operators

Public Operator Equality | Determines whether two Generic PgSqlRangeType objects are the same.
Public Operator Inequality | Determines whether two Generic PgSqlRangeType objects are different.

See Also

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

Generic PgSqlRangeType Class Properties

Devart.Data.PostgreSql Namespace : Generic PgSqlRangeType Class

For a list of all members of this type, see Generic PgSqlRangeType members.

Public Properties

Public Property IsEmpty | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound | Gets or sets the lower bound of the range.
Public Property UpperBound | Gets or sets the upper bound of the range.

See Also

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsEmpty Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsEmpty Property (Generic PgSqlRangeType)

Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.

[Visual Basic]
Public ReadOnly Property IsEmpty As Boolean
[C#]
public bool IsEmpty {get;}

Return Type

true, if the PgSqlCircle is an object, representing an empty range; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsLowerBoundInclusive Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsLowerBoundInclusive Property

Indicates whether the lower bound of the current range is inclusive.

[Visual Basic]
Public Property IsLowerBoundInclusive As Boolean
[C#]
public bool IsLowerBoundInclusive {get; set;}

Return Type

true if the lower bound of the current range is inclusive; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsLowerBoundInfinity Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsLowerBoundInfinity Property

Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).

[Visual Basic]
Public ReadOnly Property IsLowerBoundInfinity As Boolean
[C#]
public bool IsLowerBoundInfinity {get;}

Return Type

true if the lower bound of the current range is inclusive; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsNull Property (Generic PgSqlRangeType)

Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlCircle is an object, representing a NULL value; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsUpperBoundInclusive Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsUpperBoundInclusive Property

Indicates whether the upper bound of the current range is inclusive.

[Visual Basic]
Public Property IsUpperBoundInclusive As Boolean
[C#]
public bool IsUpperBoundInclusive {get; set;}

Return Type

true if the upper bound of the current range is inclusive; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsUpperBoundInfinity Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : IsUpperBoundInfinity Property

Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).

[Visual Basic]
Public ReadOnly Property IsUpperBoundInfinity As Boolean
[C#]
public bool IsUpperBoundInfinity {get;}

Return Type

true if the upper bound of the current range is inclusive; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LowerBound Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : LowerBound Property

Gets or sets the lower bound of the range.

[Visual Basic]
Public ReadOnly Property LowerBound As T
[C#]
public T LowerBound {get;}

Return Type

The value of the lower bound of the range.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpperBound Property

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : UpperBound Property

Gets or sets the upper bound of the range.

[Visual Basic]
Public ReadOnly Property UpperBound As T
[C#]
public T UpperBound {get;}

Return Type

The value of the upper bound of the range.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%% $$Methods$$

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

Generic PgSqlRangeType Class Methods

Devart.Data.PostgreSql Namespace : Generic PgSqlRangeType Class

For a list of all members of this type, see Generic PgSqlRangeType members.

Public Methods

Public Method ContainsElement | Determines whether the specified value is contained by the range.
Public Method Equals | Overridden. Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode | Overridden. Returns a hash code for the Generic PgSqlRangeType type.
Public Method ToString | Overridden. Converts the current PgSqlPath structure to a String.

See Also

Generic PgSqlRangeType Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : ContainsElement Method (Generic PgSqlRangeType)

Determines whether the specified value is contained by the range.

[Visual Basic]
Public MustOverride Function ContainsElement( _
   ByVal element As T _
) As Boolean
[C#]
public abstract bool ContainsElement(
   T element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

value
Generic PgSqlRangeType to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : Equals Method (Generic PgSqlRangeType)

Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Equals(
   object value
);

Parameters

value
Generic PgSqlRangeType to compare with.

Return Type

true if objects are equal; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : GetHashCode Method (Generic PgSqlRangeType)

Returns a hash code for the Generic PgSqlRangeType type.

[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : ToString Method (Generic PgSqlRangeType)

Converts the current PgSqlPath structure to a String.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

PgSqlRow Members | Devart.Data.PostgreSql Namespace | PgSqlRowType Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Class

Devart.Data.PostgreSql Namespace : PgSqlRow Class

Represents PostgreSQL composite type data.

For a list of all members of this type, see PgSqlRow members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRow

Syntax

[Visual Basic]
Public Class PgSqlRow
[C#]
public class PgSqlRow

Remarks

PgSqlRow class stores data of composite types. You can obtain it from server using one of PgSqlDataReader methods or create on client side and insert into table as PgSqlParameter value.

For detailed information on PostgreSQL composite types and how they are treated in dotConnect for PostgreSQL refer to article Working with Composite Types.

Example

This sample demonstrates usage of PgSqlRow, PgSqlRowType, PgSqlAttribute, and PgSqlAttributeCollection classes. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlRow Members | Devart.Data.PostgreSql Namespace | PgSqlRowType Class


%%PageItemTitle%% $$Members$$

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Class Members

Devart.Data.PostgreSql Namespace : PgSqlRow Class

PgSqlRow overview

Public Constructors

Public Constructor PgSqlRow Constructor Overloaded. Initializes a new instance of the PgSqlRow class with the specified parameters.

Public Properties

Public Property Item | Overloaded. Gets or sets the value of the attribute with the specified name.
Public Property RowType | Gets PgSqlRowType that describes the PgSqlRow.

Public Methods

Public Method Clear | Clears data stored in PgSqlRow and frees occupied memory.
Public Method Equals | Overridden. Returns a value indicating whether two PgSqlRow instances have same value.
Public Method GetHashCode | Overridden.
Public Method GetPgSqlValue | Overloaded. Gets provider-specific value.
Public Method static (Shared in Visual Basic) Parse | Parses provided string as data for composite type.
Public Method ToString | Overridden. Returns value of PgSqlRow as string.

See Also

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Constructor

Devart.Data.PostgreSql Namespace > PgSqlRow Class : PgSqlRow Constructor (PgSqlRow)

Initializes a new instance of the PgSqlRow class with the specified parameters.

Overload List

Initializes a new instance of the PgSqlRow class with the specified parameters.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlRow(string,PgSqlConnection);

Initializes a new instance of the PgSqlRow class with the specified parameters.

[Visual Basic] Public Sub New(PgSqlRowType)

[C#] public PgSqlRow(PgSqlRowType);

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

rowType
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Constructor(PgSqlRowType)

Devart.Data.PostgreSql Namespace > PgSqlRow Class > PgSqlRow Constructor : PgSqlRow Constructor(PgSqlRowType)

Initializes a new instance of the PgSqlRow class with the specified parameters.

[Visual Basic]
Public Function New( _
   ByVal rowType As PgSqlRowType _
)
[C#]
public PgSqlRow(
   PgSqlRowType rowType
);

Parameters

rowType

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

typeName
Name of composite type that describes data structure.
connection
PgSqlConnection to use to obtain composite type information from server.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlRow Class > PgSqlRow Constructor : PgSqlRow Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlRow class with the specified parameters.

[Visual Basic]
Public Function New( _
   ByVal typeName As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlRow(
   string typeName,
   PgSqlConnection connection
);

Parameters

typeName
Name of composite type that describes data structure.
connection
PgSqlConnection to use to obtain composite type information from server.

Remarks

The connection must be open before using this constructor.

Example

The following example demonstrates how to construct a PgSqlRow object and use it as parameter value.

CREATE TYPE tperson AS (name text, age integer)

CREATE TABLE personnel (id integer, person tperson)

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and fill with data
  PgSqlRow pgRow = new PgSqlRow("tperson",conn);
  pgRow[0] = "Fred";
  pgRow[1] = 24;
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",3);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  Dim pgRow As PgSqlRow = New PgSqlRow("tperson", conn)
  pgRow(0) = "Fred"
  pgRow(1) = 24
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Class Properties

Devart.Data.PostgreSql Namespace : PgSqlRow Class

For a list of all members of this type, see PgSqlRow members.

Public Properties

Public Property Item | Overloaded. Gets or sets the value of the attribute with the specified name.
Public Property RowType | Gets PgSqlRowType that describes the PgSqlRow.

See Also

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlRow Class : Item Property (PgSqlRow)

Gets or sets the value of the attribute with the specified name.

Overload List

Gets or sets the value of the attribute with the specified name.

[Visual Basic] Overloads Public Item(String) As Object

[C#] public object Item(string);

Gets or sets the value of the attribute with the specified index.

[Visual Basic] Overloads Public Item(Integer) As Object

[C#] public object Item(int);

Gets or sets the value of the specified attribute.

[Visual Basic] Overloads Public Item(PgSqlAttribute) As Object

[C#] public object Item(PgSqlAttribute);

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

Name
Name of the attribute to get value for.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(String) Property

Devart.Data.PostgreSql Namespace > PgSqlRow Class > Item Property : Item(String) Property

Gets or sets the value of the attribute with the specified name.

[Visual Basic]
Overloads Public Property Item( _
   ByVal Name As String _
) As Object
[C#]
public object Item(
   string Name
); {get; set;}

Parameters

Name
Name of the attribute to get value for.

Return Type

Value of the attribute with the specified name.

Example

This sample demonstrates usage of PgSqlRow.Item property. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT * FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    Console.Write(pgReader.GetInt32(0) + "\t");
    PgSqlRow pgRow = pgReader.GetPgSqlRow(1);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    Console.Write(pgRow[0] + "\t");
    Console.WriteLine(pgRow["age"]);
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT * FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    Console.Write(pgReader.GetInt32(0) & Chr(9))
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(1)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      Console.Write(pgRow(0) & Chr(9))
      Console.WriteLine(pgRow("age"))
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

index
Zero-based attribute ordinal.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(Int32) Property

Devart.Data.PostgreSql Namespace > PgSqlRow Class > Item Property : Item(Int32) Property

Gets or sets the value of the attribute with the specified index.

[Visual Basic]
Overloads Public Property Item( _
   ByVal index As Integer _
) As Object
[C#]
public object Item(
   int index
); {get; set;}

Parameters

index
Zero-based attribute ordinal.

Return Type

Value of the attribute with the specified index.

Example

This sample demonstrates usage of PgSqlRow.Item property. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT * FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    Console.Write(pgReader.GetInt32(0) + "\t");
    PgSqlRow pgRow = pgReader.GetPgSqlRow(1);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    Console.Write(pgRow[0] + "\t");
    Console.WriteLine(pgRow["age"]);
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT * FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    Console.Write(pgReader.GetInt32(0) & Chr(9))
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(1)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      Console.Write(pgRow(0) & Chr(9))
      Console.WriteLine(pgRow("age"))
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

attribute
PgSqlAttribute to get value for.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(PgSqlAttribute) Property

Devart.Data.PostgreSql Namespace > PgSqlRow Class > Item Property : Item(PgSqlAttribute) Property

Gets or sets the value of the specified attribute.

[Visual Basic]
Overloads Public Property Item( _
   ByVal attribute As PgSqlAttribute _
) As Object
[C#]
public object Item(
   PgSqlAttribute attribute
); {get; set;}

Parameters

attribute
PgSqlAttribute to get value for.

Return Type

Value of the specified attribute.

Example

This sample demonstrates usage of PgSqlRow, PgSqlRowType, PgSqlAttribute, and PgSqlAttributeCollection classes. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | PgSqlRowType Class | GetRowType Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

RowType Property

Devart.Data.PostgreSql Namespace > PgSqlRow Class : RowType Property (PgSqlRow)

Gets PgSqlRowType that describes the PgSqlRow.

[Visual Basic]
Public ReadOnly Property RowType As PgSqlRowType
[C#]
public PgSqlRowType RowType {get;}

Return Type

Composite type.

See Also

PgSqlRow Class | PgSqlRow Members | PgSqlRowType Class | GetRowType Method


%%PageItemTitle%% $$Methods$$

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRow Class Methods

Devart.Data.PostgreSql Namespace : PgSqlRow Class

For a list of all members of this type, see PgSqlRow members.

Public Methods

Public Method Clear | Clears data stored in PgSqlRow and frees occupied memory.
Public Method Equals | Overridden. Returns a value indicating whether two PgSqlRow instances have same value.
Public Method GetHashCode | Overridden.
Public Method GetPgSqlValue | Overloaded. Gets provider-specific value.
Public Method static (Shared in Visual Basic) Parse | Parses provided string as data for composite type.
Public Method ToString | Overridden. Returns value of PgSqlRow as string.

See Also

PgSqlRow Class | Devart.Data.PostgreSql Namespace | PgSqlRowType Class


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : Clear Method (PgSqlRow)

Clears data stored in PgSqlRow and frees occupied memory.

[Visual Basic]
Public Sub Clear()
[C#]
public void Clear();

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

obj
A PgSqlRow instance to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : Equals Method (PgSqlRow)

Returns a value indicating whether two PgSqlRow instances have same value.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
A PgSqlRow instance to compare with.

Return Type

true, if current PgSqlRow equals to the object argument; otherwise, false.

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : GetHashCode Method (PgSqlRow)
[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlValue Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : GetPgSqlValue Method

Gets provider-specific value.

Overload List

Gets provider-specific value of a specified column.

[Visual Basic] Overloads Public Function GetPgSqlValue(String) As Object

[C#] public object GetPgSqlValue(string);

Gets provider-specific value of a specified column.

[Visual Basic] Overloads Public Function GetPgSqlValue(Integer) As Object

[C#] public object GetPgSqlValue(int);

Gets provider-specific value of an attribute.

[Visual Basic] Overloads Public Function GetPgSqlValue(PgSqlAttribute) As Object

[C#] public object GetPgSqlValue(PgSqlAttribute);

See Also

PgSqlRow Class | PgSqlRow Members


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

name
The column name.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlValue(String) Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class > GetPgSqlValue Method : GetPgSqlValue(String) Method

Gets provider-specific value of a specified column.

[Visual Basic]
Overloads Public Function GetPgSqlValue( _
   ByVal name As String _
) As Object
[C#]
public object GetPgSqlValue(
   string name
);

Parameters

name
The column name.

Return Type

A provider-specific value.

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

index
The column index.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlValue(Int32) Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class > GetPgSqlValue Method : GetPgSqlValue(Int32) Method

Gets provider-specific value of a specified column.

[Visual Basic]
Overloads Public Function GetPgSqlValue( _
   ByVal index As Integer _
) As Object
[C#]
public object GetPgSqlValue(
   int index
);

Parameters

index
The column index.

Return Type

A provider-specific value.

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Overload List

Language

Visual Basic

C#

Show All

attribute
A PgSqlAttribute to get the value from.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetPgSqlValue(PgSqlAttribute) Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class > GetPgSqlValue Method : GetPgSqlValue(PgSqlAttribute) Method

Gets provider-specific value of an attribute.

[Visual Basic]
Overloads Public Function GetPgSqlValue( _
   ByVal attribute As PgSqlAttribute _
) As Object
[C#]
public object GetPgSqlValue(
   PgSqlAttribute attribute
);

Parameters

attribute
A PgSqlAttribute to get the value from.

Return Type

A provider-specific value.

See Also

PgSqlRow Class | PgSqlRow Members | Overload List


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | ToString Method | Parse Method

Language

Visual Basic

C#

Show All

rowType
PgSqlRowType that describes data on value
value
String to parse.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : Parse Method (PgSqlRow)

Parses provided string as data for composite type.

[Visual Basic]
Public Shared Function Parse( _
   ByVal rowType As PgSqlRowType, _
   ByVal value As String _
) As PgSqlRow
[C#]
public static PgSqlRow Parse(
   PgSqlRowType rowType,
   string value
);

Parameters

rowType
PgSqlRowType that describes data on value
value
String to parse.

Return Type

Parsed string as PgSqlRow

Example

This sample shows how to obtain PgSqlRowType from server and create a PgSqlRow object on the client side. The object is later inserted into table.

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and parse data
  //Note that connection must be open
  PgSqlRowType pgRowType = PgSqlRowType.GetRowType("tperson", conn);
  PgSqlRow pgRow = PgSqlRow.Parse(pgRowType,"(''Robert'',30)");
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",4);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  'Note that connection must be open
  Dim pgRowType As PgSqlRowType = PgSqlRowType.GetRowType("tperson", conn)
  Dim pgRow As PgSqlRow = PgSqlRow.Parse(pgRowType, "(''Robert'',30)")
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

See Also

PgSqlRow Class | PgSqlRow Members | ToString Method | Parse Method


%%PageItemTitle%%

PgSqlRow Class | PgSqlRow Members | Parse Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlRow Class : ToString Method (PgSqlRow)

Returns value of PgSqlRow as string.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

Value of PgSqlRow as string.

See Also

PgSqlRow Class | PgSqlRow Members | Parse Method


%%PageItemTitle%%

PgSqlRowType Members | Devart.Data.PostgreSql Namespace | PgSqlRow Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowType Class

Devart.Data.PostgreSql Namespace : PgSqlRowType Class

Represents PostgreSQL row data type.

For a list of all members of this type, see PgSqlRowType members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRowType

Syntax

[Visual Basic]
Public Class PgSqlRowType
[C#]
public class PgSqlRowType

Remarks

PgSqlRowType class stores description of composite type on server. It is used to help get data from PgSqlRow objects. You can obtain PgSqlRowType from server using PgSqlRowType.GetRowType method.

For detailed information on PostgreSQL composite types and how they are treated in dotConnect for PostgreSQL refer to article Working with Composite Types.

Example

This sample demonstrates usage of PgSqlRow, PgSqlRowType, PgSqlAttribute, and PgSqlAttributeCollection classes. It retrieves data from a column of composite type in a table and renders the data to console. To run the samples successfully you have to create server objects with the following script: CREATE TYPE tperson AS (name text, age integer); CREATE TABLE personnel (id integer, person tperson);

[C#]

static void ReadData(PgSqlConnection conn)
{
  string str = "SELECT person FROM personnel";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  PgSqlDataReader pgReader = pgCommand.ExecuteReader();
  while (pgReader.Read())
  {
    //obtain data
    PgSqlRow pgRow = pgReader.GetPgSqlRow(0);
    if (pgRow == null)
    {
      Console.WriteLine();
      continue;
    }
    //obtain data description
    PgSqlRowType pgRowType = pgRow.RowType;
    //iterate through all columns
    foreach(PgSqlAttribute pgAttr in pgRowType.Attributes)
    {
      Console.Write(pgRow[pgAttr] + "\t");
    }
    Console.WriteLine();
  }
  pgReader.Close();
}

[Visual Basic]

Sub ReadData(ByVal conn As PgSqlConnection)
  Dim str As String = "SELECT person FROM personnel"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  Dim pgReader As PgSqlDataReader = pgCommand.ExecuteReader()
  While pgReader.Read()
    'obtain data
    Dim pgRow As PgSqlRow = pgReader.GetPgSqlRow(0)
    If pgRow Is Nothing Then
      Console.WriteLine()
    Else
      'obtain data description
      Dim pgRowType As PgSqlRowType = pgRow.RowType
      'iterate through all columns
      For Each pgAttr As PgSqlAttribute In pgRowType.Attributes
        Console.Write(pgRow(pgAttr) & Chr(9))
      Next pgAttr
      Console.WriteLine()
    End If
  End While
  pgReader.Close()
End Sub

See Also

PgSqlRowType Members | Devart.Data.PostgreSql Namespace | PgSqlRow Class


%%PageItemTitle%% $$Members$$

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowType Class Members

Devart.Data.PostgreSql Namespace : PgSqlRowType Class

PgSqlRowType overview

Public Properties

Public Property Attributes | Gets collection of attributes that can be used to retrieve data form PgSqlRow.
Public Property Name | Gets name of the row type.
Public Property TypeOid | Gets OID associated with the type on the server.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlRowType and has the same values as the current PgSqlRowType instance.
Public Method GetHashCode | Overridden. Returns a hash code for the PgSqlRowType type.
Public Method static (Shared in Visual Basic) GetRowType | Returns PgSqlRowType object that corresponds to given name.
Public Method Parse | Converts a PgSqlRow from its string representation.

See Also

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class


%%PageItemTitle%% $$Properties$$

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowType Class Properties

Devart.Data.PostgreSql Namespace : PgSqlRowType Class

For a list of all members of this type, see PgSqlRowType members.

Public Properties

Public Property Attributes | Gets collection of attributes that can be used to retrieve data form PgSqlRow.
Public Property Name | Gets name of the row type.
Public Property TypeOid | Gets OID associated with the type on the server.

See Also

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Attributes Property

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : Attributes Property

Gets collection of attributes that can be used to retrieve data form PgSqlRow.

[Visual Basic]
Public ReadOnly Property Attributes As PgSqlAttributeCollection
[C#]
public PgSqlAttributeCollection Attributes {get;}

Return Type

Collection of attributes.

Remarks

PgSqlAttributeCollection allows to iterate through available PgSqlAttribute instances and obtain values using PgSqlRow.Item methods.

See Also

PgSqlRowType Class | PgSqlRowType Members


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Name Property

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : Name Property (PgSqlRowType)

Gets name of the row type.

[Visual Basic]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Return Type

Name of the row type.

See Also

PgSqlRowType Class | PgSqlRowType Members


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TypeOid Property

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : TypeOid Property

Gets OID associated with the type on the server.

[Visual Basic]
Public ReadOnly Property TypeOid As Integer
[C#]
public int TypeOid {get;}

Return Type

Type OID.

See Also

PgSqlRowType Class | PgSqlRowType Members


%%PageItemTitle%% $$Methods$$

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowType Class Methods

Devart.Data.PostgreSql Namespace : PgSqlRowType Class

For a list of all members of this type, see PgSqlRowType members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlRowType and has the same values as the current PgSqlRowType instance.
Public Method GetHashCode | Overridden. Returns a hash code for the PgSqlRowType type.
Public Method static (Shared in Visual Basic) GetRowType | Returns PgSqlRowType object that corresponds to given name.
Public Method Parse | Converts a PgSqlRow from its string representation.

See Also

PgSqlRowType Class | Devart.Data.PostgreSql Namespace | PgSqlRow Class


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members

Language

Visual Basic

C#

Show All

value
PgSqlRowType to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : Equals Method (PgSqlRowType)

Determines if the specified object is an instance of PgSqlRowType and has the same values as the current PgSqlRowType instance.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Equals(
   object value
);

Parameters

value
PgSqlRowType to compare with.

Return Type

true if objects are equal; otherwise, false.

See Also

PgSqlRowType Class | PgSqlRowType Members


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : GetHashCode Method (PgSqlRowType)

Returns a hash code for the PgSqlRowType type.

[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlRowType Class | PgSqlRowType Members


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members | RowType Property

Language

Visual Basic

C#

Show All

typeName
Name of the type to describe.
connection
Connection to be used to obtain metadata information.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetRowType Method

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : GetRowType Method

Returns PgSqlRowType object that corresponds to given name.

[Visual Basic]
Public Shared Function GetRowType( _
   ByVal typeName As String, _
   ByVal connection As PgSqlConnection _
) As PgSqlRowType
[C#]
public static PgSqlRowType GetRowType(
   string typeName,
   PgSqlConnection connection
);

Parameters

typeName
Name of the type to describe.
connection
Connection to be used to obtain metadata information.

Return Type

PgSqlRowType with given name.

Example

This sample shows how to obtain PgSqlRowType from server and create a PgSqlRow object on the client side. The object is later inserted into table.

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and parse data
  //Note that connection must be open
  PgSqlRowType pgRowType = PgSqlRowType.GetRowType("tperson", conn);
  PgSqlRow pgRow = PgSqlRow.Parse(pgRowType,"(''Robert'',30)");
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",4);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  'Note that connection must be open
  Dim pgRowType As PgSqlRowType = PgSqlRowType.GetRowType("tperson", conn)
  Dim pgRow As PgSqlRow = PgSqlRow.Parse(pgRowType, "(''Robert'',30)")
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

See Also

PgSqlRowType Class | PgSqlRowType Members | RowType Property


%%PageItemTitle%%

PgSqlRowType Class | PgSqlRowType Members | Parse Method

Language

Visual Basic

C#

Show All

rowValue
String that contains data for PgSqlRow.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlRowType Class : Parse Method (PgSqlRowType)

Converts a PgSqlRow from its string representation.

[Visual Basic]
Public Function Parse( _
   ByVal rowValue As String _
) As PgSqlRow
[C#]
public PgSqlRow Parse(
   string rowValue
);

Parameters

rowValue
String that contains data for PgSqlRow.

Return Type

Parsed PgSqlRow.

Example

This sample shows how to obtain PgSqlRowType from server and create a PgSqlRow object on the client side. The object is later inserted into table.

[C#]

static void InsertDataWithParameters(PgSqlConnection conn)
{
  string str = "INSERT INTO personnel VALUES (:ID, :ROW)";
  PgSqlCommand pgCommand = new PgSqlCommand(str,conn);
  //Create instance of PgSqlRow and parse data
  //Note that connection must be open
  PgSqlRowType pgRowType = PgSqlRowType.GetRowType("tperson", conn);
  PgSqlRow pgRow = pgRowType.Parse("(''Robert'',30)");
  //provide parameters to command and execute it
  pgCommand.Parameters.Add("ID",4);
  pgCommand.Parameters.Add("ROW",pgRow);
  pgCommand.ExecuteNonQuery();
  Console.WriteLine("Record added");
}

[Visual Basic]

Sub InsertDataWithParameters(ByVal conn As PgSqlConnection)
  Dim str As String = "INSERT INTO personnel VALUES (:ID, :ROW)"
  Dim pgCommand As PgSqlCommand = New PgSqlCommand(str, conn)
  'Create instance of PgSqlRow and fill with data
  'Note that connection must be open
  Dim pgRowType As PgSqlRowType = PgSqlRowType.GetRowType("tperson", conn)
  Dim pgRow As PgSqlRow = pgRowType.Parse("(''Robert'',30)")
  'provide parameters to command and execute it
  pgCommand.Parameters.Add("ID", 3)
  pgCommand.Parameters.Add("ROW", pgRow)
  pgCommand.ExecuteNonQuery()
  Console.WriteLine("Record added")
End Sub

See Also

PgSqlRowType Class | PgSqlRowType Members | Parse Method


%%PageItemTitle%%

PgSqlRowUpdatedEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatedEventArgs Class

Provides data for the PgSqlDataAdapter.RowUpdated event.

For a list of all members of this type, see PgSqlRowUpdatedEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
System.Data.Common.RowUpdatedEventArgs
Devart.Data.PostgreSql.PgSqlRowUpdatedEventArgs

Syntax

[Visual Basic]
Public Class PgSqlRowUpdatedEventArgs
   Inherits RowUpdatedEventArgs
[C#]
public class PgSqlRowUpdatedEventArgs : RowUpdatedEventArgs

Remarks

The PgSqlDataAdapter.RowUpdated event is raised when an update to a row is completed.

When using the Update method, there are two events that occur for each data row updated: PgSqlDataAdapter.RowUpdating and PgSqlDataAdapter.RowUpdated. The order of execution for an Update is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The PgSqlDataAdapter.RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecordS, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The PgSqlDataAdapter.RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlRowUpdatedEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatedEventArgs Class

PgSqlRowUpdatedEventArgs overview

Public Constructors

Public Constructor PgSqlRowUpdatedEventArgs Constructor Initializes a new instance of the PgSqlRowUpdatedEventArgs class.

Public Properties

Public Property Command | Gets the PgSqlCommand executed when Update is called.
Public Property Errors (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets any errors generated by the .NET Framework data provider when the Command was executed.
Public Property RecordsAffected (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property Row (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the DataRow sent through an Update.
Public Property RowCount (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the number of rows processed in a batch of updated records.
Public Property StatementType (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the type of SQL statement executed.
Public Property Status (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the UpdateStatus of the Command property.
Public Property TableMapping (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the DataTableMapping sent through an Update.

Public Methods

Public Method CopyToRows (Inherited from System.Data.Common.RowUpdatedEventArgs) Overloaded. Copies references to the modified rows into the provided array.

See Also

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlRowUpdatedEventArgs Class | PgSqlRowUpdatedEventArgs Members

Language

Visual Basic

C#

Show All

row
The DataRow sent through an update operation.
command
The PgSqlCommand executed when Update is called.
statementType
One of the StatementType values that specifies the type of query executed.
tableMapping
The DataTableMapping sent through Update.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventArgs Constructor

Devart.Data.PostgreSql Namespace > PgSqlRowUpdatedEventArgs Class : PgSqlRowUpdatedEventArgs Constructor (PgSqlRowUpdatedEventArgs)

Initializes a new instance of the PgSqlRowUpdatedEventArgs class.

[Visual Basic]
Public Function New( _
   ByVal row As DataRow, _
   ByVal command As IDbCommand, _
   ByVal statementType As StatementType, _
   ByVal tableMapping As DataTableMapping _
)
[C#]
public PgSqlRowUpdatedEventArgs(
   DataRow row,
   IDbCommand command,
   StatementType statementType,
   DataTableMapping tableMapping
);

Parameters

row
The DataRow sent through an update operation.
command
The PgSqlCommand executed when Update is called.
statementType
One of the StatementType values that specifies the type of query executed.
tableMapping
The DataTableMapping sent through Update.

See Also

PgSqlRowUpdatedEventArgs Class | PgSqlRowUpdatedEventArgs Members


%%PageItemTitle%% $$Properties$$

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatedEventArgs Class

For a list of all members of this type, see PgSqlRowUpdatedEventArgs members.

Public Properties

Public Property Command | Gets the PgSqlCommand executed when Update is called.
Public Property Errors (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets any errors generated by the .NET Framework data provider when the Command was executed.
Public Property RecordsAffected (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.
Public Property Row (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the DataRow sent through an Update.
Public Property RowCount (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the number of rows processed in a batch of updated records.
Public Property StatementType (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the type of SQL statement executed.
Public Property Status (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the UpdateStatus of the Command property.
Public Property TableMapping (Inherited from System.Data.Common.RowUpdatedEventArgs) | Gets the DataTableMapping sent through an Update.

See Also

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlRowUpdatedEventArgs Class | PgSqlRowUpdatedEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Command Property

Devart.Data.PostgreSql Namespace > PgSqlRowUpdatedEventArgs Class : Command Property (PgSqlRowUpdatedEventArgs)

Gets the PgSqlCommand executed when Update is called.

[Visual Basic]
Public ReadOnly Property Command As PgSqlCommand
[C#]
public PgSqlCommand Command {get;}

Return Type

The PgSqlCommand to execute when Update is called.

See Also

PgSqlRowUpdatedEventArgs Class | PgSqlRowUpdatedEventArgs Members


%%PageItemTitle%%

PgSqlRowUpdatingEventArgs Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatingEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatingEventArgs Class

Provides data for the PgSqlDataAdapter.RowUpdating event. This class cannot be inherited.

For a list of all members of this type, see PgSqlRowUpdatingEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
System.Data.Common.RowUpdatingEventArgs
Devart.Data.PostgreSql.PgSqlRowUpdatingEventArgs

Syntax

[Visual Basic]
Public Class PgSqlRowUpdatingEventArgs
   Inherits RowUpdatingEventArgs
[C#]
public class PgSqlRowUpdatingEventArgs : RowUpdatingEventArgs

Remarks

The PgSqlDataAdapter.RowUpdating event is raised before an update to a row.

When using the Update method, there are two events that occur for each data row updated: PgSqlDataAdapter.RowUpdating and PgSqlDataAdapter.RowUpdated. The order of execution for an update operation is as follows:

  1. The values in the DataRow are moved to the parameter values.
  2. The PgSqlDataAdapter.RowUpdating event is raised.
  3. The command executes.
  4. If the UpdateRowSource enumeration is set to FirstReturnedRecordS, the first returned result is placed in the DataRow.
  5. If there are output parameters, they are placed in the DataRow.
  6. The PgSqlDataAdapter.RowUpdated event is raised.
  7. AcceptChanges is called.

See Also

PgSqlRowUpdatingEventArgs Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlRowUpdatingEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatingEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatingEventArgs Class

PgSqlRowUpdatingEventArgs overview

Public Constructors

Public Constructor PgSqlRowUpdatingEventArgs Constructor Initializes a new instance of the PgSqlRowUpdatingEventArgs class.

Public Properties

Public Property Command | Gets or sets the PgSqlCommand to execute when Update is called.
Public Property Errors (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets any errors generated by the .NET Framework data provider when the Command executes.
Public Property Row (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the DataRow that will be sent to the server as part of an insert, update, or delete operation.
Public Property StatementType (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the type of SQL statement to execute.
Public Property Status (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets or sets the UpdateStatus of the Command property.
Public Property TableMapping (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the DataTableMapping to send through the Update.

See Also

PgSqlRowUpdatingEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlRowUpdatingEventArgs Class | PgSqlRowUpdatingEventArgs Members

Language

Visual Basic

C#

Show All

row
The DataRow to update.
command
The PgSqlCommand to execute during Update is called.
statementType
One of the StatementType values that specifies the type of query executed.
tableMapping
The DataTableMapping sent through Update.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatingEventArgs Constructor

Devart.Data.PostgreSql Namespace > PgSqlRowUpdatingEventArgs Class : PgSqlRowUpdatingEventArgs Constructor (PgSqlRowUpdatingEventArgs)

Initializes a new instance of the PgSqlRowUpdatingEventArgs class.

[Visual Basic]
Public Function New( _
   ByVal row As DataRow, _
   ByVal command As IDbCommand, _
   ByVal statementType As StatementType, _
   ByVal tableMapping As DataTableMapping _
)
[C#]
public PgSqlRowUpdatingEventArgs(
   DataRow row,
   IDbCommand command,
   StatementType statementType,
   DataTableMapping tableMapping
);

Parameters

row
The DataRow to update.
command
The PgSqlCommand to execute during Update is called.
statementType
One of the StatementType values that specifies the type of query executed.
tableMapping
The DataTableMapping sent through Update.

See Also

PgSqlRowUpdatingEventArgs Class | PgSqlRowUpdatingEventArgs Members


%%PageItemTitle%% $$Properties$$

PgSqlRowUpdatingEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatingEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatingEventArgs Class

For a list of all members of this type, see PgSqlRowUpdatingEventArgs members.

Public Properties

Public Property Command | Gets or sets the PgSqlCommand to execute when Update is called.
Public Property Errors (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets any errors generated by the .NET Framework data provider when the Command executes.
Public Property Row (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the DataRow that will be sent to the server as part of an insert, update, or delete operation.
Public Property StatementType (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the type of SQL statement to execute.
Public Property Status (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets or sets the UpdateStatus of the Command property.
Public Property TableMapping (Inherited from System.Data.Common.RowUpdatingEventArgs) | Gets the DataTableMapping to send through the Update.

See Also

PgSqlRowUpdatingEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlRowUpdatingEventArgs Class | PgSqlRowUpdatingEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Command Property

Devart.Data.PostgreSql Namespace > PgSqlRowUpdatingEventArgs Class : Command Property (PgSqlRowUpdatingEventArgs)

Gets or sets the PgSqlCommand to execute when Update is called.

[Visual Basic]
Public Property Command As PgSqlCommand
[C#]
public PgSqlCommand Command {get; set;}

Return Type

The PgSqlCommand to execute when Update is called.

See Also

PgSqlRowUpdatingEventArgs Class | PgSqlRowUpdatingEventArgs Members


%%PageItemTitle%%

PgSqlScript Members | Devart.Data.PostgreSql Namespace | PgSqlCommand Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Class

Devart.Data.PostgreSql Namespace : PgSqlScript Class

Serves to execute series of SQL statements separated by special symbols.

For a list of all members of this type, see PgSqlScript members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
Devart.Common.DbScript
Devart.Data.PostgreSql.PgSqlScript

Syntax

[Visual Basic]
Public Class PgSqlScript
   Inherits DbScript
   Implements IComponent, IDisposable
[C#]
public class PgSqlScript : DbScript, IComponent, IDisposable

Remarks

Often it is necessary to execute several SQL statements one by one. It can be performed by using a lot of components such as PgSqlCommand. Usually it isn't a good solution. With only one PgSqlScript component you can execute several SQL statements as one. This sequence of statements is named script. To separate individual statements use semicolon (;) symbol.

When PgSqlScript encounters a BEGIN keyword in the script, it looks for a slash symbol "/" in the first position of some consecutive line. Everything between the BEGIN and the slash is considered single block. Usually the slash is placed after the line containing END keyword. You do not have to place slash after nested BEGIN...END block.

Example

This sample demonstrates how to execute script and retrieve information about execution flow using Devart.Common.DbScript.Progress and Devart.Common.DbScript.Error events.

[C#]

[STAThread]
static void Main(string[] args)
{
string script =

  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');"+
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');"+
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');"+
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');"+
  "SELECT * FROM DEPT";
      PgSqlConnection pgConn = new PgSqlConnection(
          "host=server;database=test;user id=postgres;");
      PgSqlScript pgScript = new PgSqlScript(script,pgConn);
      pgScript.Progress += new Devart.Common.ScriptProgressEventHandler(OnProgress);
      pgScript.Error += new Devart.Common.ScriptErrorEventHandler(OnError);
      pgConn.Open();
      pgScript.Execute();
      pgConn.Close();
    }

static void OnProgress(object sender, Devart.Common.ScriptProgressEventArgs e)
{
  Console.WriteLine(e.Text);
  Console.WriteLine("  Successfully executed.");
}

static void OnError(object sender, Devart.Common.ScriptErrorEventArgs e)
{
  e.Ignore = true;
  Console.WriteLine(e.Text);
  Console.WriteLine("  Failed.");
}

[Visual Basic]

Module Module1

  Friend WithEvents pgScript As Devart.Data.PostgreSql.PgSqlScript

  Sub Main()
    Dim script As String = _

  "INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');" + _
  "INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');" + _
  "INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');" + _
  "INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');" + _
  "SELECT * FROM DEPT"
    Dim pgConn As PgSqlConnection = New PgSqlConnection( _
        "host=server;database=test;user id=postgres;")
    pgScript = New PgSqlScript(script, pgConn)
    pgConn.Open()
    pgScript.Execute()
    pgConn.Close()
    Console.ReadLine()
  End Sub

  Sub OnProgress(ByVal sender As Object, ByVal e As Devart.Common.ScriptProgressEventArgs) Handles pgScript.Progress
    Console.WriteLine(e.Text)
    Console.WriteLine(" Successfully executed.")
  End Sub

  Sub OnError(ByVal sender As Object, ByVal e As Devart.Common.ScriptErrorEventArgs) Handles pgScript.Error
    e.Ignore = True
    Console.WriteLine(e.Text)
    Console.WriteLine(" Failed.")
  End Sub

End Module

See Also

PgSqlScript Members | Devart.Data.PostgreSql Namespace | PgSqlCommand Class


%%PageItemTitle%% $$Members$$

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Class Members

Devart.Data.PostgreSql Namespace : PgSqlScript Class

PgSqlScript overview

Public Constructors

Public Constructor PgSqlScript Constructor Overloaded. Initializes a new instance of the PgSqlScript class.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Common.DbScript) | Gets or sets the wait time before terminating an attempt to execute a script and generating an error.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlScript.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Name (Inherited from Devart.Common.DbScript) | Gets or sets the name of component that will be displayed in dbMonitor application.
Public Property ScriptText | Overridden. Gets or sets text of the script.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Statements (Inherited from Devart.Common.DbScript) | Gets the collection of statements that make up the script.

Public Methods

Public Method Cancel (Inherited from Devart.Common.DbScript) | Tries to cancel the execution of a Devart.Common.DbScript descendant.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Execute (Inherited from Devart.Common.DbScript) | Executes the script specified in Devart.Common.DbScript.ScriptText property.
Public Method ExecuteNext (Inherited from Devart.Common.DbScript) | Executes the next statement from the script.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open (Inherited from Devart.Common.DbScript) | Overloaded. Prepares a stream to be executed as SQL script.
Public Method Reset (Inherited from Devart.Common.DbScript) | Positions Devart.Common.DbScript.ExecuteNext method on the first statement in the script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error (Inherited from Devart.Common.DbScript) | Occurs when a SQL statement within script has produced an error.
Public Event PgSqlStatementExecute | Occurs when a SQL statement within the script is about to execute.
Public Event Progress (Inherited from Devart.Common.DbScript) | Occurs when a SQL statement within script has successfully executed.

See Also

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor

Devart.Data.PostgreSql Namespace > PgSqlScript Class : PgSqlScript Constructor (PgSqlScript)

Initializes a new instance of the PgSqlScript class.

Overload List

Initializes a new instance of the PgSqlScript class.

[Visual Basic] Public Sub New()

[C#] public PgSqlScript();

Initializes a new instance of the PgSqlScript class with the text of the query.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlScript(string);

Initializes a new instance of the PgSqlScript class with the text of the query and a PgSqlConnection object.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlScript(string,PgSqlConnection);

Initializes a new instance of the PgSqlScript class with a Stream object to get SQL statements from.

[Visual Basic] Public Sub New(Stream)

[C#] public PgSqlScript(Stream);

Initializes a new instance of the PgSqlScript class with a TextReader object to get SQL statements from.

[Visual Basic] Public Sub New(TextReader)

[C#] public PgSqlScript(TextReader);

Initializes a new instance of the PgSqlScript class with a Stream object to get SQL statements from and a PgSqlConnection object.

[Visual Basic] Public Sub New(Stream,PgSqlConnection)

[C#] public PgSqlScript(Stream,PgSqlConnection);

Initializes a new instance of the PgSqlScript class with a TextReader object to get SQL statements from and a PgSqlConnection object.

[Visual Basic] Public Sub New(TextReader,PgSqlConnection)

[C#] public PgSqlScript(TextReader,PgSqlConnection);

See Also

PgSqlScript Class | PgSqlScript Members


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor()

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor()

Initializes a new instance of the PgSqlScript class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlScript();

Remarks

The base constructor initializes all fields to their default values. The following table shows initial values set to the read/write properties when a new instance of PgSqlScript is created.
Properties | Initial Value
Connection | null
Devart.Common.DbScript.Name | name of the component at design-time
ScriptText | an empty string ("")

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

stream
A Stream object that contains the script text.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(Stream)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(Stream)

Initializes a new instance of the PgSqlScript class with a Stream object to get SQL statements from.

[Visual Basic]
Public Function New( _
   ByVal stream As Stream _
)
[C#]
public PgSqlScript(
   Stream stream
);

Parameters

stream
A Stream object that contains the script text.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

stream
A Stream object that contains the script text.
connection
A PgSqlConnection object that represents the connection to a database.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(Stream,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(Stream,PgSqlConnection)

Initializes a new instance of the PgSqlScript class with a Stream object to get SQL statements from and a PgSqlConnection object.

[Visual Basic]
Public Function New( _
   ByVal stream As Stream, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlScript(
   Stream stream,
   PgSqlConnection connection
);

Parameters

stream
A Stream object that contains the script text.
connection
A PgSqlConnection object that represents the connection to a database.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

scriptText
The text of the query.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(String)

Initializes a new instance of the PgSqlScript class with the text of the query.

[Visual Basic]
Public Function New( _
   ByVal scriptText As String _
)
[C#]
public PgSqlScript(
   string scriptText
);

Parameters

scriptText
The text of the query.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

scriptText
The text of the query.
connection
A PgSqlConnection object that represents the connection to a database.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlScript class with the text of the query and a PgSqlConnection object.

[Visual Basic]
Public Function New( _
   ByVal scriptText As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlScript(
   string scriptText,
   PgSqlConnection connection
);

Parameters

scriptText
The text of the query.
connection
A PgSqlConnection object that represents the connection to a database.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

reader
A TextReader object that contains the script text.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(TextReader)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(TextReader)

Initializes a new instance of the PgSqlScript class with a TextReader object to get SQL statements from.

[Visual Basic]
Public Function New( _
   ByVal reader As TextReader _
)
[C#]
public PgSqlScript(
   TextReader reader
);

Parameters

reader
A TextReader object that contains the script text.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | Overload List

Language

Visual Basic

C#

Show All

reader
A TextReader object that contains the script text.
connection
A PgSqlConnection object that represents the connection to a database.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Constructor(TextReader,PgSqlConnection)

Devart.Data.PostgreSql Namespace > PgSqlScript Class > PgSqlScript Constructor : PgSqlScript Constructor(TextReader,PgSqlConnection)

Initializes a new instance of the PgSqlScript class with a TextReader object to get SQL statements from and a PgSqlConnection object.

[Visual Basic]
Public Function New( _
   ByVal reader As TextReader, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlScript(
   TextReader reader,
   PgSqlConnection connection
);

Parameters

reader
A TextReader object that contains the script text.
connection
A PgSqlConnection object that represents the connection to a database.

See Also

PgSqlScript Class | PgSqlScript Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Class Properties

Devart.Data.PostgreSql Namespace : PgSqlScript Class

For a list of all members of this type, see PgSqlScript members.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Common.DbScript) | Gets or sets the wait time before terminating an attempt to execute a script and generating an error.
Public Property Connection | Gets or sets the PgSqlConnection used by this instance of the PgSqlScript.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property Name (Inherited from Devart.Common.DbScript) | Gets or sets the name of component that will be displayed in dbMonitor application.
Public Property ScriptText | Overridden. Gets or sets text of the script.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property Statements (Inherited from Devart.Common.DbScript) | Gets the collection of statements that make up the script.

See Also

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | PgSqlConnection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlScript Class : Connection Property (PgSqlScript)

Gets or sets the PgSqlConnection used by this instance of the PgSqlScript.

[Visual Basic]
Public Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get; set;}

Return Type

The connection to a data source. The default value is a null reference.

Remarks

You must set Connection property before the script execution.

This property supports the InterForm technology.

See Also

PgSqlScript Class | PgSqlScript Members | PgSqlConnection Class


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ScriptText Property

Devart.Data.PostgreSql Namespace > PgSqlScript Class : ScriptText Property (PgSqlScript)

Gets or sets text of the script.

[Visual Basic]
Overrides Public Property ScriptText As String
[C#]
public override string ScriptText {get; set;}

Return Type

Script text. The default value is an empty string ("").

Remarks

Use ScriptText property to specify text of the script.

See Also

PgSqlScript Class | PgSqlScript Members


%%PageItemTitle%% $$Events$$

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Class Events

Devart.Data.PostgreSql Namespace : PgSqlScript Class

For a list of all members of this type, see PgSqlScript members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event Error (Inherited from Devart.Common.DbScript) | Occurs when a SQL statement within script has produced an error.
Public Event PgSqlStatementExecute | Occurs when a SQL statement within the script is about to execute.
Public Event Progress (Inherited from Devart.Common.DbScript) | Occurs when a SQL statement within script has successfully executed.

See Also

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class


%%PageItemTitle%%

PgSqlScript Class | PgSqlScript Members | PgSqlStatementExecuteEventHandler Delegate | PgSqlStatementExecuteEventArgs Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlStatementExecute Event

Devart.Data.PostgreSql Namespace > PgSqlScript Class : PgSqlStatementExecute Event

Occurs when a SQL statement within the script is about to execute.

[Visual Basic]
Public Event PgSqlStatementExecute() As PgSqlStatementExecuteEventHandler
[C#]
public event PgSqlStatementExecuteEventHandler PgSqlStatementExecute();

See Also

PgSqlScript Class | PgSqlScript Members | PgSqlStatementExecuteEventHandler Delegate | PgSqlStatementExecuteEventArgs Class


%%PageItemTitle%%

PgSqlSelectLimit Members | Devart.Data.PostgreSql Namespace | Limit Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Class

Devart.Data.PostgreSql Namespace : PgSqlSelectLimit Class

Represents PostgreSQL LIMIT clause.

For a list of all members of this type, see PgSqlSelectLimit members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatementNode
Devart.Data.PostgreSql.PgSqlSelectLimit

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlSelectLimit
   Inherits SelectStatementNode
[C#]
public sealed class PgSqlSelectLimit : SelectStatementNode

See Also

PgSqlSelectLimit Members | Devart.Data.PostgreSql Namespace | Limit Property


%%PageItemTitle%% $$Members$$

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Class Members

Devart.Data.PostgreSql Namespace : PgSqlSelectLimit Class

PgSqlSelectLimit overview

Public Constructors

Public Constructor PgSqlSelectLimit Constructor Overloaded. Initializes a new instance of the PgSqlSelectLimit class.

Public Properties

Public Property Count | Gets or sets the limit count value.
Public Property Offset | Gets or sets the limit offset value.

Public Methods

Public Method ToString Overridden. Returns a String that represents the current Object.

See Also

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Constructor

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class : PgSqlSelectLimit Constructor (PgSqlSelectLimit)

Initializes a new instance of the PgSqlSelectLimit class.

Overload List

Initializes a new instance of the PgSqlSelectLimit class.

[Visual Basic] Public Sub New()

[C#] public PgSqlSelectLimit();

Initializes a new instance of the PgSqlSelectLimit class with given offset and count values.

[Visual Basic] Public Sub New(Integer,Integer)

[C#] public PgSqlSelectLimit(int,int);

Initializes a new instance of the PgSqlSelectLimit class with given offset and count values.

[Visual Basic] Public Sub New(String,String)

[C#] public PgSqlSelectLimit(string,string);

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Constructor()

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class > PgSqlSelectLimit Constructor : PgSqlSelectLimit Constructor()

Initializes a new instance of the PgSqlSelectLimit class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlSelectLimit();

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List

Language

Visual Basic

C#

Show All

offset
The limit offset value.
count
The limit count value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Constructor(Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class > PgSqlSelectLimit Constructor : PgSqlSelectLimit Constructor(Int32,Int32)

Initializes a new instance of the PgSqlSelectLimit class with given offset and count values.

[Visual Basic]
Public Function New( _
   ByVal offset As Integer, _
   ByVal count As Integer _
)
[C#]
public PgSqlSelectLimit(
   int offset,
   int count
);

Parameters

offset
The limit offset value.
count
The limit count value.

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List

Language

Visual Basic

C#

Show All

offset
The limit offset value.
count
The limit count value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Constructor(String,String)

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class > PgSqlSelectLimit Constructor : PgSqlSelectLimit Constructor(String,String)

Initializes a new instance of the PgSqlSelectLimit class with given offset and count values.

[Visual Basic]
Public Function New( _
   ByVal offset As String, _
   ByVal count As String _
)
[C#]
public PgSqlSelectLimit(
   string offset,
   string count
);

Parameters

offset
The limit offset value.
count
The limit count value.

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members | Overload List


%%PageItemTitle%% $$Properties$$

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Class Properties

Devart.Data.PostgreSql Namespace : PgSqlSelectLimit Class

For a list of all members of this type, see PgSqlSelectLimit members.

Public Properties

Public Property Count | Gets or sets the limit count value.
Public Property Offset | Gets or sets the limit offset value.

See Also

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Count Property

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class : Count Property (PgSqlSelectLimit)

Gets or sets the limit count value.

[Visual Basic]
Public Property Count As Object
[C#]
public object Count {get; set;}

Return Type

The limit count value.

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Offset Property

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class : Offset Property (PgSqlSelectLimit)

Gets or sets the limit offset value.

[Visual Basic]
Public Property Offset As Object
[C#]
public object Offset {get; set;}

Return Type

The limit offset value.

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members


%%PageItemTitle%% $$Methods$$

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectLimit Class Methods

Devart.Data.PostgreSql Namespace : PgSqlSelectLimit Class

For a list of all members of this type, see PgSqlSelectLimit members.

Public Methods

Public Method ToString Overridden. Returns a String that represents the current Object.

See Also

PgSqlSelectLimit Class | Devart.Data.PostgreSql Namespace | Limit Property


%%PageItemTitle%%

PgSqlSelectLimit Class | PgSqlSelectLimit Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlSelectLimit Class : ToString Method (PgSqlSelectLimit)

Returns a String that represents the current Object.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String that represents the current Object.

See Also

PgSqlSelectLimit Class | PgSqlSelectLimit Members


%%PageItemTitle%%

PgSqlSelectStatement Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectStatement Class

Devart.Data.PostgreSql Namespace : PgSqlSelectStatement Class

Represents PostgreSQL SELECT statement.

For a list of all members of this type, see PgSqlSelectStatement members.

Inheritance Hierarchy

System.Object
Devart.Common.SelectStatement
Devart.Data.PostgreSql.PgSqlSelectStatement

Syntax

[Visual Basic]
Public NotInheritable Class PgSqlSelectStatement
   Inherits SelectStatement
[C#]
public sealed class PgSqlSelectStatement : SelectStatement

Remarks

Use PgSqlSelectStatement to construct a SELECT statement in run time. The PgSqlSelectStatement provides an object-oriented interface for manipulating each part of SQL SELECT statements. Use the ToString method to retrieve text of the constructed statement.

Example

The following example demonstrates how to use the PgSqlSelectStatement class.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();

stmt.Columns.Add(new SelectColumn("test", "td", "dname", "Department"));
stmt.Columns.Add(new SelectColumn("", "td", "loc", "Location"));
stmt.Columns.Add(new SelectColumn("", "te", "ename", "Name"));

stmt.Tables.Add(new SelectTable("test", "dept", "td"));
stmt.Tables.Add(new SelectTable("", "emp", "te"));

stmt.GroupBy.Add(new SelectColumn("", "te", "empno", ""));
stmt.OrderBy.Add(new SelectColumn("", "te", "ename", ""));

[Visual Basic]

Dim stmt As New PgSqlSelectStatement

stmt.Columns.Add(New SelectColumn("test", "td", "dname", "Department"))
stmt.Columns.Add(New SelectColumn("", "td", "loc", "Location"))
stmt.Columns.Add(New SelectColumn("", "te", "ename", "Name"))

stmt.Tables.Add(New SelectTable("test", "dept", "td"))
stmt.Tables.Add(New SelectTable("", "emp", "te"))

stmt.GroupBy.Add(New SelectColumn("", "te", "empno", ""))
stmt.OrderBy.Add(New SelectColumn("", "te", "ename", ""))

See Also

PgSqlSelectStatement Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectStatement Class Members

Devart.Data.PostgreSql Namespace : PgSqlSelectStatement Class

PgSqlSelectStatement overview

Public Constructors

Public Constructor PgSqlSelectStatement Constructor Creates a new instance of the Devart.Data.PostgreSql.PgSqlSelectStatement class.

Public Properties

Public Property All (Inherited from Devart.Common.SelectStatement) | Gets or sets the value, indicating if the all records are selected or only the unique ones.
Public Property Columns (Inherited from Devart.Common.SelectStatement) | Contains list of columns and expressions used in the select-list of the current SelectStatement object.
Public Property Distinct (Inherited from Devart.Common.SelectStatement) | Gets or sets whether statement should request unique rows only.
Public Property GroupBy (Inherited from Devart.Common.SelectStatement) | Contains list of columns used in the GROUP BY clause of the current SelectStatement object.
Public Property Having (Inherited from Devart.Common.SelectStatement) | Gets or sets HAVING clause of the statement.
Public Property Limit | Gets or sets the LIMIT clause for the statement.
Public Property OrderBy (Inherited from Devart.Common.SelectStatement) | Contains list of columns used in the ORDER BY clause of the current SelectStatement object.
Public Property Tables (Inherited from Devart.Common.SelectStatement) | Contains list of tables and subqueries used in the FROM clause of the current SelectStatement object.
Public Property Where (Inherited from Devart.Common.SelectStatement) | Gets or sets WHERE clause of the statement.

Public Methods

Public Method AddHavingCondition (Inherited from Devart.Common.SelectStatement) | Adds new condition to HAVING clause of the statement, represented by the Having property.
Public Method AddWhereCondition (Inherited from Devart.Common.SelectStatement) | Adds new condition to WHERE clause of the statement, represented by the Where property.
Public Method Clear | Overridden. Clears all parts of the Devart.Data.PostgreSql.PgSqlSelectStatement.
Public Method static (Shared in Visual Basic) Parse | Converts the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.
Public Method ToString (Inherited from Devart.Common.SelectStatement) | Returns SQL statement in the text form.
Public Method static (Shared in Visual Basic) TryParse | Tries to convert the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.

See Also

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlSelectStatement Class | PgSqlSelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectStatement Constructor

Devart.Data.PostgreSql Namespace > PgSqlSelectStatement Class : PgSqlSelectStatement Constructor (PgSqlSelectStatement)

Creates a new instance of the Devart.Data.PostgreSql.PgSqlSelectStatement class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlSelectStatement();

Example

The following example demonstrates how to use the Devart.Data.PostgreSql.PgSqlSelectStatement constructor.

[C#]

PgSqlSelectStatement stmt = new PgSqlSelectStatement();
stmt.Columns.Add(new SelectColumn("JOB"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Distinct = true;

//select distinct JOB from emp
string queryText = stmt.ToString();

[Visual Basic]

Dim stmt As New PgSqlSelectStatement
stmt.Columns.Add(New SelectColumn("JOB"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.Distinct = True

'select distinct JOB from emp
Dim queryText As String = stmt.ToString

See Also

PgSqlSelectStatement Class | PgSqlSelectStatement Members


%%PageItemTitle%% $$Properties$$

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectStatement Class Properties

Devart.Data.PostgreSql Namespace : PgSqlSelectStatement Class

For a list of all members of this type, see PgSqlSelectStatement members.

Public Properties

Public Property All (Inherited from Devart.Common.SelectStatement) | Gets or sets the value, indicating if the all records are selected or only the unique ones.
Public Property Columns (Inherited from Devart.Common.SelectStatement) | Contains list of columns and expressions used in the select-list of the current SelectStatement object.
Public Property Distinct (Inherited from Devart.Common.SelectStatement) | Gets or sets whether statement should request unique rows only.
Public Property GroupBy (Inherited from Devart.Common.SelectStatement) | Contains list of columns used in the GROUP BY clause of the current SelectStatement object.
Public Property Having (Inherited from Devart.Common.SelectStatement) | Gets or sets HAVING clause of the statement.
Public Property Limit | Gets or sets the LIMIT clause for the statement.
Public Property OrderBy (Inherited from Devart.Common.SelectStatement) | Contains list of columns used in the ORDER BY clause of the current SelectStatement object.
Public Property Tables (Inherited from Devart.Common.SelectStatement) | Contains list of tables and subqueries used in the FROM clause of the current SelectStatement object.
Public Property Where (Inherited from Devart.Common.SelectStatement) | Gets or sets WHERE clause of the statement.

See Also

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlSelectStatement Class | PgSqlSelectStatement Members | PgSqlSelectLimit Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Limit Property

Devart.Data.PostgreSql Namespace > PgSqlSelectStatement Class : Limit Property

Gets or sets the LIMIT clause for the statement.

[Visual Basic]
Public Property Limit As PgSqlSelectLimit
[C#]
public PgSqlSelectLimit Limit {get; set;}

Return Type

The LIMIT clause for the statement.

See Also

PgSqlSelectStatement Class | PgSqlSelectStatement Members | PgSqlSelectLimit Class


%%PageItemTitle%% $$Methods$$

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlSelectStatement Class Methods

Devart.Data.PostgreSql Namespace : PgSqlSelectStatement Class

For a list of all members of this type, see PgSqlSelectStatement members.

Public Methods

Public Method AddHavingCondition (Inherited from Devart.Common.SelectStatement) | Adds new condition to HAVING clause of the statement, represented by the Having property.
Public Method AddWhereCondition (Inherited from Devart.Common.SelectStatement) | Adds new condition to WHERE clause of the statement, represented by the Where property.
Public Method Clear | Overridden. Clears all parts of the Devart.Data.PostgreSql.PgSqlSelectStatement.
Public Method static (Shared in Visual Basic) Parse | Converts the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.
Public Method ToString (Inherited from Devart.Common.SelectStatement) | Returns SQL statement in the text form.
Public Method static (Shared in Visual Basic) TryParse | Tries to convert the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.

See Also

PgSqlSelectStatement Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlSelectStatement Class | PgSqlSelectStatement Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Clear Method

Devart.Data.PostgreSql Namespace > PgSqlSelectStatement Class : Clear Method (PgSqlSelectStatement)

Clears all parts of the Devart.Data.PostgreSql.PgSqlSelectStatement.

[Visual Basic]
Overrides Public NotOverridable Sub Clear()
[C#]
public override void Clear();

Remarks

Call Devart.Data.PostgreSql.PgSqlSelectStatement to empty all properties of the Devart.Data.PostgreSql.PgSqlSelectStatement object.

Example

The following example demonstrates how to use the Clear method.

[C#]

private void RefreshStatement(PgSqlSelectStatement stmt)
{
  stmt.Clear();
  stmt.Columns.Add(new SelectColumn("ENAME"));
  stmt.Columns.Add(new SelectColumn("", "emp", "JOB", "j"));
  stmt.Columns.Add(new SelectColumn("test", "", "emp", "HIREDATE", "hd"));

  stmt.Tables.Add(new SelectTable("emp"));

  //select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  string queryText = stmt.ToString();
}

[Visual Basic]

Private Sub RefreshStatement(ByVal stmt As PgSqlSelectStatement)
  stmt.Clear()
  stmt.Columns.Add(New SelectColumn("ENAME"))
  stmt.Columns.Add(New SelectColumn("", "emp", "JOB", "j"))
  stmt.Columns.Add(New SelectColumn("test", "", "emp", "HIREDATE", "hd"))
  stmt.Tables.Add(New SelectTable("emp"))
  'select ENAME,emp.JOB j,Test.emp.HIREDATE hd from emp
  Dim queryText As String = stmt.ToString
End Sub

See Also

PgSqlSelectStatement Class | PgSqlSelectStatement Members


%%PageItemTitle%%

PgSqlSelectStatement Class | PgSqlSelectStatement Members | TryParse Method

Language

Visual Basic

C#

Show All

text
The statement to parse.
behavior
One of the Devart.Common.ParserBehavior values. Determines what parts of the statement to analyze.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlSelectStatement Class : Parse Method (PgSqlSelectStatement)

Converts the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.

[Visual Basic]
Public Shared Function Parse( _
   ByVal text As String, _
   ByVal behavior As ParserBehavior _
) As PgSqlSelectStatement
[C#]
public static PgSqlSelectStatement Parse(
   string text,
   ParserBehavior behavior
);

Parameters

text
The statement to parse.
behavior
One of the Devart.Common.ParserBehavior values. Determines what parts of the statement to analyze.

Return Type

A Devart.Data.PostgreSql.PgSqlSelectStatement object that represents the specified SELECT statement.

See Also

PgSqlSelectStatement Class | PgSqlSelectStatement Members | TryParse Method


%%PageItemTitle%%

PgSqlSelectStatement Class | PgSqlSelectStatement Members | Parse Method

Language

Visual Basic

C#

Show All

text
The statement to parse.
behavior
One of the Devart.Common.ParserBehavior values. Determines what parts of the statement to analyze.
statement
A Devart.Data.PostgreSql.PgSqlSelectStatement object that represents the specified SELECT statement.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TryParse Method

Devart.Data.PostgreSql Namespace > PgSqlSelectStatement Class : TryParse Method

Tries to convert the specified SELECT statement to a Devart.Data.PostgreSql.PgSqlSelectStatement object.

[Visual Basic]
Public Shared Function TryParse( _
   ByVal text As String, _
   ByVal behavior As ParserBehavior, _
   ByRef statement As PgSqlSelectStatement _
) As Boolean
[C#]
public static bool TryParse(
   string text,
   ParserBehavior behavior,
   out PgSqlSelectStatement statement
);

Parameters

text
The statement to parse.
behavior
One of the Devart.Common.ParserBehavior values. Determines what parts of the statement to analyze.
statement
A Devart.Data.PostgreSql.PgSqlSelectStatement object that represents the specified SELECT statement.

Return Type

true if the conversion was successful; otherwise, false

See Also

PgSqlSelectStatement Class | PgSqlSelectStatement Members | Parse Method


%%PageItemTitle%%

PgSqlStatementExecuteEventArgs Members | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlStatementExecuteEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlStatementExecuteEventArgs Class

Provides data for the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of the PgSqlScript class.

For a list of all members of this type, see PgSqlStatementExecuteEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Common.DbStatementExecuteEventArgs
Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs

Syntax

[Visual Basic]
Public Class PgSqlStatementExecuteEventArgs
   Inherits DbStatementExecuteEventArgs
[C#]
public class PgSqlStatementExecuteEventArgs : DbStatementExecuteEventArgs

Remarks

The Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event contains all information about a statement.

See Also

PgSqlStatementExecuteEventArgs Members | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate


%%PageItemTitle%% $$Members$$

PgSqlStatementExecuteEventArgs Class | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlStatementExecuteEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlStatementExecuteEventArgs Class

PgSqlStatementExecuteEventArgs overview

Public Properties

Public Property Length (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets length of the statement in symbols.
Public Property LineNumber (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets position of the statement in its line.
Public Property Offset (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets offset of the statement in the whole script text.
Public Property Reader | Gets or sets an PgSqlDataReader that represents statement resultset.
Public Property StatementStatus (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Determines status of the statement and script execution.
Public Property StatementType (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets type of the statement.
Public Property Text (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets the SQL statement that is about to be executed.

See Also

PgSqlStatementExecuteEventArgs Class | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate


%%PageItemTitle%% $$Properties$$

PgSqlStatementExecuteEventArgs Class | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlStatementExecuteEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlStatementExecuteEventArgs Class

For a list of all members of this type, see PgSqlStatementExecuteEventArgs members.

Public Properties

Public Property Length (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets length of the statement in symbols.
Public Property LineNumber (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets number of line in the whole script where the statement can be located.
Public Property LinePosition (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets position of the statement in its line.
Public Property Offset (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets offset of the statement in the whole script text.
Public Property Reader | Gets or sets an PgSqlDataReader that represents statement resultset.
Public Property StatementStatus (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Determines status of the statement and script execution.
Public Property StatementType (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets type of the statement.
Public Property Text (Inherited from Devart.Common.DbStatementExecuteEventArgs) | Gets the SQL statement that is about to be executed.

See Also

PgSqlStatementExecuteEventArgs Class | Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventHandler Delegate


%%PageItemTitle%%

PgSqlStatementExecuteEventArgs Class | PgSqlStatementExecuteEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Reader Property

Devart.Data.PostgreSql Namespace > PgSqlStatementExecuteEventArgs Class : Reader Property (PgSqlStatementExecuteEventArgs)

Gets or sets an PgSqlDataReader that represents statement resultset.

[Visual Basic]
Public Property Reader As PgSqlDataReader
[C#]
public PgSqlDataReader Reader {get; set;}

Return Type

An PgSqlDataReader object. This property can be null.

Remarks

Use this property when you set StatementStatus to SqlStatementStatus.SkipStatement.

See Also

PgSqlStatementExecuteEventArgs Class | PgSqlStatementExecuteEventArgs Members


%%PageItemTitle%%

PgSqlTableChangeEventArgs Members | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTableChangeEventArgs Class

Devart.Data.PostgreSql Namespace : PgSqlTableChangeEventArgs Class

Provides data for the PgSqlDependency.OnChange event of the PgSqlDependency class.

For a list of all members of this type, see PgSqlTableChangeEventArgs members.

Inheritance Hierarchy

System.Object
System.EventArgs
Devart.Data.PostgreSql.PgSqlTableChangeEventArgs

Syntax

[Visual Basic]
Public Class PgSqlTableChangeEventArgs
   Inherits EventArgs
[C#]
public class PgSqlTableChangeEventArgs : EventArgs

Remarks

The PgSqlTableChangeEventArgs object contains information about what table was modified and what PgSqlCommand object contains SELECT statement with this table.

See Also

PgSqlTableChangeEventArgs Members | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate


%%PageItemTitle%% $$Members$$

PgSqlTableChangeEventArgs Class | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTableChangeEventArgs Class Members

Devart.Data.PostgreSql Namespace : PgSqlTableChangeEventArgs Class

PgSqlTableChangeEventArgs overview

Public Properties

Public Property Command | Gets PgSqlCommand object associated with the table that was modified on the server.
Public Property TableName | Gets name of the table that was modified on the server.

See Also

PgSqlTableChangeEventArgs Class | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate


%%PageItemTitle%% $$Properties$$

PgSqlTableChangeEventArgs Class | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTableChangeEventArgs Class Properties

Devart.Data.PostgreSql Namespace : PgSqlTableChangeEventArgs Class

For a list of all members of this type, see PgSqlTableChangeEventArgs members.

Public Properties

Public Property Command | Gets PgSqlCommand object associated with the table that was modified on the server.
Public Property TableName | Gets name of the table that was modified on the server.

See Also

PgSqlTableChangeEventArgs Class | Devart.Data.PostgreSql Namespace | OnChange Event | OnChangeEventHandler Delegate


%%PageItemTitle%%

PgSqlTableChangeEventArgs Class | PgSqlTableChangeEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Command Property

Devart.Data.PostgreSql Namespace > PgSqlTableChangeEventArgs Class : Command Property (PgSqlTableChangeEventArgs)

Gets PgSqlCommand object associated with the table that was modified on the server.

[Visual Basic]
Public ReadOnly Property Command As PgSqlCommand
[C#]
public PgSqlCommand Command {get;}

Return Type

A PgSqlCommand object.

See Also

PgSqlTableChangeEventArgs Class | PgSqlTableChangeEventArgs Members


%%PageItemTitle%%

PgSqlTableChangeEventArgs Class | PgSqlTableChangeEventArgs Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TableName Property

Devart.Data.PostgreSql Namespace > PgSqlTableChangeEventArgs Class : TableName Property (PgSqlTableChangeEventArgs)

Gets name of the table that was modified on the server.

[Visual Basic]
Public ReadOnly Property TableName As String
[C#]
public string TableName {get;}

Return Type

Name of the table that was modified on the server.

See Also

PgSqlTableChangeEventArgs Class | PgSqlTableChangeEventArgs Members


%%PageItemTitle%%

PgSqlText Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Class

Devart.Data.PostgreSql Namespace : PgSqlText Class

Represents a variable-length stream of characters to be stored in or retrieved from the database.

For a list of all members of this type, see PgSqlText members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.IO.Stream
Devart.Data.PostgreSql.PgSqlBlob
Devart.Data.PostgreSql.PgSqlText

Syntax

[Visual Basic]
Public Class PgSqlText
   Inherits PgSqlBlob
   Implements INullable, ICloneable, IComparable, IDisposable, IXmlSerializable
[C#]
public class PgSqlText : PgSqlBlob, INullable, ICloneable, IComparable, IDisposable, IXmlSerializable

See Also

PgSqlText Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlText Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Class Members

Devart.Data.PostgreSql Namespace : PgSqlText Class

PgSqlText overview

Public Constructors

Public Constructor PgSqlText Constructor Overloaded. Initializes a new instance of the PgSqlText class.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null value that can be assigned to the Value property of the PgSqlText object.

Public Properties

Public Property CanRead (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob stream can be read.
Public Property CanSeek (Inherited from PgSqlBlob) | Gets a value indicating whether forward and backward seek operations can be performed.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob object supports writing.
Public Property IsEmpty (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob is empty or not.
Public Property IsNull (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob is a Null stream.
Public Property Length (Inherited from PgSqlBlob) | Gets the size of the PgSqlBlob.
Public Property Position (Inherited from PgSqlBlob) | Gets the current read position in the PgSqlBlob stream.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property Value | Gets the string that is stored in the specified PgSqlText object.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Clone (Inherited from PgSqlBlob) | Creates a copy of the current PgSqlBlob object.
Public Method Close (Inherited from PgSqlBlob) | Closes the current stream and releases any resources associated with it.
Public Method CompareTo | Overloaded.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from PgSqlBlob) | Releases all resources allocated by this object.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlText value.
Public Method Flush (Inherited from PgSqlBlob) | Flush/write all buffers for the current PgSqlBlob.
Public Method GetHashCode | Overridden.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Read (Inherited from PgSqlBlob) | Reads a sequence of bytes from the current PgSqlBlob stream and advances the position within the stream by the number of bytes read.
Public Method ReadByte (Inherited from System.IO.Stream) | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Public Method Seek (Inherited from PgSqlBlob) | Sets the position on the current PgSqlBlob stream.
Public Method SetLength (Inherited from PgSqlBlob) | Sets length for PgSqlBlob value.
Public Method ToString | Overridden. Gets the string representation of the PgSqlText object.
Public Method Write (Inherited from PgSqlBlob) | Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.
Public Method WriteByte (Inherited from System.IO.Stream) | Writes a byte to the current position in the stream and advances the position within the stream by one byte.

See Also

PgSqlText Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Constructor

Devart.Data.PostgreSql Namespace > PgSqlText Class : PgSqlText Constructor (PgSqlText)

Initializes a new instance of the PgSqlText class.

Overload List

Initializes a new instance of the PgSqlText class.

[Visual Basic] Public Sub New()

[C#] public PgSqlText();

Initializes a new instance of the PgSqlText class, setting the Value property to the specified string.

[Visual Basic] Public Sub New(String)

[C#] public PgSqlText(string);

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Constructor()

Devart.Data.PostgreSql Namespace > PgSqlText Class > PgSqlText Constructor : PgSqlText Constructor()

Initializes a new instance of the PgSqlText class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlText();

See Also

PgSqlText Class | PgSqlText Members | Overload List


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members | Overload List

Language

Visual Basic

C#

Show All

value
The string to store.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Constructor(String)

Devart.Data.PostgreSql Namespace > PgSqlText Class > PgSqlText Constructor : PgSqlText Constructor(String)

Initializes a new instance of the PgSqlText class, setting the Value property to the specified string.

[Visual Basic]
Public Function New( _
   ByVal value As String _
)
[C#]
public PgSqlText(
   string value
);

Parameters

value
The string to store.

See Also

PgSqlText Class | PgSqlText Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlText Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Class Fields

Devart.Data.PostgreSql Namespace : PgSqlText Class

For a list of all members of this type, see PgSqlText members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null value that can be assigned to the Value property of the PgSqlText object.

See Also

PgSqlText Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlText Class : Null Field (PgSqlText)

Represents a null value that can be assigned to the Value property of the PgSqlText object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlText
[C#]
public static readonly PgSqlText Null

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%% $$Properties$$

PgSqlText Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Class Properties

Devart.Data.PostgreSql Namespace : PgSqlText Class

For a list of all members of this type, see PgSqlText members.

Public Properties

Public Property CanRead (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob stream can be read.
Public Property CanSeek (Inherited from PgSqlBlob) | Gets a value indicating whether forward and backward seek operations can be performed.
Public Property CanTimeout (Inherited from System.IO.Stream) | Gets a value that determines whether the current stream can time out.
Public Property CanWrite (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob object supports writing.
Public Property IsEmpty (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob is empty or not.
Public Property IsNull (Inherited from PgSqlBlob) | Gets a value indicating whether the PgSqlBlob is a Null stream.
Public Property Length (Inherited from PgSqlBlob) | Gets the size of the PgSqlBlob.
Public Property Position (Inherited from PgSqlBlob) | Gets the current read position in the PgSqlBlob stream.
Public Property ReadTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
Public Property Value | Gets the string that is stored in the specified PgSqlText object.
Public Property WriteTimeout (Inherited from System.IO.Stream) | Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.

See Also

PgSqlText Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Value Property

Devart.Data.PostgreSql Namespace > PgSqlText Class : Value Property (PgSqlText)

Gets the string that is stored in the specified PgSqlText object.

[Visual Basic]
Public ReadOnly Property Value As String
[C#]
public string Value {get;}

Return Type

The string to be stored or value retrieved from database.

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%% $$Methods$$

PgSqlText Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlText Class Methods

Devart.Data.PostgreSql Namespace : PgSqlText Class

For a list of all members of this type, see PgSqlText members.

Public Methods

Public Method BeginRead (Inherited from System.IO.Stream) |
Public Method BeginWrite (Inherited from System.IO.Stream) |
Public Method Clone (Inherited from PgSqlBlob) | Creates a copy of the current PgSqlBlob object.
Public Method Close (Inherited from PgSqlBlob) | Closes the current stream and releases any resources associated with it.
Public Method CompareTo | Overloaded.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from PgSqlBlob) | Releases all resources allocated by this object.
Public Method EndRead (Inherited from System.IO.Stream) | Waits for the pending asynchronous read to complete.
Public Method EndWrite (Inherited from System.IO.Stream) | Ends an asynchronous write operation.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlText value.
Public Method Flush (Inherited from PgSqlBlob) | Flush/write all buffers for the current PgSqlBlob.
Public Method GetHashCode | Overridden.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Read (Inherited from PgSqlBlob) | Reads a sequence of bytes from the current PgSqlBlob stream and advances the position within the stream by the number of bytes read.
Public Method ReadByte (Inherited from System.IO.Stream) | Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream.
Public Method Seek (Inherited from PgSqlBlob) | Sets the position on the current PgSqlBlob stream.
Public Method SetLength (Inherited from PgSqlBlob) | Sets length for PgSqlBlob value.
Public Method ToString | Overridden. Gets the string representation of the PgSqlText object.
Public Method Write (Inherited from PgSqlBlob) | Writes a sequence of bytes to the current PgSqlBlob stream, and advances the current position within this stream by the number of bytes written.
Public Method WriteByte (Inherited from System.IO.Stream) | Writes a byte to the current position in the stream and advances the position within the stream by one byte.

See Also

PgSqlText Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlText Class : CompareTo Method (PgSqlText)

Overload List

[Visual Basic] Overloads Public Function CompareTo(PgSqlText) As Integer

[C#] public int CompareTo(PgSqlText);

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members | Overload List

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlText) Method

Devart.Data.PostgreSql Namespace > PgSqlText Class > CompareTo Method : CompareTo(PgSqlText) Method
[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlText _
) As Integer
[C#]
public int CompareTo(
   PgSqlText value
);

Parameters

value

See Also

PgSqlText Class | PgSqlText Members | Overload List


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members | Overload List

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlText Class > CompareTo Method : CompareTo(Object) Method
[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value

See Also

PgSqlText Class | PgSqlText Members | Overload List


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlText Class : Equals Method (PgSqlText)

Compares the specified object parameter to the PgSqlText value.

[Visual Basic]
Overrides Public Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlText and has the same date and time; otherwise, false.

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlText Class : GetHashCode Method (PgSqlText)
[Visual Basic]
Overrides Public Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%%

PgSqlText Class | PgSqlText Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlText Class : ToString Method (PgSqlText)

Gets the string representation of the PgSqlText object.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

The string representation of the PgSqlText object.

See Also

PgSqlText Class | PgSqlText Members


%%PageItemTitle%%

PgSqlTimeStampRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Class

Devart.Data.PostgreSql Namespace : PgSqlTimeStampRange Class

Represents the PostgreSQL tsrange type. Each object of the PgSqlTimeStampRange class stores a range of integer values.

For a list of all members of this type, see PgSqlTimeStampRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>
Devart.Data.PostgreSql.PgSqlTimeStampRange

Syntax

[Visual Basic]
Public Class PgSqlTimeStampRange
   Inherits PgSqlRangeType(Of PgSqlTimeStamp)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlTimeStampRange : PgSqlRangeType<PgSqlTimeStamp>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlTimeStampRange object call the PgSqlDataReader.GetPgSqlTimeStampRange method of the PgSqlDataReader class.

See Also

PgSqlTimeStampRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlTimeStampRange Class

PgSqlTimeStampRange overview

Public Constructors

Public Constructor PgSqlTimeStampRange Constructor Overloaded. Initializes a new instance of the PgSqlTimeStampRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlTimeStampRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlTimeStampRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class : PgSqlTimeStampRange Constructor (PgSqlTimeStampRange)

Initializes a new instance of the PgSqlTimeStampRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlTimeStampRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,PgSqlTimeStamp)

[C#] public PgSqlTimeStampRange(PgSqlTimeStamp,PgSqlTimeStamp);

Initializes a new instance of the PgSqlTimeStampRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

[C#] public PgSqlTimeStampRange(PgSqlTimeStamp,bool,PgSqlTimeStamp,bool);

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class > PgSqlTimeStampRange Constructor : PgSqlTimeStampRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Initializes a new instance of the PgSqlTimeStampRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As PgSqlTimeStamp, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlTimeStampRange(
   PgSqlTimeStamp lowerBound,
   bool isLowerBoundInclusive,
   PgSqlTimeStamp upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | Overload List | #ctor


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class > PgSqlTimeStampRange Constructor : PgSqlTimeStampRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Initializes a new instance of the PgSqlTimeStampRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal upperBound As PgSqlTimeStamp _
)
[C#]
public PgSqlTimeStampRange(
   PgSqlTimeStamp lowerBound,
   PgSqlTimeStamp upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | Overload List | #ctor


%%PageItemTitle%% $$Fields$$

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlTimeStampRange Class

For a list of all members of this type, see PgSqlTimeStampRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlTimeStampRange object.

See Also

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class : Empty Field (PgSqlTimeStampRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlTimeStampRange
[C#]
public static readonly PgSqlTimeStampRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class : Null Field (PgSqlTimeStampRange)

Represents a null PgSqlTimeStampRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlTimeStampRange
[C#]
public static readonly PgSqlTimeStampRange Null

Return Type

An object that represents a null PgSqlTimeStampRange value.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members | IsNull Property


%%PageItemTitle%% $$Methods$$

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlTimeStampRange Class

For a list of all members of this type, see PgSqlTimeStampRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlTimeStampRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class : ContainsElement Method (PgSqlTimeStampRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As PgSqlTimeStamp _
) As Boolean
[C#]
public override bool ContainsElement(
   PgSqlTimeStamp element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members


%%PageItemTitle%%

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStampRange Class : Parse Method (PgSqlTimeStampRange)

Converts the specified String representation of a date to its PgSqlTimeStampRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlTimeStampRange
[C#]
public static PgSqlTimeStampRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlTimeStampRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlTimeStampRange Class | PgSqlTimeStampRange Members


%%PageItemTitle%%

PgSqlTimeStampTZRange Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Class

Devart.Data.PostgreSql Namespace : PgSqlTimeStampTZRange Class

Represents the PostgreSQL tstzrange type. Each object of the PgSqlTimeStampTZRange class stores a range of integer values.

For a list of all members of this type, see PgSqlTimeStampTZRange members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>
Devart.Data.PostgreSql.PgSqlTimeStampTZRange

Syntax

[Visual Basic]
Public Class PgSqlTimeStampTZRange
   Inherits PgSqlRangeType(Of PgSqlTimeStamp)
   Implements INullable, IXmlSerializable
[C#]
public class PgSqlTimeStampTZRange : PgSqlRangeType<PgSqlTimeStamp>, INullable, IXmlSerializable

Remarks

To obtain a PgSqlTimeStampTZRange object call the PgSqlDataReader.GetPgSqlTimeStampTZRange method of the PgSqlDataReader class.

See Also

PgSqlTimeStampTZRange Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Class Members

Devart.Data.PostgreSql Namespace : PgSqlTimeStampTZRange Class

PgSqlTimeStampTZRange overview

Public Constructors

Public Constructor PgSqlTimeStampTZRange Constructor Overloaded. Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlTimeStampTZRange object.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlTimeStampTZRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Constructor

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class : PgSqlTimeStampTZRange Constructor (PgSqlTimeStampTZRange)

Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,PgSqlTimeStamp)

[C#] public PgSqlTimeStampTZRange(PgSqlTimeStamp,PgSqlTimeStamp);

Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic] Public Sub New(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

[C#] public PgSqlTimeStampTZRange(PgSqlTimeStamp,bool,PgSqlTimeStamp,bool);

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class > PgSqlTimeStampTZRange Constructor : PgSqlTimeStampTZRange Constructor(PgSqlTimeStamp,Boolean,PgSqlTimeStamp,Boolean)

Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal isLowerBoundInclusive As Boolean, _
   ByVal upperBound As PgSqlTimeStamp, _
   ByVal isUpperBoundInclusive As Boolean _
)
[C#]
public PgSqlTimeStampTZRange(
   PgSqlTimeStamp lowerBound,
   bool isLowerBoundInclusive,
   PgSqlTimeStamp upperBound,
   bool isUpperBoundInclusive
);

Parameters

lowerBound
Lower bound.
isLowerBoundInclusive
If true, the lower bound of the range will be inclusive. If false, it is exclusive.
upperBound
Upper bound.
isUpperBoundInclusive
If true, the upper bound of the range will be inclusive. If false, it is exclusive.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | Overload List | #ctor


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | Overload List | #ctor

Language

Visual Basic

C#

Show All

lowerBound
Lower bound.
upperBound
Upper bound.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class > PgSqlTimeStampTZRange Constructor : PgSqlTimeStampTZRange Constructor(PgSqlTimeStamp,PgSqlTimeStamp)

Initializes a new instance of the PgSqlTimeStampTZRange structure with the specified range bounds. This constructor allows specifying whether each bound will be inclusive or not.

[Visual Basic]
Public Function New( _
   ByVal lowerBound As PgSqlTimeStamp, _
   ByVal upperBound As PgSqlTimeStamp _
)
[C#]
public PgSqlTimeStampTZRange(
   PgSqlTimeStamp lowerBound,
   PgSqlTimeStamp upperBound
);

Parameters

lowerBound
Lower bound.
upperBound
Upper bound.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | Overload List | #ctor


%%PageItemTitle%% $$Fields$$

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Class Fields

Devart.Data.PostgreSql Namespace : PgSqlTimeStampTZRange Class

For a list of all members of this type, see PgSqlTimeStampTZRange members.

Public Fields

Public Field static (Shared in Visual Basic) Empty | Returns a range with no elements in it.
Public Field static (Shared in Visual Basic) Null | Represents a null PgSqlTimeStampTZRange object.

See Also

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Empty Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class : Empty Field (PgSqlTimeStampTZRange)

Returns a range with no elements in it.

[Visual Basic]
Public Shared ReadOnly Empty As PgSqlTimeStampTZRange
[C#]
public static readonly PgSqlTimeStampTZRange Empty

Return Type

A range with no elements in it.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class : Null Field (PgSqlTimeStampTZRange)

Represents a null PgSqlTimeStampTZRange object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlTimeStampTZRange
[C#]
public static readonly PgSqlTimeStampTZRange Null

Return Type

An object that represents a null PgSqlTimeStampTZRange value.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members | IsNull Property


%%PageItemTitle%% $$Methods$$

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Class Methods

Devart.Data.PostgreSql Namespace : PgSqlTimeStampTZRange Class

For a list of all members of this type, see PgSqlTimeStampTZRange members.

Public Methods

Public Method ContainsElement | Overridden. Determines whether the specified value is contained by the range.
Public Method Equals (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Determines if the specified object is an instance of Generic PgSqlRangeType and has the same values as the current Generic PgSqlRangeType instance.
Public Method GetHashCode (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Returns a hash code for the Generic PgSqlRangeType type.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlTimeStampTZRange equivalent.
Public Method ToString (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Converts the current PgSqlPath structure to a String.

See Also

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members

Language

Visual Basic

C#

Show All

element
The value to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ContainsElement Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class : ContainsElement Method (PgSqlTimeStampTZRange)

Determines whether the specified value is contained by the range.

[Visual Basic]
Overrides Public Function ContainsElement( _
   ByVal element As PgSqlTimeStamp _
) As Boolean
[C#]
public override bool ContainsElement(
   PgSqlTimeStamp element
);

Parameters

element
The value to check.

Return Type

true if the range contains the specified value; otherwise, false.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members


%%PageItemTitle%%

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStampTZRange Class : Parse Method (PgSqlTimeStampTZRange)

Converts the specified String representation of a date to its PgSqlTimeStampTZRange equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlTimeStampTZRange
[C#]
public static PgSqlTimeStampTZRange Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlTimeStampTZRange structure equal to the date represented by the specified String.

Remarks

For the details of the val string format see PostgreSQL server documentation.

See Also

PgSqlTimeStampTZRange Class | PgSqlTimeStampTZRange Members


%%PageItemTitle%%

PgSqlTransaction Members | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTransaction Class

Devart.Data.PostgreSql Namespace : PgSqlTransaction Class

Represents a SQL transaction to be made in the PostgreSQL database.

For a list of all members of this type, see PgSqlTransaction members.

Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.Data.Common.DbTransaction
Devart.Common.DbTransactionBase
Devart.Data.PostgreSql.PgSqlTransaction

Syntax

[Visual Basic]
Public Class PgSqlTransaction
   Inherits DbTransactionBase
   Implements IDbTransaction, IDisposable
[C#]
public class PgSqlTransaction : DbTransactionBase, IDbTransaction, IDisposable

Remarks

The application creates a PgSqlTransaction object by calling PgSqlConnection.BeginTransaction on the PgSqlConnection object. All subsequent operations associated with the transaction (for example, committing or aborting the transaction), are performed on the PgSqlTransaction object.

The correlation between PgSqlConnection and PgSqlTransaction is always 1:1.

Example

The following example creates a PgSqlConnection and a PgSqlTransaction. It also demonstrates how to use the PgSqlConnection.BeginTransaction, Commit, and Rollback methods.

[C#]

public static void RunPgSqlTransaction(string myConnString) {
    using (PgSqlConnection pgConnection = new PgSqlConnection(myConnString)) {
        pgConnection.Open();
        // Start a local transaction
        PgSqlTransaction myTrans = pgConnection.BeginTransaction(System.Data.IsolationLevel.ReadCommitted);
        PgSqlCommand pgCommand = pgConnection.CreateCommand();
        try {
            pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(52, 'DEVELOPMENT')";
            pgCommand.ExecuteNonQuery();
            pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(62, 'PRODUCTION')";
            pgCommand.ExecuteNonQuery();
            myTrans.Commit();
            Console.WriteLine("Both records are written to database.");
        }
        catch (Exception e) {
            myTrans.Rollback();
            Console.WriteLine(e.ToString());
            Console.WriteLine("Neither record was written to database.");
        }
        finally {
            pgCommand.Dispose();
            myTrans.Dispose();
        }
    }
}

[Visual Basic]

Public Shared Sub RunPgSqlTransaction(myConnString As String)
    Using pgConnection As New PgSqlConnection(myConnString)
        pgConnection.Open()
        ' Start a local transaction
        Dim myTrans As PgSqlTransaction = pgConnection.BeginTransaction(System.Data.IsolationLevel.ReadCommitted)
        Dim pgCommand As PgSqlCommand = pgConnection.CreateCommand()
        Try
            pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(52, 'DEVELOPMENT')"
            pgCommand.ExecuteNonQuery()
            pgCommand.CommandText = "INSERT INTO Dept(DeptNo, DName) Values(62, 'PRODUCTION')"
            pgCommand.ExecuteNonQuery()
            myTrans.Commit()
            Console.WriteLine("Both records are written to database.")
        Catch e As Exception
            myTrans.Rollback()
            Console.WriteLine(e.ToString())
            Console.WriteLine("Neither record was written to database.")
        Finally
            pgCommand.Dispose()
            myTrans.Dispose()
        End Try
    End Using
End Sub

See Also

PgSqlTransaction Members | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%% $$Members$$

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTransaction Class Members

Devart.Data.PostgreSql Namespace : PgSqlTransaction Class

PgSqlTransaction overview

Public Properties

Public Property Connection | Gets the PgSqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.
Public Property IsolationLevel | Overridden. Specifies the IsolationLevel for this transaction.

Public Methods

Public Method Commit | Overridden. Commits the database transaction.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.Data.Common.DbTransaction) | Releases the unmanaged resources used by the DbTransaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Release | Removes the named savepoint from the set of savepoints of the current transaction.
Public Method Rollback | Overloaded. Overridden. Rolls back a database transaction.
Public Method Save | Sets a named transaction savepoint with a given name.

Public Events

Public Event StateChanged (Inherited from Devart.Common.DbTransactionBase) | Occurs when the state of the transaction is changed.
Public Event StateChanging (Inherited from Devart.Common.DbTransactionBase) | Occurs when the state of the transaction is changing.

See Also

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%% $$Properties$$

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTransaction Class Properties

Devart.Data.PostgreSql Namespace : PgSqlTransaction Class

For a list of all members of this type, see PgSqlTransaction members.

Public Properties

Public Property Connection | Gets the PgSqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.
Public Property IsolationLevel | Overridden. Specifies the IsolationLevel for this transaction.

See Also

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Connection Property

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : Connection Property (PgSqlTransaction)

Gets the PgSqlConnection object associated with the transaction, or a null reference (Nothing in Visual Basic) if the transaction is no longer valid.

[Visual Basic]
Public ReadOnly Property Connection As PgSqlConnection
[C#]
public PgSqlConnection Connection {get;}

Return Type

The PgSqlConnection object associated with the transaction.

Remarks

A single application may have multiple database connections, and each connection may have a transaction. This property enables you to determine the PgSqlConnection object associated with a particular transaction created by BeginTransaction.

See Also

PgSqlTransaction Class | PgSqlTransaction Members


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsolationLevel Property

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : IsolationLevel Property (PgSqlTransaction)

Specifies the IsolationLevel for this transaction.

[Visual Basic]
Overrides Public ReadOnly Property IsolationLevel As IsolationLevel
[C#]
public override IsolationLevel IsolationLevel {get;}

Return Type

The IsolationLevel for this transaction. The default value is IsolationLevel.ReadCommitted.

Remarks

The IsolationLevel applies to the entire transaction. The following isolation levels are supported by dotConnect for PostgreSQL:

  • ReadCommitted
  • Serializable
  • ReadUncommitted
  • RepeatableRead

See Also

PgSqlTransaction Class | PgSqlTransaction Members


%%PageItemTitle%% $$Methods$$

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTransaction Class Methods

Devart.Data.PostgreSql Namespace : PgSqlTransaction Class

For a list of all members of this type, see PgSqlTransaction members.

Public Methods

Public Method Commit | Overridden. Commits the database transaction.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.Data.Common.DbTransaction) | Releases the unmanaged resources used by the DbTransaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Release | Removes the named savepoint from the set of savepoints of the current transaction.
Public Method Rollback | Overloaded. Overridden. Rolls back a database transaction.
Public Method Save | Sets a named transaction savepoint with a given name.

See Also

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members | BeginTransaction Method | Rollback Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Commit Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : Commit Method (PgSqlTransaction)

Commits the database transaction.

[Visual Basic]
Overrides Public Sub Commit()
[C#]
public override void Commit();

Remarks

The Commit method is equivalent to the SQL COMMIT statement.

Example

The following example creates a PgSqlConnection and a PgSqlTransaction. It also demonstrates how to use the PgSqlConnection.BeginTransaction, Commit, and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();

  PgSqlCommand pgCommand = new PgSqlCommand();
  PgSqlTransaction myTrans;

  // Start a local transaction
  myTrans = pgConnection.BeginTransaction();
  // Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans;

  try
  {
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    myTrans.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    myTrans.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()

  Dim pgCommand As New PgSqlCommand()
  Dim myTrans As PgSqlTransaction

  ' Start a local transaction
  myTrans = pgConnection.BeginTransaction()
  ' Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans

  Try
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    myTrans.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    myTrans.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlTransaction Class | PgSqlTransaction Members | BeginTransaction Method | Rollback Method


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members

Language

Visual Basic

C#

Show All

savePointName
The name of the savepoint.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Release Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : Release Method

Removes the named savepoint from the set of savepoints of the current transaction.

[Visual Basic]
Public Sub Release( _
   ByVal savePointName As String _
)
[C#]
public void Release(
   string savePointName
);

Parameters

savePointName
The name of the savepoint.

See Also

PgSqlTransaction Class | PgSqlTransaction Members


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rollback Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : Rollback Method (PgSqlTransaction)

Rolls back a database transaction.

Overload List

Rolls back a database transaction from a pending state.

[Visual Basic] Overloads Overrides Public Sub Rollback()

[C#] public override void Rollback();

Rolls back a database transaction to a savepoint within the current transaction.

[Visual Basic] Overloads Public Sub Rollback(String)

[C#] public void Rollback(string);

See Also

PgSqlTransaction Class | PgSqlTransaction Members


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members | Overload List | BeginTransaction Method | Commit Method | Save Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rollback() Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class > Rollback Method : Rollback() Method

Rolls back a database transaction from a pending state.

[Visual Basic]
Overloads Overrides Public Sub Rollback()
[C#]
public override void Rollback();

Remarks

The Rollback method is equivalent to the SQL ROLLBACK statement. The transaction can only be rolled back from a pending state (after PgSqlConnection.BeginTransaction has been called, but before PgSqlTransaction.Commit is called).

Example

The following example creates a PgSqlConnection and a PgSqlTransaction. It also demonstrates how to use the PgSqlConnection.BeginTransaction, PgSqlTransaction.Commit, and Rollback methods.

[C#]

public void RunPgSqlTransaction(string myConnString)
{
  PgSqlConnection pgConnection = new PgSqlConnection(myConnString);
  pgConnection.Open();

  PgSqlCommand pgCommand = new PgSqlCommand();
  PgSqlTransaction myTrans;

  // Start a local transaction
  myTrans = pgConnection.BeginTransaction();
  // Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans;

  try
  {
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')";
    pgCommand.ExecuteNonQuery();
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')";
    pgCommand.ExecuteNonQuery();
    myTrans.Commit();
    Console.WriteLine("Both records are written to database.");
  }
  catch(Exception e)
  {
    myTrans.Rollback();
    Console.WriteLine(e.ToString());
    Console.WriteLine("Neither record was written to database.");
  }
  finally
  {
    pgConnection.Close();
  }
}

[Visual Basic]

Public Sub RunPgSqlTransaction(myConnString As String)
  Dim pgConnection As New PgSqlConnection(myConnString)
  pgConnection.Open()

  Dim pgCommand As New PgSqlCommand()
  Dim myTrans As PgSqlTransaction

  ' Start a local transaction
  myTrans = pgConnection.BeginTransaction()
  ' Assign transaction object for a pending local transaction
  pgCommand.Transaction = myTrans

  Try
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(50, 'DEVELOPMENT')"
    pgCommand.ExecuteNonQuery()
    pgCommand.CommandText = "INSERT INTO Test.Dept(DeptNo, DName) Values(60, 'PRODUCTION')"
    pgCommand.ExecuteNonQuery()
    myTrans.Commit()
    Console.WriteLine("Both records are written to database.")
  Catch e As Exception
    myTrans.Rollback()
    Console.WriteLine(e.ToString())
    Console.WriteLine("Neither record was written to database.")
  Finally
    pgConnection.Close()
  End Try
End Sub

See Also

PgSqlTransaction Class | PgSqlTransaction Members | Overload List | BeginTransaction Method | Commit Method | Save Method


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members | Overload List | BeginTransaction Method | Commit Method | Save Method

Language

Visual Basic

C#

Show All

savePointName
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rollback(String) Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class > Rollback Method : Rollback(String) Method

Rolls back a database transaction to a savepoint within the current transaction.

[Visual Basic]
Overloads Public Sub Rollback( _
   ByVal savePointName As String _
)
[C#]
public void Rollback(
   string savePointName
);

Parameters

savePointName

Remarks

After a rollback to a savepoint, the current transaction remains active and can be used for further operations.

See Also

PgSqlTransaction Class | PgSqlTransaction Members | Overload List | BeginTransaction Method | Commit Method | Save Method


%%PageItemTitle%%

PgSqlTransaction Class | PgSqlTransaction Members

Language

Visual Basic

C#

Show All

savePointName
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Save Method

Devart.Data.PostgreSql Namespace > PgSqlTransaction Class : Save Method

Sets a named transaction savepoint with a given name.

[Visual Basic]
Public Sub Save( _
   ByVal savePointName As String _
)
[C#]
public void Save(
   string savePointName
);

Parameters

savePointName

See Also

PgSqlTransaction Class | PgSqlTransaction Members


%%PageItemTitle%%

SslOptions Members | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Class

Devart.Data.PostgreSql Namespace : SslOptions Class (Devart.Data.PostgreSql)

Represents information required to establish a SSL connection.

For a list of all members of this type, see SslOptions members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.SslOptions

Syntax

[Visual Basic]
Public NotInheritable Class SslOptions
[C#]
public sealed class SslOptions

Remarks

This class is used in conjunction with PgSqlConnection to establish secure connection.

The following files are required for SSL encryption:

  • Authority certificate (for example root.crt) - used to verify identity of client and server.
  • Client certificate (for example client.crt) - used to encrypt and decrypt data during connection.
  • Private key (for example client.crt) - proves client certificate sent by owner; does not indicate certificate owner is trustworthy.

For more information on client side configuration you can visit OpenSSL site at http://openssl.org/. For information on SSL support in PostgreSQL server, refer to the PostgreSQL documentation topic Secure TCP/IP Connections with SSL.

Example

The following example shows how to enable SSL data transfer with dotConnect for PostgreSQL.

[C#]

PgSqlConnection conn = new PgSqlConnection("user id=postgres;password=postgres;host=localhost;");
conn.SslOptions.CACert = "E:\\Test\\root.crt";
conn.SslOptions.Cert = "E:\\Test\\client.crt";
conn.SslOptions.Key = "E:\\Test\\client.key";
conn.SslOptions.SslMode = SslMode.Require;
conn.Open();

[Visual Basic]

Dim conn As PgSqlConnection = New PgSqlConnection("user id=postgres;password=postgres;host=localhost;")
conn.SslOptions.CACert = "E:\Test\root.crt"
conn.SslOptions.Cert = "E:\Test\client.crt"
conn.SslOptions.Key = "E:\Test\client.key"
conn.SslOptions.SslMode = SslMode.Require
conn.Open()

See Also

SslOptions Members | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property


%%PageItemTitle%% $$Members$$

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property

See Also Devart.Data.PostgreSql Send comments on this topic.

SslOptions Class Members

Devart.Data.PostgreSql Namespace : SslOptions Class (Devart.Data.PostgreSql)

SslOptions overview

Public Constructors

Public Constructor SslOptions Constructor Overloaded. Initializes a new instance of the SslOptions class.

Public Properties

Public Property CACert | Gets or sets location of authority certificate.
Public Property Cert | Gets or sets the location of the client certificate.
Public Property CipherList | Gets or sets list of ciphers that client agrees to use.
Public Property Key | Gets or sets location of user's private key.
Public Property SslMode | Gets or sets a value that determines whether an SSL connection will be established the server and its priority.

Public Methods

Public Method ToString Overridden. Returns a string that represents the current object.

See Also

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor

Devart.Data.PostgreSql Namespace > SslOptions Class : SslOptions Constructor (SslOptions)

Initializes a new instance of the SslOptions class.

Overload List

Initializes a new instance of the SslOptions class.

[Visual Basic] Public Sub New()

[C#] public SslOptions();

[Visual Basic] Public Sub New(String)

[C#] public SslOptions(string);

[Visual Basic] Public Sub New(String,String,String)

[C#] public SslOptions(string,string,string);

[Visual Basic] Public Sub New(String,String,String,String)

[C#] public SslOptions(string,string,string,string);

[Visual Basic] Public Sub New(String,String,String,String,SslMode)

[C#] public SslOptions(string,string,string,string,SslMode);

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%%

SslOptions Class | SslOptions Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor()

Devart.Data.PostgreSql Namespace > SslOptions Class > SslOptions Constructor : SslOptions Constructor()

Initializes a new instance of the SslOptions class.

[Visual Basic]
Public Function New()
[C#]
public SslOptions();

See Also

SslOptions Class | SslOptions Members | Overload List


%%PageItemTitle%%

SslOptions Class | SslOptions Members | Overload List

Language

Visual Basic

C#

Show All

caCert
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor(String)

Devart.Data.PostgreSql Namespace > SslOptions Class > SslOptions Constructor : SslOptions Constructor(String)
[Visual Basic]
Public Function New( _
   ByVal caCert As String _
)
[C#]
public SslOptions(
   string caCert
);

Parameters

caCert

See Also

SslOptions Class | SslOptions Members | Overload List


%%PageItemTitle%%

SslOptions Class | SslOptions Members | Overload List

Language

Visual Basic

C#

Show All

caCert
cert
key
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor(String,String,String)

Devart.Data.PostgreSql Namespace > SslOptions Class > SslOptions Constructor : SslOptions Constructor(String,String,String)
[Visual Basic]
Public Function New( _
   ByVal caCert As String, _
   ByVal cert As String, _
   ByVal key As String _
)
[C#]
public SslOptions(
   string caCert,
   string cert,
   string key
);

Parameters

caCert
cert
key

See Also

SslOptions Class | SslOptions Members | Overload List


%%PageItemTitle%%

SslOptions Class | SslOptions Members | Overload List

Language

Visual Basic

C#

Show All

cipherList
caCert
cert
key
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor(String,String,String,String)

Devart.Data.PostgreSql Namespace > SslOptions Class > SslOptions Constructor : SslOptions Constructor(String,String,String,String)
[Visual Basic]
Public Function New( _
   ByVal cipherList As String, _
   ByVal caCert As String, _
   ByVal cert As String, _
   ByVal key As String _
)
[C#]
public SslOptions(
   string cipherList,
   string caCert,
   string cert,
   string key
);

Parameters

cipherList
caCert
cert
key

See Also

SslOptions Class | SslOptions Members | Overload List


%%PageItemTitle%%

SslOptions Class | SslOptions Members | Overload List

Language

Visual Basic

C#

Show All

cipherList
caCert
cert
key
mode
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslOptions Constructor(String,String,String,String,SslMode)

Devart.Data.PostgreSql Namespace > SslOptions Class > SslOptions Constructor : SslOptions Constructor(String,String,String,String,SslMode)
[Visual Basic]
Public Function New( _
   ByVal cipherList As String, _
   ByVal caCert As String, _
   ByVal cert As String, _
   ByVal key As String, _
   ByVal mode As SslMode _
)
[C#]
public SslOptions(
   string cipherList,
   string caCert,
   string cert,
   string key,
   SslMode mode
);

Parameters

cipherList
caCert
cert
key
mode

See Also

SslOptions Class | SslOptions Members | Overload List


%%PageItemTitle%% $$Properties$$

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property

See Also Devart.Data.PostgreSql Send comments on this topic.

SslOptions Class Properties

Devart.Data.PostgreSql Namespace : SslOptions Class (Devart.Data.PostgreSql)

For a list of all members of this type, see SslOptions members.

Public Properties

Public Property CACert | Gets or sets location of authority certificate.
Public Property Cert | Gets or sets the location of the client certificate.
Public Property CipherList | Gets or sets list of ciphers that client agrees to use.
Public Property Key | Gets or sets location of user's private key.
Public Property SslMode | Gets or sets a value that determines whether an SSL connection will be established the server and its priority.

See Also

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CACert Property

Devart.Data.PostgreSql Namespace > SslOptions Class : CACert Property

Gets or sets location of authority certificate.

[Visual Basic]
Public Property CACert As String
[C#]
public string CACert {get; set;}

Return Type

Location of authority certificate.

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Cert Property

Devart.Data.PostgreSql Namespace > SslOptions Class : Cert Property

Gets or sets the location of the client certificate.

[Visual Basic]
Public Property Cert As String
[C#]
public string Cert {get; set;}

Return Type

The location of client certificate.

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CipherList Property

Devart.Data.PostgreSql Namespace > SslOptions Class : CipherList Property

Gets or sets list of ciphers that client agrees to use.

[Visual Basic]
Public Property CipherList As String
[C#]
public string CipherList {get; set;}

Return Type

List of ciphers that client agrees to use.

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Key Property

Devart.Data.PostgreSql Namespace > SslOptions Class : Key Property

Gets or sets location of user's private key.

[Visual Basic]
Public Property Key As String
[C#]
public string Key {get; set;}

Return Type

Location of private key to use.

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%%

SslOptions Class | SslOptions Members | SslMode Enumeration

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslMode Property

Devart.Data.PostgreSql Namespace > SslOptions Class : SslMode Property (SslOptions)

Gets or sets a value that determines whether an SSL connection will be established the server and its priority.

[Visual Basic]
Public Property SslMode As SslMode
[C#]
public SslMode SslMode {get; set;}

Return Type

One of the SslMode values.

See Also

SslOptions Class | SslOptions Members | SslMode Enumeration


%%PageItemTitle%% $$Methods$$

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property

See Also Devart.Data.PostgreSql Send comments on this topic.

SslOptions Class Methods

Devart.Data.PostgreSql Namespace : SslOptions Class (Devart.Data.PostgreSql)

For a list of all members of this type, see SslOptions members.

Public Methods

Public Method ToString Overridden. Returns a string that represents the current object.

See Also

SslOptions Class | Devart.Data.PostgreSql Namespace | SslMode Enumeration | SslOptions Property


%%PageItemTitle%%

SslOptions Class | SslOptions Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > SslOptions Class : ToString Method (SslOptions)

Returns a string that represents the current object.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

See Also

SslOptions Class | SslOptions Members


%%PageItemTitle%% Enumerations

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace Enumerations

Enumerations

Enumeration | Description
PgSqlDumpObjects | Determines which database objects will be included in the dump.
PgSqlLargeObjectOpenMode | Specifies how to open an existing large object - for reading or for writing.
PgSqlLoaderMode | Determines the operating mode of the PgSqlLoader.
PgSqlType | Specifies the data type of a field, property, PgSqlParameter or PgSqlAttribute.
ProtocolVersion | Specifies version of protocol to be used when more than one is available.
Severity | Specifies a severity of occurred event.
SslMode | Determines SSL connection priority.
TransactionErrorBehavior | Determines how dotConnect for PostgreSQL handles errors, which occur within a transaction.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlDumpObjects Enumeration

Devart.Data.PostgreSql Namespace : PgSqlDumpObjects Enumeration

Determines which database objects will be included in the dump.

Members

Member | Description
None |
Aggregates |
Domains | Includes domains in the dump.
Indexes | Includes indexes in the dump.
Languages | Includes languages in the dump.
Schemas | Includes schemas in the dump.
Sequences | Includes sequences in the dump.
StoredProcs | Includes stored procedures in the dump.
Tables | Includes tables in the dump.
Triggers | Includes triggers in the dump.
Types | Includes types in the dump.
Views | Includes views in the dump.
Users | Includes users in the dump.
Constraints |
All | All database objects will be included.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLargeObjectOpenMode Enumeration

Devart.Data.PostgreSql Namespace : PgSqlLargeObjectOpenMode Enumeration

Specifies how to open an existing large object - for reading or for writing.

Members

Member | Description
Write | Open a PgSqlLargeObject for writing.
Read | Open a PgSqlLargeObject for reading.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderMode Enumeration

Devart.Data.PostgreSql Namespace : PgSqlLoaderMode Enumeration

Determines the operating mode of the PgSqlLoader.

Members

Member | Description
Binary | The binary mode is used, which is faster, but supported only within protocol 3.0.
Text | The text mode is used, which is the only option available for servers 7.3 and older.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlType Enumeration

Devart.Data.PostgreSql Namespace : PgSqlType Enumeration (Devart.Data.PostgreSql)

Specifies the data type of a field, property, PgSqlParameter or PgSqlAttribute.

Members

Member | Description
BigInt | A PostgreSQL bigint data type that contains a 64-bit signed integer. Represented as the Int64.
Bit | A PostgreSQL bit data type that contains a fixed-length bit string. Represented as the BitArray.
Boolean | A simple type representing Boolean values of true or false.
Box | A PostgreSQL box geometric data type that represents rectangular box in the plane. May be represented as the PgSqlBox class or the String.
ByteA | A PostgreSQL bytea data type that contains a variable-length stream of binary data. May be represented as the PgSqlBlob class or the array of Byte.
Char | A PostgreSQL char data type that contains a fixed-length character string. Represented as the String.
Circle | A PostgreSQL circle geometric data type that represents circle in the plane. May be represented as the PgSqlCircle class or the String.
Date | A PostgreSQL date data type that contains a fixed-length representation of a date value. Represented as the DateTime.
Double | A PostgreSQL double data type that contains a double-precision floating-point value. A floating point type representing values ranging from approximately 5.0 x 10(-324) to 1.7 x 10(308) with a precision of 15-16 digits. Represented as the Double.
Int | A PostgreSQL integer data type that contains a 32-bit signed integer. Represented as the Int32.
Interval | A PostgreSQL interval data type that contains an interval of time in days, hours, minutes, and seconds. Represented as the PgSqlInterval.
Line | A PostgreSQL line geometric data type that represents infinite line in the plane. May be represented as the PgSqlLSeg class or the String.
LSeg | A PostgreSQL lseg geometric data type that represents line segment in the plane. May be represented as the PgSqlLSeg class or the String.
Money | A PostgreSQL money data type that contains a currency amount with a fixed fractional precision.
Numeric | A PostgreSQL numeric data type that contains exact numeric data with selectable precision. Represented as the Decimal.
Path | A PostgreSQL path geometric data type that represents open and closed geometric path in the plane. May be represented as the PgSqlPath class or the String.
Point | A PostgreSQL point geometric data type that represents geometric point in the plane. May be represented as the PgSqlPoint class or the String.
Polygon | A PostgreSQL polygon geometric data type that represents closed geometric path in the plane. May be represented as the PgSqlPolygon class or the String.
Real | A PostgreSQL real data type that contains a single-precision floating-point value. Represented as the Single.
SmallInt | A PostgreSQL smallint data type that contains a 16-bit signed integer. Represented as the Int16.
Text | A PostgreSQL text data type that contains a variable-length character string. May be represented as the PgSqlText class or the String.
Time | A PostgreSQL time data type that contains a fixed-length representation of a time value. Represented as the TimeSpan.
TimeStamp | A PostgreSQL timestamp data type that contains date and time, including seconds. Represented as the DateTime.
TimeStampTZ | A PostgreSQL timestamp with time zone data type that contains date and time, including seconds, with time zone. Represented as the DateTime.
TimeTZ | A PostgreSQL time with time zone data type that contains a fixed-length representation of a time value with time zone. Represented as the TimeSpan.
VarBit | A PostgreSQL varbit data type that contains a variable-length bit string. Represented as the BitArray.
VarChar | A PostgreSQL varchar data type that contains a variable-length character string. Represented as the String.
Uuid | A PostgreSQL UUID data type that represents a unique value. Represented as the Guid.
Row | A PostgreSQL row data type that contains composite value. This type does not have corresponding .NET Framework type.
Array | A PostgreSQL array data type. May be represented as the PgSqlArray class or the String.
LargeObject | A PostgreSQL large object. May be represented as the PgSqlLargeObject class or the String.
Xml | A PostgreSQL xml type that contains XML data. May be represented as the String object.
IntRange | A PostgreSQL int4range type. Represented as the PgSqlIntRange.
BigIntRange | A PostgreSQL int8range type. Represented as the PgSqlBigIntRange.
NumericRange | A PostgreSQL daterange type. Represented as the PgSqlDateRange.
TimeStampRange | Represents the PostgreSQL tsrange type. Represented as PgSqlTimeStampRange.
TimeStampTZRange | Represents the PostgreSQL tstzrange type. Represented as PgSqlTimeStampTZRange.
DateRange | A PostgreSQL daterange type. Represented as the PgSqlDateRange.
CIdr | A PostgreSQL cidr data type that contains a an IPv4 or IPv6 network specification. May be represented as the PgSqlInet class.
Inet | A PostgreSQL inet data type that contains an IPv4 or IPv6 address and optionally its subnet. May be represented as the PgSqlInet class.
MacAddr | A PostgreSQL macaddr data type that contains a MAC address. May be represented as the PgSqlMacAddr class.
Json | A PostgreSQL json data type that contains a JSON object. Represented as the String.

Remarks

The following table shows mappings between PgSqlType data types, PostgreSQL data types, Microsoft .NET Framework types.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ProtocolVersion Enumeration

Devart.Data.PostgreSql Namespace : ProtocolVersion Enumeration (Devart.Data.PostgreSql)

Specifies version of protocol to be used when more than one is available.

Members

Member | Description
Undefined | The protocol to use is chosen automatically, depending on server version.
Ver20 | Version 2.0 protocol.
Ver30 | Version 3.0 protocol.

Remarks

Starting with PostgreSQL server 7.4, new protocol version (3.0) is introduced. It is used by default by servers 7.4 and higher. However, sometimes you might require to use the older protocol (2.0), for example, when executing batch statements. In this case, set PgSqlConnectionStringBuilder.Protocol property to ProtocolVersion.Ver20 to force usage of protocol version 2.0.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace | PgSqlError Class

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Severity Enumeration

Devart.Data.PostgreSql Namespace : Severity Enumeration (Devart.Data.PostgreSql)

Specifies a severity of occurred event.

Members

Member | Description
Fatal | Fatal situation after that recovery isn't possible.
Error | Information about user error.
Panic | Critical error after that recovery isn't possible.
Warning | Warnings for the user that can include an information about possible problems.
Notice | Notification for the user about occurred events.
Debug | Information for developers containing internal server operations.
Info | Useful information of insignificant type.
Log | Log of execution some commands by the server.

Remarks

You can use this enumeration for correct responding to event types with different severity or to ignore events with low severity.

See Also

Devart.Data.PostgreSql Namespace | PgSqlError Class


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace | SslOptions Class | SslOptions Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SslMode Enumeration

Devart.Data.PostgreSql Namespace : SslMode Enumeration (Devart.Data.PostgreSql)

Determines SSL connection priority.

Members

Member | Description
Allow | Negotiates trying first a non-SSL connection, then if that fails, tries an SSL connection.
Disable | Only an unencrypted SSL connection will be attempted. The default value.
Prefer | Negotiates trying first an SSL connection, then if that fails, tries a regular non-SSL connection.
Require | Tries only an SSL connection.

See Also

Devart.Data.PostgreSql Namespace | SslOptions Class | SslOptions Property


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace | TransactionErrorBehavior Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TransactionErrorBehavior Enumeration

Devart.Data.PostgreSql Namespace : TransactionErrorBehavior Enumeration (Devart.Data.PostgreSql)

Determines how dotConnect for PostgreSQL handles errors, which occur within a transaction.

Members

Member | Description
None | No action is performed. An application must handle an error itself and roll back the transaction.
RollbackTransaction | The transaction is rolled back automatically by dotConnect for PostgreSQL when an error occurs. The corresponding message is added to the original error message.

See Also

Devart.Data.PostgreSql Namespace | TransactionErrorBehavior Property


%%PageItemTitle%% Structures

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace Structures

Structures

Structure | Description
PgSqlArray | Represents a PostgreSQL ARRAY value.
PgSqlBox | Represents PostgreSQL box geometric data type.
PgSqlCircle | Represents PostgreSQL circle geometric data type.
PgSqlInet | Represents the PostgreSQL inet or cidr data type that stores an IPv4 or IPv6 address and optionally its subnet.
PgSqlInterval | Represents the PostgreSQL INTERVAL data type. Each object of the PgSqlInterval class stores a period of time in years, months, days, hours, minutes, seconds, and milliseconds.
PgSqlLSeg | Represents PostgreSQL lseg geometric data type.
PgSqlMacAddr | Represents the PostgreSQL macaddr data type that stores MAC addresses.
PgSqlPath | Represents PostgreSQL path geometric data type.
PgSqlPoint | Represents PostgreSQL point geometric data type.
PgSqlPolygon | Represents PostgreSQL polygon geometric data type.
PgSqlTime | Represents the PostgreSQL date and timestamp data types.
PgSqlTimeStamp | Represents the PostgreSQL date and timestamp data types.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

PgSqlArray Members | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Structure

Devart.Data.PostgreSql Namespace : PgSqlArray Structure

Represents a PostgreSQL ARRAY value.

For a list of all members of this type, see PgSqlArray members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlArray

Syntax

[Visual Basic]
Public Structure PgSqlArray
   Inherits ValueType
   Implements IEnumerable, INullable, IXmlSerializable
[C#]
public struct PgSqlArray : ValueType, IEnumerable, INullable, IXmlSerializable

Remarks

The PgSqlArray class provides methods to access elements of the multidimensional array. Items values are accessible with GetValue and SetValue methods.

Example

The following example shows how to handle PgSqlArray objects.

[C#]

/*
CREATE TABLE test.array_test
(
  f_array text[][]
)
WITH (OIDS=FALSE);
ALTER TABLE test.array_test OWNER TO postgres;

INSERT INTO test.array_test VALUES ('{{"elem11", "elem12", "elem13"},{"elem21","elem22", "elem23"}}')
*/

public void PgSqlArrayManipulation() {

    object[] elements = new object[6] { 2, 43, 4, 5, 6, 10 };
    int rank = 2;
    int dimension1 = 3;
    int dimension2 = 2;

    // One way to initialize PgSqlArray
    PgSqlArray array1 = new PgSqlArray(elements, PgSqlType.Int, rank, dimension1, dimension2);
    Console.WriteLine(array1.ToString()); // {{2,43},{4,5},{6,2}}

    // Another way to initialize PgSqlArray
    PgSqlArray array2 = new PgSqlArray(PgSqlType.Int, rank, dimension1, dimension2);
    int inc = 0;
    // Set elements of the array
    for (int i = 1; i < array2.GetLength(1) + 1; i++)
    for (int j = 1; j < array2.GetLength(2) + 1; j++) {
    array2.SetValue(elements[inc++], i, j);
}
    Console.WriteLine(array2); // {{2,43},{4,5},{6,2}}

    // Get all elements
    foreach (PgSqlArray subArr in array1)
        foreach (int elem in subArr)
            Console.Write(elem + ",");

    Console.WriteLine();
    // Get one element
    int number = (int)array1[3, 2];
    Console.WriteLine(number); // Outputs 10
    }

public void GetPgSqlArray(PgSqlConnection connection) {

    PgSqlCommand cmd = new PgSqlCommand();
    cmd.Connection = connection;
    cmd.CommandText = "SELECT f_array FROM test.array_test";

    using (PgSqlDataReader reader = cmd.ExecuteReader()) {
        while (reader.Read()) {
            PgSqlArray array = reader.GetPgSqlArray(0);
            Console.WriteLine(array);
        }
    }
}

public void UsingPgSqlArrayAsParameter(PgSqlConnection connection) {

    PgSqlCommand cmd = new PgSqlCommand();
    cmd.Connection = connection;
    cmd.CommandText = "INSERT INTO test.array_test(f_array) VALUES(:p)";

    // creates array {{elem11,elem12,elem13},{elem21,elem22,elem23}}
    // rank = 2, dimensions = {2,3}
    object[] elements = new object[] { "elem11","elem12","elem13","elem21","elem22","elem23" };
    PgSqlArray array = new PgSqlArray(elements, PgSqlType.Text, 2, 2, 3);

    PgSqlParameter param = new PgSqlParameter("p", PgSqlType.Array);
    param.Value = array;
    cmd.Parameters.Add(param);

    cmd.ExecuteNonQuery();
}

[Visual Basic]

' CREATE TABLE test.array_test
' (
' f_array text[][]
' )
' WITH (OIDS=FALSE);
' ALTER TABLE test.array_test OWNER TO postgres;'
'
' INSERT INTO test.array_test VALUES ('{{"elem11", "elem12", "elem13"},{"elem21","elem22", "elem23"}}')

Public Sub PgSqlArrayManipulation()
    Dim elements As Object() = New Object() {2, 43, 4, 5, 6, 10}
    Dim rank As Integer = 2
    Dim dimension1 As Integer = 3
    Dim dimension2 As Integer = 2
    ' One way to initialize PgSqlArray
    Dim array1 As New PgSqlArray(elements, PgSqlType.Int, rank, dimension1, dimension2)
    Console.WriteLine(array1.ToString)
    ' Another way to initialize PgSqlArray
    Dim array2 As New PgSqlArray(PgSqlType.Int, rank, New Integer() {dimension1, dimension2})
    Dim inc As Integer = 0
    ' Set elements of the array
    For i As Integer = 1 To (array2.GetLength(1) + 1) - 1
        For j As Integer = 1 To (array2.GetLength(2) + 1) - 1
            array2.SetValue(elements(inc), i, j)
            inc = inc + 1
        Next j
    Next i
    Console.WriteLine(array2)
    ' Get all elements
    Dim subArr As PgSqlArray
    For Each subArr In array1
        Dim elem As Integer
        For Each elem In subArr
            Console.Write((elem & ","))
    Next
    Next
    Console.WriteLine()
    ' Get one element
    Dim number As Integer = CInt(array1.Item(New Integer() {3, 2}))
    Console.WriteLine(number)
End Sub

Public Sub GetPgSqlArray(ByVal connection As PgSqlConnection)
    Dim cmd As New PgSqlCommand
    cmd.Connection = connection
    cmd.CommandText = "SELECT f_array FROM test.array_test"

    Using reader As PgSqlDataReader = cmd.ExecuteReader
    Do While reader.Read
        Console.WriteLine(reader.GetPgSqlArray(0))
    Loop
End Using
End Sub

Public Sub UsingPgSqlArrayAsParameter(ByVal connection As PgSqlConnection)
    Dim cmd As New PgSqlCommand
    cmd.Connection = connection
    cmd.CommandText = "INSERT INTO test.array_test(f_array) VALUES(:p)"

    ' creates array {{elem11,elem12,elem13},{elem21,elem22,elem23}}
    ' rank = 2, dimensions = {2,3}
    Dim elements As Object() = New Object() {"elem11", "elem12", "elem13", "elem21", "elem22", "elem23"}
    Dim array As New PgSqlArray(elements, PgSqlType.Text, 2, 2, 3)

    Dim param As New PgSqlParameter("p", PgSqlType.Array)
    param.Value = array
    cmd.Parameters.Add(param)

    cmd.ExecuteNonQuery()
End Sub

See Also

PgSqlArray Members | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method


%%PageItemTitle%% $$Members$$

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Structure Members

Devart.Data.PostgreSql Namespace : PgSqlArray Structure

PgSqlArray overview

Public Constructors

Public Constructor PgSqlArray Constructor Overloaded. Initializes a new instance of the PgSqlArray class.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlArray object.

Public Properties

Public Property IsEmty | Indicates whether or not the PgSqlArray represents a null value.
Public Property IsNull | Indicates whether or not the PgSqlArray represents a null value.
Public Property Item | Gets an element from the specified position.
Public Property Length | Gets the total number of elements in all the dimensions of the PgSqlArray.
Public Property PgSqlType | Gets the PgSqlType of the array elements.
Public Property Rank | Gets or sets the number of PgSqlArray dimensions.

Public Methods

Public Method static (Shared in Visual Basic) CreateEmptyArray | Create a new instance of PgSqlArray that represents an emty array.
Public Method Equals | Overridden. Determines whether two PgSqlArray instances are equal.
Public Method GetEnumerator | Returns an enumerator for the PgSqlArray.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlArray instance.
Public Method GetLength | Gets a 32-bit integer that represents the number of elements in the specified dimension of the PgSqlArray.
Public Method GetLowerBound | Gets the lower bound of the specified dimension in the PgSqlArray.
Public Method GetUpperBound | Gets the upper bound of the specified dimension in the PgSqlArray.
Public Method GetValue | Gets the value at the specified position in the multidimensional PgSqlArray.
Public Method static (Shared in Visual Basic) Parse | Converts the specified string representation of an array to its PgSqlArray equivalent.
Public Method SetValue | Sets the specified element in the current PgSqlArray to the specified value.
Public Method ToString | Overridden. Returns a string that represents the current PgSqlArray.

Operators

Public Operator Equality | Determines whether two PgSqlArray objects are the same.
Public Operator Inequality | Determines whether two PgSqlArray objects are different.

See Also

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Constructor

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : PgSqlArray Constructor (PgSqlArray)

Initializes a new instance of the PgSqlArray class.

Overload List

Initializes a new instance of the PgSqlArray class with the specified element type and dimensions.

[Visual Basic] Public Sub New(PgSqlType,Integer,ParamArray Integer())

[C#] public PgSqlArray(PgSqlType,int,params int[]);

Initializes a new instance of the PgSqlArray class with the specified elements, elements type, and dimensions.

[Visual Basic] Public Sub New(Object(),PgSqlType,Integer,ParamArray Integer())

[C#] public PgSqlArray(object[],PgSqlType,int,params int[]);

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Overload List

Language

Visual Basic

C#

Show All

elements
An array of objects that contains the individual elements of PgSqlArray.
elementType
The type of elements in the array.
rank
The number of dimensions.
dimensions
Limits for the dimentsions.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Constructor(Object[],PgSqlType,Int32,Int32[])

Devart.Data.PostgreSql Namespace > PgSqlArray Structure > PgSqlArray Constructor : PgSqlArray Constructor(Object[],PgSqlType,Int32,Int32[])

Initializes a new instance of the PgSqlArray class with the specified elements, elements type, and dimensions.

[Visual Basic]
Public Function New( _
   ByVal elements() As Object, _
   ByVal elementType As PgSqlType, _
   ByVal rank As Integer, _
   ByVal ParamArray dimensions() As Integer _
)
[C#]
public PgSqlArray(
   object[] elements,
   PgSqlType elementType,
   int rank,
   params int[] dimensions
);

Parameters

elements
An array of objects that contains the individual elements of PgSqlArray.
elementType
The type of elements in the array.
rank
The number of dimensions.
dimensions
Limits for the dimentsions.

See Also

PgSqlArray Structure | PgSqlArray Members | Overload List


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Overload List

Language

Visual Basic

C#

Show All

elementType
The type of elements in the array.
rank
The number of dimensions.
dimensions
Limits for the dimentsions.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Constructor(PgSqlType,Int32,Int32[])

Devart.Data.PostgreSql Namespace > PgSqlArray Structure > PgSqlArray Constructor : PgSqlArray Constructor(PgSqlType,Int32,Int32[])

Initializes a new instance of the PgSqlArray class with the specified element type and dimensions.

[Visual Basic]
Public Function New( _
   ByVal elementType As PgSqlType, _
   ByVal rank As Integer, _
   ByVal ParamArray dimensions() As Integer _
)
[C#]
public PgSqlArray(
   PgSqlType elementType,
   int rank,
   params int[] dimensions
);

Parameters

elementType
The type of elements in the array.
rank
The number of dimensions.
dimensions
Limits for the dimentsions.

Remarks

This constructor allows creating any arrays with any rank and any number of elements in any dimension, filled with NULL values.

Example

This sample creates two-dimensional array with three sub-arrays, each has two elements. String representation of array that can be received with the ToString method will be the following:

{{NULL,NULL},{NULL,NULL},{NULL,NULL}}

[C#]

PgSqlArray arr = new PgSqlArray(PgSqlType.Int, 2,3,2);
Console.Write(arr);

[Visual Basic]

Dim arr As PgSqlArray = New PgSqlArray(PgSqlType.Int, 2, 3, 2)
Console.Write(arr)

See Also

PgSqlArray Structure | PgSqlArray Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlArray Structure

For a list of all members of this type, see PgSqlArray members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlArray object.

See Also

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | IsNull Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Null Field (PgSqlArray)

Represents a null PgSqlArray object.

[Visual Basic]
Public Shared Null As PgSqlArray
[C#]
public static PgSqlArray Null

Return Type

An object that represents a null PgSqlArray value.

See Also

PgSqlArray Structure | PgSqlArray Members | IsNull Property


%%PageItemTitle%% $$Properties$$

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlArray Structure

For a list of all members of this type, see PgSqlArray members.

Public Properties

Public Property IsEmty | Indicates whether or not the PgSqlArray represents a null value.
Public Property IsNull | Indicates whether or not the PgSqlArray represents a null value.
Public Property Item | Gets an element from the specified position.
Public Property Length | Gets the total number of elements in all the dimensions of the PgSqlArray.
Public Property PgSqlType | Gets the PgSqlType of the array elements.
Public Property Rank | Gets or sets the number of PgSqlArray dimensions.

See Also

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | CreateEmptyArray Method | Null Field

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsEmty Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : IsEmty Property

Indicates whether or not the PgSqlArray represents a null value.

[Visual Basic]
Public ReadOnly Property IsEmty As Boolean
[C#]
public bool IsEmty {get;}

Return Type

true if the PgSqlArray represents an empty array value; otherwise, false.

Remarks

You can get the emty instance of PgSqlArray in the following ways: call static method CreateEmptyArray of PgSqlArray type. call static method Parse of PgSqlArray type. call the _ctor constructor of PgSqlArray type.

Example

This sample demostrates all three ways to create an empty instance of PgSqlArray.

[C#]

PgSqlArray arr1 = PgSqlArray.CreateEmptyArray(PgSqlType.Int);
PgSqlArray arr2 = PgSqlArray.Parse("{}", PgSqlType.Int);
PgSqlArray arr3 = new PgSqlArray(PgSqlType.Int, 0);

[Visual Basic]

Dim arr1 As PgSqlArray = PgSqlArray.CreateEmptyArray(PgSqlType.Int)
Dim arr2 As PgSqlArray = PgSqlArray.Parse("{}", PgSqlType.Int)
Dim arr3 As PgSqlArray = new PgSqlArray(PgSqlType.Int, 0)

See Also

PgSqlArray Structure | PgSqlArray Members | CreateEmptyArray Method | Null Field


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Null Field

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : IsNull Property (PgSqlArray)

Indicates whether or not the PgSqlArray represents a null value.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlArray represents a null value; otherwise, false.

See Also

PgSqlArray Structure | PgSqlArray Members | Null Field


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetValue Method

Language

Visual Basic

C#

Show All

index
One-dimensional array of 32-bit integers that represent the indexes specifying the position of the PgSqlArray element to get.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Item Property (PgSqlArray)

Gets an element from the specified position.

[Visual Basic]
Public ReadOnly Default Property Item( _
   ByVal ParamArray index() As Integer _
) As Object
[C#]
public object this[
   params int[] index
]; {get;}

Parameters

index
One-dimensional array of 32-bit integers that represent the indexes specifying the position of the PgSqlArray element to get.

Return Type

And element from the PgSqlArray.

See Also

PgSqlArray Structure | PgSqlArray Members | GetValue Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Rank Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Length Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Length Property (PgSqlArray)

Gets the total number of elements in all the dimensions of the PgSqlArray.

[Visual Basic]
Public ReadOnly Property Length As Integer
[C#]
public int Length {get;}

Return Type

The total number of elements.

See Also

PgSqlArray Structure | PgSqlArray Members | Rank Property


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlType Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : PgSqlType Property (PgSqlArray)

Gets the PgSqlType of the array elements.

[Visual Basic]
Public ReadOnly Property PgSqlType As PgSqlType
[C#]
public PgSqlType PgSqlType {get;}

Return Type

The PgSqlType of the array elements.

Remarks

You can specify the PgSqlArray element type in its constructors. This may be any type except PgSqlType.Array.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Length Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Rank Property

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Rank Property

Gets or sets the number of PgSqlArray dimensions.

[Visual Basic]
Public ReadOnly Property Rank As Integer
[C#]
public int Rank {get;}

See Also

PgSqlArray Structure | PgSqlArray Members | Length Property


%%PageItemTitle%% $$Methods$$

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlArray Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlArray Structure

For a list of all members of this type, see PgSqlArray members.

Public Methods

Public Method static (Shared in Visual Basic) CreateEmptyArray | Create a new instance of PgSqlArray that represents an emty array.
Public Method Equals | Overridden. Determines whether two PgSqlArray instances are equal.
Public Method GetEnumerator | Returns an enumerator for the PgSqlArray.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlArray instance.
Public Method GetLength | Gets a 32-bit integer that represents the number of elements in the specified dimension of the PgSqlArray.
Public Method GetLowerBound | Gets the lower bound of the specified dimension in the PgSqlArray.
Public Method GetUpperBound | Gets the upper bound of the specified dimension in the PgSqlArray.
Public Method GetValue | Gets the value at the specified position in the multidimensional PgSqlArray.
Public Method static (Shared in Visual Basic) Parse | Converts the specified string representation of an array to its PgSqlArray equivalent.
Public Method SetValue | Sets the specified element in the current PgSqlArray to the specified value.
Public Method ToString | Overridden. Returns a string that represents the current PgSqlArray.

See Also

PgSqlArray Structure | Devart.Data.PostgreSql Namespace | GetValue Method | SetValue Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

type
The PgSqlType of the array elements.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CreateEmptyArray Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : CreateEmptyArray Method

Create a new instance of PgSqlArray that represents an emty array.

[Visual Basic]
Public Shared Function CreateEmptyArray( _
   ByVal type As PgSqlType _
) As PgSqlArray
[C#]
public static PgSqlArray CreateEmptyArray(
   PgSqlType type
);

Parameters

type
The PgSqlType of the array elements.

Return Type

Returns a new instance of PgSqlArray that represents an emty array of given type.

Remarks

Empty array is a PgSqlArray with Rank=0 and zero count of elements. But keep in mind that empty PgSqlArray is not equal to Null. When you post data at the PostgreSQL database, the Null is interpreted as db null, while empty PgSqlArray is interpreted as empty value of PostgreSQL array data type.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetHashCode Method

Language

Visual Basic

C#

Show All

obj
A PgSqlArray to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Equals Method (PgSqlArray)

Determines whether two PgSqlArray instances are equal.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
A PgSqlArray to compare with.

Return Type

true if the current object is equal to the specified object; otherwise, false.

See Also

PgSqlArray Structure | PgSqlArray Members | GetHashCode Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetEnumerator Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetEnumerator Method (PgSqlArray)

Returns an enumerator for the PgSqlArray.

[Visual Basic]
Public Function GetEnumerator() As IEnumerator
[C#]
public IEnumerator GetEnumerator();

Return Type

An enumerator for the PgSqlArray.

Remarks

Enumerators allow only reading the data in the collection and cannot be used to modify it.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetHashCode Method (PgSqlArray)

Gets a hash code for the PgSqlArray instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetLowerBound Method | GetUpperBound Method | GetValue Method | Length Property

Language

Visual Basic

C#

Show All

dimension
A zero-based index of the dimension in question.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetLength Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetLength Method

Gets a 32-bit integer that represents the number of elements in the specified dimension of the PgSqlArray.

[Visual Basic]
Public Function GetLength( _
   ByVal dimension As Integer _
) As Integer
[C#]
public int GetLength(
   int dimension
);

Parameters

dimension
A zero-based index of the dimension in question.

Return Type

A 32-bit integer that represents the number of elements in the specified dimension.

See Also

PgSqlArray Structure | PgSqlArray Members | GetLowerBound Method | GetUpperBound Method | GetValue Method | Length Property


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetUpperBound Method | GetLength Method

Language

Visual Basic

C#

Show All

dimension
A zero-based dimension of the PgSqlArray whose lower bound needs to be determined.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetLowerBound Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetLowerBound Method

Gets the lower bound of the specified dimension in the PgSqlArray.

[Visual Basic]
Public Function GetLowerBound( _
   ByVal dimension As Integer _
) As Integer
[C#]
public int GetLowerBound(
   int dimension
);

Parameters

dimension
A zero-based dimension of the PgSqlArray whose lower bound needs to be determined.

Return Type

The lower bound of the specified dimension in the PgSqlArray.

See Also

PgSqlArray Structure | PgSqlArray Members | GetUpperBound Method | GetLength Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetLowerBound Method | GetLength Method

Language

Visual Basic

C#

Show All

dimension
A zero-based dimension of the PgSqlArray whose upper bound needs to be determined.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetUpperBound Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetUpperBound Method

Gets the upper bound of the specified dimension in the PgSqlArray.

[Visual Basic]
Public Function GetUpperBound( _
   ByVal dimension As Integer _
) As Integer
[C#]
public int GetUpperBound(
   int dimension
);

Parameters

dimension
A zero-based dimension of the PgSqlArray whose upper bound needs to be determined.

Return Type

The upper bound of the specified dimension in the PgSqlArray.

See Also

PgSqlArray Structure | PgSqlArray Members | GetLowerBound Method | GetLength Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | Item Property | ToString Method

Language

Visual Basic

C#

Show All

indices
One-dimensional array of 32-bit integers that represent the indexes specifying the position of the PgSqlArray element to get.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetValue Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : GetValue Method (PgSqlArray)

Gets the value at the specified position in the multidimensional PgSqlArray.

[Visual Basic]
Public Function GetValue( _
   ByVal ParamArray indices() As Integer _
) As Object
[C#]
public object GetValue(
   params int[] indices
);

Parameters

indices
One-dimensional array of 32-bit integers that represent the indexes specifying the position of the PgSqlArray element to get.

Return Type

The value of the specified array element.

See Also

PgSqlArray Structure | PgSqlArray Members | Item Property | ToString Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

val
The string representation of an array.
elementType
The type of elements in the array.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Parse Method (PgSqlArray)

Converts the specified string representation of an array to its PgSqlArray equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String, _
   ByVal elementType As PgSqlType _
) As PgSqlArray
[C#]
public static PgSqlArray Parse(
   string val,
   PgSqlType elementType
);

Parameters

val
The string representation of an array.
elementType
The type of elements in the array.

Return Type

A new PgSqlArray object.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetValue Method | Parse Method

Language

Visual Basic

C#

Show All

value
The new value for the specified element.
indices
A one-dimensional array of 32-bit integers that represent the indexes specifying the position of the element to set.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

SetValue Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : SetValue Method (PgSqlArray)

Sets the specified element in the current PgSqlArray to the specified value.

[Visual Basic]
Public Sub SetValue( _
   ByVal value As Object, _
   ByVal ParamArray indices() As Integer _
)
[C#]
public void SetValue(
   object value,
   params int[] indices
);

Parameters

value
The new value for the specified element.
indices
A one-dimensional array of 32-bit integers that represent the indexes specifying the position of the element to set.

See Also

PgSqlArray Structure | PgSqlArray Members | GetValue Method | Parse Method


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members | GetValue Method

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : ToString Method (PgSqlArray)

Returns a string that represents the current PgSqlArray.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A formatted string that represents the array in a readable form.

See Also

PgSqlArray Structure | PgSqlArray Members | GetValue Method


%%PageItemTitle%%

PgSqlBox Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Structure

Devart.Data.PostgreSql Namespace : PgSqlBox Structure

Represents PostgreSQL box geometric data type.

For a list of all members of this type, see PgSqlBox members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlBox

Syntax

[Visual Basic]
Public Structure PgSqlBox
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlBox : ValueType, INullable, IXmlSerializable

See Also

PgSqlBox Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlBox Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Structure Members

Devart.Data.PostgreSql Namespace : PgSqlBox Structure

PgSqlBox overview

Public Constructors

Public Constructor PgSqlBox Constructor Overloaded. Initializes a new instance of the PgSqlBox structure.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlBox object.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlBox is a Null.
Public Property LowerLeft | Gets the x and y coordinates of the lower left corner.
Public Property UpperRight | Gets the x and y coordinates of the upper right corner.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlBox and has the same values as the current PgSqlBox instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlBox instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a rectangular box to its PgSqlBox equivalent.
Public Method ToString | Overridden. Converts the current PgSqlBox structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlBox structures are the same.
Public Operator Inequality | Compares two PgSqlBox structures to determine if they are not equal.

See Also

PgSqlBox Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Constructor

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : PgSqlBox Constructor (PgSqlBox)

Initializes a new instance of the PgSqlBox structure.

Overload List

Initializes a new instance of the PgSqlBox structure with the specified lower left and upper right corners.

[Visual Basic] Public Sub New(PgSqlPoint,PgSqlPoint)

[C#] public PgSqlBox(PgSqlPoint,PgSqlPoint);

Initializes a new instance of the PgSqlBox structure with the specified lower left and upper right corners.

[Visual Basic] Public Sub New(Double,Double,Double,Double)

[C#] public PgSqlBox(double,double,double,double);

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members | Overload List

Language

Visual Basic

C#

Show All

x1
The specified x coordinate of the lower left corner.
y1
The specified y coordinate of the lower left corner.
x2
The specified x coordinate of the upper right corner.
y2
The specified x coordinate of the upper right corner.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Constructor(Double,Double,Double,Double)

Devart.Data.PostgreSql Namespace > PgSqlBox Structure > PgSqlBox Constructor : PgSqlBox Constructor(Double,Double,Double,Double)

Initializes a new instance of the PgSqlBox structure with the specified lower left and upper right corners.

[Visual Basic]
Public Function New( _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal x2 As Double, _
   ByVal y2 As Double _
)
[C#]
public PgSqlBox(
   double x1,
   double y1,
   double x2,
   double y2
);

Parameters

x1
The specified x coordinate of the lower left corner.
y1
The specified y coordinate of the lower left corner.
x2
The specified x coordinate of the upper right corner.
y2
The specified x coordinate of the upper right corner.

See Also

PgSqlBox Structure | PgSqlBox Members | Overload List


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members | Overload List

Language

Visual Basic

C#

Show All

lowerLeft
The PgSqlPoint that is the specified lower left corner.
upperRight
The PgSqlPoint that is the specified upper right corner.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Constructor(PgSqlPoint,PgSqlPoint)

Devart.Data.PostgreSql Namespace > PgSqlBox Structure > PgSqlBox Constructor : PgSqlBox Constructor(PgSqlPoint,PgSqlPoint)

Initializes a new instance of the PgSqlBox structure with the specified lower left and upper right corners.

[Visual Basic]
Public Function New( _
   ByVal lowerLeft As PgSqlPoint, _
   ByVal upperRight As PgSqlPoint _
)
[C#]
public PgSqlBox(
   PgSqlPoint lowerLeft,
   PgSqlPoint upperRight
);

Parameters

lowerLeft
The PgSqlPoint that is the specified lower left corner.
upperRight
The PgSqlPoint that is the specified upper right corner.

See Also

PgSqlBox Structure | PgSqlBox Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlBox Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlBox Structure

For a list of all members of this type, see PgSqlBox members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlBox object.

See Also

PgSqlBox Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : Null Field (PgSqlBox)

Represents a null PgSqlBox object.

[Visual Basic]
Public Shared Null As PgSqlBox
[C#]
public static PgSqlBox Null

Return Type

An object that represents a null PgSqlBox value.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%% $$Properties$$

PgSqlBox Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlBox Structure

For a list of all members of this type, see PgSqlBox members.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlBox is a Null.
Public Property LowerLeft | Gets the x and y coordinates of the lower left corner.
Public Property UpperRight | Gets the x and y coordinates of the upper right corner.

See Also

PgSqlBox Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : IsNull Property (PgSqlBox)

Gets a value indicating whether the PgSqlBox is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlBox is a Null; otherwise, false.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members | UpperRight Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LowerLeft Property

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : LowerLeft Property

Gets the x and y coordinates of the lower left corner.

[Visual Basic]
Public ReadOnly Property LowerLeft As PgSqlPoint
[C#]
public PgSqlPoint LowerLeft {get;}

Return Type

The PgSqlPoint that is the lower left corner.

See Also

PgSqlBox Structure | PgSqlBox Members | UpperRight Property


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members | LowerLeft Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

UpperRight Property

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : UpperRight Property

Gets the x and y coordinates of the upper right corner.

[Visual Basic]
Public ReadOnly Property UpperRight As PgSqlPoint
[C#]
public PgSqlPoint UpperRight {get;}

Return Type

The PgSqlPoint that is the specified upper right corner.

See Also

PgSqlBox Structure | PgSqlBox Members | LowerLeft Property


%%PageItemTitle%% $$Methods$$

PgSqlBox Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBox Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlBox Structure

For a list of all members of this type, see PgSqlBox members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlBox and has the same values as the current PgSqlBox instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlBox instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a rectangular box to its PgSqlBox equivalent.
Public Method ToString | Overridden. Converts the current PgSqlBox structure to a String.

See Also

PgSqlBox Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : Equals Method (PgSqlBox)

Determines if the specified object is an instance of PgSqlBox and has the same values as the current PgSqlBox instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlBox and has the same values; otherwise, false.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : GetHashCode Method (PgSqlBox)

Gets a hash code for the PgSqlBox instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : Parse Method (PgSqlBox)

Converts the specified String representation of a rectangular box to its PgSqlBox equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlBox
[C#]
public static PgSqlBox Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlBox structure equal to the rectangular box represented by the specified String.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : ToString Method (PgSqlBox)

Converts the current PgSqlBox structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlCircle Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Structure

Devart.Data.PostgreSql Namespace : PgSqlCircle Structure

Represents PostgreSQL circle geometric data type.

For a list of all members of this type, see PgSqlCircle members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlCircle

Syntax

[Visual Basic]
Public Structure PgSqlCircle
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlCircle : ValueType, INullable, IXmlSerializable

See Also

PgSqlCircle Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Structure Members

Devart.Data.PostgreSql Namespace : PgSqlCircle Structure

PgSqlCircle overview

Public Constructors

Public Constructor PgSqlCircle Constructor Overloaded. Initializes a new instance of the PgSqlCircle structure.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlCircle object.

Public Properties

Public Property Center | Gets the center point of the circle.
Public Property IsNull | Gets a value indicating whether the PgSqlCircle is a Null.
Public Property Radius | Gets the the radius of the circle.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlCircle and has the same values as the current PgSqlCircle instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlCircle instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a circle to its PgSqlCircle equivalent.
Public Method ToString | Overridden. Converts the current PgSqlCircle structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlCircle structures are the same.
Public Operator Inequality | Compares two PgSqlCircle structures to determine if they are not equal.

See Also

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Constructor

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : PgSqlCircle Constructor (PgSqlCircle)

Initializes a new instance of the PgSqlCircle structure.

Overload List

Initializes a new instance of the PgSqlCircle structure with the specified center PgSqlPoint value and radius.

[Visual Basic] Public Sub New(PgSqlPoint,Double)

[C#] public PgSqlCircle(PgSqlPoint,double);

Initializes a new instance of the PgSqlCircle structure with the specified center point and radius.

[Visual Basic] Public Sub New(Double,Double,Double)

[C#] public PgSqlCircle(double,double,double);

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members | Overload List

Language

Visual Basic

C#

Show All

x
The specified x coordinate of the center point.
y
The specified y coordinate of the center point.
radius
The specified radius.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Constructor(Double,Double,Double)

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure > PgSqlCircle Constructor : PgSqlCircle Constructor(Double,Double,Double)

Initializes a new instance of the PgSqlCircle structure with the specified center point and radius.

[Visual Basic]
Public Function New( _
   ByVal x As Double, _
   ByVal y As Double, _
   ByVal radius As Double _
)
[C#]
public PgSqlCircle(
   double x,
   double y,
   double radius
);

Parameters

x
The specified x coordinate of the center point.
y
The specified y coordinate of the center point.
radius
The specified radius.

See Also

PgSqlCircle Structure | PgSqlCircle Members | Overload List


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members | Overload List

Language

Visual Basic

C#

Show All

center
The PgSqlPoint that is the center point.
radius
The specified radius.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Constructor(PgSqlPoint,Double)

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure > PgSqlCircle Constructor : PgSqlCircle Constructor(PgSqlPoint,Double)

Initializes a new instance of the PgSqlCircle structure with the specified center PgSqlPoint value and radius.

[Visual Basic]
Public Function New( _
   ByVal center As PgSqlPoint, _
   ByVal radius As Double _
)
[C#]
public PgSqlCircle(
   PgSqlPoint center,
   double radius
);

Parameters

center
The PgSqlPoint that is the center point.
radius
The specified radius.

See Also

PgSqlCircle Structure | PgSqlCircle Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlCircle Structure

For a list of all members of this type, see PgSqlCircle members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlCircle object.

See Also

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Null Field (PgSqlCircle)

Represents a null PgSqlCircle object.

[Visual Basic]
Public Shared Null As PgSqlCircle
[C#]
public static PgSqlCircle Null

Return Type

An object that represents a null PgSqlCircle value.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%% $$Properties$$

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlCircle Structure

For a list of all members of this type, see PgSqlCircle members.

Public Properties

Public Property Center | Gets the center point of the circle.
Public Property IsNull | Gets a value indicating whether the PgSqlCircle is a Null.
Public Property Radius | Gets the the radius of the circle.

See Also

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members | Radius Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Center Property

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Center Property

Gets the center point of the circle.

[Visual Basic]
Public ReadOnly Property Center As PgSqlPoint
[C#]
public PgSqlPoint Center {get;}

Return Type

The PgSqlPoint that is the center point.

See Also

PgSqlCircle Structure | PgSqlCircle Members | Radius Property


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : IsNull Property (PgSqlCircle)

Gets a value indicating whether the PgSqlCircle is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlCircle is a Null; otherwise, false.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members | Center Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Radius Property

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Radius Property

Gets the the radius of the circle.

[Visual Basic]
Public ReadOnly Property Radius As Double
[C#]
public double Radius {get;}

Return Type

The radius of the circle.

See Also

PgSqlCircle Structure | PgSqlCircle Members | Center Property


%%PageItemTitle%% $$Methods$$

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCircle Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlCircle Structure

For a list of all members of this type, see PgSqlCircle members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlCircle and has the same values as the current PgSqlCircle instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlCircle instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a circle to its PgSqlCircle equivalent.
Public Method ToString | Overridden. Converts the current PgSqlCircle structure to a String.

See Also

PgSqlCircle Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Equals Method (PgSqlCircle)

Determines if the specified object is an instance of PgSqlCircle and has the same values as the current PgSqlCircle instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlCircle and has the same values; otherwise, false.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : GetHashCode Method (PgSqlCircle)

Gets a hash code for the PgSqlCircle instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Parse Method (PgSqlCircle)

Converts the specified String representation of a circle to its PgSqlCircle equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlCircle
[C#]
public static PgSqlCircle Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlCircle structure equal to the circle represented by the specified String.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : ToString Method (PgSqlCircle)

Converts the current PgSqlCircle structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlInet Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Structure

Devart.Data.PostgreSql Namespace : PgSqlInet Structure

Represents the PostgreSQL inet or cidr data type that stores an IPv4 or IPv6 address and optionally its subnet.

For a list of all members of this type, see PgSqlInet members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlInet

Syntax

[Visual Basic]
Public Structure PgSqlInet
   Inherits ValueType
   Implements INullable, IComparable, IXmlSerializable
[C#]
public struct PgSqlInet : ValueType, INullable, IComparable, IXmlSerializable

Remarks

The subnet is represented by the number of network address bits present in the host address and stored in the NetmaskBits property.

See Also

PgSqlInet Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlInet Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Structure Members

Devart.Data.PostgreSql Namespace : PgSqlInet Structure

PgSqlInet overview

Public Constructors

Public Constructor PgSqlInet Constructor Overloaded. Initializes a new instance of the PgSqlInet structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a NULL value that can be assigned to the PgSqlInet structure.

Public Properties

Public Property Address | Gets the IP address.
Public Property IsNull | Gets a value indicating whether the PgSqlInet structure represents Null.
Public Property NetmaskBits | Gets the number of bits in the netmask.

Public Methods

Public Method CompareTo | Overloaded. Compares the current PgSqlInet object to the specified object.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlInet value.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlInet instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of an IP address to its PgSqlInet equivalent.
Public Method ToString | Overridden. Converts the current PgSqlInet structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlInet values are equal.
Public Operator Inequality | Compares two PgSqlInet structures to determine if they are not equal.

See Also

PgSqlInet Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Constructor

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : PgSqlInet Constructor (PgSqlInet)

Initializes a new instance of the PgSqlInet structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 address specified as an array of bytes.

[Visual Basic] Public Sub New(IPAddress)

[C#] public PgSqlInet(IPAddress);

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 address specified as an array of bytes.

[Visual Basic] Public Sub New(Byte())

[C#] public PgSqlInet(byte[]);

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 subnet mask.

[Visual Basic] Public Sub New(IPAddress,Byte)

[C#] public PgSqlInet(IPAddress,byte);

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 subnet mask.

[Visual Basic] Public Sub New(Byte(),Byte)

[C#] public PgSqlInet(byte[],byte);

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

address
The IP address to assign to the structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Constructor(Byte[])

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > PgSqlInet Constructor : PgSqlInet Constructor(Byte[])

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 address specified as an array of bytes.

[Visual Basic]
Public Function New( _
   ByVal address() As Byte _
)
[C#]
public PgSqlInet(
   byte[] address
);

Parameters

address
The IP address to assign to the structure.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

address
The IP address to assign to the structure.
netmaskBits
The number of network address bits.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Constructor(Byte[],Byte)

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > PgSqlInet Constructor : PgSqlInet Constructor(Byte[],Byte)

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 subnet mask.

[Visual Basic]
Public Function New( _
   ByVal address() As Byte, _
   ByVal netmaskBits As Byte _
)
[C#]
public PgSqlInet(
   byte[] address,
   byte netmaskBits
);

Parameters

address
The IP address to assign to the structure.
netmaskBits
The number of network address bits.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

address
The IP address to assign to the structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Constructor(IPAddress)

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > PgSqlInet Constructor : PgSqlInet Constructor(IPAddress)

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 address specified as an array of bytes.

[Visual Basic]
Public Function New( _
   ByVal address As IPAddress _
)
[C#]
public PgSqlInet(
   IPAddress address
);

Parameters

address
The IP address to assign to the structure.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

address
The IP address to assign to the structure.
netmaskBits
The number of network address bits.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Constructor(IPAddress,Byte)

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > PgSqlInet Constructor : PgSqlInet Constructor(IPAddress,Byte)

Initializes a new instance of the PgSqlInet structure with the IP v4 or v6 subnet mask.

[Visual Basic]
Public Function New( _
   ByVal address As IPAddress, _
   ByVal netmaskBits As Byte _
)
[C#]
public PgSqlInet(
   IPAddress address,
   byte netmaskBits
);

Parameters

address
The IP address to assign to the structure.
netmaskBits
The number of network address bits.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlInet Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlInet Structure

For a list of all members of this type, see PgSqlInet members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a NULL value that can be assigned to the PgSqlInet structure.

See Also

PgSqlInet Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Null Field (PgSqlInet)

Represents a NULL value that can be assigned to the PgSqlInet structure.

[Visual Basic]
Public Shared Null As PgSqlInet
[C#]
public static PgSqlInet Null

Return Type

An object that represents a null PgSqlInet value.

Remarks

The string equivalent of this field is "null" or "NULL" (used in the Parse and ToString methods).

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%% $$Properties$$

PgSqlInet Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlInet Structure

For a list of all members of this type, see PgSqlInet members.

Public Properties

Public Property Address | Gets the IP address.
Public Property IsNull | Gets a value indicating whether the PgSqlInet structure represents Null.
Public Property NetmaskBits | Gets the number of bits in the netmask.

See Also

PgSqlInet Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Address Property

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Address Property (PgSqlInet)

Gets the IP address.

[Visual Basic]
Public ReadOnly Property Address As IPAddress
[C#]
public IPAddress Address {get;}

Return Type

An IP v4 or v6 address.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : IsNull Property (PgSqlInet)

Gets a value indicating whether the PgSqlInet structure represents Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlInet structure represents Null; otherwise, false.

Remarks

If this property is true, the ToString methods return empty string.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NetmaskBits Property

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : NetmaskBits Property

Gets the number of bits in the netmask.

[Visual Basic]
Public ReadOnly Property NetmaskBits As Byte
[C#]
public byte NetmaskBits {get;}

Return Type

The number of bits in the netmask.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%% $$Methods$$

PgSqlInet Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInet Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlInet Structure

For a list of all members of this type, see PgSqlInet members.

Public Methods

Public Method CompareTo | Overloaded. Compares the current PgSqlInet object to the specified object.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlInet value.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlInet instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of an IP address to its PgSqlInet equivalent.
Public Method ToString | Overridden. Converts the current PgSqlInet structure to a String.

See Also

PgSqlInet Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : CompareTo Method (PgSqlInet)

Compares the current PgSqlInet object to the specified object.

Overload List

Compares the current PgSqlInet object to the specified object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

Compares the current PgSqlInet object to the specified PgSqlInet object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(PgSqlInet) As Integer

[C#] public int CompareTo(PgSqlInet);

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

value
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > CompareTo Method : CompareTo(Object) Method

Compares the current PgSqlInet object to the specified object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlInet structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlInet is less than the argument.
Zero | The current PgSqlInet is the same to the argument.
Greater than zero | The current PgSqlInet is greater than the argument.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlInet value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlInet) Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure > CompareTo Method : CompareTo(PgSqlInet) Method

Compares the current PgSqlInet object to the specified PgSqlInet object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlInet _
) As Integer
[C#]
public int CompareTo(
   PgSqlInet value
);

Parameters

value
A PgSqlInet value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlInet structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlInet is less than the argument.
Zero | The current PgSqlInet is the same to the argument.
Greater than zero | The current PgSqlInet is greater than the argument.

See Also

PgSqlInet Structure | PgSqlInet Members | Overload List


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

obj
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Equals Method (PgSqlInet)

Compares the specified object parameter to the PgSqlInet value.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
An object value to compare with.

Return Type

true if object is an instance of the PgSqlInet and has the same IP address or subnet mask; otherwise, false.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : GetHashCode Method (PgSqlInet)

Gets a hash code for the PgSqlInet instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

value
The String to be parsed that contains an IP address. For IP v6 address must be in colon-hexadecimal notation. For IP v4 address must be in dotted-quad notation.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Parse Method (PgSqlInet)

Converts the specified String representation of an IP address to its PgSqlInet equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal value As String _
) As PgSqlInet
[C#]
public static PgSqlInet Parse(
   string value
);

Parameters

value
The String to be parsed that contains an IP address. For IP v6 address must be in colon-hexadecimal notation. For IP v4 address must be in dotted-quad notation.

Return Type

A PgSqlInet structure equal to an IP address represented by the specified String.

Remarks

For IP v4 address, the number of parts (separated by a period) in the string to parse determines how the IP address is constructed. If the string is a one part address, it is stored directly in the network address. When it stores two part address, convenient for specifying a class A address, the method stores the leading part in the first byte and the trailing part in the right-most three bytes of the network address. When the string three part address, convenient for specifying a class B address, the first part is tored in the first byte, the second part in the second byte, and the final part in the right-most two bytes of the network address.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : ToString Method (PgSqlInet)

Converts the current PgSqlInet structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInterval Members | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Structure

Devart.Data.PostgreSql Namespace : PgSqlInterval Structure

Represents the PostgreSQL INTERVAL data type. Each object of the PgSqlInterval class stores a period of time in years, months, days, hours, minutes, seconds, and milliseconds.

For a list of all members of this type, see PgSqlInterval members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlInterval

Syntax

[Visual Basic]
Public Structure PgSqlInterval
   Inherits ValueType
   Implements INullable, IComparable, IXmlSerializable
[C#]
public struct PgSqlInterval : ValueType, INullable, IComparable, IXmlSerializable

Remarks

To obtain a PgSqlInterval object call the PgSqlDataReader.GetPgSqlInterval method of the PgSqlDataReader class.

The data for this type is stored as two separate values on the server. One value is integer number of months, another is number of seconds in the interval. When two PgSqlInterval objects are compared, both values are checked for equality, and, if either fails, two PgSqlInterval objects are considered different.

See Also

PgSqlInterval Members | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure


%%PageItemTitle%% $$Members$$

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Structure Members

Devart.Data.PostgreSql Namespace : PgSqlInterval Structure

PgSqlInterval overview

Public Constructors

Public Constructor PgSqlInterval Constructor Overloaded. Initializes a new instance of the PgSqlInterval structure with the specified parameters.

Public Fields

Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum value a PgSqlInterval object can hold.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum value a PgSqlInterval object can hold.
Public Field static (Shared in Visual Basic) Null | Represents the null value of a PgSqlInterval object.
Public Field static (Shared in Visual Basic) Zero | Represents zero value in a PgSqlInterval object.

Public Properties

Public Property Days | Gets number of days stored in PgSqlInterval object.
Public Property Hours | Gets number of hours stored in PgSqlInterval object.
Public Property IsNull | Indicates whether PgSqlInterval object has null value.
Public Property Milliseconds | Gets number of milliseconds stored in PgSqlInterval object.
Public Property Minutes | Gets number of minutes stored in PgSqlInterval object.
Public Property Months | Gets the months component of the TotalMonths value.
Public Property Seconds | Gets number of seconds stored in PgSqlInterval object.
Public Property TotalDays | Gets number of days stored in PgSqlInterval object.
Public Property TotalMonths | Gets number of months stored in PgSqlInterval object.
Public Property TotalSeconds | Gets number of seconds stored in PgSqlInterval object.
Public Property Years | Gets the years component of the TotalMonths value.

Public Methods

Public Method static (Shared in Visual Basic) Add | Adds two PgSqlInterval values.
Public Method CompareTo | Overloaded. Compares the current PgSqlInterval object to the specified object.
Public Method static (Shared in Visual Basic) Divide | Divides an PgSqlInterval value by a number.
Public Method Equals | Overloaded. Overridden. Determines whether two PgSqlInterval values are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlInterval instance.
Public Method static (Shared in Visual Basic) Multiply | Multiplies an PgSqlInterval value by a number.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlInterval values are not equal.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlInterval equivalent.
Public Method static (Shared in Visual Basic) Subtract | Subtracts one PgSqlInterval structure from another.
Public Method ToString | Overridden. Converts the current PgSqlInterval structure to a String.

Operators

Public Operator Addition | Adds two PgSqlInterval values.
Public Operator Division | Divides an PgSqlInterval value by a number.
Public Operator Equality | Determines whether two PgSqlInterval values are equal.
Public Operator Explicit Type Conversion | Converts an PgSqlInterval structure to a TimeSpan structure.
Public Operator Implicit Type Conversion | Converts a TimeSpan structure to an PgSqlInterval structure.
Public Operator Inequality | Determines whether two PgSqlInterval values are not equal.
Public Operator Multiplication | Multiplies an PgSqlInterval value by a number.
Public Operator Subtraction | Subtracts one PgSqlInterval structure from another.

See Also

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Constructor

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : PgSqlInterval Constructor (PgSqlInterval)

Initializes a new instance of the PgSqlInterval structure with the specified parameters.

Overload List

Initializes a new instance of the PgSqlInterval structure with the specified TimeSpan.

[Visual Basic] Public Sub New(TimeSpan)

[C#] public PgSqlInterval(TimeSpan);

Initializes a new instance of the PgSqlInterval structure with the specified number of months and seconds.

[Visual Basic] Public Sub New(Integer,Double)

[C#] public PgSqlInterval(int,double);

Initializes a new instance of the PgSqlInterval structure with the specified number of months and seconds.

[Visual Basic] Public Sub New(Integer,Integer,Double)

[C#] public PgSqlInterval(int,int,double);

Initializes a new instance of the PgSqlInterval structure with the specified number of years, months, days, hours, minutes, seconds and milliseconds.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,Integer,Integer,Double)

[C#] public PgSqlInterval(int,int,int,int,int,int,double);

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

months
Number of months.
seconds
Number of seconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Constructor(Int32,Double)

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > PgSqlInterval Constructor : PgSqlInterval Constructor(Int32,Double)

Initializes a new instance of the PgSqlInterval structure with the specified number of months and seconds.

[Visual Basic]
Public Function New( _
   ByVal months As Integer, _
   ByVal seconds As Double _
)
[C#]
public PgSqlInterval(
   int months,
   double seconds
);

Parameters

months
Number of months.
seconds
Number of seconds.

Remarks

When PgSqlInterval is created, its Years, Months, Days, Hours, Minutes, Seconds, and Milliseconds properties are initialized according to arguments specified in the constructor.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

months
Number of months.
days
Number of days.
seconds
Number of seconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Constructor(Int32,Int32,Double)

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > PgSqlInterval Constructor : PgSqlInterval Constructor(Int32,Int32,Double)

Initializes a new instance of the PgSqlInterval structure with the specified number of months and seconds.

[Visual Basic]
Public Function New( _
   ByVal months As Integer, _
   ByVal days As Integer, _
   ByVal seconds As Double _
)
[C#]
public PgSqlInterval(
   int months,
   int days,
   double seconds
);

Parameters

months
Number of months.
days
Number of days.
seconds
Number of seconds.

Remarks

When PgSqlInterval is created, its Years, Months, Days, Hours, Minutes, Seconds, and Milliseconds properties are initialized according to arguments specified in the constructor.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

years
Number of years.
months
Number of months.
days
Number of days.
hours
Number of hours.
minutes
Number of minutes.
seconds
Number of seconds.
milliseconds
Number of milliseconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Double)

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > PgSqlInterval Constructor : PgSqlInterval Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Double)

Initializes a new instance of the PgSqlInterval structure with the specified number of years, months, days, hours, minutes, seconds and milliseconds.

[Visual Basic]
Public Function New( _
   ByVal years As Integer, _
   ByVal months As Integer, _
   ByVal days As Integer, _
   ByVal hours As Integer, _
   ByVal minutes As Integer, _
   ByVal seconds As Integer, _
   ByVal milliseconds As Double _
)
[C#]
public PgSqlInterval(
   int years,
   int months,
   int days,
   int hours,
   int minutes,
   int seconds,
   double milliseconds
);

Parameters

years
Number of years.
months
Number of months.
days
Number of days.
hours
Number of hours.
minutes
Number of minutes.
seconds
Number of seconds.
milliseconds
Number of milliseconds.

Remarks

When PgSqlInterval is created, its Years, Months, Days, Hours, Minutes, Seconds, and Milliseconds properties are initialized according to arguments specified in the constructor.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

ts
The specified TimeSpan.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Constructor(TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > PgSqlInterval Constructor : PgSqlInterval Constructor(TimeSpan)

Initializes a new instance of the PgSqlInterval structure with the specified TimeSpan.

[Visual Basic]
Public Function New( _
   ByVal ts As TimeSpan _
)
[C#]
public PgSqlInterval(
   TimeSpan ts
);

Parameters

ts
The specified TimeSpan.

Remarks

When PgSqlInterval is created, its Years, Months, Days, Hours, Minutes, Seconds, and Milliseconds properties are initialized according to arguments specified in the constructor.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlInterval Structure

For a list of all members of this type, see PgSqlInterval members.

Public Fields

Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum value a PgSqlInterval object can hold.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum value a PgSqlInterval object can hold.
Public Field static (Shared in Visual Basic) Null | Represents the null value of a PgSqlInterval object.
Public Field static (Shared in Visual Basic) Zero | Represents zero value in a PgSqlInterval object.

See Also

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MaxValue Field

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : MaxValue Field (PgSqlInterval)

Represents the maximum value a PgSqlInterval object can hold.

[Visual Basic]
Public Shared ReadOnly MaxValue As PgSqlInterval
[C#]
public static readonly PgSqlInterval MaxValue

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MinValue Field

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : MinValue Field (PgSqlInterval)

Represents the minimum value a PgSqlInterval object can hold.

[Visual Basic]
Public Shared ReadOnly MinValue As PgSqlInterval
[C#]
public static readonly PgSqlInterval MinValue

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Null Field (PgSqlInterval)

Represents the null value of a PgSqlInterval object.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlInterval
[C#]
public static readonly PgSqlInterval Null

Return Type

An object that represents a null PgSqlInterval value.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Zero Field

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Zero Field

Represents zero value in a PgSqlInterval object.

[Visual Basic]
Public Shared ReadOnly Zero As PgSqlInterval
[C#]
public static readonly PgSqlInterval Zero

Remarks

Equals to 0 months and 0 seconds.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%% $$Properties$$

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlInterval Structure

For a list of all members of this type, see PgSqlInterval members.

Public Properties

Public Property Days | Gets number of days stored in PgSqlInterval object.
Public Property Hours | Gets number of hours stored in PgSqlInterval object.
Public Property IsNull | Indicates whether PgSqlInterval object has null value.
Public Property Milliseconds | Gets number of milliseconds stored in PgSqlInterval object.
Public Property Minutes | Gets number of minutes stored in PgSqlInterval object.
Public Property Months | Gets the months component of the TotalMonths value.
Public Property Seconds | Gets number of seconds stored in PgSqlInterval object.
Public Property TotalDays | Gets number of days stored in PgSqlInterval object.
Public Property TotalMonths | Gets number of months stored in PgSqlInterval object.
Public Property TotalSeconds | Gets number of seconds stored in PgSqlInterval object.
Public Property Years | Gets the years component of the TotalMonths value.

See Also

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Days Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Days Property (PgSqlInterval)

Gets number of days stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property Days As Integer
[C#]
public int Days {get;}

Return Type

Days component of a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Hours Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Hours Property

Gets number of hours stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property Hours As Integer
[C#]
public int Hours {get;}

Return Type

Hours component of a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : IsNull Property (PgSqlInterval)

Indicates whether PgSqlInterval object has null value.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if bject has null value; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Milliseconds Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Milliseconds Property

Gets number of milliseconds stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property Milliseconds As Integer
[C#]
public int Milliseconds {get;}

Return Type

Milliseconds component of a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Minutes Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Minutes Property

Gets number of minutes stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property Minutes As Integer
[C#]
public int Minutes {get;}

Return Type

Minutes component of a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Months Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Months Property

Gets the months component of the TotalMonths value.

[Visual Basic]
Public ReadOnly Property Months As Integer
[C#]
public int Months {get;}

Return Type

The months component of the TotalMonths value.

Remarks

The real number of months stored on server is contained in TotalMonths property. Its constituent parts are Years and Months. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Seconds Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Seconds Property

Gets number of seconds stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property Seconds As Integer
[C#]
public int Seconds {get;}

Return Type

Seconds component of a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TotalDays Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : TotalDays Property

Gets number of days stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property TotalDays As Integer
[C#]
public int TotalDays {get;}

Return Type

Number of days in a PgSqlInterval object.

Remarks

When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TotalMonths Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : TotalMonths Property

Gets number of months stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property TotalMonths As Integer
[C#]
public int TotalMonths {get;}

Return Type

Number of months in a PgSqlInterval object.

Remarks

The real number of months stored on server is contained in TotalMonths property. Its constituent parts are Years and Months. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TotalSeconds Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : TotalSeconds Property

Gets number of seconds stored in PgSqlInterval object.

[Visual Basic]
Public ReadOnly Property TotalSeconds As Double
[C#]
public double TotalSeconds {get;}

Return Type

Number of seconds in a PgSqlInterval object.

Remarks

The real number of seconds stored on server is contained in TotalSeconds property. Its constituent parts are Days, Hours, Minutes, Seconds, and Milliseconds. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Years Property

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Years Property

Gets the years component of the TotalMonths value.

[Visual Basic]
Public ReadOnly Property Years As Integer
[C#]
public int Years {get;}

Return Type

The years component of the TotalMonths value.

Remarks

The real number of months stored on server is contained in TotalMonths property. Its constituent parts are Years and Months. When a value is assigned to PgSqlInterval object, it is automatically parsed and appropriate properties are filled with right values.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%% $$Methods$$

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlInterval Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlInterval Structure

For a list of all members of this type, see PgSqlInterval members.

Public Methods

Public Method static (Shared in Visual Basic) Add | Adds two PgSqlInterval values.
Public Method CompareTo | Overloaded. Compares the current PgSqlInterval object to the specified object.
Public Method static (Shared in Visual Basic) Divide | Divides an PgSqlInterval value by a number.
Public Method Equals | Overloaded. Overridden. Determines whether two PgSqlInterval values are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlInterval instance.
Public Method static (Shared in Visual Basic) Multiply | Multiplies an PgSqlInterval value by a number.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlInterval values are not equal.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a date to its PgSqlInterval equivalent.
Public Method static (Shared in Visual Basic) Subtract | Subtracts one PgSqlInterval structure from another.
Public Method ToString | Overridden. Converts the current PgSqlInterval structure to a String.

See Also

PgSqlInterval Structure | Devart.Data.PostgreSql Namespace | PgSqlTimeStamp Structure


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Add Method (PgSqlInterval)

Adds two PgSqlInterval values.

[Visual Basic]
Public Shared Function Add( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As PgSqlInterval
[C#]
public static PgSqlInterval Add(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Parameters

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : CompareTo Method (PgSqlInterval)

Compares the current PgSqlInterval object to the specified object.

Overload List

Compares the current PgSqlInet object to the specified object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

Compares the current PgSqlInterval object to the specified PgSqlInterval object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(PgSqlInterval) As Integer

[C#] public int CompareTo(PgSqlInterval);

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

value
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > CompareTo Method : CompareTo(Object) Method

Compares the current PgSqlInet object to the specified object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlInet structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlInet is less than the argument.
Zero | The current PgSqlInet is the same to the argument.
Greater than zero | The current PgSqlInet is greater than the argument.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlInet value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > CompareTo Method : CompareTo(PgSqlInterval) Method

Compares the current PgSqlInterval object to the specified PgSqlInterval object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlInterval _
) As Integer
[C#]
public int CompareTo(
   PgSqlInterval value
);

Parameters

value
A PgSqlInet value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlInterval structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlInterval is less than the argument.
Zero | The current PgSqlInterval is the same to the argument.
Greater than zero | The current PgSqlInterval is greater than the argument.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value
The specified PgSqlInterval.
divisor
A divisor.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Divide Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Divide Method

Divides an PgSqlInterval value by a number.

[Visual Basic]
Public Shared Function Divide( _
   ByVal value As PgSqlInterval, _
   ByVal divisor As Double _
) As PgSqlInterval
[C#]
public static PgSqlInterval Divide(
   PgSqlInterval value,
   double divisor
);

Parameters

value
The specified PgSqlInterval.
divisor
A divisor.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Equals Method (PgSqlInterval)

Determines whether two PgSqlInterval values are equal.

Overload List

Compares itself with the specified parameter treated as PgSqlInterval object.

[Visual Basic] Overloads Overrides Public NotOverridable Function Equals(Object) As Boolean

[C#] public override bool Equals(object);

Determines whether two PgSqlInterval values are equal.

[Visual Basic] Overloads Public Shared Function Equals(PgSqlInterval,PgSqlInterval) As Boolean

[C#] public static bool Equals(PgSqlInterval,PgSqlInterval);

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlInterval object to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > Equals Method : Equals(Object) Method

Compares itself with the specified parameter treated as PgSqlInterval object.

[Visual Basic]
Overloads Overrides Public NotOverridable Function Equals( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Equals(
   object value
);

Parameters

value
A PgSqlInterval object to compare with.

Return Type

true if two PgSqlInterval values are equal; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members | Overload List

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(PgSqlInterval,PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure > Equals Method : Equals(PgSqlInterval,PgSqlInterval) Method

Determines whether two PgSqlInterval values are equal.

[Visual Basic]
Overloads Public Shared Function Equals( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As Boolean
[C#]
public static bool Equals(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Parameters

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

true if two PgSqlInterval values are equal; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members | Overload List


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : GetHashCode Method (PgSqlInterval)

Gets a hash code for the PgSqlInterval instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value
The specified PgSqlInterval.
multiplier
A multiplier.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Multiply Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Multiply Method

Multiplies an PgSqlInterval value by a number.

[Visual Basic]
Public Shared Function Multiply( _
   ByVal value As PgSqlInterval, _
   ByVal multiplier As Double _
) As PgSqlInterval
[C#]
public static PgSqlInterval Multiply(
   PgSqlInterval value,
   double multiplier
);

Parameters

value
The specified PgSqlInterval.
multiplier
A multiplier.

Return Type

A new PgSqlInterval instance.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NotEquals Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : NotEquals Method (PgSqlInterval)

Determines whether two PgSqlInterval values are not equal.

[Visual Basic]
Public Shared Function NotEquals( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As Boolean
[C#]
public static bool NotEquals(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Parameters

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

true if two PgSqlInterval values are not equal; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Parse Method (PgSqlInterval)

Converts the specified String representation of a date to its PgSqlInterval equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal value As String _
) As PgSqlInterval
[C#]
public static PgSqlInterval Parse(
   string value
);

Parameters

value
The String to be parsed.

Return Type

A PgSqlInterval structure equal to the date represented by the specified String.

Remarks

The value can be in the various formats, for example "6 years 8 months 15 days 13:03:02". Refer to PostgreSQL server documentation for detailed information.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Subtract Method (PgSqlInterval)

Subtracts one PgSqlInterval structure from another.

[Visual Basic]
Public Shared Function Subtract( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As PgSqlInterval
[C#]
public static PgSqlInterval Subtract(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Parameters

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : ToString Method (PgSqlInterval)

Converts the current PgSqlInterval structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String representing the value of PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlLSeg Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Structure

Devart.Data.PostgreSql Namespace : PgSqlLSeg Structure

Represents PostgreSQL lseg geometric data type.

For a list of all members of this type, see PgSqlLSeg members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlLSeg

Syntax

[Visual Basic]
Public Structure PgSqlLSeg
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlLSeg : ValueType, INullable, IXmlSerializable

See Also

PgSqlLSeg Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Structure Members

Devart.Data.PostgreSql Namespace : PgSqlLSeg Structure

PgSqlLSeg overview

Public Constructors

Public Constructor PgSqlLSeg Constructor Overloaded. Initializes a new instance of the PgSqlLSeg structure with the specified start and end points of the line segment.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlLSeg object.

Public Properties

Public Property EndPoint | Gets the end point of the line segment.
Public Property IsNull | Gets a value indicating whether the PgSqlLSeg is a Null.
Public Property StartPoint | Gets the start point of the line segment.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlLSeg and has the same values as the current PgSqlLSeg instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlLSeg instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a line segment to its PgSqlLSeg equivalent.
Public Method ToString | Overridden. Converts the current PgSqlLSeg structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlLSeg structures are the same.
Public Operator Inequality | Compares two PgSqlLSeg structures to determine if they are not equal.

See Also

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Constructor

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : PgSqlLSeg Constructor (PgSqlLSeg)

Initializes a new instance of the PgSqlLSeg structure with the specified start and end points of the line segment.

Overload List

Initializes a new instance of the PgSqlLSeg structure with the specified start and end points of the line segment.

[Visual Basic] Public Sub New(Double,Double,Double,Double)

[C#] public PgSqlLSeg(double,double,double,double);

Initializes a new instance of the PgSqlLSeg structure with the specified start and end PgSqlPoint values of the line segment.

[Visual Basic] Public Sub New(PgSqlPoint,PgSqlPoint)

[C#] public PgSqlLSeg(PgSqlPoint,PgSqlPoint);

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members | Overload List

Language

Visual Basic

C#

Show All

x1
The specified x coordinate of the start point.
y1
The specified y coordinate of the start point.
x2
The specified x coordinate of the end point.
y2
The specified y coordinate of the end point.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Constructor(Double,Double,Double,Double)

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure > PgSqlLSeg Constructor : PgSqlLSeg Constructor(Double,Double,Double,Double)

Initializes a new instance of the PgSqlLSeg structure with the specified start and end points of the line segment.

[Visual Basic]
Public Function New( _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal x2 As Double, _
   ByVal y2 As Double _
)
[C#]
public PgSqlLSeg(
   double x1,
   double y1,
   double x2,
   double y2
);

Parameters

x1
The specified x coordinate of the start point.
y1
The specified y coordinate of the start point.
x2
The specified x coordinate of the end point.
y2
The specified y coordinate of the end point.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members | Overload List


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members | Overload List

Language

Visual Basic

C#

Show All

startPoint
The PgSqlPoint that is the specified start point of the line.
endPoint
The PgSqlPoint that is the specified end point of the line.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Constructor(PgSqlPoint,PgSqlPoint)

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure > PgSqlLSeg Constructor : PgSqlLSeg Constructor(PgSqlPoint,PgSqlPoint)

Initializes a new instance of the PgSqlLSeg structure with the specified start and end PgSqlPoint values of the line segment.

[Visual Basic]
Public Function New( _
   ByVal startPoint As PgSqlPoint, _
   ByVal endPoint As PgSqlPoint _
)
[C#]
public PgSqlLSeg(
   PgSqlPoint startPoint,
   PgSqlPoint endPoint
);

Parameters

startPoint
The PgSqlPoint that is the specified start point of the line.
endPoint
The PgSqlPoint that is the specified end point of the line.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlLSeg Structure

For a list of all members of this type, see PgSqlLSeg members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlLSeg object.

See Also

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : Null Field (PgSqlLSeg)

Represents a null PgSqlLSeg object.

[Visual Basic]
Public Shared Null As PgSqlLSeg
[C#]
public static PgSqlLSeg Null

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%% $$Properties$$

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlLSeg Structure

For a list of all members of this type, see PgSqlLSeg members.

Public Properties

Public Property EndPoint | Gets the end point of the line segment.
Public Property IsNull | Gets a value indicating whether the PgSqlLSeg is a Null.
Public Property StartPoint | Gets the start point of the line segment.

See Also

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members | StartPoint Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

EndPoint Property

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : EndPoint Property

Gets the end point of the line segment.

[Visual Basic]
Public ReadOnly Property EndPoint As PgSqlPoint
[C#]
public PgSqlPoint EndPoint {get;}

Return Type

The PgSqlPoint that is the end point.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members | StartPoint Property


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : IsNull Property (PgSqlLSeg)

Gets a value indicating whether the PgSqlLSeg is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlLSeg is a Null; otherwise, false.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members | EndPoint Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

StartPoint Property

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : StartPoint Property

Gets the start point of the line segment.

[Visual Basic]
Public ReadOnly Property StartPoint As PgSqlPoint
[C#]
public PgSqlPoint StartPoint {get;}

Return Type

The PgSqlPoint that is the start point.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members | EndPoint Property


%%PageItemTitle%% $$Methods$$

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLSeg Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlLSeg Structure

For a list of all members of this type, see PgSqlLSeg members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlLSeg and has the same values as the current PgSqlLSeg instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlLSeg instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a line segment to its PgSqlLSeg equivalent.
Public Method ToString | Overridden. Converts the current PgSqlLSeg structure to a String.

See Also

PgSqlLSeg Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : Equals Method (PgSqlLSeg)

Determines if the specified object is an instance of PgSqlLSeg and has the same values as the current PgSqlLSeg instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlLSeg and has the same values; otherwise, false.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : GetHashCode Method (PgSqlLSeg)

Gets a hash code for the PgSqlLSeg instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : Parse Method (PgSqlLSeg)

Converts the specified String representation of a line segment to its PgSqlLSeg equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlLSeg
[C#]
public static PgSqlLSeg Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlLSeg structure equal to the line segment represented by the specified String.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : ToString Method (PgSqlLSeg)

Converts the current PgSqlLSeg structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlMacAddr Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Structure

Devart.Data.PostgreSql Namespace : PgSqlMacAddr Structure

Represents the PostgreSQL macaddr data type that stores MAC addresses.

For a list of all members of this type, see PgSqlMacAddr members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlMacAddr

Syntax

[Visual Basic]
Public Structure PgSqlMacAddr
   Inherits ValueType
   Implements INullable, IComparable, IXmlSerializable
[C#]
public struct PgSqlMacAddr : ValueType, INullable, IComparable, IXmlSerializable

See Also

PgSqlMacAddr Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Structure Members

Devart.Data.PostgreSql Namespace : PgSqlMacAddr Structure

PgSqlMacAddr overview

Public Constructors

Public Constructor PgSqlMacAddr Constructor Initializes a new instance of the PgSqlMacAddr structure with the MAC address specified as an array of bytes.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a NULL value that can be assigned to the PgSqlMacAddr structure.

Public Properties

Public Property Address | Gets the MAC address.
Public Property IsNull | Gets a value indicating whether the PgSqlMacAddr structure represents Null.

Public Methods

Public Method CompareTo | Overloaded. Compares the current PgSqlMacAddr object to the specified object.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlMacAddr value.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlMacAddr instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of an IP address to its PgSqlMacAddr equivalent.
Public Method ToString | Overridden. Converts the current PgSqlMacAddr structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlMacAddr values are equal.
Public Operator Inequality | Compares two PgSqlMacAddr structures to determine if they are not equal.

See Also

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

address
The MAC address to assign to the structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Constructor

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : PgSqlMacAddr Constructor (PgSqlMacAddr)

Initializes a new instance of the PgSqlMacAddr structure with the MAC address specified as an array of bytes.

[Visual Basic]
Public Function New( _
   ByVal address() As Byte _
)
[C#]
public PgSqlMacAddr(
   byte[] address
);

Parameters

address
The MAC address to assign to the structure.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%% $$Fields$$

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlMacAddr Structure

For a list of all members of this type, see PgSqlMacAddr members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a NULL value that can be assigned to the PgSqlMacAddr structure.

See Also

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Null Field (PgSqlMacAddr)

Represents a NULL value that can be assigned to the PgSqlMacAddr structure.

[Visual Basic]
Public Shared Null As PgSqlMacAddr
[C#]
public static PgSqlMacAddr Null

Return Type

An object that represents a null PgSqlMacAddr value.

Remarks

The string equivalent of this field is "null" or "NULL" (used in the Parse and ToString methods).

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%% $$Properties$$

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlMacAddr Structure

For a list of all members of this type, see PgSqlMacAddr members.

Public Properties

Public Property Address | Gets the MAC address.
Public Property IsNull | Gets a value indicating whether the PgSqlMacAddr structure represents Null.

See Also

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Address Property

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Address Property (PgSqlMacAddr)

Gets the MAC address.

[Visual Basic]
Public ReadOnly Property Address As Byte()
[C#]
public byte[] Address {get;}

Return Type

A MAC address.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : IsNull Property (PgSqlMacAddr)

Gets a value indicating whether the PgSqlMacAddr structure represents Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlMacAddr structure represents Null; otherwise, false.

Remarks

If this property is true, the ToString methods return empty string.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%% $$Methods$$

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMacAddr Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlMacAddr Structure

For a list of all members of this type, see PgSqlMacAddr members.

Public Methods

Public Method CompareTo | Overloaded. Compares the current PgSqlMacAddr object to the specified object.
Public Method Equals | Overridden. Compares the specified object parameter to the PgSqlMacAddr value.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlMacAddr instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of an IP address to its PgSqlMacAddr equivalent.
Public Method ToString | Overridden. Converts the current PgSqlMacAddr structure to a String.

See Also

PgSqlMacAddr Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : CompareTo Method (PgSqlMacAddr)

Compares the current PgSqlMacAddr object to the specified object.

Overload List

Compares the current PgSqlMacAddr object to the specified object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

Compares the current PgSqlMacAddr object to the specified PgSqlMacAddr object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(PgSqlMacAddr) As Integer

[C#] public int CompareTo(PgSqlMacAddr);

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members | Overload List

Language

Visual Basic

C#

Show All

value
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure > CompareTo Method : CompareTo(Object) Method

Compares the current PgSqlMacAddr object to the specified object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlMacAddr structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlMacAddr is less than the argument.
Zero | The current PgSqlMacAddr is the same to the argument.
Greater than zero | The current PgSqlMacAddr is greater than the argument.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members | Overload List


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlMacAddr value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlMacAddr) Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure > CompareTo Method : CompareTo(PgSqlMacAddr) Method

Compares the current PgSqlMacAddr object to the specified PgSqlMacAddr object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlMacAddr _
) As Integer
[C#]
public int CompareTo(
   PgSqlMacAddr value
);

Parameters

value
A PgSqlMacAddr value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlMacAddr structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlMacAddr is less than the argument.
Zero | The current PgSqlMacAddr is the same to the argument.
Greater than zero | The current PgSqlMacAddr is greater than the argument.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members | Overload List


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

obj
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Equals Method (PgSqlMacAddr)

Compares the specified object parameter to the PgSqlMacAddr value.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
An object value to compare with.

Return Type

true if object is an instance of the PgSqlMacAddr and has the same IP address or subnet mask; otherwise, false.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : GetHashCode Method (PgSqlMacAddr)

Gets a hash code for the PgSqlMacAddr instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

value
The String to be parsed. It must be a hexadecimal representation of a six-byte MAC address with optional delimiter characters: '.', ':', or '-'.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Parse Method (PgSqlMacAddr)

Converts the specified String representation of an IP address to its PgSqlMacAddr equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal value As String _
) As PgSqlMacAddr
[C#]
public static PgSqlMacAddr Parse(
   string value
);

Parameters

value
The String to be parsed. It must be a hexadecimal representation of a six-byte MAC address with optional delimiter characters: '.', ':', or '-'.

Return Type

A PgSqlMacAddr structure equal to the polygon represented by the specified String.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : ToString Method (PgSqlMacAddr)

Converts the current PgSqlMacAddr structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlPath Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Structure

Devart.Data.PostgreSql Namespace : PgSqlPath Structure

Represents PostgreSQL path geometric data type.

For a list of all members of this type, see PgSqlPath members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlPath

Syntax

[Visual Basic]
Public Structure PgSqlPath
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlPath : ValueType, INullable, IXmlSerializable

See Also

PgSqlPath Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlPath Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Structure Members

Devart.Data.PostgreSql Namespace : PgSqlPath Structure

PgSqlPath overview

Public Constructors

Public Constructor PgSqlPath Constructor Initializes a new instance of the PgSqlPath structure with the specified connected sets of points.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPath object.

Public Properties

Public Property IsClosedPath | Gets a value indicating whether the path is open or closed.
Public Property IsNull | Gets a value indicating whether the PgSqlPath is a Null.
Public Property Points | Gets the end points of the line segments comprising the path.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPath and has the same values as the current PgSqlPath instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPath instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a path to its PgSqlPath equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPath structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlPath structures are the same.
Public Operator Inequality | Compares two PgSqlPath structures to determine if they are not equal.

See Also

PgSqlPath Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

isClosedPath
true if path is closed, where the first and last point are connected; false if path is open, where the first and last points in the set are not connected.
points
Array of the PgSqlPoint end points of the line segments comprising the path.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Constructor

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : PgSqlPath Constructor (PgSqlPath)

Initializes a new instance of the PgSqlPath structure with the specified connected sets of points.

[Visual Basic]
Public Function New( _
   ByVal isClosedPath As Boolean, _
   ByVal points() As PgSqlPoint _
)
[C#]
public PgSqlPath(
   bool isClosedPath,
   PgSqlPoint[] points
);

Parameters

isClosedPath
true if path is closed, where the first and last point are connected; false if path is open, where the first and last points in the set are not connected.
points
Array of the PgSqlPoint end points of the line segments comprising the path.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%% $$Fields$$

PgSqlPath Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlPath Structure

For a list of all members of this type, see PgSqlPath members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPath object.

See Also

PgSqlPath Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Null Field (PgSqlPath)

Represents a null PgSqlPath object.

[Visual Basic]
Public Shared Null As PgSqlPath
[C#]
public static PgSqlPath Null

Return Type

An object that represents a null PgSqlPoint value.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%% $$Properties$$

PgSqlPath Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlPath Structure

For a list of all members of this type, see PgSqlPath members.

Public Properties

Public Property IsClosedPath | Gets a value indicating whether the path is open or closed.
Public Property IsNull | Gets a value indicating whether the PgSqlPath is a Null.
Public Property Points | Gets the end points of the line segments comprising the path.

See Also

PgSqlPath Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsClosedPath Property

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : IsClosedPath Property

Gets a value indicating whether the path is open or closed.

[Visual Basic]
Public ReadOnly Property IsClosedPath As Boolean
[C#]
public bool IsClosedPath {get;}

Return Type

true if path is closed, where the first and last point are connected; false if path is open, where the first and last points in the set are not connected.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : IsNull Property (PgSqlPath)

Gets a value indicating whether the PgSqlPath is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlPath is a Null; otherwise, false.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Points Property

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Points Property (PgSqlPath)

Gets the end points of the line segments comprising the path.

[Visual Basic]
Public ReadOnly Property Points As PgSqlPoint()
[C#]
public PgSqlPoint[] Points {get;}

Return Type

The array of the PgSqlPoint end points.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%% $$Methods$$

PgSqlPath Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPath Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlPath Structure

For a list of all members of this type, see PgSqlPath members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPath and has the same values as the current PgSqlPath instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPath instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a path to its PgSqlPath equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPath structure to a String.

See Also

PgSqlPath Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Equals Method (PgSqlPath)

Determines if the specified object is an instance of PgSqlPath and has the same values as the current PgSqlPath instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlPath and has the same values; otherwise, false.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : GetHashCode Method (PgSqlPath)

Gets a hash code for the PgSqlPath instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Parse Method (PgSqlPath)

Converts the specified String representation of a path to its PgSqlPath equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlPath
[C#]
public static PgSqlPath Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlPath structure equal to the path represented by the specified String.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : ToString Method (PgSqlPath)

Converts the current PgSqlPath structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPoint Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Structure

Devart.Data.PostgreSql Namespace : PgSqlPoint Structure

Represents PostgreSQL point geometric data type.

For a list of all members of this type, see PgSqlPoint members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlPoint

Syntax

[Visual Basic]
Public Structure PgSqlPoint
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlPoint : ValueType, INullable, IXmlSerializable

See Also

PgSqlPoint Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Structure Members

Devart.Data.PostgreSql Namespace : PgSqlPoint Structure

PgSqlPoint overview

Public Constructors

Public Constructor PgSqlPoint Constructor Initializes a new instance of the PgSqlPoint structure with the specified x and y coordinates.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPoint object.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlPoint is a Null.
Public Property X | Gets the X coordinate of the PgSqlPoint instance.
Public Property Y | Gets the Y coordinate of the PgSqlPoint instance.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPoint and has the same values as the current PgSqlPoint instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPoint instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a point to its PgSqlPoint equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPoint structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlPoint structures are the same.
Public Operator Inequality | Compares two PgSqlPoint structures to determine if they are not equal.

See Also

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

x
The specified x coordinate.
y
The specified y coordinate.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Constructor

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : PgSqlPoint Constructor (PgSqlPoint)

Initializes a new instance of the PgSqlPoint structure with the specified x and y coordinates.

[Visual Basic]
Public Function New( _
   ByVal x As Double, _
   ByVal y As Double _
)
[C#]
public PgSqlPoint(
   double x,
   double y
);

Parameters

x
The specified x coordinate.
y
The specified y coordinate.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%% $$Fields$$

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlPoint Structure

For a list of all members of this type, see PgSqlPoint members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPoint object.

See Also

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Null Field (PgSqlPoint)

Represents a null PgSqlPoint object.

[Visual Basic]
Public Shared Null As PgSqlPoint
[C#]
public static PgSqlPoint Null

Return Type

An object that represents a null PgSqlPoint value.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%% $$Properties$$

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlPoint Structure

For a list of all members of this type, see PgSqlPoint members.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlPoint is a Null.
Public Property X | Gets the X coordinate of the PgSqlPoint instance.
Public Property Y | Gets the Y coordinate of the PgSqlPoint instance.

See Also

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : IsNull Property (PgSqlPoint)

Gets a value indicating whether the PgSqlPoint is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlPoint is a Null; otherwise, false.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members | Y Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

X Property

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : X Property

Gets the X coordinate of the PgSqlPoint instance.

[Visual Basic]
Public ReadOnly Property X As Double
[C#]
public double X {get;}

Return Type

The X coordinate of the point.

See Also

PgSqlPoint Structure | PgSqlPoint Members | Y Property


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members | X Property

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Y Property

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Y Property

Gets the Y coordinate of the PgSqlPoint instance.

[Visual Basic]
Public ReadOnly Property Y As Double
[C#]
public double Y {get;}

Return Type

The Y coordinate of the point.

See Also

PgSqlPoint Structure | PgSqlPoint Members | X Property


%%PageItemTitle%% $$Methods$$

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPoint Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlPoint Structure

For a list of all members of this type, see PgSqlPoint members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPoint and has the same values as the current PgSqlPoint instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPoint instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a point to its PgSqlPoint equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPoint structure to a String.

See Also

PgSqlPoint Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Equals Method (PgSqlPoint)

Determines if the specified object is an instance of PgSqlPoint and has the same values as the current PgSqlPoint instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlPoint and has the same values; otherwise, false.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : GetHashCode Method (PgSqlPoint)

Gets a hash code for the PgSqlPoint instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Parse Method (PgSqlPoint)

Converts the specified String representation of a point to its PgSqlPoint equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlPoint
[C#]
public static PgSqlPoint Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlPoint structure equal to the point represented by the specified String.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : ToString Method (PgSqlPoint)

Converts the current PgSqlPoint structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPolygon Members | Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Structure

Devart.Data.PostgreSql Namespace : PgSqlPolygon Structure

Represents PostgreSQL polygon geometric data type.

For a list of all members of this type, see PgSqlPolygon members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlPolygon

Syntax

[Visual Basic]
Public Structure PgSqlPolygon
   Inherits ValueType
   Implements INullable, IXmlSerializable
[C#]
public struct PgSqlPolygon : ValueType, INullable, IXmlSerializable

See Also

PgSqlPolygon Members | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Members$$

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Structure Members

Devart.Data.PostgreSql Namespace : PgSqlPolygon Structure

PgSqlPolygon overview

Public Constructors

Public Constructor PgSqlPolygon Constructor Initializes a new instance of the PgSqlPolygon structure with the specified sets of points.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPolygon object.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlPolygon is a Null.
Public Property Points | Gets the end points of the line segments comprising the boundary of the polygon.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPolygon and has the same values as the current PgSqlPolygon instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPolygon instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a polygon (similar to closed path) to its PgSqlPolygon equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPolygon structure to a String.

Operators

Public Operator Equality | Determines whether two PgSqlPolygon structures are the same.
Public Operator Inequality | Compares two PgSqlPolygon structures to determine if they are not equal.

See Also

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

points
Array of the PgSqlPoint end points of the line segments comprising the boundary of the polygon.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Constructor

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : PgSqlPolygon Constructor (PgSqlPolygon)

Initializes a new instance of the PgSqlPolygon structure with the specified sets of points.

[Visual Basic]
Public Function New( _
   ByVal points() As PgSqlPoint _
)
[C#]
public PgSqlPolygon(
   PgSqlPoint[] points
);

Parameters

points
Array of the PgSqlPoint end points of the line segments comprising the boundary of the polygon.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%% $$Fields$$

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlPolygon Structure

For a list of all members of this type, see PgSqlPolygon members.

Public Fields

Public Field static (Shared in Visual Basic) Null Represents a null PgSqlPolygon object.

See Also

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Null Field (PgSqlPolygon)

Represents a null PgSqlPolygon object.

[Visual Basic]
Public Shared Null As PgSqlPolygon
[C#]
public static PgSqlPolygon Null

Return Type

An object that represents a null PgSqlPolygon value.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%% $$Properties$$

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlPolygon Structure

For a list of all members of this type, see PgSqlPolygon members.

Public Properties

Public Property IsNull | Gets a value indicating whether the PgSqlPolygon is a Null.
Public Property Points | Gets the end points of the line segments comprising the boundary of the polygon.

See Also

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : IsNull Property (PgSqlPolygon)

Gets a value indicating whether the PgSqlPolygon is a Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true, if the PgSqlPolygon is a Null; otherwise, false.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Points Property

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Points Property (PgSqlPolygon)

Gets the end points of the line segments comprising the boundary of the polygon.

[Visual Basic]
Public ReadOnly Property Points As PgSqlPoint()
[C#]
public PgSqlPoint[] Points {get;}

Return Type

The array of the PgSqlPoint end points.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%% $$Methods$$

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlPolygon Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlPolygon Structure

For a list of all members of this type, see PgSqlPolygon members.

Public Methods

Public Method Equals | Overridden. Determines if the specified object is an instance of PgSqlPolygon and has the same values as the current PgSqlPolygon instance.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlPolygon instance.
Public Method static (Shared in Visual Basic) Parse | Converts the specified String representation of a polygon (similar to closed path) to its PgSqlPolygon equivalent.
Public Method ToString | Overridden. Converts the current PgSqlPolygon structure to a String.

See Also

PgSqlPolygon Structure | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

obj
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Equals Method (PgSqlPolygon)

Determines if the specified object is an instance of PgSqlPolygon and has the same values as the current PgSqlPolygon instance.

[Visual Basic]
Overrides Public NotOverridable Function Equals( _
   ByVal obj As Object _
) As Boolean
[C#]
public override bool Equals(
   object obj
);

Parameters

obj
The object to be compared.

Return Type

true if object is an instance of the PgSqlPolygon and has the same values; otherwise, false.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : GetHashCode Method (PgSqlPolygon)

Gets a hash code for the PgSqlPolygon instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

val
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Parse Method (PgSqlPolygon)

Converts the specified String representation of a polygon (similar to closed path) to its PgSqlPolygon equivalent.

[Visual Basic]
Public Shared Function Parse( _
   ByVal val As String _
) As PgSqlPolygon
[C#]
public static PgSqlPolygon Parse(
   string val
);

Parameters

val
The String to be parsed.

Return Type

A PgSqlPolygon structure equal to the polygon represented by the specified String.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : ToString Method (PgSqlPolygon)

Converts the current PgSqlPolygon structure to a String.

[Visual Basic]
Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlTime Members | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Structure

Devart.Data.PostgreSql Namespace : PgSqlTime Structure

Represents the PostgreSQL date and timestamp data types.

For a list of all members of this type, see PgSqlTime members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlTime

Syntax

[Visual Basic]
Public Structure PgSqlTime
   Inherits ValueType
   Implements INullable, IComparable, IXmlSerializable
[C#]
public struct PgSqlTime : ValueType, INullable, IComparable, IXmlSerializable

Remarks

To obtain a PgSqlTime object call the PgSqlDataReader.GetPgSqlTime(Int32) method of the PgSqlDataReader or PgSqlParameter class.

The dotConnect for PostgreSQL PgSqlTime structure in behavior resembles server-side operations with date and timestamp (with or without timezone) data types. The structure handles a wider range of dates than the standard System.DateTime.

See Also

PgSqlTime Members | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%% $$Members$$

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Structure Members

Devart.Data.PostgreSql Namespace : PgSqlTime Structure

PgSqlTime overview

Public Constructors

Public Constructor PgSqlTime Constructor Overloaded. Initializes a new instance of the PgSqlTime structure.

Public Fields

Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum valid date for a PgSqlTime structure.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum valid date for a PgSqlTime structure.
Public Field static (Shared in Visual Basic) Null | Represents a NULL value that can be assigned to the PgSqlTime structure.

Public Properties

Public Property Hour | Gets the hour component of a PgSqlTime.
Public Property IsNull | Gets a value indicating whether the PgSqlTime structure represents Null.
Public Property Microsecond | Gets the microsecond component of a PgSqlTime.
Public Property Minute | Gets the minute component of a PgSqlTime.
Public Property Second | Gets the second component of a PgSqlTime.
Public Property Ticks | Gets the number of microseconds in the structure value.
Public Property TimeZone | Gets or sets the time zone of the PgSqlTime object.
Public Property Value | Gets the date and time that is stored in the PgSqlTime structure.
Public Property WithTimeZone | Determines whether this is a timestamp with time zone.

Public Methods

Public Method static (Shared in Visual Basic) Add | Overloaded. Adds a PgSqlInterval or TimeSpan to a PgSqlTime structure.
Public Method AddHours | Adds the specified number of hours to the current PgSqlTime instance.
Public Method AddMicroseconds | Adds the specified number of microseconds to the current PgSqlTime instance.
Public Method AddMinutes | Adds the specified number of minutes to the current PgSqlTime instance.
Public Method AddSeconds | Adds the specified number of seconds to the current PgSqlTime instance.
Public Method CompareTo | Overloaded. Compares the current PgSqlTime object to the specified object.
Public Method static (Shared in Visual Basic) Equals | Overloaded. Compares two PgSqlTime structures to determine if they are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlTime instance.
Public Method static (Shared in Visual Basic) GreaterThan | Determines whether the first of two PgSqlTime values is greater than the second.
Public Method static (Shared in Visual Basic) GreaterThanOrEqual | Determines whether the first of two PgSqlTime values is greater than or equal to the second.
Public Method static (Shared in Visual Basic) LessThan | Determines whether the first of two PgSqlTime values is less than the second.
Public Method static (Shared in Visual Basic) LessThanOrEqual | Determines whether the first of two PgSqlTime values is less than or equal to the second.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlTime values are not equal.
Public Method static (Shared in Visual Basic) Parse | Overloaded. Converts the specified String representation of a date to its PgSqlTime equivalent.
Public Method static (Shared in Visual Basic) Subtract | Overloaded. Subtracts a value from a PgSqlTime structure.
Public Method ToString | Overloaded. Overridden. Converts the current PgSqlTime structure to a String.

Operators

Public Operator Addition | Overloaded. Adds the specified object to the PgSqlTime and returns a new PgSqlTime structure.
Public Operator Equality | Determines whether two PgSqlTime values are equal.
Public Operator Explicit Type Conversion | Overloaded. Converts a PgSqlTime structure to the DateTime object.
Public Operator Greater Than | Compares two PgSqlTime structures to determine if the first is greater than the second.
Public Operator Greater Than or Equal | Compares two PgSqlTime structures to determine if the first is greater than or equal to the second.
Public Operator Implicit Type Conversion | Overloaded. Converts a DateTime object to the PgSqlTime structure.
Public Operator Inequality | Determines whether two PgSqlTime values are not equal.
Public Operator Less Than | Compares two PgSqlTime structures to determine if the first is less than the second.
Public Operator Less Than or Equal | Compares two PgSqlTime structures to determine if the first is less than or equal to the second.
Public Operator Subtraction | Overloaded. Subtracts the specified object from the PgSqlTime structure.

See Also

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : PgSqlTime Constructor (PgSqlTime)

Initializes a new instance of the PgSqlTime structure.

Overload List

Initializes a new instance of the PgSqlTime structure with the specified TimeSpan value.

[Visual Basic] Public Sub New(TimeSpan)

[C#] public PgSqlTime(TimeSpan);

Initializes a new instance of the PgSqlTime structure with the specified TimeSpan value and the specified time zone.

[Visual Basic] Public Sub New(TimeSpan,TimeSpan)

[C#] public PgSqlTime(TimeSpan,TimeSpan);

Initializes a new instance of the PgSqlTime structure with the specified total number of microseconds.

[Visual Basic] Public Sub New(Long)

[C#] public PgSqlTime(long);

Initializes a new instance of the PgSqlTime structure with the specified total number of microseconds and time zone.

[Visual Basic] Public Sub New(Long,TimeSpan)

[C#] public PgSqlTime(long,TimeSpan);

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, and second.

[Visual Basic] Public Sub New(Integer,Integer,Integer)

[C#] public PgSqlTime(int,int,int);

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second and microsecond.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer)

[C#] public PgSqlTime(int,int,int,int);

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second, and the specified timezone.

[Visual Basic] Public Sub New(Integer,Integer,Integer,TimeSpan)

[C#] public PgSqlTime(int,int,int,TimeSpan);

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second, microsecond, and the specified timezone.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,TimeSpan)

[C#] public PgSqlTime(int,int,int,int,TimeSpan);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

hour
The specified hour.
minute
The specified minute.
second
The specified second.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int32,Int32,Int32)

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, and second.

[Visual Basic]
Public Function New( _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer _
)
[C#]
public PgSqlTime(
   int hour,
   int minute,
   int second
);

Parameters

hour
The specified hour.
minute
The specified minute.
second
The specified second.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int32,Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int32,Int32,Int32,Int32)

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second and microsecond.

[Visual Basic]
Public Function New( _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal microsecond As Integer _
)
[C#]
public PgSqlTime(
   int hour,
   int minute,
   int second,
   int microsecond
);

Parameters

hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
timeZone
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int32,Int32,Int32,Int32,TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int32,Int32,Int32,Int32,TimeSpan)

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second, microsecond, and the specified timezone.

[Visual Basic]
Public Function New( _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal microsecond As Integer, _
   ByVal timeZone As TimeSpan _
)
[C#]
public PgSqlTime(
   int hour,
   int minute,
   int second,
   int microsecond,
   TimeSpan timeZone
);

Parameters

hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
timeZone

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

hour
The specified hour.
minute
The specified minute.
second
The specified second.
timeZone
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int32,Int32,Int32,TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int32,Int32,Int32,TimeSpan)

Initializes a new instance of the PgSqlTime structure with the specified hour, minute, second, and the specified timezone.

[Visual Basic]
Public Function New( _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal timeZone As TimeSpan _
)
[C#]
public PgSqlTime(
   int hour,
   int minute,
   int second,
   TimeSpan timeZone
);

Parameters

hour
The specified hour.
minute
The specified minute.
second
The specified second.
timeZone

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

timeTicks
The specified number of microseconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int64)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int64)

Initializes a new instance of the PgSqlTime structure with the specified total number of microseconds.

[Visual Basic]
Public Function New( _
   ByVal timeTicks As Long _
)
[C#]
public PgSqlTime(
   long timeTicks
);

Parameters

timeTicks
The specified number of microseconds.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

timeTicks
The specified number of microseconds.
timeZone
The specified time zone
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(Int64,TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(Int64,TimeSpan)

Initializes a new instance of the PgSqlTime structure with the specified total number of microseconds and time zone.

[Visual Basic]
Public Function New( _
   ByVal timeTicks As Long, _
   ByVal timeZone As TimeSpan _
)
[C#]
public PgSqlTime(
   long timeTicks,
   TimeSpan timeZone
);

Parameters

timeTicks
The specified number of microseconds.
timeZone
The specified time zone

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

time
A TimeSpan value to initialize the new PgSqlTime object with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(TimeSpan)

Initializes a new instance of the PgSqlTime structure with the specified TimeSpan value.

[Visual Basic]
Public Function New( _
   ByVal time As TimeSpan _
)
[C#]
public PgSqlTime(
   TimeSpan time
);

Parameters

time
A TimeSpan value to initialize the new PgSqlTime object with.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

time
A TimeSpan value to initialize the new PgSqlTime object with.
timeZone
The specified time zone.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Constructor(TimeSpan,TimeSpan)

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > PgSqlTime Constructor : PgSqlTime Constructor(TimeSpan,TimeSpan)

Initializes a new instance of the PgSqlTime structure with the specified TimeSpan value and the specified time zone.

[Visual Basic]
Public Function New( _
   ByVal time As TimeSpan, _
   ByVal timeZone As TimeSpan _
)
[C#]
public PgSqlTime(
   TimeSpan time,
   TimeSpan timeZone
);

Parameters

time
A TimeSpan value to initialize the new PgSqlTime object with.
timeZone
The specified time zone.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlTime Structure

For a list of all members of this type, see PgSqlTime members.

Public Fields

Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum valid date for a PgSqlTime structure.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum valid date for a PgSqlTime structure.
Public Field static (Shared in Visual Basic) Null | Represents a NULL value that can be assigned to the PgSqlTime structure.

See Also

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MaxValue Field

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : MaxValue Field (PgSqlTime)

Represents the maximum valid date for a PgSqlTime structure.

[Visual Basic]
Public Shared ReadOnly MaxValue As PgSqlTime
[C#]
public static readonly PgSqlTime MaxValue

Remarks

The maximum valid date for a PgSqlTime structure is 5874897 AD.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MinValue Field

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : MinValue Field (PgSqlTime)

Represents the minimum valid date for a PgSqlTime structure.

[Visual Basic]
Public Shared ReadOnly MinValue As PgSqlTime
[C#]
public static readonly PgSqlTime MinValue

Remarks

The minimum valid date for a PgSqlTime structure is 4713 BC.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Null Field (PgSqlTime)

Represents a NULL value that can be assigned to the PgSqlTime structure.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlTime
[C#]
public static readonly PgSqlTime Null

Remarks

The string equivalent of this field is "null" or "NULL" (used in the Parse and ToString methods).

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%% $$Properties$$

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlTime Structure

For a list of all members of this type, see PgSqlTime members.

Public Properties

Public Property Hour | Gets the hour component of a PgSqlTime.
Public Property IsNull | Gets a value indicating whether the PgSqlTime structure represents Null.
Public Property Microsecond | Gets the microsecond component of a PgSqlTime.
Public Property Minute | Gets the minute component of a PgSqlTime.
Public Property Second | Gets the second component of a PgSqlTime.
Public Property Ticks | Gets the number of microseconds in the structure value.
Public Property TimeZone | Gets or sets the time zone of the PgSqlTime object.
Public Property Value | Gets the date and time that is stored in the PgSqlTime structure.
Public Property WithTimeZone | Determines whether this is a timestamp with time zone.

See Also

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Hour Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Hour Property (PgSqlTime)

Gets the hour component of a PgSqlTime.

[Visual Basic]
Public ReadOnly Property Hour As Integer
[C#]
public int Hour {get;}

Return Type

A number that represents an hour value between 0 and 23.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : IsNull Property (PgSqlTime)

Gets a value indicating whether the PgSqlTime structure represents Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlTime structure represents Null; otherwise, false.

Remarks

If this property is true, the ToString methods return empty string.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Microsecond Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Microsecond Property (PgSqlTime)

Gets the microsecond component of a PgSqlTime.

[Visual Basic]
Public ReadOnly Property Microsecond As Integer
[C#]
public int Microsecond {get;}

Return Type

Number of microseconds.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Minute Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Minute Property (PgSqlTime)

Gets the minute component of a PgSqlTime.

[Visual Basic]
Public ReadOnly Property Minute As Integer
[C#]
public int Minute {get;}

Return Type

A number that represents a minute value between 0 and 59.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Second Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Second Property (PgSqlTime)

Gets the second component of a PgSqlTime.

[Visual Basic]
Public ReadOnly Property Second As Integer
[C#]
public int Second {get;}

Return Type

A number that represents a second value between 0 and 59.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Ticks Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Ticks Property

Gets the number of microseconds in the structure value.

[Visual Basic]
Public ReadOnly Property Ticks As Long
[C#]
public long Ticks {get;}

Return Type

Thenumber of microseconds in the structure value. The value includes hours and minutes expressed in microseconds.

Remarks

Do not confuse with the Microsecond, which does not include hours and minutes.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TimeZone Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : TimeZone Property (PgSqlTime)

Gets or sets the time zone of the PgSqlTime object.

[Visual Basic]
Public Property TimeZone As TimeSpan
[C#]
public TimeSpan TimeZone {get; set;}

Return Type

The time zone of the PgSqlTime object.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Value Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Value Property (PgSqlTime)

Gets the date and time that is stored in the PgSqlTime structure.

[Visual Basic]
Public ReadOnly Property Value As TimeSpan
[C#]
public TimeSpan Value {get;}

Return Type

A DateTime object.

Remarks

The value cannot be less than MinValue or greater than MaxValue.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

WithTimeZone Property

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : WithTimeZone Property (PgSqlTime)

Determines whether this is a timestamp with time zone.

[Visual Basic]
Public ReadOnly Property WithTimeZone As Boolean
[C#]
public bool WithTimeZone {get;}

Return Type

true, if this time value is stored with time zone; otherwise false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%% $$Methods$$

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTime Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlTime Structure

For a list of all members of this type, see PgSqlTime members.

Public Methods

Public Method static (Shared in Visual Basic) Add | Overloaded. Adds a PgSqlInterval or TimeSpan to a PgSqlTime structure.
Public Method AddHours | Adds the specified number of hours to the current PgSqlTime instance.
Public Method AddMicroseconds | Adds the specified number of microseconds to the current PgSqlTime instance.
Public Method AddMinutes | Adds the specified number of minutes to the current PgSqlTime instance.
Public Method AddSeconds | Adds the specified number of seconds to the current PgSqlTime instance.
Public Method CompareTo | Overloaded. Compares the current PgSqlTime object to the specified object.
Public Method static (Shared in Visual Basic) Equals | Overloaded. Compares two PgSqlTime structures to determine if they are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlTime instance.
Public Method static (Shared in Visual Basic) GreaterThan | Determines whether the first of two PgSqlTime values is greater than the second.
Public Method static (Shared in Visual Basic) GreaterThanOrEqual | Determines whether the first of two PgSqlTime values is greater than or equal to the second.
Public Method static (Shared in Visual Basic) LessThan | Determines whether the first of two PgSqlTime values is less than the second.
Public Method static (Shared in Visual Basic) LessThanOrEqual | Determines whether the first of two PgSqlTime values is less than or equal to the second.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlTime values are not equal.
Public Method static (Shared in Visual Basic) Parse | Overloaded. Converts the specified String representation of a date to its PgSqlTime equivalent.
Public Method static (Shared in Visual Basic) Subtract | Overloaded. Subtracts a value from a PgSqlTime structure.
Public Method ToString | Overloaded. Overridden. Converts the current PgSqlTime structure to a String.

See Also

PgSqlTime Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Add Method (PgSqlTime)

Adds a PgSqlInterval or TimeSpan to a PgSqlTime structure.

Overload List

Adds a PgSqlInterval to a TimeSpan structure.

[Visual Basic] Overloads Public Shared Function Add(PgSqlTime,TimeSpan) As PgSqlTime

[C#] public static PgSqlTime Add(PgSqlTime,TimeSpan);

Adds a PgSqlInterval to a PgSqlTime structure.

[Visual Basic] Overloads Public Shared Function Add(PgSqlTime,PgSqlInterval) As PgSqlTime

[C#] public static PgSqlTime Add(PgSqlTime,PgSqlInterval);

Adds a PgSqlTime to a PgSqlTime structure.

[Visual Basic] Overloads Public Shared Function Add(PgSqlTime,PgSqlTime) As PgSqlTime

[C#] public static PgSqlTime Add(PgSqlTime,PgSqlTime);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
The first item to add.
t
The second item to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlTime,TimeSpan) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Add Method : Add(PgSqlTime,TimeSpan) Method

Adds a PgSqlInterval to a TimeSpan structure.

[Visual Basic]
Overloads Public Shared Function Add( _
   ByVal x As PgSqlTime, _
   ByVal t As TimeSpan _
) As PgSqlTime
[C#]
public static PgSqlTime Add(
   PgSqlTime x,
   TimeSpan t
);

Parameters

x
The first item to add.
t
The second item to add.

Return Type

The new PgSqlTime that represents sum of the two arguments.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
The first item to add.
t
The second item to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlTime,PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Add Method : Add(PgSqlTime,PgSqlInterval) Method

Adds a PgSqlInterval to a PgSqlTime structure.

[Visual Basic]
Overloads Public Shared Function Add( _
   ByVal x As PgSqlTime, _
   ByVal t As PgSqlInterval _
) As PgSqlTime
[C#]
public static PgSqlTime Add(
   PgSqlTime x,
   PgSqlInterval t
);

Parameters

x
The first item to add.
t
The second item to add.

Return Type

The new PgSqlTime that represents sum of the two arguments.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
The first item to add.
t
The second item to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlTime,PgSqlTime) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Add Method : Add(PgSqlTime,PgSqlTime) Method

Adds a PgSqlTime to a PgSqlTime structure.

[Visual Basic]
Overloads Public Shared Function Add( _
   ByVal x As PgSqlTime, _
   ByVal t As PgSqlTime _
) As PgSqlTime
[C#]
public static PgSqlTime Add(
   PgSqlTime x,
   PgSqlTime t
);

Parameters

x
The first item to add.
t
The second item to add.

Return Type

The new PgSqlTime that represents sum of the two arguments.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

value
The number of hours to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddHours Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : AddHours Method (PgSqlTime)

Adds the specified number of hours to the current PgSqlTime instance.

[Visual Basic]
Public Function AddHours( _
   ByVal value As Double _
) As PgSqlTime
[C#]
public PgSqlTime AddHours(
   double value
);

Parameters

value
The number of hours to add.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

value
The specified number of microseconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddMicroseconds Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : AddMicroseconds Method (PgSqlTime)

Adds the specified number of microseconds to the current PgSqlTime instance.

[Visual Basic]
Public Function AddMicroseconds( _
   ByVal value As Long _
) As PgSqlTime
[C#]
public PgSqlTime AddMicroseconds(
   long value
);

Parameters

value
The specified number of microseconds.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

value
The number of minutes to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddMinutes Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : AddMinutes Method (PgSqlTime)

Adds the specified number of minutes to the current PgSqlTime instance.

[Visual Basic]
Public Function AddMinutes( _
   ByVal value As Double _
) As PgSqlTime
[C#]
public PgSqlTime AddMinutes(
   double value
);

Parameters

value
The number of minutes to add.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

value
The number of seconds to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddSeconds Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : AddSeconds Method (PgSqlTime)

Adds the specified number of seconds to the current PgSqlTime instance.

[Visual Basic]
Public Function AddSeconds( _
   ByVal value As Double _
) As PgSqlTime
[C#]
public PgSqlTime AddSeconds(
   double value
);

Parameters

value
The number of seconds to add.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : CompareTo Method (PgSqlTime)

Compares the current PgSqlTime object to the specified object.

Overload List

Compares the current PgSqlTime object to the specified object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

Compares the current PgSqlTime object to the specified PgSqlTime and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(PgSqlTime) As Integer

[C#] public int CompareTo(PgSqlTime);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > CompareTo Method : CompareTo(Object) Method

Compares the current PgSqlTime object to the specified object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlTime structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlTime is less than the argument.
Zero | The current PgSqlTime is the same to the argument.
Greater than zero | The current PgSqlTime is greater than the argument.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlTime value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlTime) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > CompareTo Method : CompareTo(PgSqlTime) Method

Compares the current PgSqlTime object to the specified PgSqlTime and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlTime _
) As Integer
[C#]
public int CompareTo(
   PgSqlTime value
);

Parameters

value
A PgSqlTime value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlTime structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlTime is less than the argument.
Zero | The current PgSqlTime is the same to the argument.
Greater than zero | The current PgSqlTime is greater than the argument.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Equals Method (PgSqlTime)

Compares two PgSqlTime structures to determine if they are equal.

Overload List

Determines whether two PgSqlTime values are equal.

[Visual Basic] Overloads Public Shared Function Equals(PgSqlTime,PgSqlTime) As Boolean

[C#] public static bool Equals(PgSqlTime,PgSqlTime);

Compares the specified object parameter to the PgSqlTime value.

[Visual Basic] Overloads Overrides Public NotOverridable Function Equals(Object) As Boolean

[C#] public override bool Equals(object);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime value to compare.
y
A PgSqlTime value to compare.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(PgSqlTime,PgSqlTime) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Equals Method : Equals(PgSqlTime,PgSqlTime) Method

Determines whether two PgSqlTime values are equal.

[Visual Basic]
Overloads Public Shared Function Equals( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool Equals(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
A PgSqlTime value to compare.
y
A PgSqlTime value to compare.

Return Type

true if two PgSqlTime values are equal; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Equals Method : Equals(Object) Method

Compares the specified object parameter to the PgSqlTime value.

[Visual Basic]
Overloads Overrides Public NotOverridable Function Equals( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Equals(
   object value
);

Parameters

value
The object to be compared.

Return Type

true if object is an instance of the PgSqlTime and has the same date and time; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : GetHashCode Method (PgSqlTime)

Gets a hash code for the PgSqlTime instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GreaterThan Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : GreaterThan Method (PgSqlTime)

Determines whether the first of two PgSqlTime values is greater than the second.

[Visual Basic]
Public Shared Function GreaterThan( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool GreaterThan(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is greater than the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GreaterThanOrEqual Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : GreaterThanOrEqual Method (PgSqlTime)

Determines whether the first of two PgSqlTime values is greater than or equal to the second.

[Visual Basic]
Public Shared Function GreaterThanOrEqual( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool GreaterThanOrEqual(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is greater than or equal to the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LessThan Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : LessThan Method (PgSqlTime)

Determines whether the first of two PgSqlTime values is less than the second.

[Visual Basic]
Public Shared Function LessThan( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool LessThan(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is less than the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LessThanOrEqual Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : LessThanOrEqual Method (PgSqlTime)

Determines whether the first of two PgSqlTime values is less than or equal to the second.

[Visual Basic]
Public Shared Function LessThanOrEqual( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool LessThanOrEqual(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is less than or equal to the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NotEquals Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : NotEquals Method (PgSqlTime)

Determines whether two PgSqlTime values are not equal.

[Visual Basic]
Public Shared Function NotEquals( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public static bool NotEquals(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if two PgSqlTime values are not equal; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Parse Method (PgSqlTime)

Converts the specified String representation of a date to its PgSqlTime equivalent.

Overload List

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String) As PgSqlTime

[C#] public static PgSqlTime Parse(string);

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String,Boolean) As PgSqlTime

[C#] public static PgSqlTime Parse(string,bool);

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String,String) As PgSqlTime

[C#] public static PgSqlTime Parse(string,string);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Parse Method : Parse(String) Method

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String _
) As PgSqlTime
[C#]
public static PgSqlTime Parse(
   string value
);

Parameters

value
The String to be parsed.

Return Type

a PgSqlTime structure equal to the date represented by the specified String.

Remarks

The value format must correspond to your local windows settings.

Example

The following example demonstrates usage of Parse method on a machine that has default Windows XP settings. If you have custom settings or use non-English version of the operating system you must change the format of value parameter.

[C#]

PgSqlTime newts = PgSqlTime.Parse("12/25/2005 3:40:15 PM");

[Visual Basic]

Dim newts As PgSqlTime = PgSqlTime.Parse("12/25/2005 3:40:15 PM")

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
withTimeZone
Determines whether to use the time zone.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String,Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Parse Method : Parse(String,Boolean) Method

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String, _
   ByVal withTimeZone As Boolean _
) As PgSqlTime
[C#]
public static PgSqlTime Parse(
   string value,
   bool withTimeZone
);

Parameters

value
The String to be parsed.
withTimeZone
Determines whether to use the time zone.

Return Type

a PgSqlTime structure equal to the date represented by the specified String.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
format
A String that describes elements contained within value. The syntax is as in the PostgreSQL to_timestamp function.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String,String) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Parse Method : Parse(String,String) Method

Converts the specified String representation of a date to its PgSqlTime equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String, _
   ByVal format As String _
) As PgSqlTime
[C#]
public static PgSqlTime Parse(
   string value,
   string format
);

Parameters

value
The String to be parsed.
format
A String that describes elements contained within value. The syntax is as in the PostgreSQL to_timestamp function.

Return Type

a PgSqlTime structure equal to the date represented by the specified String.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Subtract Method (PgSqlTime)

Subtracts a value from a PgSqlTime structure.

Overload List

Subtracts a TimeSpan value from a PgSqlTime structure.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTime,TimeSpan) As PgSqlTime

[C#] public static PgSqlTime Subtract(PgSqlTime,TimeSpan);

Subtracts a PgSqlInterval value from a PgSqlTime structure.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTime,PgSqlInterval) As PgSqlTime

[C#] public static PgSqlTime Subtract(PgSqlTime,PgSqlInterval);

Subtracts a PgSqlTime value from another PgSqlTime value.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTime,PgSqlTime) As PgSqlInterval

[C#] public static PgSqlInterval Subtract(PgSqlTime,PgSqlTime);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to subtract from.
t
A TimeSpan value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTime,TimeSpan) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtract Method : Subtract(PgSqlTime,TimeSpan) Method

Subtracts a TimeSpan value from a PgSqlTime structure.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTime, _
   ByVal t As TimeSpan _
) As PgSqlTime
[C#]
public static PgSqlTime Subtract(
   PgSqlTime x,
   TimeSpan t
);

Parameters

x
A PgSqlTime structure to subtract from.
t
A TimeSpan value to subtract.

Return Type

The new PgSqlTime structure that represents the result of the subtract operation.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to subtract from.
t
A PgSqlInterval value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTime,PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtract Method : Subtract(PgSqlTime,PgSqlInterval) Method

Subtracts a PgSqlInterval value from a PgSqlTime structure.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTime, _
   ByVal t As PgSqlInterval _
) As PgSqlTime
[C#]
public static PgSqlTime Subtract(
   PgSqlTime x,
   PgSqlInterval t
);

Parameters

x
A PgSqlTime structure to subtract from.
t
A PgSqlInterval value to subtract.

Return Type

The new PgSqlTime structure that represents the result of the subtract operation.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime value to subtract from.
y
A PgSqlTime value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTime,PgSqlTime) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtract Method : Subtract(PgSqlTime,PgSqlTime) Method

Subtracts a PgSqlTime value from another PgSqlTime value.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As PgSqlInterval
[C#]
public static PgSqlInterval Subtract(
   PgSqlTime x,
   PgSqlTime y
);

Parameters

x
A PgSqlTime value to subtract from.
y
A PgSqlTime value to subtract.

Return Type

The PgSqlInterval structure that represents the result of the subtract operation.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : ToString Method (PgSqlTime)

Converts the current PgSqlTime structure to a String.

Overload List

Converts the current PgSqlTime structure to a String.

[Visual Basic] Overloads Overrides Public NotOverridable Function ToString() As String

[C#] public override string ToString();

Converts the current PgSqlTime structure to a String using provided format string.

[Visual Basic] Overloads Public Function ToString(String) As String

[C#] public string ToString(string);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString() Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > ToString Method : ToString() Method

Converts the current PgSqlTime structure to a String.

[Visual Basic]
Overloads Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

Remarks

This overload uses the DateTimeFormatInfo.CurrentInfo.ShortDatePattern and DateTimeFormatInfo.CurrentInfo.LongTimePattern values. Depending on the constructor used to create the structure, the method may add the time zone.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

format
Format to use for converting the string.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString(String) Method

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > ToString Method : ToString(String) Method

Converts the current PgSqlTime structure to a String using provided format string.

[Visual Basic]
Overloads Public Function ToString( _
   ByVal format As String _
) As String
[C#]
public string ToString(
   string format
);

Parameters

format
Format to use for converting the string.

Return Type

A String object.

Remarks

For information on how to build a format string refer to description of to_char function in the PostgreSQL documentation.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Members | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Structure

Devart.Data.PostgreSql Namespace : PgSqlTimeStamp Structure

Represents the PostgreSQL date and timestamp data types.

For a list of all members of this type, see PgSqlTimeStamp members.

Inheritance Hierarchy

System.Object
System.ValueType
Devart.Data.PostgreSql.PgSqlTimeStamp

Syntax

[Visual Basic]
Public Structure PgSqlTimeStamp
   Inherits ValueType
   Implements INullable, IComparable, IXmlSerializable
[C#]
public struct PgSqlTimeStamp : ValueType, INullable, IComparable, IXmlSerializable

Remarks

To obtain a PgSqlTimeStamp object call the PgSqlDataReader.GetPgSqlTimeStamp(Int32) method of the PgSqlDataReader or PgSqlParameter class.

The dotConnect for PostgreSQL PgSqlTimeStamp structure in behavior resembles server-side operations with date and timestamp (with or without timezone) data types. The structure handles a wider range of dates than the standard System.DateTime.

See Also

PgSqlTimeStamp Members | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%% $$Members$$

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Structure Members

Devart.Data.PostgreSql Namespace : PgSqlTimeStamp Structure

PgSqlTimeStamp overview

Public Constructors

Public Constructor PgSqlTimeStamp Constructor Overloaded. Initializes a new instance of the PgSqlTimeStamp structure.

Public Fields

Public Field static (Shared in Visual Basic) Epoch | Returns the date 1970-01-01 00:00:00-00.
Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum valid date for a PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum valid date for a PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) NegativeInfinity | Represents a negative infinity value that can be assigned to the PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) Null | Represents a NULL value that can be assigned to the PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) PositiveInfinity | Represents a positive infinity value that can be assigned to the PgSqlTimeStamp structure.

Public Properties

Public Property Day | Gets the day component of a PgSqlTimeStamp.
Public Property DayOfWeek | Returns the day of a week that corresponds to the current PgSqlTimeStamp value.
Public Property DayOfYear | Returns ordinal of the day in a year that corresponds to the current PgSqlTimeStamp value.
Public Property Days | Gets the number of days in the date part of the structure (days since January 24.11.4714 BC).
Public Property Hour | Gets the hour component of a PgSqlTimeStamp.
Public Property IsFinite | Indicates whether the current structure value is finite or null.
Public Property IsNull | Gets a value indicating whether the PgSqlTimeStamp structure represents Null.
Public Property Microsecond | Gets the microsecond component of a PgSqlTimeStamp.
Public Property Minute | Gets the minute component of a PgSqlTimeStamp.
Public Property Month | Gets the month component of a PgSqlTimeStamp.
Public Property Second | Gets the second component of a PgSqlTimeStamp.
Public Property TimeOfDay | Gets the time part of the PgSqlTimeStamp structure.
Public Property TimeTicks | Gets the number of microseconds in the time part of the structure.
Public Property Value | Gets the date and time that is stored in the PgSqlTimeStamp structure.
Public Property WithTimeZone | Determines whether this is a timestamp with time zone.
Public Property Year | Gets the year component of a PgSqlTimeStamp.

Public Methods

Public Method static (Shared in Visual Basic) Add | Overloaded. Adds a PgSqlInterval or TimeSpan to a PgSqlTimeStamp structure.
Public Method AddDays | Adds the specified number of days to the current PgSqlTimeStamp instance.
Public Method AddHours | Adds the specified number of hours to the current PgSqlTimeStamp instance.
Public Method AddMicroseconds | Adds the specified number of microseconds to the current PgSqlTimeStamp instance.
Public Method AddMinutes | Adds the specified number of minutes to the current PgSqlTimeStamp instance.
Public Method AddMonths | Adds the specified number of months to the current PgSqlTimeStamp instance.
Public Method AddSeconds | Adds the specified number of seconds to the current PgSqlTimeStamp instance.
Public Method AddYears | Adds the specified number of years to the current PgSqlTimeStamp instance.
Public Method CompareTo | Overloaded. Compares the current PgSqlTimeStamp object to the specified object.
Public Method static (Shared in Visual Basic) DaysInMonth | Returns the number of days in the specified month and year.
Public Method static (Shared in Visual Basic) Equals | Overloaded. Compares two PgSqlTimeStamp structures to determine if they are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlTimeStamp instance.
Public Method static (Shared in Visual Basic) GreaterThan | Determines whether the first of two PgSqlTimeStamp values is greater than the second.
Public Method static (Shared in Visual Basic) GreaterThanOrEqual | Determines whether the first of two PgSqlTimeStamp values is greater than or equal to the second.
Public Method static (Shared in Visual Basic) IsLeapYear | Indicates whether specified year is a leap one.
Public Method static (Shared in Visual Basic) LessThan | Determines whether the first of two PgSqlTimeStamp values is less than the second.
Public Method static (Shared in Visual Basic) LessThanOrEqual | Determines whether the first of two PgSqlTimeStamp values is less than or equal to the second.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlTimeStamp values are not equal.
Public Method static (Shared in Visual Basic) Parse | Overloaded. Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.
Public Method static (Shared in Visual Basic) Subtract | Overloaded. Subtracts a value from a PgSqlTimeStamp structure.
Public Method ToString | Overloaded. Overridden. Converts the current PgSqlTimeStamp structure to a String.

Operators

Public Operator Addition | Overloaded. Adds the specified object to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.
Public Operator Equality | Determines whether two PgSqlTimeStamp values are equal.
Public Operator Explicit Type Conversion | Converts a PgSqlTimeStamp structure to the DateTime object.
Public Operator Greater Than | Compares two PgSqlTimeStamp structures to determine if the first is greater than the second.
Public Operator Greater Than or Equal | Compares two PgSqlTimeStamp structures to determine if the first is greater than or equal to the second.
Public Operator Implicit Type Conversion | Converts a DateTime object to the PgSqlTimeStamp structure.
Public Operator Inequality | Determines whether two PgSqlTimeStamp values are not equal.
Public Operator Less Than | Compares two PgSqlTimeStamp structures to determine if the first is less than the second.
Public Operator Less Than or Equal | Compares two PgSqlTimeStamp structures to determine if the first is less than or equal to the second.
Public Operator Subtraction | Overloaded. Subtracts the specified object from the PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : PgSqlTimeStamp Constructor (PgSqlTimeStamp)

Initializes a new instance of the PgSqlTimeStamp structure.

Overload List

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime.

[Visual Basic] Public Sub New(Date)

[C#] public PgSqlTimeStamp(DateTime);

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime.

[Visual Basic] Public Sub New(Date,Boolean)

[C#] public PgSqlTimeStamp(DateTime,bool);

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime and time zone.

[Visual Basic] Public Sub New(Date,String)

[C#] public PgSqlTimeStamp(DateTime,string);

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days and microseconds.

[Visual Basic] Public Sub New(Integer,Long)

[C#] public PgSqlTimeStamp(int,long);

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days and microseconds.

[Visual Basic] Public Sub New(Integer,Long,Boolean)

[C#] public PgSqlTimeStamp(int,long,bool);

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days, microseconds, and time zone.

[Visual Basic] Public Sub New(Integer,Long,String)

[C#] public PgSqlTimeStamp(int,long,string);

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, and day.

[Visual Basic] Public Sub New(Integer,Integer,Integer)

[C#] public PgSqlTimeStamp(int,int,int);

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, and second.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,Integer,Integer)

[C#] public PgSqlTimeStamp(int,int,int,int,int,int);

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, and microsecond.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,Integer,Integer,Integer)

[C#] public PgSqlTimeStamp(int,int,int,int,int,int,int);

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, and microsecond.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,Integer,Integer,Integer,Boolean)

[C#] public PgSqlTimeStamp(int,int,int,int,int,int,int,bool);

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, microsecond, and time zone.

[Visual Basic] Public Sub New(Integer,Integer,Integer,Integer,Integer,Integer,Integer,String)

[C#] public PgSqlTimeStamp(int,int,int,int,int,int,int,string);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The specified DateTime.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(DateTime)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(DateTime)

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime.

[Visual Basic]
Public Function New( _
   ByVal value As Date _
)
[C#]
public PgSqlTimeStamp(
   DateTime value
);

Parameters

value
The specified DateTime.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The specified DateTime.
withTimeZone
Determines whether to use the time zone. This affects the behavior of the ToString methods.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(DateTime,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(DateTime,Boolean)

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime.

[Visual Basic]
Public Function New( _
   ByVal value As Date, _
   ByVal withTimeZone As Boolean _
)
[C#]
public PgSqlTimeStamp(
   DateTime value,
   bool withTimeZone
);

Parameters

value
The specified DateTime.
withTimeZone
Determines whether to use the time zone. This affects the behavior of the ToString methods.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The specified DateTime.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(DateTime,String)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(DateTime,String)

Initializes a new instance of the PgSqlTimeStamp structure with the specified DateTime and time zone.

[Visual Basic]
Public Function New( _
   ByVal value As Date, _
   ByVal timeZone As String _
)
[C#]
public PgSqlTimeStamp(
   DateTime value,
   string timeZone
);

Parameters

value
The specified DateTime.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

year
The specified year.
month
The specified month.
day
The specified day.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int32,Int32)

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, and day.

[Visual Basic]
Public Function New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer _
)
[C#]
public PgSqlTimeStamp(
   int year,
   int month,
   int day
);

Parameters

year
The specified year.
month
The specified month.
day
The specified day.

Remarks

Note that this overload initializes the PgSqlTimeStamp structure in date-only mode, which means that ToString methods do not include the time part of the PgSqlTimeStamp.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32)

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, and second.

[Visual Basic]
Public Function New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer, _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer _
)
[C#]
public PgSqlTimeStamp(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second
);

Parameters

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32)

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, and microsecond.

[Visual Basic]
Public Function New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer, _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal microsecond As Integer _
)
[C#]
public PgSqlTimeStamp(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int microsecond
);

Parameters

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
withTimeZone
Determines whether to use the local time zone. This affects the behavior of the ToString methods.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32,Boolean)

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, and microsecond.

[Visual Basic]
Public Function New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer, _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal microsecond As Integer, _
   ByVal withTimeZone As Boolean _
)
[C#]
public PgSqlTimeStamp(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int microsecond,
   bool withTimeZone
);

Parameters

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
withTimeZone
Determines whether to use the local time zone. This affects the behavior of the ToString methods.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32,String)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int32,Int32,Int32,Int32,Int32,Int32,String)

Initializes a new instance of the PgSqlTimeStamp structure with the specified year, month, day, hour, minute, second, microsecond, and time zone.

[Visual Basic]
Public Function New( _
   ByVal year As Integer, _
   ByVal month As Integer, _
   ByVal day As Integer, _
   ByVal hour As Integer, _
   ByVal minute As Integer, _
   ByVal second As Integer, _
   ByVal microsecond As Integer, _
   ByVal timeZone As String _
)
[C#]
public PgSqlTimeStamp(
   int year,
   int month,
   int day,
   int hour,
   int minute,
   int second,
   int microsecond,
   string timeZone
);

Parameters

year
The specified year.
month
The specified month.
day
The specified day.
hour
The specified hour.
minute
The specified minute.
second
The specified second.
microsecond
The specified microsecond.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int64)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int64)

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days and microseconds.

[Visual Basic]
Public Function New( _
   ByVal days As Integer, _
   ByVal timeTicks As Long _
)
[C#]
public PgSqlTimeStamp(
   int days,
   long timeTicks
);

Parameters

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.
withTimeZone
Determines whether to use the time zone. This affects the behavior of the ToString methods.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int64,Boolean)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int64,Boolean)

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days and microseconds.

[Visual Basic]
Public Function New( _
   ByVal days As Integer, _
   ByVal timeTicks As Long, _
   ByVal withTimeZone As Boolean _
)
[C#]
public PgSqlTimeStamp(
   int days,
   long timeTicks,
   bool withTimeZone
);

Parameters

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.
withTimeZone
Determines whether to use the time zone. This affects the behavior of the ToString methods.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Constructor(Int32,Int64,String)

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > PgSqlTimeStamp Constructor : PgSqlTimeStamp Constructor(Int32,Int64,String)

Initializes a new instance of the PgSqlTimeStamp structure with the specified total number of days, microseconds, and time zone.

[Visual Basic]
Public Function New( _
   ByVal days As Integer, _
   ByVal timeTicks As Long, _
   ByVal timeZone As String _
)
[C#]
public PgSqlTimeStamp(
   int days,
   long timeTicks,
   string timeZone
);

Parameters

days
The specified number of days in the date part of the structure.
timeTicks
The specified number of microseconds in the time part of the structure.
timeZone
A String that represents the time zone. Should be represented in "TZH:TZM" or "TZH" format and begin with + or -.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%% $$Fields$$

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Structure Fields

Devart.Data.PostgreSql Namespace : PgSqlTimeStamp Structure

For a list of all members of this type, see PgSqlTimeStamp members.

Public Fields

Public Field static (Shared in Visual Basic) Epoch | Returns the date 1970-01-01 00:00:00-00.
Public Field static (Shared in Visual Basic) MaxValue | Represents the maximum valid date for a PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) MinValue | Represents the minimum valid date for a PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) NegativeInfinity | Represents a negative infinity value that can be assigned to the PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) Null | Represents a NULL value that can be assigned to the PgSqlTimeStamp structure.
Public Field static (Shared in Visual Basic) PositiveInfinity | Represents a positive infinity value that can be assigned to the PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Epoch Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Epoch Field

Returns the date 1970-01-01 00:00:00-00.

[Visual Basic]
Public Shared ReadOnly Epoch As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp Epoch

Return Type

The date 1970-01-01 00:00:00-00.

Remarks

The string equivalent of this field is "epoch" (used in the Parse methods).

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MaxValue Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : MaxValue Field (PgSqlTimeStamp)

Represents the maximum valid date for a PgSqlTimeStamp structure.

[Visual Basic]
Public Shared ReadOnly MaxValue As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp MaxValue

Remarks

The maximum valid date for a PgSqlTimeStamp structure is 5874897 AD.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

MinValue Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : MinValue Field (PgSqlTimeStamp)

Represents the minimum valid date for a PgSqlTimeStamp structure.

[Visual Basic]
Public Shared ReadOnly MinValue As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp MinValue

Remarks

The minimum valid date for a PgSqlTimeStamp structure is 4713 BC.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NegativeInfinity Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : NegativeInfinity Field

Represents a negative infinity value that can be assigned to the PgSqlTimeStamp structure.

[Visual Basic]
Public Shared ReadOnly NegativeInfinity As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp NegativeInfinity

Remarks

The string equivalent of this field is "-infinity" (used in the Parse and ToString methods).

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Null Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Null Field (PgSqlTimeStamp)

Represents a NULL value that can be assigned to the PgSqlTimeStamp structure.

[Visual Basic]
Public Shared ReadOnly Null As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp Null

Return Type

An object that represents a null PgSqlTimeStamp value.

Remarks

The string equivalent of this field is "null" or "NULL" (used in the Parse and ToString methods).

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PositiveInfinity Field

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : PositiveInfinity Field

Represents a positive infinity value that can be assigned to the PgSqlTimeStamp structure.

[Visual Basic]
Public Shared ReadOnly PositiveInfinity As PgSqlTimeStamp
[C#]
public static readonly PgSqlTimeStamp PositiveInfinity

Remarks

The string equivalent of this field is "+infinity" (used in the Parse and ToString methods).

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%% $$Properties$$

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Structure Properties

Devart.Data.PostgreSql Namespace : PgSqlTimeStamp Structure

For a list of all members of this type, see PgSqlTimeStamp members.

Public Properties

Public Property Day | Gets the day component of a PgSqlTimeStamp.
Public Property DayOfWeek | Returns the day of a week that corresponds to the current PgSqlTimeStamp value.
Public Property DayOfYear | Returns ordinal of the day in a year that corresponds to the current PgSqlTimeStamp value.
Public Property Days | Gets the number of days in the date part of the structure (days since January 24.11.4714 BC).
Public Property Hour | Gets the hour component of a PgSqlTimeStamp.
Public Property IsFinite | Indicates whether the current structure value is finite or null.
Public Property IsNull | Gets a value indicating whether the PgSqlTimeStamp structure represents Null.
Public Property Microsecond | Gets the microsecond component of a PgSqlTimeStamp.
Public Property Minute | Gets the minute component of a PgSqlTimeStamp.
Public Property Month | Gets the month component of a PgSqlTimeStamp.
Public Property Second | Gets the second component of a PgSqlTimeStamp.
Public Property TimeOfDay | Gets the time part of the PgSqlTimeStamp structure.
Public Property TimeTicks | Gets the number of microseconds in the time part of the structure.
Public Property Value | Gets the date and time that is stored in the PgSqlTimeStamp structure.
Public Property WithTimeZone | Determines whether this is a timestamp with time zone.
Public Property Year | Gets the year component of a PgSqlTimeStamp.

See Also

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Day Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Day Property

Gets the day component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Day As Integer
[C#]
public int Day {get;}

Return Type

A number that represents a day value between 1 and 31.

Remarks

Do not confuse with the Days, which includes years and months.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DayOfWeek Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : DayOfWeek Property

Returns the day of a week that corresponds to the current PgSqlTimeStamp value.

[Visual Basic]
Public ReadOnly Property DayOfWeek As DayOfWeek
[C#]
public DayOfWeek DayOfWeek {get;}

Return Type

One of the DayOfWeek values.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DayOfYear Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : DayOfYear Property

Returns ordinal of the day in a year that corresponds to the current PgSqlTimeStamp value.

[Visual Basic]
Public ReadOnly Property DayOfYear As Integer
[C#]
public int DayOfYear {get;}

Return Type

The day's ordinal.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Days Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Days Property (PgSqlTimeStamp)

Gets the number of days in the date part of the structure (days since January 24.11.4714 BC).

[Visual Basic]
Public ReadOnly Property Days As Integer
[C#]
public int Days {get;}

Return Type

The number of days in the date part of the structure. The value includes years and months expressed in days. Zero value corresponds to the MinValue.

Remarks

Do not confuse with the Day, which does not include years and months.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Hour Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Hour Property (PgSqlTimeStamp)

Gets the hour component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Hour As Integer
[C#]
public int Hour {get;}

Return Type

A number that represents an hour value between 0 and 23.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsFinite Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : IsFinite Property

Indicates whether the current structure value is finite or null.

[Visual Basic]
Public ReadOnly Property IsFinite As Boolean
[C#]
public bool IsFinite {get;}

Return Type

true if the Value represents a finite timestamp or Null; otherwise, false.

Remarks

This property indicates whether the timestamp differs from PositiveInfinity and NegativeInfinity fields.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsNull Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : IsNull Property (PgSqlTimeStamp)

Gets a value indicating whether the PgSqlTimeStamp structure represents Null.

[Visual Basic]
Public ReadOnly Property IsNull As Boolean
[C#]
public bool IsNull {get;}

Return Type

true if the PgSqlTimeStamp structure represents Null; otherwise, false.

Remarks

If this property is true, the ToString methods return empty string.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Microsecond Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Microsecond Property (PgSqlTimeStamp)

Gets the microsecond component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Microsecond As Integer
[C#]
public int Microsecond {get;}

Return Type

Number of microseconds in the time part of the structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Minute Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Minute Property (PgSqlTimeStamp)

Gets the minute component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Minute As Integer
[C#]
public int Minute {get;}

Return Type

A number that represents a minute value between 0 and 59.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Month Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Month Property

Gets the month component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Month As Integer
[C#]
public int Month {get;}

Return Type

A number that represents a month value between 1 and 12.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Second Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Second Property (PgSqlTimeStamp)

Gets the second component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Second As Integer
[C#]
public int Second {get;}

Return Type

A number that represents a second value between 0 and 59.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TimeOfDay Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : TimeOfDay Property

Gets the time part of the PgSqlTimeStamp structure.

[Visual Basic]
Public ReadOnly Property TimeOfDay As TimeSpan
[C#]
public TimeSpan TimeOfDay {get;}

Return Type

A TimeSpan value.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

TimeTicks Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : TimeTicks Property

Gets the number of microseconds in the time part of the structure.

[Visual Basic]
Public ReadOnly Property TimeTicks As Long
[C#]
public long TimeTicks {get;}

Return Type

Thenumber of microseconds in the time part of the structure. The value includes hours and minutes expressed in microseconds.

Remarks

Do not confuse with the Microsecond, which does not include hours and minutes.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Value Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Value Property (PgSqlTimeStamp)

Gets the date and time that is stored in the PgSqlTimeStamp structure.

[Visual Basic]
Public ReadOnly Property Value As Date
[C#]
public DateTime Value {get;}

Return Type

A DateTime object.

Remarks

The value cannot be less than MinValue or greater than MaxValue.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

WithTimeZone Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : WithTimeZone Property (PgSqlTimeStamp)

Determines whether this is a timestamp with time zone.

[Visual Basic]
Public ReadOnly Property WithTimeZone As Boolean
[C#]
public bool WithTimeZone {get;}

Return Type

true, if this timestamp is stored with time zone; otherwise false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Year Property

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Year Property

Gets the year component of a PgSqlTimeStamp.

[Visual Basic]
Public ReadOnly Property Year As Integer
[C#]
public int Year {get;}

Return Type

A number that represents a year value between -4713 and 5874897.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%% $$Methods$$

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStamp Structure Methods

Devart.Data.PostgreSql Namespace : PgSqlTimeStamp Structure

For a list of all members of this type, see PgSqlTimeStamp members.

Public Methods

Public Method static (Shared in Visual Basic) Add | Overloaded. Adds a PgSqlInterval or TimeSpan to a PgSqlTimeStamp structure.
Public Method AddDays | Adds the specified number of days to the current PgSqlTimeStamp instance.
Public Method AddHours | Adds the specified number of hours to the current PgSqlTimeStamp instance.
Public Method AddMicroseconds | Adds the specified number of microseconds to the current PgSqlTimeStamp instance.
Public Method AddMinutes | Adds the specified number of minutes to the current PgSqlTimeStamp instance.
Public Method AddMonths | Adds the specified number of months to the current PgSqlTimeStamp instance.
Public Method AddSeconds | Adds the specified number of seconds to the current PgSqlTimeStamp instance.
Public Method AddYears | Adds the specified number of years to the current PgSqlTimeStamp instance.
Public Method CompareTo | Overloaded. Compares the current PgSqlTimeStamp object to the specified object.
Public Method static (Shared in Visual Basic) DaysInMonth | Returns the number of days in the specified month and year.
Public Method static (Shared in Visual Basic) Equals | Overloaded. Compares two PgSqlTimeStamp structures to determine if they are equal.
Public Method GetHashCode | Overridden. Gets a hash code for the PgSqlTimeStamp instance.
Public Method static (Shared in Visual Basic) GreaterThan | Determines whether the first of two PgSqlTimeStamp values is greater than the second.
Public Method static (Shared in Visual Basic) GreaterThanOrEqual | Determines whether the first of two PgSqlTimeStamp values is greater than or equal to the second.
Public Method static (Shared in Visual Basic) IsLeapYear | Indicates whether specified year is a leap one.
Public Method static (Shared in Visual Basic) LessThan | Determines whether the first of two PgSqlTimeStamp values is less than the second.
Public Method static (Shared in Visual Basic) LessThanOrEqual | Determines whether the first of two PgSqlTimeStamp values is less than or equal to the second.
Public Method static (Shared in Visual Basic) NotEquals | Determines whether two PgSqlTimeStamp values are not equal.
Public Method static (Shared in Visual Basic) Parse | Overloaded. Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.
Public Method static (Shared in Visual Basic) Subtract | Overloaded. Subtracts a value from a PgSqlTimeStamp structure.
Public Method ToString | Overloaded. Overridden. Converts the current PgSqlTimeStamp structure to a String.

See Also

PgSqlTimeStamp Structure | Devart.Data.PostgreSql Namespace | PgSqlInterval Structure


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Add Method (PgSqlTimeStamp)

Adds a PgSqlInterval or TimeSpan to a PgSqlTimeStamp structure.

Overload List

Adds a PgSqlInterval to a TimeSpan structure.

[Visual Basic] Overloads Public Shared Function Add(PgSqlTimeStamp,TimeSpan) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Add(PgSqlTimeStamp,TimeSpan);

Adds a PgSqlInterval to a PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Shared Function Add(PgSqlTimeStamp,PgSqlInterval) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Add(PgSqlTimeStamp,PgSqlInterval);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
The first item to add.
t
The second item to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlTimeStamp,TimeSpan) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Add Method : Add(PgSqlTimeStamp,TimeSpan) Method

Adds a PgSqlInterval to a TimeSpan structure.

[Visual Basic]
Overloads Public Shared Function Add( _
   ByVal x As PgSqlTimeStamp, _
   ByVal t As TimeSpan _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Add(
   PgSqlTimeStamp x,
   TimeSpan t
);

Parameters

x
The first item to add.
t
The second item to add.

Return Type

The new PgSqlTimeStamp that represents sum of the two arguments.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
The first item to add.
t
The second item to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Add(PgSqlTimeStamp,PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Add Method : Add(PgSqlTimeStamp,PgSqlInterval) Method

Adds a PgSqlInterval to a PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Shared Function Add( _
   ByVal x As PgSqlTimeStamp, _
   ByVal t As PgSqlInterval _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Add(
   PgSqlTimeStamp x,
   PgSqlInterval t
);

Parameters

x
The first item to add.
t
The second item to add.

Return Type

The new PgSqlTimeStamp that represents sum of the two arguments.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
The number of days to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddDays Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddDays Method

Adds the specified number of days to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddDays( _
   ByVal value As Double _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddDays(
   double value
);

Parameters

value
The number of days to add.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
The number of hours to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddHours Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddHours Method (PgSqlTimeStamp)

Adds the specified number of hours to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddHours( _
   ByVal value As Double _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddHours(
   double value
);

Parameters

value
The number of hours to add.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
The specified number of microseconds.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddMicroseconds Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddMicroseconds Method (PgSqlTimeStamp)

Adds the specified number of microseconds to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddMicroseconds( _
   ByVal value As Long _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddMicroseconds(
   long value
);

Parameters

value
The specified number of microseconds.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
The number of minutes to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddMinutes Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddMinutes Method (PgSqlTimeStamp)

Adds the specified number of minutes to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddMinutes( _
   ByVal value As Double _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddMinutes(
   double value
);

Parameters

value
The number of minutes to add.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

months
The specified number of months.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddMonths Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddMonths Method

Adds the specified number of months to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddMonths( _
   ByVal months As Integer _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddMonths(
   int months
);

Parameters

months
The specified number of months.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
The number of seconds to add.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddSeconds Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddSeconds Method (PgSqlTimeStamp)

Adds the specified number of seconds to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddSeconds( _
   ByVal value As Double _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddSeconds(
   double value
);

Parameters

value
The number of seconds to add.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

years
The specified number of years.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

AddYears Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : AddYears Method

Adds the specified number of years to the current PgSqlTimeStamp instance.

[Visual Basic]
Public Function AddYears( _
   ByVal years As Integer _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp AddYears(
   int years
);

Parameters

years
The specified number of years.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : CompareTo Method (PgSqlTimeStamp)

Compares the current PgSqlTimeStamp object to the specified object.

Overload List

Compares the current PgSqlTimeStamp object to the specified object and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(Object) As Integer

[C#] public int CompareTo(object);

Compares the current PgSqlTimeStamp object to the specified PgSqlTimeStamp and returns an integer that represents their relative values.

[Visual Basic] Overloads Public Function CompareTo(PgSqlTimeStamp) As Integer

[C#] public int CompareTo(PgSqlTimeStamp);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
An object value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > CompareTo Method : CompareTo(Object) Method

Compares the current PgSqlTimeStamp object to the specified object and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As Object _
) As Integer
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlTimeStamp structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlTimeStamp is less than the argument.
Zero | The current PgSqlTimeStamp is the same to the argument.
Greater than zero | The current PgSqlTimeStamp is greater than the argument.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
A PgSqlTimeStamp value to compare with.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

CompareTo(PgSqlTimeStamp) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > CompareTo Method : CompareTo(PgSqlTimeStamp) Method

Compares the current PgSqlTimeStamp object to the specified PgSqlTimeStamp and returns an integer that represents their relative values.

[Visual Basic]
Overloads Public Function CompareTo( _
   ByVal value As PgSqlTimeStamp _
) As Integer
[C#]
public int CompareTo(
   PgSqlTimeStamp value
);

Parameters

value
A PgSqlTimeStamp value to compare with.

Return Type

A signed number indicating the relative values of the current PgSqlTimeStamp structure and the object.
Return Value | Condition
Less than zero | The value of the current PgSqlTimeStamp is less than the argument.
Zero | The current PgSqlTimeStamp is the same to the argument.
Greater than zero | The current PgSqlTimeStamp is greater than the argument.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

year
The year.
month
The month (a number ranging from 1 to 12).
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

DaysInMonth Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : DaysInMonth Method

Returns the number of days in the specified month and year.

[Visual Basic]
Public Shared Function DaysInMonth( _
   ByVal year As Integer, _
   ByVal month As Integer _
) As Integer
[C#]
public static int DaysInMonth(
   int year,
   int month
);

Parameters

year
The year.
month
The month (a number ranging from 1 to 12).

Return Type

The number of days in the specified month and year.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Equals Method (PgSqlTimeStamp)

Compares two PgSqlTimeStamp structures to determine if they are equal.

Overload List

Determines whether two PgSqlTimeStamp values are equal.

[Visual Basic] Overloads Public Shared Function Equals(PgSqlTimeStamp,PgSqlTimeStamp) As Boolean

[C#] public static bool Equals(PgSqlTimeStamp,PgSqlTimeStamp);

Compares the specified object parameter to the PgSqlTimeStamp value.

[Visual Basic] Overloads Overrides Public NotOverridable Function Equals(Object) As Boolean

[C#] public override bool Equals(object);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp value to compare.
y
A PgSqlTimeStamp value to compare.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(PgSqlTimeStamp,PgSqlTimeStamp) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Equals Method : Equals(PgSqlTimeStamp,PgSqlTimeStamp) Method

Determines whether two PgSqlTimeStamp values are equal.

[Visual Basic]
Overloads Public Shared Function Equals( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool Equals(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
A PgSqlTimeStamp value to compare.
y
A PgSqlTimeStamp value to compare.

Return Type

true if two PgSqlTimeStamp values are equal; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The object to be compared.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equals(Object) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Equals Method : Equals(Object) Method

Compares the specified object parameter to the PgSqlTimeStamp value.

[Visual Basic]
Overloads Overrides Public NotOverridable Function Equals( _
   ByVal value As Object _
) As Boolean
[C#]
public override bool Equals(
   object value
);

Parameters

value
The object to be compared.

Return Type

true if object is an instance of the PgSqlTimeStamp and has the same date and time; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GetHashCode Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : GetHashCode Method (PgSqlTimeStamp)

Gets a hash code for the PgSqlTimeStamp instance.

[Visual Basic]
Overrides Public NotOverridable Function GetHashCode() As Integer
[C#]
public override int GetHashCode();

Return Type

A 32-bit signed integer hash code.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GreaterThan Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : GreaterThan Method (PgSqlTimeStamp)

Determines whether the first of two PgSqlTimeStamp values is greater than the second.

[Visual Basic]
Public Shared Function GreaterThan( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool GreaterThan(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is greater than the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

GreaterThanOrEqual Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : GreaterThanOrEqual Method (PgSqlTimeStamp)

Determines whether the first of two PgSqlTimeStamp values is greater than or equal to the second.

[Visual Basic]
Public Shared Function GreaterThanOrEqual( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool GreaterThanOrEqual(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is greater than or equal to the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

year
The year to check.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

IsLeapYear Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : IsLeapYear Method

Indicates whether specified year is a leap one.

[Visual Basic]
Public Shared Function IsLeapYear( _
   ByVal year As Integer _
) As Boolean
[C#]
public static bool IsLeapYear(
   int year
);

Parameters

year
The year to check.

Return Type

true if the specified year is a leap one; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LessThan Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : LessThan Method (PgSqlTimeStamp)

Determines whether the first of two PgSqlTimeStamp values is less than the second.

[Visual Basic]
Public Shared Function LessThan( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool LessThan(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is less than the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

LessThanOrEqual Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : LessThanOrEqual Method (PgSqlTimeStamp)

Determines whether the first of two PgSqlTimeStamp values is less than or equal to the second.

[Visual Basic]
Public Shared Function LessThanOrEqual( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool LessThanOrEqual(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is less than or equal to the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

NotEquals Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : NotEquals Method (PgSqlTimeStamp)

Determines whether two PgSqlTimeStamp values are not equal.

[Visual Basic]
Public Shared Function NotEquals( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public static bool NotEquals(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if two PgSqlTimeStamp values are not equal; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Parse Method (PgSqlTimeStamp)

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

Overload List

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Parse(string);

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String,Boolean) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Parse(string,bool);

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic] Overloads Public Shared Function Parse(String,String) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Parse(string,string);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Parse Method : Parse(String) Method

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Parse(
   string value
);

Parameters

value
The String to be parsed.

Return Type

a PgSqlTimeStamp structure equal to the date represented by the specified String.

Remarks

The value format must correspond to your local windows settings.

Example

The following example demonstrates usage of Parse method on a machine that has default Windows XP settings. If you have custom settings or use non-English version of the operating system you must change the format of value parameter.

[C#]

PgSqlTimeStamp newts = PgSqlTimeStamp.Parse("12/25/2005 3:40:15 PM");

[Visual Basic]

Dim newts As PgSqlTimeStamp = PgSqlTimeStamp.Parse("12/25/2005 3:40:15 PM")

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
withTimeZone
Determines whether to use the time zone.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String,Boolean) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Parse Method : Parse(String,Boolean) Method

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String, _
   ByVal withTimeZone As Boolean _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Parse(
   string value,
   bool withTimeZone
);

Parameters

value
The String to be parsed.
withTimeZone
Determines whether to use the time zone.

Return Type

a PgSqlTimeStamp structure equal to the date represented by the specified String.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

value
The String to be parsed.
format
A String that describes elements contained within value. The syntax is as in the PostgreSQL to_timestamp function.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Parse(String,String) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Parse Method : Parse(String,String) Method

Converts the specified String representation of a date to its PgSqlTimeStamp equivalent.

[Visual Basic]
Overloads Public Shared Function Parse( _
   ByVal value As String, _
   ByVal format As String _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Parse(
   string value,
   string format
);

Parameters

value
The String to be parsed.
format
A String that describes elements contained within value. The syntax is as in the PostgreSQL to_timestamp function.

Return Type

a PgSqlTimeStamp structure equal to the date represented by the specified String.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Subtract Method (PgSqlTimeStamp)

Subtracts a value from a PgSqlTimeStamp structure.

Overload List

Subtracts a TimeSpan value from a PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTimeStamp,TimeSpan) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Subtract(PgSqlTimeStamp,TimeSpan);

Subtracts a PgSqlInterval value from a PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTimeStamp,PgSqlInterval) As PgSqlTimeStamp

[C#] public static PgSqlTimeStamp Subtract(PgSqlTimeStamp,PgSqlInterval);

Subtracts a PgSqlTimeStamp value from another PgSqlTimeStamp value.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTimeStamp,PgSqlTimeStamp) As PgSqlInterval

[C#] public static PgSqlInterval Subtract(PgSqlTimeStamp,PgSqlTimeStamp);

Subtracts a DateTime value from a PgSqlTimeStamp value.

[Visual Basic] Overloads Public Shared Function Subtract(PgSqlTimeStamp,Date) As PgSqlInterval

[C#] public static PgSqlInterval Subtract(PgSqlTimeStamp,DateTime);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp structure to subtract from.
t
A TimeSpan value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTimeStamp,TimeSpan) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtract Method : Subtract(PgSqlTimeStamp,TimeSpan) Method

Subtracts a TimeSpan value from a PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTimeStamp, _
   ByVal t As TimeSpan _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Subtract(
   PgSqlTimeStamp x,
   TimeSpan t
);

Parameters

x
A PgSqlTimeStamp structure to subtract from.
t
A TimeSpan value to subtract.

Return Type

The new PgSqlTimeStamp structure that represents the result of the subtract operation.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp structure to subtract from.
t
A PgSqlInterval value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTimeStamp,PgSqlInterval) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtract Method : Subtract(PgSqlTimeStamp,PgSqlInterval) Method

Subtracts a PgSqlInterval value from a PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTimeStamp, _
   ByVal t As PgSqlInterval _
) As PgSqlTimeStamp
[C#]
public static PgSqlTimeStamp Subtract(
   PgSqlTimeStamp x,
   PgSqlInterval t
);

Parameters

x
A PgSqlTimeStamp structure to subtract from.
t
A PgSqlInterval value to subtract.

Return Type

The new PgSqlTimeStamp structure that represents the result of the subtract operation.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp value to subtract from.
y
A PgSqlTimeStamp value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTimeStamp,PgSqlTimeStamp) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtract Method : Subtract(PgSqlTimeStamp,PgSqlTimeStamp) Method

Subtracts a PgSqlTimeStamp value from another PgSqlTimeStamp value.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As PgSqlInterval
[C#]
public static PgSqlInterval Subtract(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Parameters

x
A PgSqlTimeStamp value to subtract from.
y
A PgSqlTimeStamp value to subtract.

Return Type

The PgSqlInterval structure that represents the result of the subtract operation.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp value to subtract from.
y
A DateTime value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtract(PgSqlTimeStamp,DateTime) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtract Method : Subtract(PgSqlTimeStamp,DateTime) Method

Subtracts a DateTime value from a PgSqlTimeStamp value.

[Visual Basic]
Overloads Public Shared Function Subtract( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As Date _
) As PgSqlInterval
[C#]
public static PgSqlInterval Subtract(
   PgSqlTimeStamp x,
   DateTime y
);

Parameters

x
A PgSqlTimeStamp value to subtract from.
y
A DateTime value to subtract.

Return Type

The PgSqlInterval structure that represents the result of the subtract operation.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : ToString Method (PgSqlTimeStamp)

Converts the current PgSqlTimeStamp structure to a String.

Overload List

Converts the current PgSqlTimeStamp structure to a String.

[Visual Basic] Overloads Overrides Public NotOverridable Function ToString() As String

[C#] public override string ToString();

Converts the current PgSqlTimeStamp structure to a String using provided format string.

[Visual Basic] Overloads Public Function ToString(String) As String

[C#] public string ToString(string);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString() Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > ToString Method : ToString() Method

Converts the current PgSqlTimeStamp structure to a String.

[Visual Basic]
Overloads Overrides Public NotOverridable Function ToString() As String
[C#]
public override string ToString();

Return Type

A String object.

Remarks

This overload uses the DateTimeFormatInfo.CurrentInfo.ShortDatePattern and DateTimeFormatInfo.CurrentInfo.LongTimePattern values. Depending on the constructor used to create the structure, the method may add the time zone.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

format
Format to use for converting the string.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

ToString(String) Method

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > ToString Method : ToString(String) Method

Converts the current PgSqlTimeStamp structure to a String using provided format string.

[Visual Basic]
Overloads Public Function ToString( _
   ByVal format As String _
) As String
[C#]
public string ToString(
   string format
);

Parameters

format
Format to use for converting the string.

Return Type

A String object.

Remarks

For information on how to build a format string refer to description of to_char function in the PostgreSQL documentation.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%% Delegates

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace Delegates

Delegates

Delegate | Description
OnChangeEventHandler | Represents the method that will handle the PgSqlDependency.OnChange event of a PgSqlDependency.
PgSqlAlerterAlertEventHandler | Represents the method that will handle the PgSqlAlerter.Alert event of PgSqlAlerter.
PgSqlAlerterErrorEventHandler | Represents the method that will handle the PgSqlAlerter.Error event of PgSqlAlerter.
PgSqlAlerterStoppedEventHandler | Represents the method that will handle the PgSqlAlerter.Stopped event of PgSqlAlerter.
PgSqlErrorEventHandler | Represents the method that will handle the PgSqlConnection.Error event of a PgSqlConnection.
PgSqlInfoMessageEventHandler | Represents the method that will handle the PgSqlConnection.InfoMessage event of PgSqlConnection.
PgSqlLoaderErrorEventHandler | Represents the method that will handle the PgSqlLoader.Error event of a PgSqlLoader.
PgSqlNotificationEventHandler | Represents the method that will handle the PgSqlConnection.Notification event of a PgSqlConnection.
PgSqlRowUpdatedEventHandler | Represents the method that will handle the PgSqlDataAdapter.RowUpdated event of an PgSqlDataAdapter.
PgSqlRowUpdatingEventHandler | Represents the method that will handle the PgSqlDataAdapter.RowUpdating event of an PgSqlDataAdapter.
PgSqlStatementExecuteEventHandler | Represents the method that will handle the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of an PgSqlScript.

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace | OnChange Event | PgSqlTableChangeEventArgs Class

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
A PgSqlTableChangeEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

OnChangeEventHandler Delegate

Devart.Data.PostgreSql Namespace : OnChangeEventHandler Delegate

Represents the method that will handle the PgSqlDependency.OnChange event of a PgSqlDependency.

[Visual Basic]
Public Delegate Sub OnChangeEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlTableChangeEventArgs _
)
[C#]
public delegate void OnChangeEventHandler(
   object sender,
   PgSqlTableChangeEventArgs e
);

Parameters

sender
The source of the event.
e
A PgSqlTableChangeEventArgs object that contains the event data.

Remarks

When you create a PgSqlDependency.OnChange 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace | OnChange Event | PgSqlTableChangeEventArgs Class


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlAlerterAlertEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterAlertEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlAlerterAlertEventHandler Delegate

Represents the method that will handle the PgSqlAlerter.Alert event of PgSqlAlerter.

[Visual Basic]
Public Delegate Sub PgSqlAlerterAlertEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlAlerterAlertEventArgs _
)
[C#]
public delegate void PgSqlAlerterAlertEventHandler(
   object sender,
   PgSqlAlerterAlertEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlAlerterAlertEventArgs object that contains the event data.

Remarks

When you create a PgSqlAlerterAlertEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlAlerterErrorEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterErrorEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlAlerterErrorEventHandler Delegate

Represents the method that will handle the PgSqlAlerter.Error event of PgSqlAlerter.

[Visual Basic]
Public Delegate Sub PgSqlAlerterErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlAlerterErrorEventArgs _
)
[C#]
public delegate void PgSqlAlerterErrorEventHandler(
   object sender,
   PgSqlAlerterErrorEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlAlerterErrorEventArgs object that contains the event data.

Remarks

When you create a PgSqlAlerterErrorEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlAlerterStoppedEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlAlerterStoppedEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlAlerterStoppedEventHandler Delegate

Represents the method that will handle the PgSqlAlerter.Stopped event of PgSqlAlerter.

[Visual Basic]
Public Delegate Sub PgSqlAlerterStoppedEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlAlerterStoppedEventArgs _
)
[C#]
public delegate void PgSqlAlerterStoppedEventHandler(
   object sender,
   PgSqlAlerterStoppedEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlAlerterStoppedEventArgs object that contains the event data.

Remarks

When you create a PgSqlAlerterStoppedEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlErrorEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlErrorEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlErrorEventHandler Delegate

Represents the method that will handle the PgSqlConnection.Error event of a PgSqlConnection.

[Visual Basic]
Public Delegate Sub PgSqlErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlErrorEventArgs _
)
[C#]
public delegate void PgSqlErrorEventHandler(
   object sender,
   PgSqlErrorEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlErrorEventArgs object that contains the event data.

Remarks

When you create a PgSqlErrorEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlInfoMessageEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlInfoMessageEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlInfoMessageEventHandler Delegate

Represents the method that will handle the PgSqlConnection.InfoMessage event of PgSqlConnection.

[Visual Basic]
Public Delegate Sub PgSqlInfoMessageEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlInfoMessageEventArgs _
)
[C#]
public delegate void PgSqlInfoMessageEventHandler(
   object sender,
   PgSqlInfoMessageEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlInfoMessageEventArgs object that contains the event data.

Remarks

When you create a PgSqlInfoMessageEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
A PgSqlLoaderErrorEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderErrorEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlLoaderErrorEventHandler Delegate

Represents the method that will handle the PgSqlLoader.Error event of a PgSqlLoader.

[Visual Basic]
Public Delegate Sub PgSqlLoaderErrorEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlLoaderErrorEventArgs _
)
[C#]
public delegate void PgSqlLoaderErrorEventHandler(
   object sender,
   PgSqlLoaderErrorEventArgs e
);

Parameters

sender
The source of the event.
e
A PgSqlLoaderErrorEventArgs object that contains the event data.

Remarks

When you create a PgSqlLoader.Error 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlNotificationEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlNotificationEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlNotificationEventHandler Delegate

Represents the method that will handle the PgSqlConnection.Notification event of a PgSqlConnection.

[Visual Basic]
Public Delegate Sub PgSqlNotificationEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlNotificationEventArgs _
)
[C#]
public delegate void PgSqlNotificationEventHandler(
   object sender,
   PgSqlNotificationEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlNotificationEventArgs object that contains the event data.

Remarks

When you create a PgSqlNotificationEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlRowUpdatedEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatedEventHandler Delegate

Represents the method that will handle the PgSqlDataAdapter.RowUpdated event of an PgSqlDataAdapter.

[Visual Basic]
Public Delegate Sub PgSqlRowUpdatedEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlRowUpdatedEventArgs _
)
[C#]
public delegate void PgSqlRowUpdatedEventHandler(
   object sender,
   PgSqlRowUpdatedEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlRowUpdatedEventArgs object that contains the event data.

Remarks

The handler is not required to perform any action, and your code should avoid generating exceptions or allowing exceptions to propagate to the calling method. Any exceptions that do reach the caller are ignored. When you create an PgSqlRowUpdatedEventArgs 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
The PgSqlRowUpdatingEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatingEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatingEventHandler Delegate

Represents the method that will handle the PgSqlDataAdapter.RowUpdating event of an PgSqlDataAdapter.

[Visual Basic]
Public Delegate Sub PgSqlRowUpdatingEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlRowUpdatingEventArgs _
)
[C#]
public delegate void PgSqlRowUpdatingEventHandler(
   object sender,
   PgSqlRowUpdatingEventArgs e
);

Parameters

sender
The source of the event.
e
The PgSqlRowUpdatingEventArgs object that contains the event data.

Remarks

The handler is not required to perform any action, and your code should avoid generating exceptions or allowing exceptions to propagate to the calling method. Any exceptions that do reach the caller are ignored.

Use the handler to process PgSqlRowUpdatingEventArgs and to specify how updates are processed. For example, you may opt to skip the update of the current row or skip the update of all remaining rows. Note that the rows are updated in the order that they were received from the data source.

When you create an PgSqlRowUpdatingEventArgs 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventArgs Class

Language

Visual Basic

C#

Show All

sender
The source of the event.
e
An Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs object that contains the event data.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

PgSqlStatementExecuteEventHandler Delegate

Devart.Data.PostgreSql Namespace : PgSqlStatementExecuteEventHandler Delegate

Represents the method that will handle the Devart.Data.PostgreSql.PgSqlScript.PgSqlStatementExecute event of an PgSqlScript.

[Visual Basic]
Public Delegate Sub PgSqlStatementExecuteEventHandler( _
   ByVal sender As Object, _
   ByVal e As PgSqlStatementExecuteEventArgs _
)
[C#]
public delegate void PgSqlStatementExecuteEventHandler(
   object sender,
   PgSqlStatementExecuteEventArgs e
);

Parameters

sender
The source of the event.
e
An Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs object that contains the event data.

Remarks

When you create an PgSqlStatementExecuteEventHandler 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, unless you remove the delegate. For more information about event handler delegates, see "Events and Delegates" in the .NET Framework SDK documentation.

See Also

Devart.Data.PostgreSql Namespace | PgSqlStatementExecute Event | PgSqlStatementExecuteEventArgs Class


%%ItemTitle%%

Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Assembly Overview

Namespaces

Namespace | Description
Devart.Data.PostgreSql.Synchronization |


%%ItemTitle%%

Devart.Data.PostgreSql.Synchronization Assembly

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Devart.Data.PostgreSql.Synchronization Namespace

Inheritance Hierarchy

Classes

Class | Description
PgSqlSyncDescriptionBuilder | Provides synchronization scope and table information for a PostgreSQL database that is involved in synchronization.
PgSqlSyncProvider | A synchronization provider for synchronizing PostgreSQL databases.
PgSqlSyncScopeDeprovisioning | Removes scopes, templates, and other synchronization elements from a PostgreSQL database that was previously provisioned for synchronization.
PgSqlSyncScopeProvisioning | Represents the provisioning of a PostgreSQL database for a particular scope.
PgSqlSyncTableProvisioning | Represents the provisioning of a PostgreSQL database table.

See Also

Devart.Data.PostgreSql.Synchronization Assembly


%%PageItemTitle%% Classes

Devart.Data.PostgreSql.Synchronization Assembly

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Devart.Data.PostgreSql.Synchronization Namespace Classes

Inheritance Hierarchy

Classes

Class | Description
PgSqlSyncDescriptionBuilder | Provides synchronization scope and table information for a PostgreSQL database that is involved in synchronization.
PgSqlSyncProvider | A synchronization provider for synchronizing PostgreSQL databases.
PgSqlSyncScopeDeprovisioning | Removes scopes, templates, and other synchronization elements from a PostgreSQL database that was previously provisioned for synchronization.
PgSqlSyncScopeProvisioning | Represents the provisioning of a PostgreSQL database for a particular scope.
PgSqlSyncTableProvisioning | Represents the provisioning of a PostgreSQL database table.

See Also

Devart.Data.PostgreSql.Synchronization Assembly


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Members | Devart.Data.PostgreSql.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncDescriptionBuilder Class

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncDescriptionBuilder Class

Provides synchronization scope and table information for a PostgreSQL database that is involved in synchronization.

For a list of all members of this type, see PgSqlSyncDescriptionBuilder members.

Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.Synchronization.PgSqlSyncDescriptionBuilder

Syntax

[Visual Basic]
Public Class PgSqlSyncDescriptionBuilder
[C#]
public class PgSqlSyncDescriptionBuilder

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlSyncDescriptionBuilder Members | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Members$$

PgSqlSyncDescriptionBuilder Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncDescriptionBuilder Class Members

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncDescriptionBuilder Class

PgSqlSyncDescriptionBuilder overview

Public Constructors

Public Constructor PgSqlSyncDescriptionBuilder Constructor Initializes a new instance of the PgSqlSyncDescriptionBuilder class.

Public Methods

Public Method static (Shared in Visual Basic) GetDescriptionForScope | Overloaded. Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.
Public Method static (Shared in Visual Basic) GetDescriptionForTable | Overloaded. Returns a DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncDescriptionBuilder Constructor

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class : PgSqlSyncDescriptionBuilder Constructor (PgSqlSyncDescriptionBuilder)

Initializes a new instance of the PgSqlSyncDescriptionBuilder class.

[Visual Basic]
Public Function New()
[C#]
public PgSqlSyncDescriptionBuilder();

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members


%%PageItemTitle%% $$Methods$$

PgSqlSyncDescriptionBuilder Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncDescriptionBuilder Class Methods

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncDescriptionBuilder Class

For a list of all members of this type, see PgSqlSyncDescriptionBuilder members.

Public Methods

Public Method static (Shared in Visual Basic) GetDescriptionForScope | Overloaded. Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.
Public Method static (Shared in Visual Basic) GetDescriptionForTable | Overloaded. Returns a DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForScope Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class : GetDescriptionForScope Method

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

Overload List

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic] Overloads Public Shared Function GetDescriptionForScope(String,PgSqlConnection) As DbSyncScopeDescription

[C#] public static DbSyncScopeDescription GetDescriptionForScope(string,PgSqlConnection);

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic] Overloads Public Shared Function GetDescriptionForScope(String,String,PgSqlConnection) As DbSyncScopeDescription

[C#] public static DbSyncScopeDescription GetDescriptionForScope(string,string,PgSqlConnection);

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic] Overloads Public Shared Function GetDescriptionForScope(String,String,String,PgSqlConnection) As DbSyncScopeDescription

[C#] public static DbSyncScopeDescription GetDescriptionForScope(string,string,string,PgSqlConnection);

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The synchronization scope to get description for.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForScope(String,PgSqlConnection) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class > GetDescriptionForScope Method : GetDescriptionForScope(String,PgSqlConnection) Method

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic]
Overloads Public Shared Function GetDescriptionForScope( _
   ByVal scopeName As String, _
   ByVal connection As PgSqlConnection _
) As DbSyncScopeDescription
[C#]
public static DbSyncScopeDescription GetDescriptionForScope(
   string scopeName,
   PgSqlConnection connection
);

Parameters

scopeName
The synchronization scope to get description for.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.

Return Type

A DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The synchronization scope to get description for.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForScope(String,String,PgSqlConnection) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class > GetDescriptionForScope Method : GetDescriptionForScope(String,String,PgSqlConnection) Method

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic]
Overloads Public Shared Function GetDescriptionForScope( _
   ByVal scopeName As String, _
   ByVal objectPrefix As String, _
   ByVal connection As PgSqlConnection _
) As DbSyncScopeDescription
[C#]
public static DbSyncScopeDescription GetDescriptionForScope(
   string scopeName,
   string objectPrefix,
   PgSqlConnection connection
);

Parameters

scopeName
The synchronization scope to get description for.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.

Return Type

A DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The synchronization scope to get description for.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
objectSchema
The schema containing Sync Framework metadata objects.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForScope(String,String,String,PgSqlConnection) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class > GetDescriptionForScope Method : GetDescriptionForScope(String,String,String,PgSqlConnection) Method

Returns a DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

[Visual Basic]
Overloads Public Shared Function GetDescriptionForScope( _
   ByVal scopeName As String, _
   ByVal objectPrefix As String, _
   ByVal objectSchema As String, _
   ByVal connection As PgSqlConnection _
) As DbSyncScopeDescription
[C#]
public static DbSyncScopeDescription GetDescriptionForScope(
   string scopeName,
   string objectPrefix,
   string objectSchema,
   PgSqlConnection connection
);

Parameters

scopeName
The synchronization scope to get description for.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
objectSchema
The schema containing Sync Framework metadata objects.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned synchronization scope to get description for.

Return Type

A DbSyncScopeDescription object that contains information about the specified synchronization scope that is defined for a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForTable Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class : GetDescriptionForTable Method

Returns a DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

Overload List

Returns a DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

[Visual Basic] Overloads Public Shared Function GetDescriptionForTable(String,PgSqlConnection) As DbSyncTableDescription

[C#] public static DbSyncTableDescription GetDescriptionForTable(string,PgSqlConnection);

[Visual Basic] Overloads Public Shared Function GetDescriptionForTable(String,Collection(Of String),PgSqlConnection) As DbSyncTableDescription

[C#] public static DbSyncTableDescription GetDescriptionForTable(string,Collection<string>,PgSqlConnection);

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List

Language

Visual Basic

C#

Show All

tableName
The name of the table to get description for.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned table to get description for.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForTable(String,PgSqlConnection) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class > GetDescriptionForTable Method : GetDescriptionForTable(String,PgSqlConnection) Method

Returns a DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

[Visual Basic]
Overloads Public Shared Function GetDescriptionForTable( _
   ByVal tableName As String, _
   ByVal connection As PgSqlConnection _
) As DbSyncTableDescription
[C#]
public static DbSyncTableDescription GetDescriptionForTable(
   string tableName,
   PgSqlConnection connection
);

Parameters

tableName
The name of the table to get description for.
connection
A PgSqlConnection object that contains a connection to the database with the provisioned table to get description for.

Return Type

A DbSyncTableDescription object that contains information about the specified table in a PostgreSQL database.

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List


%%PageItemTitle%%

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List

Language

Visual Basic

C#

Show All

tableName
columnNames
connection
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetDescriptionForTable(String,Generic Collection,PgSqlConnection) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncDescriptionBuilder Class > GetDescriptionForTable Method : GetDescriptionForTable(String,Generic Collection,PgSqlConnection) Method
[Visual Basic]
Overloads Public Shared Function GetDescriptionForTable( _
   ByVal tableName As String, _
   ByVal columnNames As Collection(Of String), _
   ByVal connection As PgSqlConnection _
) As DbSyncTableDescription
[C#]
public static DbSyncTableDescription GetDescriptionForTable(
   string tableName,
   Collection<string> columnNames,
   PgSqlConnection connection
);

Parameters

tableName
columnNames
connection

See Also

PgSqlSyncDescriptionBuilder Class | PgSqlSyncDescriptionBuilder Members | Overload List


%%PageItemTitle%%

PgSqlSyncProvider Members | Devart.Data.PostgreSql.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Class

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncProvider Class

A synchronization provider for synchronizing PostgreSQL databases.

For a list of all members of this type, see PgSqlSyncProvider members.

Inheritance Hierarchy

System.Object
Microsoft.Synchronization.SyncProvider
Microsoft.Synchronization.KnowledgeSyncProvider
Microsoft.Synchronization.Data.RelationalSyncProvider
Microsoft.Synchronization.Data.DbSyncProvider
Devart.Data.Synchronization.DbSyncProviderBase
Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider

Syntax

[Visual Basic]
Public Class PgSqlSyncProvider
   Inherits DbSyncProviderBase
   Implements IDisposable
[C#]
public class PgSqlSyncProvider : DbSyncProviderBase, IDisposable

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlSyncProvider Members | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Members$$

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Class Members

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncProvider Class

PgSqlSyncProvider overview

Public Constructors

Public Constructor PgSqlSyncProvider Constructor Overloaded. Initializes a new instance of the PgSqlSyncProvider class.

Public Properties

Public Property ApplicationTransactionSize (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property BatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ChangeTracking (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property CleanupBatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Configuration (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Connection (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Sets the connection to the database.
Public Property DestinationCallbacks (Inherited from Microsoft.Synchronization.KnowledgeSyncProvider) |
Public Property IdFormats (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property MemoryDataCacheSize (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property SelectNewTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectOverlappingScopesCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectTableMaxTimestampsCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncAdapters (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncProviderPosition (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property UpdateScopeCleanupTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property UpdateScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |

Public Methods

Public Method BeginSession (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | This method is called by the SyncOrchestrator class to indicate that a synchronization session has started.
Public Method CleanupMetadata (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method Dispose (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method EndSession (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetScopeDescription (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetSyncBatchParameters (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |

Public Events

Public Event ApplyChangeFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyMetadataFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchSpooled (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesSelected (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event DbConnectionFailure (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SelectingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncPeerOutdated (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncProgress (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)

See Also

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Constructor

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : PgSqlSyncProvider Constructor (PgSqlSyncProvider)

Initializes a new instance of the PgSqlSyncProvider class.

Overload List

Initializes a new instance of the PgSqlSyncProvider class with default values.

[Visual Basic] Public Sub New()

[C#] public PgSqlSyncProvider();

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name and connection.

[Visual Basic] Public Sub New(String,PgSqlConnection)

[C#] public PgSqlSyncProvider(string,PgSqlConnection);

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name, connection, and object preffix.

[Visual Basic] Public Sub New(String,PgSqlConnection,String)

[C#] public PgSqlSyncProvider(string,PgSqlConnection,string);

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name, connection, object preffix, and object schema.

[Visual Basic] Public Sub New(String,PgSqlConnection,String,String)

[C#] public PgSqlSyncProvider(string,PgSqlConnection,string,string);

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Constructor()

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class > PgSqlSyncProvider Constructor : PgSqlSyncProvider Constructor()

Initializes a new instance of the PgSqlSyncProvider class with default values.

[Visual Basic]
Public Function New()
[C#]
public PgSqlSyncProvider();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Constructor(String,PgSqlConnection)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class > PgSqlSyncProvider Constructor : PgSqlSyncProvider Constructor(String,PgSqlConnection)

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name and connection.

[Visual Basic]
Public Function New( _
   ByVal scopeName As String, _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlSyncProvider(
   string scopeName,
   PgSqlConnection connection
);

Parameters

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Constructor(String,PgSqlConnection,String)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class > PgSqlSyncProvider Constructor : PgSqlSyncProvider Constructor(String,PgSqlConnection,String)

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name, connection, and object preffix.

[Visual Basic]
Public Function New( _
   ByVal scopeName As String, _
   ByVal connection As PgSqlConnection, _
   ByVal objectPrefix As String _
)
[C#]
public PgSqlSyncProvider(
   string scopeName,
   PgSqlConnection connection,
   string objectPrefix
);

Parameters

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
objectSchema
The schema containing Sync Framework metadata objects.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Constructor(String,PgSqlConnection,String,String)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class > PgSqlSyncProvider Constructor : PgSqlSyncProvider Constructor(String,PgSqlConnection,String,String)

Initializes a new instance of the PgSqlSyncProvider class with the specified synchronization scope name, connection, object preffix, and object schema.

[Visual Basic]
Public Function New( _
   ByVal scopeName As String, _
   ByVal connection As PgSqlConnection, _
   ByVal objectPrefix As String, _
   ByVal objectSchema As String _
)
[C#]
public PgSqlSyncProvider(
   string scopeName,
   PgSqlConnection connection,
   string objectPrefix,
   string objectSchema
);

Parameters

scopeName
The name of the scope to synchronize.
connection
The connection to the database to synchronize.
objectPrefix
The preffix for names of Sync Framework metadata objects. Must match to the preffix, specified in the Devart.Data.Synchronization.SyncScopeProvisioning.ObjectPrefix property of the Devart.Data.Synchronization.SyncScopeProvisioning class descendant, that was used to provision the scope.
objectSchema
The schema containing Sync Framework metadata objects.

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members | Overload List


%%PageItemTitle%%

PgSqlSyncScopeDeprovisioning Members | Devart.Data.PostgreSql.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeDeprovisioning Class

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeDeprovisioning Class

Removes scopes, templates, and other synchronization elements from a PostgreSQL database that was previously provisioned for synchronization.

For a list of all members of this type, see PgSqlSyncScopeDeprovisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncScopeDeprovisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeDeprovisioning

Syntax

[Visual Basic]
Public Class PgSqlSyncScopeDeprovisioning
   Inherits SyncScopeDeprovisioning
[C#]
public class PgSqlSyncScopeDeprovisioning : SyncScopeDeprovisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlSyncScopeDeprovisioning Members | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Members$$

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeDeprovisioning Class Members

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeDeprovisioning Class

PgSqlSyncScopeDeprovisioning overview

Public Constructors

Public Constructor PgSqlSyncScopeDeprovisioning Constructor Initializes a new instance of the PgSqlSyncScopeDeprovisioning class with the specified connection.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the schema containing Sync Framework metadata objects.

Public Methods

Public Method DeprovisionScope (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Deprovisions the specified scope by removing all associated synchronization elements from the database.
Public Method DeprovisionStore (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Removes all Sync Framework metadata tables, triggers, and stored procedures from the database.
Public Method DeprovisionTemplate (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.
Public Method ScriptDeprovisionScope (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to deprovision a scope.
Public Method ScriptDeprovisionStore (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.
Public Method ScriptDeprovisionTemplate (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to deprovision a template and all scopes that were created from that template.

See Also

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncScopeDeprovisioning Class | PgSqlSyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

connection
A connection to perform the deprovisioning operation over.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeDeprovisioning Constructor

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeDeprovisioning Class : PgSqlSyncScopeDeprovisioning Constructor (PgSqlSyncScopeDeprovisioning)

Initializes a new instance of the PgSqlSyncScopeDeprovisioning class with the specified connection.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlSyncScopeDeprovisioning(
   PgSqlConnection connection
);

Parameters

connection
A connection to perform the deprovisioning operation over.

See Also

PgSqlSyncScopeDeprovisioning Class | PgSqlSyncScopeDeprovisioning Members


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Members | Devart.Data.PostgreSql.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Class

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeProvisioning Class

Represents the provisioning of a PostgreSQL database for a particular scope.

For a list of all members of this type, see PgSqlSyncScopeProvisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncScopeProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeProvisioning

Syntax

[Visual Basic]
Public Class PgSqlSyncScopeProvisioning
   Inherits SyncScopeProvisioning
[C#]
public class PgSqlSyncScopeProvisioning : SyncScopeProvisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlSyncScopeProvisioning Members | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Members$$

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Class Members

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeProvisioning Class

PgSqlSyncScopeProvisioning overview

Public Constructors

Public Constructor PgSqlSyncScopeProvisioning Constructor Overloaded. Initializes a new instance of the PgSqlSyncScopeProvisioning class.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets the name of the scope.
Public Property Tables (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets a collection of Devart.Data.Synchronization.SyncTableProvisioning objects that represent the provisioning of database tables.
Public Property UserComment (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the user-specified comment about the scope.

Public Methods

Public Method Apply (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Applies the provisioning script to a database by using the connection that was specified in the constructor.
Public Method PopulateFromScopeDescription (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Sets the scope description from which the database should be provisioned.
Public Method PopulateFromTemplate (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Sets the template-based scope description from which the database should be provisioned.
Public Method ScopeExists (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Indicates whether the specified scope exists in the database, the connection, specified in the constructor.
Public Method Script (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Generates the SQL script to provision the database for a particular scope.
Public Method SetCreateProceduresDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata. The default value is CreateOrUseExisting.
Public Method SetCreateProceduresForAdditionalScopeDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create additional stored procedures for a scope that contains tables that have already been provisioned for other scopes. For example, this scope adds a filter column to a table that has already been provisioned without the filter column. Set this option to Create to ensure that an additional change enumeration procedure is created that can handle the filter column. The default setting is Skip.
Public Method SetCreateTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create tables that store user data to synchronize. The default value is CreateOrUseExisting.
Public Method SetCreateTrackingTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create tables that store change-tracking metadata. The default value is CreateOrUseExisting.
Public Method SetCreateTriggersDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create the triggers (on synchronized tables) that update tracking tables. The default value is CreateOrUseExisting.
Public Method SetPopulateTrackingTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to insert metadata into change-tracking tables for rows that already exist in the provisioned tables. The default value is CreateOrUseExisting.
Public Method TemplateExists (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Indicates whether the specified template exists in the database.

See Also

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Constructor

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeProvisioning Class : PgSqlSyncScopeProvisioning Constructor (PgSqlSyncScopeProvisioning)

Initializes a new instance of the PgSqlSyncScopeProvisioning class.

Overload List

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection.

[Visual Basic] Public Sub New(PgSqlConnection)

[C#] public PgSqlSyncScopeProvisioning(PgSqlConnection);

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and sychronization scope description.

[Visual Basic] Public Sub New(PgSqlConnection,DbSyncScopeDescription)

[C#] public PgSqlSyncScopeProvisioning(PgSqlConnection,DbSyncScopeDescription);

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and provisioning type.

[Visual Basic] Public Sub New(PgSqlConnection,SyncScopeProvisioningType)

[C#] public PgSqlSyncScopeProvisioning(PgSqlConnection,SyncScopeProvisioningType);

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection, sychronization scope description, and provisioning type.

[Visual Basic] Public Sub New(PgSqlConnection,DbSyncScopeDescription,SyncScopeProvisioningType)

[C#] public PgSqlSyncScopeProvisioning(PgSqlConnection,DbSyncScopeDescription,SyncScopeProvisioningType);

See Also

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List

Language

Visual Basic

C#

Show All

connection
A connection to perform the provisioning operation over.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Constructor(PgSqlConnection)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeProvisioning Class > PgSqlSyncScopeProvisioning Constructor : PgSqlSyncScopeProvisioning Constructor(PgSqlConnection)

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection _
)
[C#]
public PgSqlSyncScopeProvisioning(
   PgSqlConnection connection
);

Parameters

connection
A connection to perform the provisioning operation over.

See Also

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List

Language

Visual Basic

C#

Show All

connection
A connection to perform the provisioning operation over.
scopeDescription
The description of the scope to provision.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,DbSyncScopeDescription)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeProvisioning Class > PgSqlSyncScopeProvisioning Constructor : PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,DbSyncScopeDescription)

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and sychronization scope description.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal scopeDescription As DbSyncScopeDescription _
)
[C#]
public PgSqlSyncScopeProvisioning(
   PgSqlConnection connection,
   DbSyncScopeDescription scopeDescription
);

Parameters

connection
A connection to perform the provisioning operation over.
scopeDescription
The description of the scope to provision.

See Also

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List

Language

Visual Basic

C#

Show All

connection
A connection to perform the provisioning operation over.
scopeDescription
The description of the scope to provision.
provisioningType
The kind of provisioning that this object will perform - scope provisioning or template provisioning.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,DbSyncScopeDescription,SyncScopeProvisioningType)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeProvisioning Class > PgSqlSyncScopeProvisioning Constructor : PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,DbSyncScopeDescription,SyncScopeProvisioningType)

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection, sychronization scope description, and provisioning type.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal scopeDescription As DbSyncScopeDescription, _
   ByVal provisioningType As SyncScopeProvisioningType _
)
[C#]
public PgSqlSyncScopeProvisioning(
   PgSqlConnection connection,
   DbSyncScopeDescription scopeDescription,
   SyncScopeProvisioningType provisioningType
);

Parameters

connection
A connection to perform the provisioning operation over.
scopeDescription
The description of the scope to provision.
provisioningType
The kind of provisioning that this object will perform - scope provisioning or template provisioning.

See Also

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List


%%PageItemTitle%%

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List

Language

Visual Basic

C#

Show All

connection
A connection to perform the provisioning operation over.
provisioningType
The kind of provisioning that this object will perform - scope provisioning or template provisioning.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,SyncScopeProvisioningType)

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncScopeProvisioning Class > PgSqlSyncScopeProvisioning Constructor : PgSqlSyncScopeProvisioning Constructor(PgSqlConnection,SyncScopeProvisioningType)

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and provisioning type.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal provisioningType As SyncScopeProvisioningType _
)
[C#]
public PgSqlSyncScopeProvisioning(
   PgSqlConnection connection,
   SyncScopeProvisioningType provisioningType
);

Parameters

connection
A connection to perform the provisioning operation over.
provisioningType
The kind of provisioning that this object will perform - scope provisioning or template provisioning.

See Also

PgSqlSyncScopeProvisioning Class | PgSqlSyncScopeProvisioning Members | Overload List


%%PageItemTitle%%

PgSqlSyncTableProvisioning Members | Devart.Data.PostgreSql.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncTableProvisioning Class

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncTableProvisioning Class

Represents the provisioning of a PostgreSQL database table.

For a list of all members of this type, see PgSqlSyncTableProvisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncTableProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncTableProvisioning

Syntax

[Visual Basic]
Public Class PgSqlSyncTableProvisioning
   Inherits SyncTableProvisioning
[C#]
public class PgSqlSyncTableProvisioning : SyncTableProvisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

PgSqlSyncTableProvisioning Members | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Members$$

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncTableProvisioning Class Members

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncTableProvisioning Class

PgSqlSyncTableProvisioning overview

Public Constructors

Public Constructor PgSqlSyncTableProvisioning Constructor Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and table description.

Public Properties

Public Property CreateProcedures (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata.
Public Property CreateProceduresForAdditionalScope (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create sets of stored procedures that insert, update, and delete data and synchronization metadata for any additional scopes.
Public Property CreateTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the table that is synchronized.
Public Property CreateTrackingTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the table that store change-tracking metadata for the synchronized table.
Public Property CreateTriggers (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the triggers on the provisioned table, that update tracking the table.
Public Property FilterClause (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.
Public Property FilterColumns (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets the list of columns that are used for filtering data.
Public Property FilterParameters (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets the collection of parameters, used for filtering and specified in the Devart.Data.Synchronization.SyncProviderAdapterConfiguration.FilterClause property.
Public Property GlobalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property LocalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property PopulateTrackingTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Specifies whether to insert metadata into the change-tracking table for rows that already exist in the provisioned table. The default value is CreateOrUseExisting.
Public Property SelectChangesProcName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property UnquotedGlobalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property UnquotedLocalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

Public Methods

Public Method AddFilterColumn (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Adds a column that is used in the Devart.Data.Synchronization.SyncTableProvisioning.FilterClause to filter data rows for synchronization.
Public Method Apply | Overloaded. Applies the provisioning script to a database.
Public Method Script (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Generates the SQL script to provision the table.
Public Method ToString (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Returns a string that represents the SqlSyncTableProvisioning object.

See Also

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members

Language

Visual Basic

C#

Show All

connection
A connection to perform the provisioning operation over.
tableDescription
The description of the table to provision.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncTableProvisioning Constructor

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncTableProvisioning Class : PgSqlSyncTableProvisioning Constructor (PgSqlSyncTableProvisioning)

Initializes a new instance of the PgSqlSyncScopeProvisioning class with the specified connection and table description.

[Visual Basic]
Public Function New( _
   ByVal connection As PgSqlConnection, _
   ByVal tableDescription As DbSyncTableDescription _
)
[C#]
public PgSqlSyncTableProvisioning(
   PgSqlConnection connection,
   DbSyncTableDescription tableDescription
);

Parameters

connection
A connection to perform the provisioning operation over.
tableDescription
The description of the table to provision.

See Also

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members


%%PageItemTitle%% $$Methods$$

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncTableProvisioning Class Methods

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncTableProvisioning Class

For a list of all members of this type, see PgSqlSyncTableProvisioning members.

Public Methods

Public Method AddFilterColumn (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Adds a column that is used in the Devart.Data.Synchronization.SyncTableProvisioning.FilterClause to filter data rows for synchronization.
Public Method Apply | Overloaded. Applies the provisioning script to a database.
Public Method Script (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Generates the SQL script to provision the table.
Public Method ToString (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Returns a string that represents the SqlSyncTableProvisioning object.

See Also

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Apply Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncTableProvisioning Class : Apply Method (PgSqlSyncTableProvisioning)

Applies the provisioning script to a database.

Overload List

Applies the provisioning script to a PostgreSQL database within the specified transaction.

[Visual Basic] Overloads Public Sub Apply(PgSqlTransaction)

[C#] public void Apply(PgSqlTransaction);

Applies the provisioning script to a database.

[Visual Basic] Overloads Public Sub Apply()

[C#] public void Apply();

See Also

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members


%%PageItemTitle%%

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members | Overload List

Language

Visual Basic

C#

Show All

transaction
The transaction object to use for the provisioning operation.
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Apply(PgSqlTransaction) Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncTableProvisioning Class > Apply Method : Apply(PgSqlTransaction) Method

Applies the provisioning script to a PostgreSQL database within the specified transaction.

[Visual Basic]
Overloads Public Sub Apply( _
   ByVal transaction As PgSqlTransaction _
)
[C#]
public void Apply(
   PgSqlTransaction transaction
);

Parameters

transaction
The transaction object to use for the provisioning operation.

See Also

PgSqlSyncTableProvisioning Class | PgSqlSyncTableProvisioning Members | Overload List


%%ItemTitle%%

Devart.Data.Synchronization Send comments on this topic.

Assembly Overview

Namespaces

Namespace | Description
Devart.Data.Synchronization |


%%ItemTitle%%

Devart.Data.Synchronization Assembly

See Also Devart.Data.Synchronization Send comments on this topic.

Devart.Data.Synchronization Namespace

Inheritance Hierarchy

Classes

Class | Description
DbSyncProviderBase | Base class for Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider.
SyncProviderAdapterConfiguration | Represents synchronization adapter configuration for a table in a database.
SyncProviderAdapterConfigurationCollection | Represents a collection of SyncProviderAdapterConfiguration objects.
SyncProviderAdapterParameters | Represents a set of filter template parameters and the name of their associated table.
SyncProviderAdapterParametersCollection | Represents the collection of filter template parameter sets that are associated with the database tables used by this adapter.
SyncProviderFilterParameter | Represents a filter template parameter with its value.
SyncProviderScopeConfiguration | Represents configuration information that is used by Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider for a particular scope.
SyncProviderScopeParameters | Represents the collection of parameter sets associated with all of the tables in the scope.
SyncScopeDeprovisioning | Removes scopes, templates, and other synchronization elements from a database that was previously provisioned for synchronization.
SyncScopeProvisioning | Represents the provisioning of a database for a particular scope.
SyncSqlParameterCollection | Represents a collection of DbParameter objects that can be indexed by the name of the parameter.
SyncTableProvisioning | Represents the provisioning of a database table.
SyncTableProvisioningCollection | Represents a collection of SyncTableProvisioning objects that can be indexed by the name of the table to provision.

Enumerations

Enumeration | Description
SyncScopeProvisioningType | Defines the kind of provisioning.

See Also

Devart.Data.Synchronization Assembly


%%PageItemTitle%% Classes

Devart.Data.Synchronization Assembly

See Also Devart.Data.Synchronization Send comments on this topic.

Devart.Data.Synchronization Namespace Classes

Inheritance Hierarchy

Classes

Class | Description
DbSyncProviderBase | Base class for Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider.
SyncProviderAdapterConfiguration | Represents synchronization adapter configuration for a table in a database.
SyncProviderAdapterConfigurationCollection | Represents a collection of SyncProviderAdapterConfiguration objects.
SyncProviderAdapterParameters | Represents a set of filter template parameters and the name of their associated table.
SyncProviderAdapterParametersCollection | Represents the collection of filter template parameter sets that are associated with the database tables used by this adapter.
SyncProviderFilterParameter | Represents a filter template parameter with its value.
SyncProviderScopeConfiguration | Represents configuration information that is used by Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider for a particular scope.
SyncProviderScopeParameters | Represents the collection of parameter sets associated with all of the tables in the scope.
SyncScopeDeprovisioning | Removes scopes, templates, and other synchronization elements from a database that was previously provisioned for synchronization.
SyncScopeProvisioning | Represents the provisioning of a database for a particular scope.
SyncSqlParameterCollection | Represents a collection of DbParameter objects that can be indexed by the name of the parameter.
SyncTableProvisioning | Represents the provisioning of a database table.
SyncTableProvisioningCollection | Represents a collection of SyncTableProvisioning objects that can be indexed by the name of the table to provision.

See Also

Devart.Data.Synchronization Assembly


%%PageItemTitle%%

DbSyncProviderBase Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DbSyncProviderBase Class

Devart.Data.Synchronization Namespace : DbSyncProviderBase Class

Base class for Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider.

For a list of all members of this type, see DbSyncProviderBase members.

Inheritance Hierarchy

System.Object
Microsoft.Synchronization.SyncProvider
Microsoft.Synchronization.KnowledgeSyncProvider
Microsoft.Synchronization.Data.RelationalSyncProvider
Microsoft.Synchronization.Data.DbSyncProvider
Devart.Data.Synchronization.DbSyncProviderBase
Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider

Syntax

[Visual Basic]
Public MustInherit Class DbSyncProviderBase
   Inherits DbSyncProvider
   Implements IDisposable
[C#]
public abstract class DbSyncProviderBase : DbSyncProvider, IDisposable

Remarks

Abstract DbSyncProviderBase class implements some of Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider functionality that is DBMS-independent.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

DbSyncProviderBase Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

DbSyncProviderBase Class Members

Devart.Data.Synchronization Namespace : DbSyncProviderBase Class

DbSyncProviderBase overview

Public Properties

Public Property ApplicationTransactionSize (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property BatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ChangeTracking (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property CleanupBatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Configuration (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Connection | Overridden. Sets the connection to the database.
Public Property DestinationCallbacks (Inherited from Microsoft.Synchronization.KnowledgeSyncProvider) |
Public Property IdFormats (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property MemoryDataCacheSize (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property SelectNewTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectOverlappingScopesCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectTableMaxTimestampsCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncAdapters (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncProviderPosition (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property UpdateScopeCleanupTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property UpdateScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |

Public Methods

Public Method BeginSession | Overridden. This method is called by the SyncOrchestrator class to indicate that a synchronization session has started.
Public Method CleanupMetadata (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method Dispose (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method EndSession (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetScopeDescription (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetSyncBatchParameters (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |

Public Events

Public Event ApplyChangeFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyMetadataFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchSpooled (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesSelected (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event DbConnectionFailure (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SelectingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncPeerOutdated (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncProgress (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)

See Also

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

DbSyncProviderBase Class Properties

Devart.Data.Synchronization Namespace : DbSyncProviderBase Class

For a list of all members of this type, see DbSyncProviderBase members.

Public Properties

Public Property ApplicationTransactionSize (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property BatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ChangeTracking (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property CleanupBatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Configuration (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Connection | Overridden. Sets the connection to the database.
Public Property DestinationCallbacks (Inherited from Microsoft.Synchronization.KnowledgeSyncProvider) |
Public Property IdFormats (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property MemoryDataCacheSize (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property SelectNewTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectOverlappingScopesCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectTableMaxTimestampsCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncAdapters (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncProviderPosition (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property UpdateScopeCleanupTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property UpdateScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |

See Also

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Connection Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : Connection Property (DbSyncProviderBase)

Sets the connection to the database.

[Visual Basic]
Overrides Public WriteOnly Property Connection As IDbConnection
[C#]
public override IDbConnection Connection {set;}

Return Type

The connection to the database.

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectPrefix Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ObjectPrefix Property (DbSyncProviderBase)

Gets or sets the optional preffix for names of Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectPrefix As String
[C#]
public string ObjectPrefix {get; set;}

Return Type

The preffix for names of Sync Framework metadata objects.

Remarks

Must match to the preffix, specified in the SyncScopeProvisioning.ObjectPrefix property of the SyncScopeProvisioning class descendant, that was used to provision the database.

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectSchema Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ObjectSchema Property (DbSyncProviderBase)

Gets or sets the schema containing Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectSchema As String
[C#]
public string ObjectSchema {get; set;}

Return Type

The schema containing Sync Framework metadata objects.

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%% $$Methods$$

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

DbSyncProviderBase Class Methods

Devart.Data.Synchronization Namespace : DbSyncProviderBase Class

For a list of all members of this type, see DbSyncProviderBase members.

Public Methods

Public Method BeginSession | Overridden. This method is called by the SyncOrchestrator class to indicate that a synchronization session has started.
Public Method CleanupMetadata (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method Dispose (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method EndSession (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetScopeDescription (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetSyncBatchParameters (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |

See Also

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

position
Determines whether the provider is associated with the local or remote database.
syncSessionContext
A SyncSessionContext object containing the information about the current synchronization session.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

BeginSession Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : BeginSession Method

This method is called by the SyncOrchestrator class to indicate that a synchronization session has started.

[Visual Basic]
Overrides Public Sub BeginSession( _
   ByVal position As SyncProviderPosition, _
   ByVal syncSessionContext As SyncSessionContext _
)
[C#]
public override void BeginSession(
   SyncProviderPosition position,
   SyncSessionContext syncSessionContext
);

Parameters

position
Determines whether the provider is associated with the local or remote database.
syncSessionContext
A SyncSessionContext object containing the information about the current synchronization session.

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfiguration Class

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfiguration Class

Represents synchronization adapter configuration for a table in a database.

For a list of all members of this type, see SyncProviderAdapterConfiguration members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderAdapterConfiguration

Syntax

[Visual Basic]
Public Class SyncProviderAdapterConfiguration
[C#]
public class SyncProviderAdapterConfiguration

Remarks

Sync Framework uses this class to create a DbSyncAdapter object for each table that is provisioned for synchronization.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderAdapterConfiguration Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderAdapterConfiguration Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfiguration Class Members

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfiguration Class

SyncProviderAdapterConfiguration overview

Public Constructors

Public Constructor SyncProviderAdapterConfiguration Constructor Initializes a new instance of the SyncProviderAdapterConfiguration class.

Public Properties

Public Property Columns | Gets the collection of DbSyncColumnDescription objects, representing all columns in a table.
Public Property DeleteMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to delete metadata from a tracking table.
Public Property DeleteProcName | Gets or sets the name of the stored procedure that Sync Framework uses to delete data from a synchronized table during synchronization.
Public Property DeleteTriggerName | Gets or sets the name of the delete trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.
Public Property FilterClause | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter data to be synchronized.
Public Property FilterColumns | Gets the list of columns that are used for filtering data.
Public Property FilterParameters | Gets the collection of parameters, used for filtering and specified in the FilterClause property.
Public Property GlobalTableName | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property InsertMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to insert metadata into a tracking table.
Public Property InsertProcName | Gets or sets the name of the stored procedure that Sync Framework uses to insert data into a synchronized table during synchronization.
Public Property InsertTriggerName | Gets or sets the name of the insert trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.
Public Property SelectChangesProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property SelectRowProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select conflicting rows from a synchronized table during synchronization.
Public Property TableName | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property TrackingTableName | Gets the name, not including database-specific delimiters, of the tracking table for a specific table that is synchronized.
Public Property TrackingTableNameShort | Gets the name of the tracking table for a specific table that is synchronized, not including database-specific delimiters and the name of the schema.
Public Property UnmappedElements | Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.
Public Property UpdateMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to update metadata in a tracking table.
Public Property UpdateProcName | Gets or sets the name of the stored procedure that Sync Framework uses to update data in a synchronized table during synchronization.
Public Property UpdateTriggerName | Gets or sets the name of the update trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

See Also

SyncProviderAdapterConfiguration Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfiguration Constructor

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : SyncProviderAdapterConfiguration Constructor (SyncProviderAdapterConfiguration)

Initializes a new instance of the SyncProviderAdapterConfiguration class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderAdapterConfiguration();

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%% $$Properties$$

SyncProviderAdapterConfiguration Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfiguration Class Properties

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfiguration Class

For a list of all members of this type, see SyncProviderAdapterConfiguration members.

Public Properties

Public Property Columns | Gets the collection of DbSyncColumnDescription objects, representing all columns in a table.
Public Property DeleteMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to delete metadata from a tracking table.
Public Property DeleteProcName | Gets or sets the name of the stored procedure that Sync Framework uses to delete data from a synchronized table during synchronization.
Public Property DeleteTriggerName | Gets or sets the name of the delete trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.
Public Property FilterClause | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter data to be synchronized.
Public Property FilterColumns | Gets the list of columns that are used for filtering data.
Public Property FilterParameters | Gets the collection of parameters, used for filtering and specified in the FilterClause property.
Public Property GlobalTableName | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property InsertMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to insert metadata into a tracking table.
Public Property InsertProcName | Gets or sets the name of the stored procedure that Sync Framework uses to insert data into a synchronized table during synchronization.
Public Property InsertTriggerName | Gets or sets the name of the insert trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.
Public Property SelectChangesProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property SelectRowProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select conflicting rows from a synchronized table during synchronization.
Public Property TableName | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property TrackingTableName | Gets the name, not including database-specific delimiters, of the tracking table for a specific table that is synchronized.
Public Property TrackingTableNameShort | Gets the name of the tracking table for a specific table that is synchronized, not including database-specific delimiters and the name of the schema.
Public Property UnmappedElements | Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.
Public Property UpdateMetadataProcName | Gets or sets the name of the stored procedure that Sync Framework uses to update metadata in a tracking table.
Public Property UpdateProcName | Gets or sets the name of the stored procedure that Sync Framework uses to update data in a synchronized table during synchronization.
Public Property UpdateTriggerName | Gets or sets the name of the update trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

See Also

SyncProviderAdapterConfiguration Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Columns Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : Columns Property (SyncProviderAdapterConfiguration)

Gets the collection of DbSyncColumnDescription objects, representing all columns in a table.

[Visual Basic]
Public Property Columns As Collection(Of DbSyncColumnDescription)
[C#]
public Collection<DbSyncColumnDescription> Columns {get; set;}

Return Type

The collection of DbSyncColumnDescription objects, representing all columns in a table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeleteMetadataProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : DeleteMetadataProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to delete metadata from a tracking table.

[Visual Basic]
Public Property DeleteMetadataProcName As String
[C#]
public string DeleteMetadataProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to delete metadata from a tracking table.

Remarks

Default value is "TableName_deletemetadata", where TableName stands for the name of the provisioned table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeleteProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : DeleteProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to delete data from a synchronized table during synchronization.

[Visual Basic]
Public Property DeleteProcName As String
[C#]
public string DeleteProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to delete data from a synchronized table during synchronization.

Remarks

Default value is "TableName_delete", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeleteTriggerName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : DeleteTriggerName Property

Gets or sets the name of the delete trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

[Visual Basic]
Public Property DeleteTriggerName As String
[C#]
public string DeleteTriggerName {get; set;}

Return Type

The name of the delete trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

Remarks

Default value is "TableName_delete_trigger", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterClause Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : FilterClause Property (SyncProviderAdapterConfiguration)

Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter data to be synchronized.

[Visual Basic]
Public Property FilterClause As String
[C#]
public string FilterClause {get; set;}

Return Type

The filter condition (a WHERE clause without the WHERE keyword) to filter data to be synchronized.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterColumns Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : FilterColumns Property (SyncProviderAdapterConfiguration)

Gets the list of columns that are used for filtering data.

[Visual Basic]
Public Property FilterColumns As Collection(Of String)
[C#]
public Collection<string> FilterColumns {get; set;}

Return Type

The list of columns that are used for filtering data.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterParameters Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : FilterParameters Property (SyncProviderAdapterConfiguration)

Gets the collection of parameters, used for filtering and specified in the FilterClause property.

[Visual Basic]
Public Property FilterParameters As Collection(Of SyncProviderFilterParameter)
[C#]
public Collection<SyncProviderFilterParameter> FilterParameters {get; set;}

Return Type

The collection of parameters, used for filtering and specified in the FilterClause property.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

GlobalTableName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : GlobalTableName Property

Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

[Visual Basic]
Public Property GlobalTableName As String
[C#]
public string GlobalTableName {get; set;}

Return Type

The name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

InsertMetadataProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : InsertMetadataProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to insert metadata into a tracking table.

[Visual Basic]
Public Property InsertMetadataProcName As String
[C#]
public string InsertMetadataProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to insert metadata into a tracking table.

Remarks

Default value is "TableName_insertmetadata", where TableName stands for the name of the provisioned table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

InsertProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : InsertProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to insert data into a synchronized table during synchronization.

[Visual Basic]
Public Property InsertProcName As String
[C#]
public string InsertProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to insert data into a synchronized table during synchronization.

Remarks

Default value is "TableName_delete", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

InsertTriggerName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : InsertTriggerName Property

Gets or sets the name of the insert trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

[Visual Basic]
Public Property InsertTriggerName As String
[C#]
public string InsertTriggerName {get; set;}

Return Type

The name of the insert trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

Remarks

Default value is "TableName_insert_trigger", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectChangesProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : SelectChangesProcName Property (SyncProviderAdapterConfiguration)

Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.

[Visual Basic]
Public Property SelectChangesProcName As String
[C#]
public string SelectChangesProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.

Remarks

Default value is "TableName_selectchanges", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectRowProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : SelectRowProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to select conflicting rows from a synchronized table during synchronization.

[Visual Basic]
Public Property SelectRowProcName As String
[C#]
public string SelectRowProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to select conflicting rows from a synchronized table during synchronization.

Remarks

Default value is "TableName_selectrow", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

TableName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : TableName Property (SyncProviderAdapterConfiguration)

Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

[Visual Basic]
Public Property TableName As String
[C#]
public string TableName {get; set;}

Return Type

The name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

TrackingTableName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : TrackingTableName Property

Gets the name, not including database-specific delimiters, of the tracking table for a specific table that is synchronized.

[Visual Basic]
Public Property TrackingTableName As String
[C#]
public string TrackingTableName {get; set;}

Return Type

The name, not including database-specific delimiters, of the tracking table for a specific table that is synchronized.

Remarks

Default value is "TableName_tracking", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

TrackingTableNameShort Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : TrackingTableNameShort Property

Gets the name of the tracking table for a specific table that is synchronized, not including database-specific delimiters and the name of the schema.

[Visual Basic]
Public Property TrackingTableNameShort As String
[C#]
public string TrackingTableNameShort {get; set;}

Return Type

The name of the tracking table for a specific table that is synchronized, not including database-specific delimiters and the name of the schema.

Remarks

Default value is "TableName_tracking", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UnmappedElements Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : UnmappedElements Property (SyncProviderAdapterConfiguration)

Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

[Visual Basic]
Public Property UnmappedElements As XmlElement()
[C#]
public XmlElement[] UnmappedElements {get; set;}

Return Type

The array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UpdateMetadataProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : UpdateMetadataProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to update metadata in a tracking table.

[Visual Basic]
Public Property UpdateMetadataProcName As String
[C#]
public string UpdateMetadataProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to update metadata in a tracking table.

Remarks

Default value is "TableName_updatemetadata", where TableName stands for the name of the provisioned table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UpdateProcName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : UpdateProcName Property

Gets or sets the name of the stored procedure that Sync Framework uses to update data in a synchronized table during synchronization.

[Visual Basic]
Public Property UpdateProcName As String
[C#]
public string UpdateProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to update data in a synchronized table during synchronization.

Remarks

Default value is "TableName_update", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UpdateTriggerName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfiguration Class : UpdateTriggerName Property

Gets or sets the name of the update trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

[Visual Basic]
Public Property UpdateTriggerName As String
[C#]
public string UpdateTriggerName {get; set;}

Return Type

The name of the update trigger that Sync Framework creates on a synchronized table to update metadata in a tracking table.

Remarks

Default value is "TableName_update_trigger", where TableName stands for the name of the synchronized table.

See Also

SyncProviderAdapterConfiguration Class | SyncProviderAdapterConfiguration Members


%%PageItemTitle%%

SyncProviderAdapterConfigurationCollection Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfigurationCollection Class

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfigurationCollection Class

Represents a collection of SyncProviderAdapterConfiguration objects.

For a list of all members of this type, see SyncProviderAdapterConfigurationCollection members.

Inheritance Hierarchy

System.Object
System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>
Devart.Data.Synchronization.SyncProviderAdapterConfigurationCollection

Syntax

[Visual Basic]
Public Class SyncProviderAdapterConfigurationCollection
   Inherits Collection(Of SyncProviderAdapterConfiguration)
   Implements ICollection<SyncProviderAdapterConfiguration>, IEnumerable<SyncProviderAdapterConfiguration>, IList<SyncProviderAdapterConfiguration>, ICollection, IEnumerable, IList
[C#]
public class SyncProviderAdapterConfigurationCollection : Collection<SyncProviderAdapterConfiguration>, ICollection<SyncProviderAdapterConfiguration>, IEnumerable<SyncProviderAdapterConfiguration>, IList<SyncProviderAdapterConfiguration>, ICollection, IEnumerable, IList

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderAdapterConfigurationCollection Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfigurationCollection Class Members

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfigurationCollection Class

SyncProviderAdapterConfigurationCollection overview

Public Constructors

Public Constructor SyncProviderAdapterConfigurationCollection Constructor Initializes a new instance of the SyncProviderAdapterConfigurationCollection class.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>) |
Public Property Item | Overloaded. An indexer property that gets the SyncProviderAdapterConfiguration object that is associated with the specified table.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)

See Also

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfigurationCollection Constructor

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfigurationCollection Class : SyncProviderAdapterConfigurationCollection Constructor (SyncProviderAdapterConfigurationCollection)

Initializes a new instance of the SyncProviderAdapterConfigurationCollection class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderAdapterConfigurationCollection();

See Also

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members


%%PageItemTitle%% $$Properties$$

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfigurationCollection Class Properties

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfigurationCollection Class

For a list of all members of this type, see SyncProviderAdapterConfigurationCollection members.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>) |
Public Property Item | Overloaded. An indexer property that gets the SyncProviderAdapterConfiguration object that is associated with the specified table.

See Also

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfigurationCollection Class : Item Property (SyncProviderAdapterConfigurationCollection)

An indexer property that gets the SyncProviderAdapterConfiguration object that is associated with the specified table.

Overload List

An indexer property that gets the SyncProviderAdapterConfiguration object that is associated with the specified table.

[Visual Basic] Overloads Public Item(String) As SyncProviderAdapterConfiguration

[C#] public SyncProviderAdapterConfiguration Item(string);

[Visual Basic] Overloads Public Item(Integer) As SyncProviderAdapterConfiguration

[C#] public SyncProviderAdapterConfiguration Item(int);

See Also

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members


%%PageItemTitle%%

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members | Overload List

Language

Visual Basic

C#

Show All

globalTableName
The name of the table to look up.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item(String) Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterConfigurationCollection Class > Item Property : Item(String) Property

An indexer property that gets the SyncProviderAdapterConfiguration object that is associated with the specified table.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal globalTableName As String _
) As SyncProviderAdapterConfiguration
[C#]
public SyncProviderAdapterConfiguration Item(
   string globalTableName
); {get;}

Parameters

globalTableName
The name of the table to look up.

Return Type

The SyncProviderAdapterConfiguration object that is associated with globalTableName. Null if the specified table is not found.

See Also

SyncProviderAdapterConfigurationCollection Class | SyncProviderAdapterConfigurationCollection Members | Overload List


%%PageItemTitle%%

SyncProviderAdapterParameters Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParameters Class

Devart.Data.Synchronization Namespace : SyncProviderAdapterParameters Class

Represents a set of filter template parameters and the name of their associated table.

For a list of all members of this type, see SyncProviderAdapterParameters members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderAdapterParameters

Syntax

[Visual Basic]
Public Class SyncProviderAdapterParameters
[C#]
public class SyncProviderAdapterParameters

Remarks

This class is primarily used by Sync Framework for XML serialization.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderAdapterParameters Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderAdapterParameters Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParameters Class Members

Devart.Data.Synchronization Namespace : SyncProviderAdapterParameters Class

SyncProviderAdapterParameters overview

Public Constructors

Public Constructor SyncProviderAdapterParameters Constructor Initializes a new instance of the SyncProviderAdapterParameters class.

Public Properties

Public Property FilterParameters | Gets the collection of filter template parameters for the associated table, specified in TableName.
Public Property TableName | Gets or sets the name of the database table that is associated with these parameters.

See Also

SyncProviderAdapterParameters Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParameters Constructor

Devart.Data.Synchronization Namespace > SyncProviderAdapterParameters Class : SyncProviderAdapterParameters Constructor (SyncProviderAdapterParameters)

Initializes a new instance of the SyncProviderAdapterParameters class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderAdapterParameters();

See Also

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members


%%PageItemTitle%% $$Properties$$

SyncProviderAdapterParameters Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParameters Class Properties

Devart.Data.Synchronization Namespace : SyncProviderAdapterParameters Class

For a list of all members of this type, see SyncProviderAdapterParameters members.

Public Properties

Public Property FilterParameters | Gets the collection of filter template parameters for the associated table, specified in TableName.
Public Property TableName | Gets or sets the name of the database table that is associated with these parameters.

See Also

SyncProviderAdapterParameters Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterParameters Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterParameters Class : FilterParameters Property (SyncProviderAdapterParameters)

Gets the collection of filter template parameters for the associated table, specified in TableName.

[Visual Basic]
Public Property FilterParameters As Collection(Of SyncProviderFilterParameter)
[C#]
public Collection<SyncProviderFilterParameter> FilterParameters {get; set;}

Return Type

The collection of filter template parameters for the associated table.

See Also

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members


%%PageItemTitle%%

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

TableName Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterParameters Class : TableName Property (SyncProviderAdapterParameters)

Gets or sets the name of the database table that is associated with these parameters.

[Visual Basic]
Public Property TableName As String
[C#]
public string TableName {get; set;}

Return Type

The name of the database table that is associated with these parameters.

See Also

SyncProviderAdapterParameters Class | SyncProviderAdapterParameters Members


%%PageItemTitle%%

SyncProviderAdapterParametersCollection Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParametersCollection Class

Devart.Data.Synchronization Namespace : SyncProviderAdapterParametersCollection Class

Represents the collection of filter template parameter sets that are associated with the database tables used by this adapter.

For a list of all members of this type, see SyncProviderAdapterParametersCollection members.

Inheritance Hierarchy

System.Object
System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>
Devart.Data.Synchronization.SyncProviderAdapterParametersCollection

Syntax

[Visual Basic]
Public Class SyncProviderAdapterParametersCollection
   Inherits Collection(Of SyncProviderAdapterParameters)
   Implements ICollection<SyncProviderAdapterParameters>, IEnumerable<SyncProviderAdapterParameters>, IList<SyncProviderAdapterParameters>, ICollection, IEnumerable, IList
[C#]
public class SyncProviderAdapterParametersCollection : Collection<SyncProviderAdapterParameters>, ICollection<SyncProviderAdapterParameters>, IEnumerable<SyncProviderAdapterParameters>, IList<SyncProviderAdapterParameters>, ICollection, IEnumerable, IList

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderAdapterParametersCollection Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParametersCollection Class Members

Devart.Data.Synchronization Namespace : SyncProviderAdapterParametersCollection Class

SyncProviderAdapterParametersCollection overview

Public Constructors

Public Constructor SyncProviderAdapterParametersCollection Constructor Initializes a new instance of the SyncProviderAdapterParametersCollection class.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>) |
Public Property Item | Overloaded. An indexer property that gets the SyncProviderAdapterParameters object that is associated with the specified table.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)

See Also

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParametersCollection Constructor

Devart.Data.Synchronization Namespace > SyncProviderAdapterParametersCollection Class : SyncProviderAdapterParametersCollection Constructor (SyncProviderAdapterParametersCollection)

Initializes a new instance of the SyncProviderAdapterParametersCollection class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderAdapterParametersCollection();

See Also

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members


%%PageItemTitle%% $$Properties$$

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParametersCollection Class Properties

Devart.Data.Synchronization Namespace : SyncProviderAdapterParametersCollection Class

For a list of all members of this type, see SyncProviderAdapterParametersCollection members.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>) |
Public Property Item | Overloaded. An indexer property that gets the SyncProviderAdapterParameters object that is associated with the specified table.

See Also

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterParametersCollection Class : Item Property (SyncProviderAdapterParametersCollection)

An indexer property that gets the SyncProviderAdapterParameters object that is associated with the specified table.

Overload List

An indexer property that gets the SyncProviderAdapterParameters object that is associated with the specified table.

[Visual Basic] Overloads Public Item(String) As SyncProviderAdapterParameters

[C#] public SyncProviderAdapterParameters Item(string);

[Visual Basic] Overloads Public Item(Integer) As SyncProviderAdapterParameters

[C#] public SyncProviderAdapterParameters Item(int);

See Also

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members


%%PageItemTitle%%

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members | Overload List

Language

Visual Basic

C#

Show All

tableName
The name of the table to look up.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item(String) Property

Devart.Data.Synchronization Namespace > SyncProviderAdapterParametersCollection Class > Item Property : Item(String) Property

An indexer property that gets the SyncProviderAdapterParameters object that is associated with the specified table.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal tableName As String _
) As SyncProviderAdapterParameters
[C#]
public SyncProviderAdapterParameters Item(
   string tableName
); {get;}

Parameters

tableName
The name of the table to look up.

Return Type

The SyncProviderAdapterParameters object that is associated with the table name. Null if the specified table is not found.

See Also

SyncProviderAdapterParametersCollection Class | SyncProviderAdapterParametersCollection Members | Overload List


%%PageItemTitle%%

SyncProviderFilterParameter Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Class

Devart.Data.Synchronization Namespace : SyncProviderFilterParameter Class

Represents a filter template parameter with its value.

For a list of all members of this type, see SyncProviderFilterParameter members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderFilterParameter

Syntax

[Visual Basic]
Public Class SyncProviderFilterParameter
[C#]
public class SyncProviderFilterParameter

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderFilterParameter Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderFilterParameter Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Class Members

Devart.Data.Synchronization Namespace : SyncProviderFilterParameter Class

SyncProviderFilterParameter overview

Public Constructors

Public Constructor SyncProviderFilterParameter Constructor Overloaded. Initializes a new instance of the SyncProviderFilterParameter class.

Public Properties

Public Property ParameterName | Gets or sets the name of the parameter that is used in FilterClause.
Public Property Value | Gets or set the value of the filter parameter.

See Also

SyncProviderFilterParameter Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Constructor

Devart.Data.Synchronization Namespace > SyncProviderFilterParameter Class : SyncProviderFilterParameter Constructor (SyncProviderFilterParameter)

Initializes a new instance of the SyncProviderFilterParameter class.

Overload List

Initializes a new instance of the SyncProviderFilterParameter class with default values.

[Visual Basic] Public Sub New()

[C#] public SyncProviderFilterParameter();

Initializes a new instance of the SyncProviderFilterParameter class with the specified DbParameter instance.

[Visual Basic] Public Sub New(DbParameter)

[C#] public SyncProviderFilterParameter(DbParameter);

See Also

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members


%%PageItemTitle%%

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members | Overload List

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Constructor()

Devart.Data.Synchronization Namespace > SyncProviderFilterParameter Class > SyncProviderFilterParameter Constructor : SyncProviderFilterParameter Constructor()

Initializes a new instance of the SyncProviderFilterParameter class with default values.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderFilterParameter();

See Also

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members | Overload List


%%PageItemTitle%%

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members | Overload List

Language

Visual Basic

C#

Show All

parameter
A DbParameter instance, having the desired name and value.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Constructor(DbParameter)

Devart.Data.Synchronization Namespace > SyncProviderFilterParameter Class > SyncProviderFilterParameter Constructor : SyncProviderFilterParameter Constructor(DbParameter)

Initializes a new instance of the SyncProviderFilterParameter class with the specified DbParameter instance.

[Visual Basic]
Public Function New( _
   ByVal parameter As DbParameter _
)
[C#]
public SyncProviderFilterParameter(
   DbParameter parameter
);

Parameters

parameter
A DbParameter instance, having the desired name and value.

See Also

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members | Overload List


%%PageItemTitle%% $$Properties$$

SyncProviderFilterParameter Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderFilterParameter Class Properties

Devart.Data.Synchronization Namespace : SyncProviderFilterParameter Class

For a list of all members of this type, see SyncProviderFilterParameter members.

Public Properties

Public Property ParameterName | Gets or sets the name of the parameter that is used in FilterClause.
Public Property Value | Gets or set the value of the filter parameter.

See Also

SyncProviderFilterParameter Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ParameterName Property

Devart.Data.Synchronization Namespace > SyncProviderFilterParameter Class : ParameterName Property (SyncProviderFilterParameter)

Gets or sets the name of the parameter that is used in FilterClause.

[Visual Basic]
Public Property ParameterName As String
[C#]
public string ParameterName {get; set;}

Return Type

The name of the parameter that is used in FilterClause.

See Also

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members


%%PageItemTitle%%

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Value Property

Devart.Data.Synchronization Namespace > SyncProviderFilterParameter Class : Value Property (SyncProviderFilterParameter)

Gets or set the value of the filter parameter.

[Visual Basic]
Public Property Value As Object
[C#]
public object Value {get; set;}

Return Type

The value of the filter parameter.

Remarks

This value is passed to the select_changes stored procedure to control which items are enumerated during synchronization.

See Also

SyncProviderFilterParameter Class | SyncProviderFilterParameter Members


%%PageItemTitle%%

SyncProviderScopeConfiguration Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeConfiguration Class

Devart.Data.Synchronization Namespace : SyncProviderScopeConfiguration Class

Represents configuration information that is used by Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider for a particular scope.

For a list of all members of this type, see SyncProviderScopeConfiguration members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderScopeConfiguration

Syntax

[Visual Basic]
Public Class SyncProviderScopeConfiguration
[C#]
public class SyncProviderScopeConfiguration

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderScopeConfiguration Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderScopeConfiguration Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeConfiguration Class Members

Devart.Data.Synchronization Namespace : SyncProviderScopeConfiguration Class

SyncProviderScopeConfiguration overview

Public Constructors

Public Constructor SyncProviderScopeConfiguration Constructor Initializes a new instance of the SyncProviderScopeConfiguration class.

Public Properties

Public Property AdapterConfigurations | Gets or sets a list of SyncProviderAdapterConfiguration objects, each of which is associated with a table in a database.
Public Property IsTemplate | Determines whether the associated scope is a template.
Public Property UnmappedElements | Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

See Also

SyncProviderScopeConfiguration Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeConfiguration Constructor

Devart.Data.Synchronization Namespace > SyncProviderScopeConfiguration Class : SyncProviderScopeConfiguration Constructor (SyncProviderScopeConfiguration)

Initializes a new instance of the SyncProviderScopeConfiguration class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderScopeConfiguration();

See Also

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members


%%PageItemTitle%% $$Properties$$

SyncProviderScopeConfiguration Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeConfiguration Class Properties

Devart.Data.Synchronization Namespace : SyncProviderScopeConfiguration Class

For a list of all members of this type, see SyncProviderScopeConfiguration members.

Public Properties

Public Property AdapterConfigurations | Gets or sets a list of SyncProviderAdapterConfiguration objects, each of which is associated with a table in a database.
Public Property IsTemplate | Determines whether the associated scope is a template.
Public Property UnmappedElements | Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

See Also

SyncProviderScopeConfiguration Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

AdapterConfigurations Property

Devart.Data.Synchronization Namespace > SyncProviderScopeConfiguration Class : AdapterConfigurations Property

Gets or sets a list of SyncProviderAdapterConfiguration objects, each of which is associated with a table in a database.

[Visual Basic]
Public Property AdapterConfigurations As SyncProviderAdapterConfigurationCollection
[C#]
public SyncProviderAdapterConfigurationCollection AdapterConfigurations {get; set;}

Return Type

A list of SyncProviderAdapterConfiguration objects, each of which is associated with a table in a database.

See Also

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members


%%PageItemTitle%%

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

IsTemplate Property

Devart.Data.Synchronization Namespace > SyncProviderScopeConfiguration Class : IsTemplate Property

Determines whether the associated scope is a template.

[Visual Basic]
Public Property IsTemplate As Boolean
[C#]
public bool IsTemplate {get; set;}

Return Type

true, if the associated scope is a template; otherwise, false.

See Also

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members


%%PageItemTitle%%

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UnmappedElements Property

Devart.Data.Synchronization Namespace > SyncProviderScopeConfiguration Class : UnmappedElements Property (SyncProviderScopeConfiguration)

Gets or sets the array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

[Visual Basic]
Public Property UnmappedElements As XmlElement()
[C#]
public XmlElement[] UnmappedElements {get; set;}

Return Type

The array of any XML configuration elements that are not recognized by Sync Framework when an adapter is configured.

See Also

SyncProviderScopeConfiguration Class | SyncProviderScopeConfiguration Members


%%PageItemTitle%%

SyncProviderScopeParameters Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeParameters Class

Devart.Data.Synchronization Namespace : SyncProviderScopeParameters Class

Represents the collection of parameter sets associated with all of the tables in the scope.

For a list of all members of this type, see SyncProviderScopeParameters members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderScopeParameters

Syntax

[Visual Basic]
Public Class SyncProviderScopeParameters
[C#]
public class SyncProviderScopeParameters

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncProviderScopeParameters Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncProviderScopeParameters Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeParameters Class Members

Devart.Data.Synchronization Namespace : SyncProviderScopeParameters Class

SyncProviderScopeParameters overview

Public Constructors

Public Constructor SyncProviderScopeParameters Constructor Initializes a new instance of the SyncProviderScopeParameters class.

Public Properties

Public Property AdapterParameters Gets the collection of parameter sets associated with all of the tables in the scope.

See Also

SyncProviderScopeParameters Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderScopeParameters Class | SyncProviderScopeParameters Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeParameters Constructor

Devart.Data.Synchronization Namespace > SyncProviderScopeParameters Class : SyncProviderScopeParameters Constructor (SyncProviderScopeParameters)

Initializes a new instance of the SyncProviderScopeParameters class.

[Visual Basic]
Public Function New()
[C#]
public SyncProviderScopeParameters();

See Also

SyncProviderScopeParameters Class | SyncProviderScopeParameters Members


%%PageItemTitle%% $$Properties$$

SyncProviderScopeParameters Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderScopeParameters Class Properties

Devart.Data.Synchronization Namespace : SyncProviderScopeParameters Class

For a list of all members of this type, see SyncProviderScopeParameters members.

Public Properties

Public Property AdapterParameters Gets the collection of parameter sets associated with all of the tables in the scope.

See Also

SyncProviderScopeParameters Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncProviderScopeParameters Class | SyncProviderScopeParameters Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

AdapterParameters Property

Devart.Data.Synchronization Namespace > SyncProviderScopeParameters Class : AdapterParameters Property

Gets the collection of parameter sets associated with all of the tables in the scope.

[Visual Basic]
Public Property AdapterParameters As SyncProviderAdapterParametersCollection
[C#]
public SyncProviderAdapterParametersCollection AdapterParameters {get; set;}

Return Type

The collection of parameter sets associated with all of the tables in the scope.

See Also

SyncProviderScopeParameters Class | SyncProviderScopeParameters Members


%%PageItemTitle%%

SyncScopeDeprovisioning Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncScopeDeprovisioning Class

Devart.Data.Synchronization Namespace : SyncScopeDeprovisioning Class

Removes scopes, templates, and other synchronization elements from a database that was previously provisioned for synchronization.

For a list of all members of this type, see SyncScopeDeprovisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncScopeDeprovisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeDeprovisioning

Syntax

[Visual Basic]
Public MustInherit Class SyncScopeDeprovisioning
[C#]
public abstract class SyncScopeDeprovisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncScopeDeprovisioning Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeDeprovisioning Class Members

Devart.Data.Synchronization Namespace : SyncScopeDeprovisioning Class

SyncScopeDeprovisioning overview

Public Properties

Public Property CommandTimeout | Gets or sets the wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.

Public Methods

Public Method DeprovisionScope | Deprovisions the specified scope by removing all associated synchronization elements from the database.
Public Method DeprovisionStore | Removes all Sync Framework metadata tables, triggers, and stored procedures from the database.
Public Method DeprovisionTemplate | Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.
Public Method ScriptDeprovisionScope | Generates a script that can be used to deprovision a scope.
Public Method ScriptDeprovisionStore | Generates a script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.
Public Method ScriptDeprovisionTemplate | Generates a script that can be used to deprovision a template and all scopes that were created from that template.

See Also

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeDeprovisioning Class Properties

Devart.Data.Synchronization Namespace : SyncScopeDeprovisioning Class

For a list of all members of this type, see SyncScopeDeprovisioning members.

Public Properties

Public Property CommandTimeout | Gets or sets the wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.

See Also

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CommandTimeout Property

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : CommandTimeout Property (SyncScopeDeprovisioning)

Gets or sets the wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.

[Visual Basic]
Public Property CommandTimeout As Integer
[C#]
public int CommandTimeout {get; set;}

Return Type

The wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectPrefix Property

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : ObjectPrefix Property (SyncScopeDeprovisioning)

Gets or sets the optional preffix for names of Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectPrefix As String
[C#]
public string ObjectPrefix {get; set;}

Return Type

The preffix for names of Sync Framework metadata objects.

Remarks

Must match to the preffix, specified in the SyncScopeProvisioning.ObjectPrefix property of the SyncScopeProvisioning class descendant, that was used to provision the database.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectSchema Property

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : ObjectSchema Property (SyncScopeDeprovisioning)

Gets or sets the schema containing Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectSchema As String
[C#]
public string ObjectSchema {get; set;}

Return Type

The schema containing Sync Framework metadata objects.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%% $$Methods$$

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeDeprovisioning Class Methods

Devart.Data.Synchronization Namespace : SyncScopeDeprovisioning Class

For a list of all members of this type, see SyncScopeDeprovisioning members.

Public Methods

Public Method DeprovisionScope | Deprovisions the specified scope by removing all associated synchronization elements from the database.
Public Method DeprovisionStore | Removes all Sync Framework metadata tables, triggers, and stored procedures from the database.
Public Method DeprovisionTemplate | Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.
Public Method ScriptDeprovisionScope | Generates a script that can be used to deprovision a scope.
Public Method ScriptDeprovisionStore | Generates a script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.
Public Method ScriptDeprovisionTemplate | Generates a script that can be used to deprovision a template and all scopes that were created from that template.

See Also

SyncScopeDeprovisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to deprovision.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeprovisionScope Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : DeprovisionScope Method

Deprovisions the specified scope by removing all associated synchronization elements from the database.

[Visual Basic]
Public Sub DeprovisionScope( _
   ByVal scopeName As String _
)
[C#]
public void DeprovisionScope(
   string scopeName
);

Parameters

scopeName
The name of the scope to deprovision.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeprovisionStore Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : DeprovisionStore Method

Removes all Sync Framework metadata tables, triggers, and stored procedures from the database.

[Visual Basic]
Public Sub DeprovisionStore()
[C#]
public void DeprovisionStore();

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

templateName
The name of the template to deprovision.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

DeprovisionTemplate Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : DeprovisionTemplate Method

Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.

[Visual Basic]
Public Sub DeprovisionTemplate( _
   ByVal templateName As String _
)
[C#]
public void DeprovisionTemplate(
   string templateName
);

Parameters

templateName
The name of the template to deprovision.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to deprovision.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScriptDeprovisionScope Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : ScriptDeprovisionScope Method

Generates a script that can be used to deprovision a scope.

[Visual Basic]
Public Function ScriptDeprovisionScope( _
   ByVal scopeName As String _
) As String
[C#]
public string ScriptDeprovisionScope(
   string scopeName
);

Parameters

scopeName
The name of the scope to deprovision.

Return Type

A script that can be used to deprovision a scope.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScriptDeprovisionStore Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : ScriptDeprovisionStore Method

Generates a script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.

[Visual Basic]
Public Function ScriptDeprovisionStore() As String
[C#]
public string ScriptDeprovisionStore();

Return Type

A script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members

Language

Visual Basic

C#

Show All

templateName
The name of the template to deprovision.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScriptDeprovisionTemplate Method

Devart.Data.Synchronization Namespace > SyncScopeDeprovisioning Class : ScriptDeprovisionTemplate Method

Generates a script that can be used to deprovision a template and all scopes that were created from that template.

[Visual Basic]
Public Function ScriptDeprovisionTemplate( _
   ByVal templateName As String _
) As String
[C#]
public string ScriptDeprovisionTemplate(
   string templateName
);

Parameters

templateName
The name of the template to deprovision.

Return Type

A script that can be used to deprovision a template and all scopes that were created from that template.

See Also

SyncScopeDeprovisioning Class | SyncScopeDeprovisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncScopeProvisioning Class

Devart.Data.Synchronization Namespace : SyncScopeProvisioning Class

Represents the provisioning of a database for a particular scope.

For a list of all members of this type, see SyncScopeProvisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncScopeProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeProvisioning

Syntax

[Visual Basic]
Public MustInherit Class SyncScopeProvisioning
[C#]
public abstract class SyncScopeProvisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncScopeProvisioning Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeProvisioning Class Members

Devart.Data.Synchronization Namespace : SyncScopeProvisioning Class

SyncScopeProvisioning overview

Public Properties

Public Property CommandTimeout | Gets or sets the wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName | Gets the name of the scope.
Public Property Tables | Gets a collection of SyncTableProvisioning objects that represent the provisioning of database tables.
Public Property UserComment | Gets or sets the user-specified comment about the scope.

Public Methods

Public Method Apply | Applies the provisioning script to a database by using the connection that was specified in the constructor.
Public Method PopulateFromScopeDescription | Sets the scope description from which the database should be provisioned.
Public Method PopulateFromTemplate | Sets the template-based scope description from which the database should be provisioned.
Public Method ScopeExists | Indicates whether the specified scope exists in the database, the connection, specified in the constructor.
Public Method Script | Generates the SQL script to provision the database for a particular scope.
Public Method SetCreateProceduresDefault | Specifies whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata. The default value is CreateOrUseExisting.
Public Method SetCreateProceduresForAdditionalScopeDefault | Specifies whether to create additional stored procedures for a scope that contains tables that have already been provisioned for other scopes. For example, this scope adds a filter column to a table that has already been provisioned without the filter column. Set this option to Create to ensure that an additional change enumeration procedure is created that can handle the filter column. The default setting is Skip.
Public Method SetCreateTableDefault | Specifies whether to create tables that store user data to synchronize. The default value is CreateOrUseExisting.
Public Method SetCreateTrackingTableDefault | Specifies whether to create tables that store change-tracking metadata. The default value is CreateOrUseExisting.
Public Method SetCreateTriggersDefault | Specifies whether to create the triggers (on synchronized tables) that update tracking tables. The default value is CreateOrUseExisting.
Public Method SetPopulateTrackingTableDefault | Specifies whether to insert metadata into change-tracking tables for rows that already exist in the provisioned tables. The default value is CreateOrUseExisting.
Public Method TemplateExists | Indicates whether the specified template exists in the database.

See Also

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeProvisioning Class Properties

Devart.Data.Synchronization Namespace : SyncScopeProvisioning Class

For a list of all members of this type, see SyncScopeProvisioning members.

Public Properties

Public Property CommandTimeout | Gets or sets the wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName | Gets the name of the scope.
Public Property Tables | Gets a collection of SyncTableProvisioning objects that represent the provisioning of database tables.
Public Property UserComment | Gets or sets the user-specified comment about the scope.

See Also

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CommandTimeout Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : CommandTimeout Property (SyncScopeProvisioning)

Gets or sets the wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.

[Visual Basic]
Public Property CommandTimeout As Integer
[C#]
public int CommandTimeout {get; set;}

Return Type

The wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectPrefix Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : ObjectPrefix Property (SyncScopeProvisioning)

Gets or sets the optional preffix for names of Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectPrefix As String
[C#]
public string ObjectPrefix {get; set;}

Return Type

The preffix for names of Sync Framework metadata objects.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectSchema Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : ObjectSchema Property (SyncScopeProvisioning)

Gets or sets the schema containing Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectSchema As String
[C#]
public string ObjectSchema {get; set;}

Return Type

The schema containing Sync Framework metadata objects.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScopeName Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : ScopeName Property (SyncScopeProvisioning)

Gets the name of the scope.

[Visual Basic]
Public ReadOnly Property ScopeName As String
[C#]
public string ScopeName {get;}

Return Type

The name of the scope.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Tables Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : Tables Property (SyncScopeProvisioning)

Gets a collection of SyncTableProvisioning objects that represent the provisioning of database tables.

[Visual Basic]
Public ReadOnly Property Tables As SyncTableProvisioningCollection
[C#]
public SyncTableProvisioningCollection Tables {get;}

Return Type

A collection of SyncTableProvisioning objects that represent the provisioning of database tables.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UserComment Property

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : UserComment Property

Gets or sets the user-specified comment about the scope.

[Visual Basic]
Public Property UserComment As String
[C#]
public string UserComment {get; set;}

Return Type

The user-specified comment about the scope.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%% $$Methods$$

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncScopeProvisioning Class Methods

Devart.Data.Synchronization Namespace : SyncScopeProvisioning Class

For a list of all members of this type, see SyncScopeProvisioning members.

Public Methods

Public Method Apply | Applies the provisioning script to a database by using the connection that was specified in the constructor.
Public Method PopulateFromScopeDescription | Sets the scope description from which the database should be provisioned.
Public Method PopulateFromTemplate | Sets the template-based scope description from which the database should be provisioned.
Public Method ScopeExists | Indicates whether the specified scope exists in the database, the connection, specified in the constructor.
Public Method Script | Generates the SQL script to provision the database for a particular scope.
Public Method SetCreateProceduresDefault | Specifies whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata. The default value is CreateOrUseExisting.
Public Method SetCreateProceduresForAdditionalScopeDefault | Specifies whether to create additional stored procedures for a scope that contains tables that have already been provisioned for other scopes. For example, this scope adds a filter column to a table that has already been provisioned without the filter column. Set this option to Create to ensure that an additional change enumeration procedure is created that can handle the filter column. The default setting is Skip.
Public Method SetCreateTableDefault | Specifies whether to create tables that store user data to synchronize. The default value is CreateOrUseExisting.
Public Method SetCreateTrackingTableDefault | Specifies whether to create tables that store change-tracking metadata. The default value is CreateOrUseExisting.
Public Method SetCreateTriggersDefault | Specifies whether to create the triggers (on synchronized tables) that update tracking tables. The default value is CreateOrUseExisting.
Public Method SetPopulateTrackingTableDefault | Specifies whether to insert metadata into change-tracking tables for rows that already exist in the provisioned tables. The default value is CreateOrUseExisting.
Public Method TemplateExists | Indicates whether the specified template exists in the database.

See Also

SyncScopeProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Apply Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : Apply Method (SyncScopeProvisioning)

Applies the provisioning script to a database by using the connection that was specified in the constructor.

[Visual Basic]
Public Sub Apply()
[C#]
public void Apply();

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

scopeDescription
The scope configuration for provisioning the database.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

PopulateFromScopeDescription Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : PopulateFromScopeDescription Method

Sets the scope description from which the database should be provisioned.

[Visual Basic]
Public Sub PopulateFromScopeDescription( _
   ByVal scopeDescription As DbSyncScopeDescription _
)
[C#]
public void PopulateFromScopeDescription(
   DbSyncScopeDescription scopeDescription
);

Parameters

scopeDescription
The scope configuration for provisioning the database.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

scopeName
The name of the scope.
templateName
The name of the template.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

PopulateFromTemplate Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : PopulateFromTemplate Method

Sets the template-based scope description from which the database should be provisioned.

[Visual Basic]
Public Sub PopulateFromTemplate( _
   ByVal scopeName As String, _
   ByVal templateName As String _
)
[C#]
public void PopulateFromTemplate(
   string scopeName,
   string templateName
);

Parameters

scopeName
The name of the scope.
templateName
The name of the template.

Remarks

You will need to specify values for filter parameters for a template-based scope.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

scopeName
The name of the scope to check.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScopeExists Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : ScopeExists Method

Indicates whether the specified scope exists in the database, the connection, specified in the constructor.

[Visual Basic]
Public Function ScopeExists( _
   ByVal scopeName As String _
) As Boolean
[C#]
public bool ScopeExists(
   string scopeName
);

Parameters

scopeName
The name of the scope to check.

Return Type

true, if the specified scope exists in the database; otherwise, false.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Script Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : Script Method (SyncScopeProvisioning)

Generates the SQL script to provision the database for a particular scope.

[Visual Basic]
Public Function Script() As String
[C#]
public string Script();

Return Type

The SQL script to provision the database for a particular scope.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the stored procedures.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetCreateProceduresDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetCreateProceduresDefault Method

Specifies whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata. The default value is CreateOrUseExisting.

[Visual Basic]
Public Sub SetCreateProceduresDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetCreateProceduresDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the stored procedures.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the stored procedures.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetCreateProceduresForAdditionalScopeDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetCreateProceduresForAdditionalScopeDefault Method

Specifies whether to create additional stored procedures for a scope that contains tables that have already been provisioned for other scopes. For example, this scope adds a filter column to a table that has already been provisioned without the filter column. Set this option to Create to ensure that an additional change enumeration procedure is created that can handle the filter column. The default setting is Skip.

[Visual Basic]
Public Sub SetCreateProceduresForAdditionalScopeDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetCreateProceduresForAdditionalScopeDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the stored procedures.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the tables that are synchronized.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetCreateTableDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetCreateTableDefault Method

Specifies whether to create tables that store user data to synchronize. The default value is CreateOrUseExisting.

[Visual Basic]
Public Sub SetCreateTableDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetCreateTableDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the tables that are synchronized.

Remarks

If the tables to synchronize data of already exist in the database, and you are not defining any table schema by using DbSyncTableDescription objects, use the Skip value.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the tracking tables.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetCreateTrackingTableDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetCreateTrackingTableDefault Method

Specifies whether to create tables that store change-tracking metadata. The default value is CreateOrUseExisting.

[Visual Basic]
Public Sub SetCreateTrackingTableDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetCreateTrackingTableDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the tracking tables.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the triggers (on synchronized tables) that update tracking tables.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetCreateTriggersDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetCreateTriggersDefault Method

Specifies whether to create the triggers (on synchronized tables) that update tracking tables. The default value is CreateOrUseExisting.

[Visual Basic]
Public Sub SetCreateTriggersDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetCreateTriggersDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to create the triggers (on synchronized tables) that update tracking tables.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

defaultOption
One of the DbSyncCreationOption values that specifies whether to insert metadata into change-tracking tables for rows that already exist in base tables.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

SetPopulateTrackingTableDefault Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : SetPopulateTrackingTableDefault Method

Specifies whether to insert metadata into change-tracking tables for rows that already exist in the provisioned tables. The default value is CreateOrUseExisting.

[Visual Basic]
Public Sub SetPopulateTrackingTableDefault( _
   ByVal defaultOption As DbSyncCreationOption _
)
[C#]
public void SetPopulateTrackingTableDefault(
   DbSyncCreationOption defaultOption
);

Parameters

defaultOption
One of the DbSyncCreationOption values that specifies whether to insert metadata into change-tracking tables for rows that already exist in base tables.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncScopeProvisioning Class | SyncScopeProvisioning Members

Language

Visual Basic

C#

Show All

templateName
The name of the template to check.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

TemplateExists Method

Devart.Data.Synchronization Namespace > SyncScopeProvisioning Class : TemplateExists Method

Indicates whether the specified template exists in the database.

[Visual Basic]
Public Function TemplateExists( _
   ByVal templateName As String _
) As Boolean
[C#]
public bool TemplateExists(
   string templateName
);

Parameters

templateName
The name of the template to check.

Return Type

true, if the specified template exists in the database; otherwise, false.

See Also

SyncScopeProvisioning Class | SyncScopeProvisioning Members


%%PageItemTitle%%

SyncSqlParameterCollection Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncSqlParameterCollection Class

Devart.Data.Synchronization Namespace : SyncSqlParameterCollection Class

Represents a collection of DbParameter objects that can be indexed by the name of the parameter.

For a list of all members of this type, see SyncSqlParameterCollection members.

Inheritance Hierarchy

System.Object
System.Collections.ObjectModel.Collection<DbParameter>
Devart.Data.Synchronization.SyncSqlParameterCollection

Syntax

[Visual Basic]
Public Class SyncSqlParameterCollection
   Inherits Collection(Of DbParameter)
   Implements ICollection<DbParameter>, IEnumerable<DbParameter>, IList<DbParameter>, ICollection, IEnumerable, IList
[C#]
public class SyncSqlParameterCollection : Collection<DbParameter>, ICollection<DbParameter>, IEnumerable<DbParameter>, IList<DbParameter>, ICollection, IEnumerable, IList

Remarks

This class is used to represent the collection of template filter parameters.

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncSqlParameterCollection Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncSqlParameterCollection Class Members

Devart.Data.Synchronization Namespace : SyncSqlParameterCollection Class

SyncSqlParameterCollection overview

Public Constructors

Public Constructor SyncSqlParameterCollection Constructor Initializes a new instance of the SyncSqlParameterCollection class.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<DbParameter>) |
Public Property Item | Overloaded. An indexer property that gets the DbParameter object with the specified name in the collection.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)

See Also

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncSqlParameterCollection Constructor

Devart.Data.Synchronization Namespace > SyncSqlParameterCollection Class : SyncSqlParameterCollection Constructor (SyncSqlParameterCollection)

Initializes a new instance of the SyncSqlParameterCollection class.

[Visual Basic]
Public Function New()
[C#]
public SyncSqlParameterCollection();

See Also

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members


%%PageItemTitle%% $$Properties$$

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncSqlParameterCollection Class Properties

Devart.Data.Synchronization Namespace : SyncSqlParameterCollection Class

For a list of all members of this type, see SyncSqlParameterCollection members.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<DbParameter>) |
Public Property Item | Overloaded. An indexer property that gets the DbParameter object with the specified name in the collection.

See Also

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item Property

Devart.Data.Synchronization Namespace > SyncSqlParameterCollection Class : Item Property (SyncSqlParameterCollection)

An indexer property that gets the DbParameter object with the specified name in the collection.

Overload List

An indexer property that gets the DbParameter object with the specified name in the collection.

[Visual Basic] Overloads Public Item(String) As DbParameter

[C#] public DbParameter Item(string);

[Visual Basic] Overloads Public Item(Integer) As DbParameter

[C#] public DbParameter Item(int);

See Also

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members


%%PageItemTitle%%

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members | Overload List

Language

Visual Basic

C#

Show All

parameterName
The name of the parameter to retrieve.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item(String) Property

Devart.Data.Synchronization Namespace > SyncSqlParameterCollection Class > Item Property : Item(String) Property

An indexer property that gets the DbParameter object with the specified name in the collection.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal parameterName As String _
) As DbParameter
[C#]
public DbParameter Item(
   string parameterName
); {get;}

Parameters

parameterName
The name of the parameter to retrieve.

Return Type

The DbParameter object with the specified name. Null if there is no parameter with such name in the collection.

See Also

SyncSqlParameterCollection Class | SyncSqlParameterCollection Members | Overload List


%%PageItemTitle%%

SyncTableProvisioning Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioning Class

Devart.Data.Synchronization Namespace : SyncTableProvisioning Class

Represents the provisioning of a database table.

For a list of all members of this type, see SyncTableProvisioning members.

Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncTableProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncTableProvisioning

Syntax

[Visual Basic]
Public MustInherit Class SyncTableProvisioning
[C#]
public abstract class SyncTableProvisioning

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncTableProvisioning Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioning Class Members

Devart.Data.Synchronization Namespace : SyncTableProvisioning Class

SyncTableProvisioning overview

Public Properties

Public Property CreateProcedures | Determines whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata.
Public Property CreateProceduresForAdditionalScope | Determines whether to create sets of stored procedures that insert, update, and delete data and synchronization metadata for any additional scopes.
Public Property CreateTable | Determines whether to create the table that is synchronized.
Public Property CreateTrackingTable | Determines whether to create the table that store change-tracking metadata for the synchronized table.
Public Property CreateTriggers | Determines whether to create the triggers on the provisioned table, that update tracking the table.
Public Property FilterClause | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.
Public Property FilterColumns | Gets the list of columns that are used for filtering data.
Public Property FilterParameters | Gets the collection of parameters, used for filtering and specified in the FilterClause property.
Public Property GlobalName | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property LocalName | Gets or sets the name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property PopulateTrackingTable | Specifies whether to insert metadata into the change-tracking table for rows that already exist in the provisioned table. The default value is CreateOrUseExisting.
Public Property SelectChangesProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property UnquotedGlobalName | Gets or sets the name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property UnquotedLocalName | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

Public Methods

Public Method AddFilterColumn | Adds a column that is used in the FilterClause to filter data rows for synchronization.
Public Method Apply | Applies the provisioning script to a database.
Public Method Script | Generates the SQL script to provision the table.
Public Method ToString | Overridden. Returns a string that represents the SqlSyncTableProvisioning object.

See Also

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioning Class Properties

Devart.Data.Synchronization Namespace : SyncTableProvisioning Class

For a list of all members of this type, see SyncTableProvisioning members.

Public Properties

Public Property CreateProcedures | Determines whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata.
Public Property CreateProceduresForAdditionalScope | Determines whether to create sets of stored procedures that insert, update, and delete data and synchronization metadata for any additional scopes.
Public Property CreateTable | Determines whether to create the table that is synchronized.
Public Property CreateTrackingTable | Determines whether to create the table that store change-tracking metadata for the synchronized table.
Public Property CreateTriggers | Determines whether to create the triggers on the provisioned table, that update tracking the table.
Public Property FilterClause | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.
Public Property FilterColumns | Gets the list of columns that are used for filtering data.
Public Property FilterParameters | Gets the collection of parameters, used for filtering and specified in the FilterClause property.
Public Property GlobalName | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property LocalName | Gets or sets the name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property ObjectPrefix | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema | Gets or sets the schema containing Sync Framework metadata objects.
Public Property PopulateTrackingTable | Specifies whether to insert metadata into the change-tracking table for rows that already exist in the provisioned table. The default value is CreateOrUseExisting.
Public Property SelectChangesProcName | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property UnquotedGlobalName | Gets or sets the name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property UnquotedLocalName | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

See Also

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CreateProcedures Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : CreateProcedures Property

Determines whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata.

[Visual Basic]
Public Property CreateProcedures As DbSyncCreationOption
[C#]
public DbSyncCreationOption CreateProcedures {get; set;}

Return Type

One of the DbSyncCreationOption values.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CreateProceduresForAdditionalScope Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : CreateProceduresForAdditionalScope Property

Determines whether to create sets of stored procedures that insert, update, and delete data and synchronization metadata for any additional scopes.

[Visual Basic]
Public Property CreateProceduresForAdditionalScope As DbSyncCreationOption
[C#]
public DbSyncCreationOption CreateProceduresForAdditionalScope {get; set;}

Return Type

One of the DbSyncCreationOption values.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CreateTable Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : CreateTable Property

Determines whether to create the table that is synchronized.

[Visual Basic]
Public Property CreateTable As DbSyncCreationOption
[C#]
public DbSyncCreationOption CreateTable {get; set;}

Return Type

One of the DbSyncCreationOption values.

Remarks

If the table to synchronize data of already exists in the database, and you are not defining any table schema by using a DbSyncTableDescription object, use the Skip value.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CreateTrackingTable Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : CreateTrackingTable Property

Determines whether to create the table that store change-tracking metadata for the synchronized table.

[Visual Basic]
Public Property CreateTrackingTable As DbSyncCreationOption
[C#]
public DbSyncCreationOption CreateTrackingTable {get; set;}

Return Type

One of the DbSyncCreationOption values.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CreateTriggers Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : CreateTriggers Property

Determines whether to create the triggers on the provisioned table, that update tracking the table.

[Visual Basic]
Public Property CreateTriggers As DbSyncCreationOption
[C#]
public DbSyncCreationOption CreateTriggers {get; set;}

Return Type

One of the DbSyncCreationOption values.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterClause Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : FilterClause Property (SyncTableProvisioning)

Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.

[Visual Basic]
Public Property FilterClause As String
[C#]
public string FilterClause {get; set;}

Return Type

The filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterColumns Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : FilterColumns Property (SyncTableProvisioning)

Gets the list of columns that are used for filtering data.

[Visual Basic]
Public ReadOnly Property FilterColumns As Collection(Of DbSyncColumnDescription)
[C#]
public Collection<DbSyncColumnDescription> FilterColumns {get;}

Return Type

The list of columns that are used for filtering data.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

FilterParameters Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : FilterParameters Property (SyncTableProvisioning)

Gets the collection of parameters, used for filtering and specified in the FilterClause property.

[Visual Basic]
Public ReadOnly Property FilterParameters As SyncSqlParameterCollection
[C#]
public SyncSqlParameterCollection FilterParameters {get;}

Return Type

The collection of parameters, used for filtering and specified in the FilterClause property.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

GlobalName Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : GlobalName Property

Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

[Visual Basic]
Public ReadOnly Property GlobalName As String
[C#]
public string GlobalName {get;}

Return Type

The name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

LocalName Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : LocalName Property

Gets or sets the name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

[Visual Basic]
Public Overridable ReadOnly Property LocalName As String
[C#]
public virtual string LocalName {get;}

Return Type

The name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectPrefix Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : ObjectPrefix Property (SyncTableProvisioning)

Gets or sets the optional preffix for names of Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectPrefix As String
[C#]
public string ObjectPrefix {get; set;}

Return Type

The preffix for names of Sync Framework metadata objects.

Remarks

Must match to the preffix, specified in the SyncScopeProvisioning.ObjectPrefix property of the SyncScopeProvisioning class descendant, that was used to provision the database.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ObjectSchema Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : ObjectSchema Property (SyncTableProvisioning)

Gets or sets the schema containing Sync Framework metadata objects.

[Visual Basic]
Public Property ObjectSchema As String
[C#]
public string ObjectSchema {get; set;}

Return Type

The schema containing Sync Framework metadata objects.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

PopulateTrackingTable Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : PopulateTrackingTable Property

Specifies whether to insert metadata into the change-tracking table for rows that already exist in the provisioned table. The default value is CreateOrUseExisting.

[Visual Basic]
Public Property PopulateTrackingTable As DbSyncCreationOption
[C#]
public DbSyncCreationOption PopulateTrackingTable {get; set;}

Return Type

One of the DbSyncCreationOption values.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectChangesProcName Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : SelectChangesProcName Property (SyncTableProvisioning)

Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.

[Visual Basic]
Public Property SelectChangesProcName As String
[C#]
public string SelectChangesProcName {get; set;}

Return Type

The name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UnquotedGlobalName Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : UnquotedGlobalName Property

Gets or sets the name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

[Visual Basic]
Public ReadOnly Property UnquotedGlobalName As String
[C#]
public string UnquotedGlobalName {get;}

Return Type

The name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UnquotedLocalName Property

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : UnquotedLocalName Property

Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

[Visual Basic]
Public ReadOnly Property UnquotedLocalName As String
[C#]
public string UnquotedLocalName {get;}

Return Type

The name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%% $$Methods$$

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioning Class Methods

Devart.Data.Synchronization Namespace : SyncTableProvisioning Class

For a list of all members of this type, see SyncTableProvisioning members.

Public Methods

Public Method AddFilterColumn | Adds a column that is used in the FilterClause to filter data rows for synchronization.
Public Method Apply | Applies the provisioning script to a database.
Public Method Script | Generates the SQL script to provision the table.
Public Method ToString | Overridden. Returns a string that represents the SqlSyncTableProvisioning object.

See Also

SyncTableProvisioning Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

name
The name of the filter column to add.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

AddFilterColumn Method

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : AddFilterColumn Method

Adds a column that is used in the FilterClause to filter data rows for synchronization.

[Visual Basic]
Public Sub AddFilterColumn( _
   ByVal name As String _
)
[C#]
public void AddFilterColumn(
   string name
);

Parameters

name
The name of the filter column to add.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Apply Method

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : Apply Method (SyncTableProvisioning)

Applies the provisioning script to a database.

[Visual Basic]
Public Sub Apply()
[C#]
public void Apply();

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Script Method

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : Script Method (SyncTableProvisioning)

Generates the SQL script to provision the table.

[Visual Basic]
Public Function Script() As String
[C#]
public string Script();

Return Type

The SQL script to provision the table.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioning Class | SyncTableProvisioning Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ToString Method

Devart.Data.Synchronization Namespace > SyncTableProvisioning Class : ToString Method (SyncTableProvisioning)

Returns a string that represents the SqlSyncTableProvisioning object.

[Visual Basic]
Overrides Public Function ToString() As String
[C#]
public override string ToString();

Return Type

A string that represents the SqlSyncTableProvisioning object.

See Also

SyncTableProvisioning Class | SyncTableProvisioning Members


%%PageItemTitle%%

SyncTableProvisioningCollection Members | Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioningCollection Class

Devart.Data.Synchronization Namespace : SyncTableProvisioningCollection Class

Represents a collection of SyncTableProvisioning objects that can be indexed by the name of the table to provision.

For a list of all members of this type, see SyncTableProvisioningCollection members.

Inheritance Hierarchy

System.Object
System.Collections.ObjectModel.Collection<SyncTableProvisioning>
Devart.Data.Synchronization.SyncTableProvisioningCollection

Syntax

[Visual Basic]
Public Class SyncTableProvisioningCollection
   Inherits Collection(Of SyncTableProvisioning)
   Implements ICollection<SyncTableProvisioning>, IEnumerable<SyncTableProvisioning>, IList<SyncTableProvisioning>, ICollection, IEnumerable, IList
[C#]
public class SyncTableProvisioningCollection : Collection<SyncTableProvisioning>, ICollection<SyncTableProvisioning>, IEnumerable<SyncTableProvisioning>, IList<SyncTableProvisioning>, ICollection, IEnumerable, IList

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

SyncTableProvisioningCollection Members | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Members$$

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioningCollection Class Members

Devart.Data.Synchronization Namespace : SyncTableProvisioningCollection Class

SyncTableProvisioningCollection overview

Public Constructors

Public Constructor SyncTableProvisioningCollection Constructor Initializes a new instance of the SyncTableProvisioningCollection class.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>) |
Public Property Item | Overloaded. An indexer property that gets the SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)

See Also

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioningCollection Constructor

Devart.Data.Synchronization Namespace > SyncTableProvisioningCollection Class : SyncTableProvisioningCollection Constructor (SyncTableProvisioningCollection)

Initializes a new instance of the SyncTableProvisioningCollection class.

[Visual Basic]
Public Function New()
[C#]
public SyncTableProvisioningCollection();

See Also

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members


%%PageItemTitle%% $$Properties$$

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioningCollection Class Properties

Devart.Data.Synchronization Namespace : SyncTableProvisioningCollection Class

For a list of all members of this type, see SyncTableProvisioningCollection members.

Public Properties

Public Property Count (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>) |
Public Property Item | Overloaded. An indexer property that gets the SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection.

See Also

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item Property

Devart.Data.Synchronization Namespace > SyncTableProvisioningCollection Class : Item Property (SyncTableProvisioningCollection)

An indexer property that gets the SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection.

Overload List

An indexer property that gets the SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection.

[Visual Basic] Overloads Public Item(String) As SyncTableProvisioning

[C#] public SyncTableProvisioning Item(string);

[Visual Basic] Overloads Public Item(Integer) As SyncTableProvisioning

[C#] public SyncTableProvisioning Item(int);

See Also

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members


%%PageItemTitle%%

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members | Overload List

Language

Visual Basic

C#

Show All

globalTableName
The name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table, the SyncTableProvisioning object for which to retrieve.
See Also Languages Devart.Data.Synchronization Send comments on this topic.

Item(String) Property

Devart.Data.Synchronization Namespace > SyncTableProvisioningCollection Class > Item Property : Item(String) Property

An indexer property that gets the SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection.

[Visual Basic]
Overloads Public ReadOnly Property Item( _
   ByVal globalTableName As String _
) As SyncTableProvisioning
[C#]
public SyncTableProvisioning Item(
   string globalTableName
); {get;}

Parameters

globalTableName
The name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table, the SyncTableProvisioning object for which to retrieve.

Return Type

The SyncTableProvisioning object, corresponding to the provisioned table with the specified name, in the collection. Null if there is no SyncTableProvisioning object, corresponding to the table with such a name, in the collection.

See Also

SyncTableProvisioningCollection Class | SyncTableProvisioningCollection Members | Overload List


%%PageItemTitle%% Enumerations

Devart.Data.Synchronization Assembly

See Also Devart.Data.Synchronization Send comments on this topic.

Devart.Data.Synchronization Namespace Enumerations

Enumerations

Enumeration | Description
SyncScopeProvisioningType | Defines the kind of provisioning.

See Also

Devart.Data.Synchronization Assembly


%%PageItemTitle%%

Devart.Data.Synchronization Namespace

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncScopeProvisioningType Enumeration

Devart.Data.Synchronization Namespace : SyncScopeProvisioningType Enumeration

Defines the kind of provisioning.

Members

Member | Description
Scope | Scope provisioning. After a scope is provisioned, the database can be synchronized for the specified scope.
Template | Template provisioning. After a template is provisioned, synchronization scopes can be created based on the template.

Remarks

This class is available only in Professional Edition. It is not available in Standard and Mobile Editions.

See Also

Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Events$$

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Class Events

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncProvider Class

For a list of all members of this type, see PgSqlSyncProvider members.

Public Events

Public Event ApplyChangeFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyMetadataFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchSpooled (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesSelected (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event DbConnectionFailure (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SelectingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncPeerOutdated (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncProgress (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)

See Also

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Methods$$

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Class Methods

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncProvider Class

For a list of all members of this type, see PgSqlSyncProvider members.

Public Methods

Public Method BeginSession (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | This method is called by the SyncOrchestrator class to indicate that a synchronization session has started.
Public Method CleanupMetadata (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method Dispose (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method EndSession (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method GetScopeDescription (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Method GetSyncBatchParameters (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Method ProcessFullEnumerationChangeBatch (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |

See Also

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncProvider Class Properties

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncProvider Class

For a list of all members of this type, see PgSqlSyncProvider members.

Public Properties

Public Property ApplicationTransactionSize (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property BatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ChangeTracking (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property CleanupBatchingDirectory (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Configuration (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property Connection (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Sets the connection to the database.
Public Property DestinationCallbacks (Inherited from Microsoft.Synchronization.KnowledgeSyncProvider) |
Public Property IdFormats (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property MemoryDataCacheSize (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.DbSyncProviderBase) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property SelectNewTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectOverlappingScopesCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SelectTableMaxTimestampsCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncAdapters (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property SyncProviderPosition (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider) |
Public Property UpdateScopeCleanupTimestampCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |
Public Property UpdateScopeInfoCommand (Inherited from Microsoft.Synchronization.Data.DbSyncProvider) |

See Also

PgSqlSyncProvider Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ApplicationTransactionSize Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ApplicationTransactionSize Property (PgSqlSyncProvider)
[Visual Basic]
Public Property ApplicationTransactionSize As Long
[C#]
public long ApplicationTransactionSize {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ApplyChangeFailed Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ApplyChangeFailed Event (PgSqlSyncProvider)
[Visual Basic]
Public Event ApplyChangeFailed() As EventHandler(Of DbApplyChangeFailedEventArgs)
[C#]
public event EventHandler<DbApplyChangeFailedEventArgs> ApplyChangeFailed();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ApplyingChanges Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ApplyingChanges Event (PgSqlSyncProvider)
[Visual Basic]
Public Event ApplyingChanges() As EventHandler(Of DbApplyingChangesEventArgs)
[C#]
public event EventHandler<DbApplyingChangesEventArgs> ApplyingChanges();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ApplyMetadataFailed Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ApplyMetadataFailed Event (PgSqlSyncProvider)
[Visual Basic]
Public Event ApplyMetadataFailed() As EventHandler(Of ApplyMetadataFailedEventArgs)
[C#]
public event EventHandler<ApplyMetadataFailedEventArgs> ApplyMetadataFailed();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

BatchApplied Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : BatchApplied Event (PgSqlSyncProvider)
[Visual Basic]
Public Event BatchApplied() As EventHandler(Of DbBatchAppliedEventArgs)
[C#]
public event EventHandler<DbBatchAppliedEventArgs> BatchApplied();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

BatchingDirectory Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : BatchingDirectory Property (PgSqlSyncProvider)
[Visual Basic]
Public Property BatchingDirectory As String
[C#]
public string BatchingDirectory {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

BatchSpooled Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : BatchSpooled Event (PgSqlSyncProvider)
[Visual Basic]
Public Event BatchSpooled() As EventHandler(Of DbBatchSpooledEventArgs)
[C#]
public event EventHandler<DbBatchSpooledEventArgs> BatchSpooled();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ChangesApplied Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ChangesApplied Event (PgSqlSyncProvider)
[Visual Basic]
Public Event ChangesApplied() As EventHandler(Of DbChangesAppliedEventArgs)
[C#]
public event EventHandler<DbChangesAppliedEventArgs> ChangesApplied();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ChangesSelected Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ChangesSelected Event (PgSqlSyncProvider)
[Visual Basic]
Public Event ChangesSelected() As EventHandler(Of DbChangesSelectedEventArgs)
[C#]
public event EventHandler<DbChangesSelectedEventArgs> ChangesSelected();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ChangeTracking Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ChangeTracking Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property ChangeTracking As ChangeTrackingModel
[C#]
public virtual ChangeTrackingModel ChangeTracking {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

CleanupBatchingDirectory Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : CleanupBatchingDirectory Property (PgSqlSyncProvider)
[Visual Basic]
Public Property CleanupBatchingDirectory As Boolean
[C#]
public bool CleanupBatchingDirectory {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

CleanupMetadata Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : CleanupMetadata Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Function CleanupMetadata() As Boolean
[C#]
public virtual bool CleanupMetadata();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Configuration Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : Configuration Property (PgSqlSyncProvider)
[Visual Basic]
Public ReadOnly Property Configuration As KnowledgeSyncProviderConfiguration
[C#]
public KnowledgeSyncProviderConfiguration Configuration {get;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

DbConnectionFailure Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : DbConnectionFailure Event (PgSqlSyncProvider)
[Visual Basic]
Public Event DbConnectionFailure() As EventHandler(Of DbConnectionFailureEventArgs)
[C#]
public event EventHandler<DbConnectionFailureEventArgs> DbConnectionFailure();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

DestinationCallbacks Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : DestinationCallbacks Property (PgSqlSyncProvider)
[Visual Basic]
Public ReadOnly Property DestinationCallbacks As SyncCallbacks
[C#]
public SyncCallbacks DestinationCallbacks {get;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Dispose Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : Dispose Method (PgSqlSyncProvider)
[Visual Basic]
Public Sub Dispose()
[C#]
public void Dispose();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

syncSessionContext
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

EndSession Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : EndSession Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Sub EndSession( _
   ByVal syncSessionContext As SyncSessionContext _
)
[C#]
public virtual void EndSession(
   SyncSessionContext syncSessionContext
);

Parameters

syncSessionContext

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

batchSize
destinationKnowledge
changeDataRetriever
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetChangeBatch Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : GetChangeBatch Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Function GetChangeBatch( _
   ByVal batchSize As UInteger, _
   ByVal destinationKnowledge As SyncKnowledge, _
   ByRef changeDataRetriever As Object _
) As ChangeBatch
[C#]
public virtual ChangeBatch GetChangeBatch(
   uint batchSize,
   SyncKnowledge destinationKnowledge,
   out object changeDataRetriever
);

Parameters

batchSize
destinationKnowledge
changeDataRetriever

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

batchSize
lowerEnumerationBound
knowledgeForDataRetrieval
changeDataRetriever
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetFullEnumerationChangeBatch Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : GetFullEnumerationChangeBatch Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Function GetFullEnumerationChangeBatch( _
   ByVal batchSize As UInteger, _
   ByVal lowerEnumerationBound As SyncId, _
   ByVal knowledgeForDataRetrieval As SyncKnowledge, _
   ByRef changeDataRetriever As Object _
) As FullEnumerationChangeBatch
[C#]
public virtual FullEnumerationChangeBatch GetFullEnumerationChangeBatch(
   uint batchSize,
   SyncId lowerEnumerationBound,
   SyncKnowledge knowledgeForDataRetrieval,
   out object changeDataRetriever
);

Parameters

batchSize
lowerEnumerationBound
knowledgeForDataRetrieval
changeDataRetriever

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetScopeDescription Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : GetScopeDescription Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Function GetScopeDescription() As DbSyncScopeDescription
[C#]
public virtual DbSyncScopeDescription GetScopeDescription();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

batchSize
knowledge
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

GetSyncBatchParameters Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : GetSyncBatchParameters Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Sub GetSyncBatchParameters( _
   ByRef batchSize As UInteger, _
   ByRef knowledge As SyncKnowledge _
)
[C#]
public virtual void GetSyncBatchParameters(
   out uint batchSize,
   out SyncKnowledge knowledge
);

Parameters

batchSize
knowledge

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

IdFormats Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : IdFormats Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable ReadOnly Property IdFormats As SyncIdFormatGroup
[C#]
public virtual SyncIdFormatGroup IdFormats {get;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

MemoryDataCacheSize Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : MemoryDataCacheSize Property (PgSqlSyncProvider)
[Visual Basic]
Public Property MemoryDataCacheSize As UInteger
[C#]
public uint MemoryDataCacheSize {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ProcessChangeBatch Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ProcessChangeBatch Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Sub ProcessChangeBatch( _
   ByVal resolutionPolicy As ConflictResolutionPolicy, _
   ByVal sourceChanges As ChangeBatch, _
   ByVal changeDataRetriever As Object, _
   ByVal syncCallbacks As SyncCallbacks, _
   ByVal sessionStatistics As SyncSessionStatistics _
)
[C#]
public virtual void ProcessChangeBatch(
   ConflictResolutionPolicy resolutionPolicy,
   ChangeBatch sourceChanges,
   object changeDataRetriever,
   SyncCallbacks syncCallbacks,
   SyncSessionStatistics sessionStatistics
);

Parameters

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics
See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ProcessFullEnumerationChangeBatch Method

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ProcessFullEnumerationChangeBatch Method (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Sub ProcessFullEnumerationChangeBatch( _
   ByVal resolutionPolicy As ConflictResolutionPolicy, _
   ByVal sourceChanges As FullEnumerationChangeBatch, _
   ByVal changeDataRetriever As Object, _
   ByVal syncCallbacks As SyncCallbacks, _
   ByVal sessionStatistics As SyncSessionStatistics _
)
[C#]
public virtual void ProcessFullEnumerationChangeBatch(
   ConflictResolutionPolicy resolutionPolicy,
   FullEnumerationChangeBatch sourceChanges,
   object changeDataRetriever,
   SyncCallbacks syncCallbacks,
   SyncSessionStatistics sessionStatistics
);

Parameters

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

ScopeName Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : ScopeName Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property ScopeName As String
[C#]
public virtual string ScopeName {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SelectingChanges Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SelectingChanges Event (PgSqlSyncProvider)
[Visual Basic]
Public Event SelectingChanges() As EventHandler(Of DbSelectingChangesEventArgs)
[C#]
public event EventHandler<DbSelectingChangesEventArgs> SelectingChanges();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SelectNewTimestampCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SelectNewTimestampCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property SelectNewTimestampCommand As IDbCommand
[C#]
public virtual IDbCommand SelectNewTimestampCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SelectOverlappingScopesCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SelectOverlappingScopesCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property SelectOverlappingScopesCommand As IDbCommand
[C#]
public virtual IDbCommand SelectOverlappingScopesCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SelectScopeInfoCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SelectScopeInfoCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property SelectScopeInfoCommand As IDbCommand
[C#]
public virtual IDbCommand SelectScopeInfoCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SelectTableMaxTimestampsCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SelectTableMaxTimestampsCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property SelectTableMaxTimestampsCommand As IDbCommand
[C#]
public virtual IDbCommand SelectTableMaxTimestampsCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SyncAdapters Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SyncAdapters Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable ReadOnly Property SyncAdapters As DbSyncAdapterCollection
[C#]
public virtual DbSyncAdapterCollection SyncAdapters {get;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SyncPeerOutdated Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SyncPeerOutdated Event (PgSqlSyncProvider)
[Visual Basic]
Public Event SyncPeerOutdated() As EventHandler(Of DbOutdatedEventArgs)
[C#]
public event EventHandler<DbOutdatedEventArgs> SyncPeerOutdated();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SyncProgress Event

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SyncProgress Event (PgSqlSyncProvider)
[Visual Basic]
Public Event SyncProgress() As EventHandler(Of DbSyncProgressEventArgs)
[C#]
public event EventHandler<DbSyncProgressEventArgs> SyncProgress();

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

SyncProviderPosition Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : SyncProviderPosition Property (PgSqlSyncProvider)
[Visual Basic]
Public Property SyncProviderPosition As SyncProviderPosition
[C#]
public SyncProviderPosition SyncProviderPosition {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

UpdateScopeCleanupTimestampCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : UpdateScopeCleanupTimestampCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property UpdateScopeCleanupTimestampCommand As IDbCommand
[C#]
public virtual IDbCommand UpdateScopeCleanupTimestampCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%%

PgSqlSyncProvider Class | PgSqlSyncProvider Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql.Synchronization Send comments on this topic.

UpdateScopeInfoCommand Property

Devart.Data.PostgreSql.Synchronization Namespace > PgSqlSyncProvider Class : UpdateScopeInfoCommand Property (PgSqlSyncProvider)
[Visual Basic]
Public Overridable Property UpdateScopeInfoCommand As IDbCommand
[C#]
public virtual IDbCommand UpdateScopeInfoCommand {get; set;}

See Also

PgSqlSyncProvider Class | PgSqlSyncProvider Members


%%PageItemTitle%% $$Methods$$

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeDeprovisioning Class Methods

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeDeprovisioning Class

For a list of all members of this type, see PgSqlSyncScopeDeprovisioning members.

Public Methods

Public Method DeprovisionScope (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Deprovisions the specified scope by removing all associated synchronization elements from the database.
Public Method DeprovisionStore (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Removes all Sync Framework metadata tables, triggers, and stored procedures from the database.
Public Method DeprovisionTemplate (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.
Public Method ScriptDeprovisionScope (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to deprovision a scope.
Public Method ScriptDeprovisionStore (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to remove all Sync Framework metadata, triggers, and stored procedures from a database.
Public Method ScriptDeprovisionTemplate (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Generates a script that can be used to deprovision a template and all scopes that were created from that template.

See Also

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeDeprovisioning Class Properties

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeDeprovisioning Class

For a list of all members of this type, see PgSqlSyncScopeDeprovisioning members.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the wait time, in seconds, for a deprovisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncScopeDeprovisioning) | Gets or sets the schema containing Sync Framework metadata objects.

See Also

PgSqlSyncScopeDeprovisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Methods$$

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Class Methods

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeProvisioning Class

For a list of all members of this type, see PgSqlSyncScopeProvisioning members.

Public Methods

Public Method Apply (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Applies the provisioning script to a database by using the connection that was specified in the constructor.
Public Method PopulateFromScopeDescription (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Sets the scope description from which the database should be provisioned.
Public Method PopulateFromTemplate (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Sets the template-based scope description from which the database should be provisioned.
Public Method ScopeExists (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Indicates whether the specified scope exists in the database, the connection, specified in the constructor.
Public Method Script (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Generates the SQL script to provision the database for a particular scope.
Public Method SetCreateProceduresDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata. The default value is CreateOrUseExisting.
Public Method SetCreateProceduresForAdditionalScopeDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create additional stored procedures for a scope that contains tables that have already been provisioned for other scopes. For example, this scope adds a filter column to a table that has already been provisioned without the filter column. Set this option to Create to ensure that an additional change enumeration procedure is created that can handle the filter column. The default setting is Skip.
Public Method SetCreateTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create tables that store user data to synchronize. The default value is CreateOrUseExisting.
Public Method SetCreateTrackingTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create tables that store change-tracking metadata. The default value is CreateOrUseExisting.
Public Method SetCreateTriggersDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to create the triggers (on synchronized tables) that update tracking tables. The default value is CreateOrUseExisting.
Public Method SetPopulateTrackingTableDefault (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Specifies whether to insert metadata into change-tracking tables for rows that already exist in the provisioned tables. The default value is CreateOrUseExisting.
Public Method TemplateExists (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Indicates whether the specified template exists in the database.

See Also

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncScopeProvisioning Class Properties

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncScopeProvisioning Class

For a list of all members of this type, see PgSqlSyncScopeProvisioning members.

Public Properties

Public Property CommandTimeout (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the wait time, in seconds, for a provisioning command to execute before the command is stopped and an error is generated.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property ScopeName (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets the name of the scope.
Public Property Tables (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets a collection of Devart.Data.Synchronization.SyncTableProvisioning objects that represent the provisioning of database tables.
Public Property UserComment (Inherited from Devart.Data.Synchronization.SyncScopeProvisioning) | Gets or sets the user-specified comment about the scope.

See Also

PgSqlSyncScopeProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% $$Properties$$

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

PgSqlSyncTableProvisioning Class Properties

Devart.Data.PostgreSql.Synchronization Namespace : PgSqlSyncTableProvisioning Class

For a list of all members of this type, see PgSqlSyncTableProvisioning members.

Public Properties

Public Property CreateProcedures (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create a set of stored procedures that insert, update, and delete data and synchronization metadata.
Public Property CreateProceduresForAdditionalScope (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create sets of stored procedures that insert, update, and delete data and synchronization metadata for any additional scopes.
Public Property CreateTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the table that is synchronized.
Public Property CreateTrackingTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the table that store change-tracking metadata for the synchronized table.
Public Property CreateTriggers (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Determines whether to create the triggers on the provisioned table, that update tracking the table.
Public Property FilterClause (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the filter condition (a WHERE clause without the WHERE keyword) to filter table data to be synchronized.
Public Property FilterColumns (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets the list of columns that are used for filtering data.
Public Property FilterParameters (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets the collection of parameters, used for filtering and specified in the Devart.Data.Synchronization.SyncProviderAdapterConfiguration.FilterClause property.
Public Property GlobalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property LocalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.
Public Property ObjectPrefix (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the optional preffix for names of Sync Framework metadata objects.
Public Property ObjectSchema (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the schema containing Sync Framework metadata objects.
Public Property PopulateTrackingTable (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Specifies whether to insert metadata into the change-tracking table for rows that already exist in the provisioned table. The default value is CreateOrUseExisting.
Public Property SelectChangesProcName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name of the stored procedure that Sync Framework uses to select changes from a synchronized table during synchronization.
Public Property UnquotedGlobalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, not including database-specific delimiters, that other nodes in a synchronization topology use to identify a table.
Public Property UnquotedLocalName (Inherited from Devart.Data.Synchronization.SyncTableProvisioning) | Gets or sets the name, not including database-specific delimiters, that the local node in a synchronization topology uses to identify a table.

See Also

PgSqlSyncTableProvisioning Class | Devart.Data.PostgreSql.Synchronization Namespace


%%PageItemTitle%% Delegates

Devart.Data.PostgreSql.Synchronization Assembly

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Devart.Data.PostgreSql.Synchronization Namespace Delegates

See Also

Devart.Data.PostgreSql.Synchronization Assembly


%%PageItemTitle%% Enumerations

Devart.Data.PostgreSql.Synchronization Assembly

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Devart.Data.PostgreSql.Synchronization Namespace Enumerations

See Also

Devart.Data.PostgreSql.Synchronization Assembly


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data.PostgreSql.Synchronization Assembly

See Also Devart.Data.PostgreSql.Synchronization Send comments on this topic.

Devart.Data.PostgreSql.Synchronization Namespace Inheritance Hierarchy

System.Object
Devart.Data.PostgreSql.Synchronization.PgSqlSyncDescriptionBuilder
Devart.Data.Synchronization.SyncScopeDeprovisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeDeprovisioning
Devart.Data.Synchronization.SyncScopeProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncScopeProvisioning
Devart.Data.Synchronization.SyncTableProvisioning
Devart.Data.PostgreSql.Synchronization.PgSqlSyncTableProvisioning
Microsoft.Synchronization.SyncProvider
Microsoft.Synchronization.KnowledgeSyncProvider
Microsoft.Synchronization.Data.RelationalSyncProvider
Microsoft.Synchronization.Data.DbSyncProvider
Devart.Data.Synchronization.DbSyncProviderBase
Devart.Data.PostgreSql.Synchronization.PgSqlSyncProvider

See Also

Devart.Data.PostgreSql.Synchronization Namespace | Devart.Data.PostgreSql.Synchronization Assembly


%%PageItemTitle%% Delegates

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Common Namespace (Devart.Data.PostgreSql) Delegates

See Also

Devart.Data.PostgreSql Assembly


%%PageItemTitle%% Enumerations

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Common Namespace (Devart.Data.PostgreSql) Enumerations

See Also

Devart.Data.PostgreSql Assembly


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Common Namespace (Devart.Data.PostgreSql) Inheritance Hierarchy

System.Object
Devart.Common.SelectStatement
Devart.Common.SelectStatementNode
Devart.Common.SelectColumn
Devart.Common.SelectTable
System.Collections.CollectionBase
Devart.Common.SelectColumnCollection
Devart.Common.SelectTableCollection
System.EventArgs
Devart.Common.DbStatementExecuteEventArgs
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbConnection
Devart.Common.DbConnectionBase

See Also

Devart.Common Namespace | Devart.Data.PostgreSql Assembly


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

left
The first PgSqlArray to compare.
right
The second PgSqlArray to compare.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Equality Operator (PgSqlArray)

Determines whether two PgSqlArray objects are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlArray, _
   ByVal right As PgSqlArray _
) As Boolean
[C#]
public bool operator ==(
   PgSqlArray left,
   PgSqlArray right
);

Operands

left
The first PgSqlArray to compare.
right
The second PgSqlArray to compare.

Return Type

true if the two specified objects are equal; otherwise, false.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%%

PgSqlArray Structure | PgSqlArray Members

Language

Visual Basic

C#

Show All

left
The first PgSqlArray to compare.
right
The second PgSqlArray to compare.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlArray Structure : Inequality Operator (PgSqlArray)

Determines whether two PgSqlArray objects are different.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlArray, _
   ByVal right As PgSqlArray _
) As Boolean
[C#]
public bool operator !=(
   PgSqlArray left,
   PgSqlArray right
);

Operands

left
The first PgSqlArray to compare.
right
The second PgSqlArray to compare.

Return Type

true if the two specified objects are different; otherwise, false.

See Also

PgSqlArray Structure | PgSqlArray Members


%%PageItemTitle%% $$Methods$$

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlAttributeCollection Class Methods

Devart.Data.PostgreSql Namespace : PgSqlAttributeCollection Class

For a list of all members of this type, see PgSqlAttributeCollection members.

Public Methods

Public Method Clear (Inherited from System.Collections.CollectionBase) | Removes all objects from the CollectionBase instance. This method cannot be overridden.
Public Method GetEnumerator (Inherited from System.Collections.CollectionBase) | Returns an enumerator that iterates through the CollectionBase instance.
Public Method RemoveAt (Inherited from System.Collections.CollectionBase) | Removes the element at the specified index of the CollectionBase instance. This method is not overridable.

See Also

PgSqlAttributeCollection Class | Devart.Data.PostgreSql Namespace | PgSqlAttribute Class | PgSqlRowType Class


%%PageItemTitle%% $$Properties$$

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlBigIntRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlBigIntRange Class

For a list of all members of this type, see PgSqlBigIntRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int64>) | Gets or sets the upper bound of the range.

See Also

PgSqlBigIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

left
Left PgSqlBox operand.
right
Right PgSqlBox operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : Equality Operator (PgSqlBox)

Determines whether two PgSqlBox structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlBox, _
   ByVal right As PgSqlBox _
) As Boolean
[C#]
public bool operator ==(
   PgSqlBox left,
   PgSqlBox right
);

Operands

left
Left PgSqlBox operand.
right
Right PgSqlBox operand.

Return Type

true if two PgSqlBox values are equal; otherwise, false.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlBox Structure | PgSqlBox Members

Language

Visual Basic

C#

Show All

left
Left PgSqlBox operand.
right
Right PgSqlBox operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlBox Structure : Inequality Operator (PgSqlBox)

Compares two PgSqlBox structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlBox, _
   ByVal right As PgSqlBox _
) As Boolean
[C#]
public bool operator !=(
   PgSqlBox left,
   PgSqlBox right
);

Operands

left
Left PgSqlBox operand.
right
Right PgSqlBox operand.

Return Type

true if two PgSqlBox values are not equal; otherwise, false.

See Also

PgSqlBox Structure | PgSqlBox Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

left
Left PgSqlCircle operand.
right
Right PgSqlCircle operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Equality Operator (PgSqlCircle)

Determines whether two PgSqlCircle structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlCircle, _
   ByVal right As PgSqlCircle _
) As Boolean
[C#]
public bool operator ==(
   PgSqlCircle left,
   PgSqlCircle right
);

Operands

left
Left PgSqlCircle operand.
right
Right PgSqlCircle operand.

Return Type

true if two PgSqlCircle values are equal; otherwise, false.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%%

PgSqlCircle Structure | PgSqlCircle Members

Language

Visual Basic

C#

Show All

left
Left PgSqlCircle operand.
right
Right PgSqlCircle operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlCircle Structure : Inequality Operator (PgSqlCircle)

Compares two PgSqlCircle structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlCircle, _
   ByVal right As PgSqlCircle _
) As Boolean
[C#]
public bool operator !=(
   PgSqlCircle left,
   PgSqlCircle right
);

Operands

left
Left PgSqlCircle operand.
right
Right PgSqlCircle operand.

Return Type

true if two PgSqlCircle values are not equal; otherwise, false.

See Also

PgSqlCircle Structure | PgSqlCircle Members


%%PageItemTitle%% $$Events$$

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommand Class Events

Devart.Data.PostgreSql Namespace : PgSqlCommand Class

For a list of all members of this type, see PgSqlCommand members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlCommand Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%PageItemTitle%% $$Events$$

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlCommandBuilder Class Events

Devart.Data.PostgreSql Namespace : PgSqlCommandBuilder Class

For a list of all members of this type, see PgSqlCommandBuilder members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlCommandBuilder Class | Devart.Data.PostgreSql Namespace | PgSqlDataAdapter Class | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Methods$$

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataAdapter Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDataAdapter Class

For a list of all members of this type, see PgSqlDataAdapter members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Fill (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Adds or refreshes rows in the DataSet.
Public Method FillPage (Inherited from Devart.Common.DbDataAdapter) | Fills associated DataSet with specified range of rows.
Public Method FillSchema (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Configures the schema of the specified DataTable based on the specified SchemaType.
Public Method GetFillParameters (Inherited from System.Data.Common.DbDataAdapter) | Gets the parameters set by the user when executing an SQL SELECT statement.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.
Public Method Update (Inherited from System.Data.Common.DbDataAdapter) | Overloaded. Calls the respective INSERT, UPDATE, or DELETE statements for each inserted, updated, or deleted row in the specified DataSet.

See Also

PgSqlDataAdapter Class | Devart.Data.PostgreSql Namespace | PgSqlConnection Class | PgSqlCommand Class


%%PageItemTitle%% $$Events$$

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSet Class Events

Devart.Data.PostgreSql Namespace : PgSqlDataSet Class

For a list of all members of this type, see PgSqlDataSet members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.MarshalByValueComponent) | Adds an event handler to listen to the Disposed event on the component.
Public Event Initialized (Inherited from System.Data.DataSet) | Occurs after the DataSet is initialized.
Public Event MergeFailed (Inherited from System.Data.DataSet) | Occurs when a target and source DataRow have the same primary key value, and EnforceConstraints is set to true.

See Also

PgSqlDataSet Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Methods$$

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDataSourceEnumerator Class Methods

Devart.Data.PostgreSql Namespace : PgSqlDataSourceEnumerator Class

For a list of all members of this type, see PgSqlDataSourceEnumerator members.

Public Methods

Public Method GetDataSources (Inherited from Devart.Common.DbDataSourceEnumerator) Retrieves a DataTable containing information about all visible instances of the server.

See Also

PgSqlDataSourceEnumerator Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDateRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlDateRange Class

For a list of all members of this type, see PgSqlDateRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

See Also

PgSqlDateRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Events$$

PgSqlDump Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlDump Class Events

Devart.Data.PostgreSql Namespace : PgSqlDump Class

For a list of all members of this type, see PgSqlDump members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

PgSqlDump Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

left
First PgSqlInet.
right
Second PgSqlInet.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Equality Operator (PgSqlInet)

Determines whether two PgSqlInet values are equal.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlInet, _
   ByVal right As PgSqlInet _
) As Boolean
[C#]
public bool operator ==(
   PgSqlInet left,
   PgSqlInet right
);

Operands

left
First PgSqlInet.
right
Second PgSqlInet.

Return Type

true if two PgSqlInet values are equal; otherwise, false.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInet Structure | PgSqlInet Members

Language

Visual Basic

C#

Show All

left
Left PgSqlInet operand.
right
Right PgSqlInet operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlInet Structure : Inequality Operator (PgSqlInet)

Compares two PgSqlInet structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlInet, _
   ByVal right As PgSqlInet _
) As Boolean
[C#]
public bool operator !=(
   PgSqlInet left,
   PgSqlInet right
);

Operands

left
Left PgSqlInet operand.
right
Right PgSqlInet operand.

Return Type

true if two PgSqlInet values are not equal; otherwise, false.

See Also

PgSqlInet Structure | PgSqlInet Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Addition Operator (PgSqlInterval)

Adds two PgSqlInterval values.

[Visual Basic]
Public Operator +( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As PgSqlInterval
[C#]
public PgSqlInterval operator +(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Operands

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
The specified PgSqlInterval.
divisor
A divisor.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Division Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Division Operator

Divides an PgSqlInterval value by a number.

[Visual Basic]
Public Operator /( _
   ByVal value1 As PgSqlInterval, _
   ByVal divisor As Double _
) As PgSqlInterval
[C#]
public PgSqlInterval operator /(
   PgSqlInterval value1,
   double divisor
);

Operands

value1
The specified PgSqlInterval.
divisor
A divisor.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Equality Operator (PgSqlInterval)

Determines whether two PgSqlInterval values are equal.

[Visual Basic]
Public Operator =( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As Boolean
[C#]
public bool operator ==(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Operands

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

true if two PgSqlInterval values are equal; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value
An PgSqlInterval structure to convert to TimeSpan.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Explicit Type Conversion Operator (PgSqlInterval)

Converts an PgSqlInterval structure to a TimeSpan structure.

[Visual Basic]
Public Operator Narrowing CType( _
   ByVal value As PgSqlInterval _
) As TimeSpan
[C#]
public TimeSpan operator explicit(
   PgSqlInterval value
);

Operands

value
An PgSqlInterval structure to convert to TimeSpan.

Return Type

A TimeSpan structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value
A TimeSpan structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Implicit Type Conversion Operator (PgSqlInterval)

Converts a TimeSpan structure to an PgSqlInterval structure.

[Visual Basic]
Public Operator Widening CType( _
   ByVal value As TimeSpan _
) As PgSqlInterval
[C#]
public PgSqlInterval operator implicit(
   TimeSpan value
);

Operands

value
A TimeSpan structure.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Inequality Operator (PgSqlInterval)

Determines whether two PgSqlInterval values are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As Boolean
[C#]
public bool operator !=(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Operands

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

true if two PgSqlInterval values are not equal; otherwise, false.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
The specified PgSqlInterval.
multiplier
A multiplier.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Multiplication Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Multiplication Operator

Multiplies an PgSqlInterval value by a number.

[Visual Basic]
Public Operator *( _
   ByVal value1 As PgSqlInterval, _
   ByVal multiplier As Double _
) As PgSqlInterval
[C#]
public PgSqlInterval operator *(
   PgSqlInterval value1,
   double multiplier
);

Operands

value1
The specified PgSqlInterval.
multiplier
A multiplier.

Return Type

A new PgSqlInterval instance.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%%

PgSqlInterval Structure | PgSqlInterval Members

Language

Visual Basic

C#

Show All

value1
First PgSqlInterval.
value2
Second PgSqlInterval.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction Operator

Devart.Data.PostgreSql Namespace > PgSqlInterval Structure : Subtraction Operator (PgSqlInterval)

Subtracts one PgSqlInterval structure from another.

[Visual Basic]
Public Operator -( _
   ByVal value1 As PgSqlInterval, _
   ByVal value2 As PgSqlInterval _
) As PgSqlInterval
[C#]
public PgSqlInterval operator -(
   PgSqlInterval value1,
   PgSqlInterval value2
);

Operands

value1
First PgSqlInterval.
value2
Second PgSqlInterval.

Return Type

A PgSqlInterval structure.

See Also

PgSqlInterval Structure | PgSqlInterval Members


%%PageItemTitle%% $$Properties$$

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlIntRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlIntRange Class

For a list of all members of this type, see PgSqlIntRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Int32>) | Gets or sets the upper bound of the range.

See Also

PgSqlIntRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Methods$$

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlLoaderColumn Class Methods

Devart.Data.PostgreSql Namespace : PgSqlLoaderColumn Class

For a list of all members of this type, see PgSqlLoaderColumn members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from Devart.Common.DbLoaderColumn) | Returns the name of the Devart.Common.DbLoaderColumn.

See Also

PgSqlLoaderColumn Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class : Item Property (PgSqlLoader)

Sets the value of the column with the specified name for PgSqlLoaderColumnCollection.

Overload List

[Visual Basic] Overloads Public Item(String) As Object

[C#] public object Item(string);

[Visual Basic] Overloads Public Item(Integer) As Object

[C#] public object Item(int);

See Also

PgSqlLoader Class | PgSqlLoader Members


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List

Language

Visual Basic

C#

Show All

columnIndex
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(Int32,Object) Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > Item Property : Item(Int32,Object) Property
[Visual Basic]
Overloads Public WriteOnly Property Item( _
   ByVal columnIndex As Integer _
) As Object
[C#]
public object Item(
   int columnIndex
); {set;}

Parameters

columnIndex

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List


%%PageItemTitle%%

PgSqlLoader Class | PgSqlLoader Members | Overload List

Language

Visual Basic

C#

Show All

columnName
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Item(String,Object) Property

Devart.Data.PostgreSql Namespace > PgSqlLoader Class > Item Property : Item(String,Object) Property
[Visual Basic]
Overloads Public WriteOnly Property Item( _
   ByVal columnName As String _
) As Object
[C#]
public object Item(
   string columnName
); {set;}

Parameters

columnName

See Also

PgSqlLoader Class | PgSqlLoader Members | Overload List


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

left
Left PgSqlLSeg operand.
right
Right PgSqlLSeg operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : Equality Operator (PgSqlLSeg)

Determines whether two PgSqlLSeg structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlLSeg, _
   ByVal right As PgSqlLSeg _
) As Boolean
[C#]
public bool operator ==(
   PgSqlLSeg left,
   PgSqlLSeg right
);

Operands

left
Left PgSqlLSeg operand.
right
Right PgSqlLSeg operand.

Return Type

true if two PgSqlLSeg values are equal; otherwise, false.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlLSeg Structure | PgSqlLSeg Members

Language

Visual Basic

C#

Show All

left
Left PgSqlLSeg operand.
right
Right PgSqlLSeg operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlLSeg Structure : Inequality Operator (PgSqlLSeg)

Compares two PgSqlLSeg structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlLSeg, _
   ByVal right As PgSqlLSeg _
) As Boolean
[C#]
public bool operator !=(
   PgSqlLSeg left,
   PgSqlLSeg right
);

Operands

left
Left PgSqlLSeg operand.
right
Right PgSqlLSeg operand.

Return Type

true if two PgSqlLSeg values are not equal; otherwise, false.

See Also

PgSqlLSeg Structure | PgSqlLSeg Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

left
First PgSqlMacAddr.
right
Second PgSqlMacAddr.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Equality Operator (PgSqlMacAddr)

Determines whether two PgSqlMacAddr values are equal.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlMacAddr, _
   ByVal right As PgSqlMacAddr _
) As Boolean
[C#]
public bool operator ==(
   PgSqlMacAddr left,
   PgSqlMacAddr right
);

Operands

left
First PgSqlMacAddr.
right
Second PgSqlMacAddr.

Return Type

true if two PgSqlMacAddr values are equal; otherwise, false.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%%

PgSqlMacAddr Structure | PgSqlMacAddr Members

Language

Visual Basic

C#

Show All

left
Left PgSqlMacAddr operand.
right
Right PgSqlMacAddr operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlMacAddr Structure : Inequality Operator (PgSqlMacAddr)

Compares two PgSqlMacAddr structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlMacAddr, _
   ByVal right As PgSqlMacAddr _
) As Boolean
[C#]
public bool operator !=(
   PgSqlMacAddr left,
   PgSqlMacAddr right
);

Operands

left
Left PgSqlMacAddr operand.
right
Right PgSqlMacAddr operand.

Return Type

true if two PgSqlMacAddr values are not equal; otherwise, false.

See Also

PgSqlMacAddr Structure | PgSqlMacAddr Members


%%PageItemTitle%% $$Events$$

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Class Events

Devart.Data.PostgreSql Namespace : PgSqlMonitor Class

For a list of all members of this type, see PgSqlMonitor members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event TraceEvent (Inherited from Devart.Common.DbMonitor) | Occurs when Devart.Common.DbMonitor object signals about some database activity.

See Also

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Methods$$

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlMonitor Class Methods

Devart.Data.PostgreSql Namespace : PgSqlMonitor Class

For a list of all members of this type, see PgSqlMonitor members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlMonitor Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlNumericRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlNumericRange Class

For a list of all members of this type, see PgSqlNumericRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<Decimal>) | Gets or sets the upper bound of the range.

See Also

PgSqlNumericRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPath operand.
right
Right PgSqlPath operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Equality Operator (PgSqlPath)

Determines whether two PgSqlPath structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlPath, _
   ByVal right As PgSqlPath _
) As Boolean
[C#]
public bool operator ==(
   PgSqlPath left,
   PgSqlPath right
);

Operands

left
Left PgSqlPath operand.
right
Right PgSqlPath operand.

Return Type

true if two PgSqlPath values are equal; otherwise, false.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPath Structure | PgSqlPath Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPath operand.
right
Right PgSqlPath operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlPath Structure : Inequality Operator (PgSqlPath)

Compares two PgSqlPath structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlPath, _
   ByVal right As PgSqlPath _
) As Boolean
[C#]
public bool operator !=(
   PgSqlPath left,
   PgSqlPath right
);

Operands

left
Left PgSqlPath operand.
right
Right PgSqlPath operand.

Return Type

true if two PgSqlPath values are not equal; otherwise, false.

See Also

PgSqlPath Structure | PgSqlPath Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPoint operand.
right
Right PgSqlPoint operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Equality Operator (PgSqlPoint)

Determines whether two PgSqlPoint structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlPoint, _
   ByVal right As PgSqlPoint _
) As Boolean
[C#]
public bool operator ==(
   PgSqlPoint left,
   PgSqlPoint right
);

Operands

left
Left PgSqlPoint operand.
right
Right PgSqlPoint operand.

Return Type

true if two PgSqlPoint values are equal; otherwise, false.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPoint Structure | PgSqlPoint Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPoint operand.
right
Right PgSqlPoint operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlPoint Structure : Inequality Operator (PgSqlPoint)

Compares two PgSqlPoint structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlPoint, _
   ByVal right As PgSqlPoint _
) As Boolean
[C#]
public bool operator !=(
   PgSqlPoint left,
   PgSqlPoint right
);

Operands

left
Left PgSqlPoint operand.
right
Right PgSqlPoint operand.

Return Type

true if two PgSqlPoint values are not equal; otherwise, false.

See Also

PgSqlPoint Structure | PgSqlPoint Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPolygon operand.
right
Right PgSqlPolygon operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Equality Operator (PgSqlPolygon)

Determines whether two PgSqlPolygon structures are the same.

[Visual Basic]
Public Operator =( _
   ByVal left As PgSqlPolygon, _
   ByVal right As PgSqlPolygon _
) As Boolean
[C#]
public bool operator ==(
   PgSqlPolygon left,
   PgSqlPolygon right
);

Operands

left
Left PgSqlPolygon operand.
right
Right PgSqlPolygon operand.

Return Type

true if two PgSqlPolygon values are equal; otherwise, false.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

PgSqlPolygon Structure | PgSqlPolygon Members

Language

Visual Basic

C#

Show All

left
Left PgSqlPolygon operand.
right
Right PgSqlPolygon operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlPolygon Structure : Inequality Operator (PgSqlPolygon)

Compares two PgSqlPolygon structures to determine if they are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal left As PgSqlPolygon, _
   ByVal right As PgSqlPolygon _
) As Boolean
[C#]
public bool operator !=(
   PgSqlPolygon left,
   PgSqlPolygon right
);

Operands

left
Left PgSqlPolygon operand.
right
Right PgSqlPolygon operand.

Return Type

true if two PgSqlPolygon values are not equal; otherwise, false.

See Also

PgSqlPolygon Structure | PgSqlPolygon Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

value1
Left Generic PgSqlRangeType operand.
value2
Right Generic PgSqlRangeType operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : Equality Operator (Generic PgSqlRangeType)

Determines whether two Generic PgSqlRangeType objects are the same.

[Visual Basic]
Public Operator =( _
   ByVal value1 As PgSqlRangeType(Of T), _
   ByVal value2 As PgSqlRangeType(Of T) _
) As Boolean
[C#]
public bool operator ==(
   PgSqlRangeType<T> value1,
   PgSqlRangeType<T> value2
);

Operands

value1
Left Generic PgSqlRangeType operand.
value2
Right Generic PgSqlRangeType operand.

Return Type

true if two Generic PgSqlRangeType values are equal; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%%

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members

Language

Visual Basic

C#

Show All

value1
Left Generic PgSqlRangeType operand.
value2
Right Generic PgSqlRangeType operand.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > Generic PgSqlRangeType Class : Inequality Operator (Generic PgSqlRangeType)

Determines whether two Generic PgSqlRangeType objects are different.

[Visual Basic]
Public Operator <>( _
   ByVal value1 As PgSqlRangeType(Of T), _
   ByVal value2 As PgSqlRangeType(Of T) _
) As Boolean
[C#]
public bool operator !=(
   PgSqlRangeType<T> value1,
   PgSqlRangeType<T> value2
);

Operands

value1
Left Generic PgSqlRangeType operand.
value2
Right Generic PgSqlRangeType operand.

Return Type

true if two Generic PgSqlRangeType values are different; otherwise, false.

See Also

Generic PgSqlRangeType Class | Generic PgSqlRangeType Members


%%PageItemTitle%% $$Methods$$

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlRowUpdatedEventArgs Class Methods

Devart.Data.PostgreSql Namespace : PgSqlRowUpdatedEventArgs Class

For a list of all members of this type, see PgSqlRowUpdatedEventArgs members.

Public Methods

Public Method CopyToRows (Inherited from System.Data.Common.RowUpdatedEventArgs) Overloaded. Copies references to the modified rows into the provided array.

See Also

PgSqlRowUpdatedEventArgs Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Methods$$

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlScript Class Methods

Devart.Data.PostgreSql Namespace : PgSqlScript Class

For a list of all members of this type, see PgSqlScript members.

Public Methods

Public Method Cancel (Inherited from Devart.Common.DbScript) | Tries to cancel the execution of a Devart.Common.DbScript descendant.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method Execute (Inherited from Devart.Common.DbScript) | Executes the script specified in Devart.Common.DbScript.ScriptText property.
Public Method ExecuteNext (Inherited from Devart.Common.DbScript) | Executes the next statement from the script.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Open (Inherited from Devart.Common.DbScript) | Overloaded. Prepares a stream to be executed as SQL script.
Public Method Reset (Inherited from Devart.Common.DbScript) | Positions Devart.Common.DbScript.ExecuteNext method on the first statement in the script.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

PgSqlScript Class | Devart.Data.PostgreSql Namespace | PgSqlCommand Class


%%PageItemTitle%% $$Properties$$

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlTimeStampRange Class

For a list of all members of this type, see PgSqlTimeStampRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

See Also

PgSqlTimeStampRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%% $$Properties$$

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTimeStampTZRange Class Properties

Devart.Data.PostgreSql Namespace : PgSqlTimeStampTZRange Class

For a list of all members of this type, see PgSqlTimeStampTZRange members.

Public Properties

Public Property IsEmpty (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing an empty range.
Public Property IsLowerBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is inclusive.
Public Property IsLowerBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the lower bound of the current range is infinity (the current range includes any value less than the upper bound).
Public Property IsNull (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets a value indicating whether the Generic PgSqlRangeType is an object, representing a NULL value.
Public Property IsUpperBoundInclusive (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is inclusive.
Public Property IsUpperBoundInfinity (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Indicates whether the upper bound of the current range is infinity (the current range includes any value greater than the lower bound).
Public Property LowerBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the lower bound of the range.
Public Property UpperBound (Inherited from Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>) | Gets or sets the upper bound of the range.

See Also

PgSqlTimeStampTZRange Class | Devart.Data.PostgreSql Namespace


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Addition Operator (PgSqlTimeStamp)

Adds the specified object to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.

Overload List

Adds the specified PgSqlInterval to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Operator +(PgSqlTimeStamp,PgSqlInterval) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp operator +(PgSqlTimeStamp,PgSqlInterval);

Adds the specified TimeSpan to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Operator +(PgSqlTimeStamp,TimeSpan) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp operator +(PgSqlTimeStamp,TimeSpan);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d
A PgSqlTimeStamp structure.
t
A PgSqlInterval structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition(PgSqlTimeStamp,PgSqlInterval) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Addition Operator : Addition(PgSqlTimeStamp,PgSqlInterval) Operator

Adds the specified PgSqlInterval to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Operator +( _
   ByVal d As PgSqlTimeStamp, _
   ByVal t As PgSqlInterval _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp operator +(
   PgSqlTimeStamp d,
   PgSqlInterval t
);

Operands

d
A PgSqlTimeStamp structure.
t
A PgSqlInterval structure.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d
A PgSqlTimeStamp structure.
t
A TimeSpan value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition(PgSqlTimeStamp,TimeSpan) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Addition Operator : Addition(PgSqlTimeStamp,TimeSpan) Operator

Adds the specified TimeSpan to the PgSqlTimeStamp and returns a new PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Operator +( _
   ByVal d As PgSqlTimeStamp, _
   ByVal t As TimeSpan _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp operator +(
   PgSqlTimeStamp d,
   TimeSpan t
);

Operands

d
A PgSqlTimeStamp structure.
t
A TimeSpan value.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Equality Operator (PgSqlTimeStamp)

Determines whether two PgSqlTimeStamp values are equal.

[Visual Basic]
Public Operator =( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator ==(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if two PgSqlTimeStamp values are equal; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
A PgSqlTimeStamp structure to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Explicit Type Conversion Operator (PgSqlTimeStamp)

Converts a PgSqlTimeStamp structure to the DateTime object.

[Visual Basic]
Public Operator Narrowing CType( _
   ByVal x As PgSqlTimeStamp _
) As Date
[C#]
public DateTime operator explicit(
   PgSqlTimeStamp x
);

Operands

x
A PgSqlTimeStamp structure to convert.

Return Type

A DateTime object.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Greater Than Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Greater Than Operator (PgSqlTimeStamp)

Compares two PgSqlTimeStamp structures to determine if the first is greater than the second.

[Visual Basic]
Public Operator >( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator >(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is greater than the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Greater Than or Equal Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Greater Than or Equal Operator (PgSqlTimeStamp)

Compares two PgSqlTimeStamp structures to determine if the first is greater than or equal to the second.

[Visual Basic]
Public Operator >=( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator >=(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is greater than or equal to the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

value
A DateTime object to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Implicit Type Conversion Operator (PgSqlTimeStamp)

Converts a DateTime object to the PgSqlTimeStamp structure.

[Visual Basic]
Public Operator Widening CType( _
   ByVal value As Date _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp operator implicit(
   DateTime value
);

Operands

value
A DateTime object to convert.

Return Type

A PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Inequality Operator (PgSqlTimeStamp)

Determines whether two PgSqlTimeStamp values are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator !=(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if two PgSqlTimeStamp values are not equal; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Less Than Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Less Than Operator (PgSqlTimeStamp)

Compares two PgSqlTimeStamp structures to determine if the first is less than the second.

[Visual Basic]
Public Operator <( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator <(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is less than the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Less Than or Equal Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Less Than or Equal Operator (PgSqlTimeStamp)

Compares two PgSqlTimeStamp structures to determine if the first is less than or equal to the second.

[Visual Basic]
Public Operator <=( _
   ByVal x As PgSqlTimeStamp, _
   ByVal y As PgSqlTimeStamp _
) As Boolean
[C#]
public bool operator <=(
   PgSqlTimeStamp x,
   PgSqlTimeStamp y
);

Operands

x
The first PgSqlTimeStamp value.
y
The second PgSqlTimeStamp value.

Return Type

true if the first of two PgSqlTimeStamp values is less than or equal to the second; otherwise, false.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure : Subtraction Operator (PgSqlTimeStamp)

Subtracts the specified object from the PgSqlTimeStamp structure.

Overload List

Subtracts the specified DateTime value from a PgSqlTimeStamp value and returns a new PgSqlInterval value.

[Visual Basic] Overloads Public Operator -(PgSqlTimeStamp,Date) As PgSqlInterval

[C#] public PgSqlInterval operator -(PgSqlTimeStamp,DateTime);

Subtracts the specified PgSqlInterval value from the PgSqlTimeStamp value and returns a new PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Operator -(PgSqlTimeStamp,PgSqlInterval) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp operator -(PgSqlTimeStamp,PgSqlInterval);

Subtracts the specified PgSqlTimeStamp value from another PgSqlTimeStamp value and returns a new PgSqlInterval value.

[Visual Basic] Overloads Public Operator -(PgSqlTimeStamp,PgSqlTimeStamp) As PgSqlInterval

[C#] public PgSqlInterval operator -(PgSqlTimeStamp,PgSqlTimeStamp);

Subtracts the specified TimeSpan value from the PgSqlTimeStamp value and returns a new PgSqlTimeStamp structure.

[Visual Basic] Overloads Public Operator -(PgSqlTimeStamp,TimeSpan) As PgSqlTimeStamp

[C#] public PgSqlTimeStamp operator -(PgSqlTimeStamp,TimeSpan);

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d1
A PgSqlTimeStamp value.
d2
A DateTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTimeStamp,DateTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtraction Operator : Subtraction(PgSqlTimeStamp,DateTime) Operator

Subtracts the specified DateTime value from a PgSqlTimeStamp value and returns a new PgSqlInterval value.

[Visual Basic]
Overloads Public Operator -( _
   ByVal d1 As PgSqlTimeStamp, _
   ByVal d2 As Date _
) As PgSqlInterval
[C#]
public PgSqlInterval operator -(
   PgSqlTimeStamp d1,
   DateTime d2
);

Operands

d1
A PgSqlTimeStamp value.
d2
A DateTime value.

Return Type

A new PgSqlInterval structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d
A PgSqlTimeStamp structure.
t
A PgSqlInterval structure.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTimeStamp,PgSqlInterval) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtraction Operator : Subtraction(PgSqlTimeStamp,PgSqlInterval) Operator

Subtracts the specified PgSqlInterval value from the PgSqlTimeStamp value and returns a new PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Operator -( _
   ByVal d As PgSqlTimeStamp, _
   ByVal t As PgSqlInterval _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp operator -(
   PgSqlTimeStamp d,
   PgSqlInterval t
);

Operands

d
A PgSqlTimeStamp structure.
t
A PgSqlInterval structure.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d1
A PgSqlTimeStamp value.
d2
A PgSqlTimeStamp value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTimeStamp,PgSqlTimeStamp) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtraction Operator : Subtraction(PgSqlTimeStamp,PgSqlTimeStamp) Operator

Subtracts the specified PgSqlTimeStamp value from another PgSqlTimeStamp value and returns a new PgSqlInterval value.

[Visual Basic]
Overloads Public Operator -( _
   ByVal d1 As PgSqlTimeStamp, _
   ByVal d2 As PgSqlTimeStamp _
) As PgSqlInterval
[C#]
public PgSqlInterval operator -(
   PgSqlTimeStamp d1,
   PgSqlTimeStamp d2
);

Operands

d1
A PgSqlTimeStamp value.
d2
A PgSqlTimeStamp value.

Return Type

A new PgSqlInterval structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List

Language

Visual Basic

C#

Show All

d
A PgSqlTimeStamp value.
t
A TimeSpan value to subtract.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTimeStamp,TimeSpan) Operator

Devart.Data.PostgreSql Namespace > PgSqlTimeStamp Structure > Subtraction Operator : Subtraction(PgSqlTimeStamp,TimeSpan) Operator

Subtracts the specified TimeSpan value from the PgSqlTimeStamp value and returns a new PgSqlTimeStamp structure.

[Visual Basic]
Overloads Public Operator -( _
   ByVal d As PgSqlTimeStamp, _
   ByVal t As TimeSpan _
) As PgSqlTimeStamp
[C#]
public PgSqlTimeStamp operator -(
   PgSqlTimeStamp d,
   TimeSpan t
);

Operands

d
A PgSqlTimeStamp value.
t
A TimeSpan value to subtract.

Return Type

A new PgSqlTimeStamp structure.

See Also

PgSqlTimeStamp Structure | PgSqlTimeStamp Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Addition Operator (PgSqlTime)

Adds the specified object to the PgSqlTime and returns a new PgSqlTime structure.

Overload List

Adds the specified PgSqlInterval to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic] Overloads Public Operator +(PgSqlTime,PgSqlInterval) As PgSqlTime

[C#] public PgSqlTime operator +(PgSqlTime,PgSqlInterval);

Adds the specified object to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic] Overloads Public Operator +(PgSqlTime,PgSqlTime) As PgSqlTime

[C#] public PgSqlTime operator +(PgSqlTime,PgSqlTime);

Adds the specified TimeSpan to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic] Overloads Public Operator +(PgSqlTime,TimeSpan) As PgSqlTime

[C#] public PgSqlTime operator +(PgSqlTime,TimeSpan);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
The PgSqlTime value.
t2
The PgSqlInterval value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition(PgSqlTime,PgSqlInterval) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Addition Operator : Addition(PgSqlTime,PgSqlInterval) Operator

Adds the specified PgSqlInterval to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic]
Overloads Public Operator +( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As PgSqlInterval _
) As PgSqlTime
[C#]
public PgSqlTime operator +(
   PgSqlTime t1,
   PgSqlInterval t2
);

Operands

t1
The PgSqlTime value.
t2
The PgSqlInterval value.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
The first PgSqlTime value.
t2
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition(PgSqlTime,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Addition Operator : Addition(PgSqlTime,PgSqlTime) Operator

Adds the specified object to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic]
Overloads Public Operator +( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As PgSqlTime _
) As PgSqlTime
[C#]
public PgSqlTime operator +(
   PgSqlTime t1,
   PgSqlTime t2
);

Operands

t1
The first PgSqlTime value.
t2
The second PgSqlTime value.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
The PgSqlTime value.
t2
The TimeSpan value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Addition(PgSqlTime,TimeSpan) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Addition Operator : Addition(PgSqlTime,TimeSpan) Operator

Adds the specified TimeSpan to the PgSqlTime and returns a new PgSqlTime structure.

[Visual Basic]
Overloads Public Operator +( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As TimeSpan _
) As PgSqlTime
[C#]
public PgSqlTime operator +(
   PgSqlTime t1,
   TimeSpan t2
);

Operands

t1
The PgSqlTime value.
t2
The TimeSpan value.

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Equality Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Equality Operator (PgSqlTime)

Determines whether two PgSqlTime values are equal.

[Visual Basic]
Public Operator =( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator ==(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if two PgSqlTime values are equal; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Explicit Type Conversion Operator (PgSqlTime)

Converts a PgSqlTime structure to the DateTime object.

Overload List

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic] Overloads Public Operator Narrowing CType(PgSqlTime) As Date

[C#] public DateTime operator explicit(PgSqlTime);

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic] Overloads Public Operator Narrowing CType(PgSqlTime) As DateTimeOffset

[C#] public DateTimeOffset operator explicit(PgSqlTime);

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic] Overloads Public Operator Narrowing CType(PgSqlTime) As PgSqlInterval

[C#] public PgSqlInterval operator explicit(PgSqlTime);

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic] Overloads Public Operator Narrowing CType(PgSqlTime) As TimeSpan

[C#] public TimeSpan operator explicit(PgSqlTime);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion(DateTime,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Explicit Type Conversion Operator : Explicit Type Conversion(DateTime,PgSqlTime) Operator

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic]
Overloads Public Operator Narrowing CType( _
   ByVal x As PgSqlTime _
) As Date
[C#]
public DateTime operator explicit(
   PgSqlTime x
);

Operands

x
A PgSqlTime structure to convert.

Return Type

A DateTime object.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion(DateTimeOffset,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Explicit Type Conversion Operator : Explicit Type Conversion(DateTimeOffset,PgSqlTime) Operator

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic]
Overloads Public Operator Narrowing CType( _
   ByVal x As PgSqlTime _
) As DateTimeOffset
[C#]
public DateTimeOffset operator explicit(
   PgSqlTime x
);

Operands

x
A PgSqlTime structure to convert.

Return Type

A DateTime object.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion(PgSqlInterval,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Explicit Type Conversion Operator : Explicit Type Conversion(PgSqlInterval,PgSqlTime) Operator

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic]
Overloads Public Operator Narrowing CType( _
   ByVal x As PgSqlTime _
) As PgSqlInterval
[C#]
public PgSqlInterval operator explicit(
   PgSqlTime x
);

Operands

x
A PgSqlTime structure to convert.

Return Type

A DateTime object.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

x
A PgSqlTime structure to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Explicit Type Conversion(TimeSpan,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Explicit Type Conversion Operator : Explicit Type Conversion(TimeSpan,PgSqlTime) Operator

Converts a PgSqlTime structure to the DateTime object.

[Visual Basic]
Overloads Public Operator Narrowing CType( _
   ByVal x As PgSqlTime _
) As TimeSpan
[C#]
public TimeSpan operator explicit(
   PgSqlTime x
);

Operands

x
A PgSqlTime structure to convert.

Return Type

A DateTime object.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Greater Than Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Greater Than Operator (PgSqlTime)

Compares two PgSqlTime structures to determine if the first is greater than the second.

[Visual Basic]
Public Operator >( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator >(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is greater than the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Greater Than or Equal Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Greater Than or Equal Operator (PgSqlTime)

Compares two PgSqlTime structures to determine if the first is greater than or equal to the second.

[Visual Basic]
Public Operator >=( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator >=(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is greater than or equal to the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Implicit Type Conversion Operator (PgSqlTime)

Converts a DateTime object to the PgSqlTime structure.

Overload List

Converts a DateTime object to the PgSqlTime structure.

[Visual Basic] Overloads Public Operator Widening CType(Date) As PgSqlTime

[C#] public PgSqlTime operator implicit(DateTime);

[Visual Basic] Overloads Public Operator Widening CType(DateTimeOffset) As PgSqlTime

[C#] public PgSqlTime operator implicit(DateTimeOffset);

[Visual Basic] Overloads Public Operator Widening CType(PgSqlInterval) As PgSqlTime

[C#] public PgSqlTime operator implicit(PgSqlInterval);

[Visual Basic] Overloads Public Operator Widening CType(TimeSpan) As PgSqlTime

[C#] public PgSqlTime operator implicit(TimeSpan);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
A DateTime object to convert.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion(PgSqlTime,DateTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Implicit Type Conversion Operator : Implicit Type Conversion(PgSqlTime,DateTime) Operator

Converts a DateTime object to the PgSqlTime structure.

[Visual Basic]
Overloads Public Operator Widening CType( _
   ByVal value As Date _
) As PgSqlTime
[C#]
public PgSqlTime operator implicit(
   DateTime value
);

Operands

value
A DateTime object to convert.

Return Type

A PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion(PgSqlTime,DateTimeOffset) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Implicit Type Conversion Operator : Implicit Type Conversion(PgSqlTime,DateTimeOffset) Operator
[Visual Basic]
Overloads Public Operator Widening CType( _
   ByVal value As DateTimeOffset _
) As PgSqlTime
[C#]
public PgSqlTime operator implicit(
   DateTimeOffset value
);

Operands

value

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion(PgSqlTime,PgSqlInterval) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Implicit Type Conversion Operator : Implicit Type Conversion(PgSqlTime,PgSqlInterval) Operator
[Visual Basic]
Overloads Public Operator Widening CType( _
   ByVal value As PgSqlInterval _
) As PgSqlTime
[C#]
public PgSqlTime operator implicit(
   PgSqlInterval value
);

Operands

value

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

value
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Implicit Type Conversion(PgSqlTime,TimeSpan) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Implicit Type Conversion Operator : Implicit Type Conversion(PgSqlTime,TimeSpan) Operator
[Visual Basic]
Overloads Public Operator Widening CType( _
   ByVal value As TimeSpan _
) As PgSqlTime
[C#]
public PgSqlTime operator implicit(
   TimeSpan value
);

Operands

value

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Inequality Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Inequality Operator (PgSqlTime)

Determines whether two PgSqlTime values are not equal.

[Visual Basic]
Public Operator <>( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator !=(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if two PgSqlTime values are not equal; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Less Than Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Less Than Operator (PgSqlTime)

Compares two PgSqlTime structures to determine if the first is less than the second.

[Visual Basic]
Public Operator <( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator <(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is less than the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

x
The first PgSqlTime value.
y
The second PgSqlTime value.
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Less Than or Equal Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Less Than or Equal Operator (PgSqlTime)

Compares two PgSqlTime structures to determine if the first is less than or equal to the second.

[Visual Basic]
Public Operator <=( _
   ByVal x As PgSqlTime, _
   ByVal y As PgSqlTime _
) As Boolean
[C#]
public bool operator <=(
   PgSqlTime x,
   PgSqlTime y
);

Operands

x
The first PgSqlTime value.
y
The second PgSqlTime value.

Return Type

true if the first of two PgSqlTime values is less than or equal to the second; otherwise, false.

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure : Subtraction Operator (PgSqlTime)

Subtracts the specified object from the PgSqlTime structure.

Overload List

Subtracts the specified PgSqlInterval value from the PgSqlTime value and returns a new PgSqlTime structure.

[Visual Basic] Overloads Public Operator -(PgSqlTime,PgSqlInterval) As PgSqlTime

[C#] public PgSqlTime operator -(PgSqlTime,PgSqlInterval);

Subtracts the specified PgSqlTime value from another PgSqlTime value and returns a new PgSqlInterval value.

[Visual Basic] Overloads Public Operator -(PgSqlTime,PgSqlTime) As PgSqlInterval

[C#] public PgSqlInterval operator -(PgSqlTime,PgSqlTime);

Subtracts the specified TimeSpan value from the PgSqlTime value and returns a new PgSqlTime structure.

[Visual Basic] Overloads Public Operator -(PgSqlTime,TimeSpan) As PgSqlTime

[C#] public PgSqlTime operator -(PgSqlTime,TimeSpan);

See Also

PgSqlTime Structure | PgSqlTime Members


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
t2
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTime,PgSqlInterval) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtraction Operator : Subtraction(PgSqlTime,PgSqlInterval) Operator

Subtracts the specified PgSqlInterval value from the PgSqlTime value and returns a new PgSqlTime structure.

[Visual Basic]
Overloads Public Operator -( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As PgSqlInterval _
) As PgSqlTime
[C#]
public PgSqlTime operator -(
   PgSqlTime t1,
   PgSqlInterval t2
);

Operands

t1
t2

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
t2
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTime,PgSqlTime) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtraction Operator : Subtraction(PgSqlTime,PgSqlTime) Operator

Subtracts the specified PgSqlTime value from another PgSqlTime value and returns a new PgSqlInterval value.

[Visual Basic]
Overloads Public Operator -( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As PgSqlTime _
) As PgSqlInterval
[C#]
public PgSqlInterval operator -(
   PgSqlTime t1,
   PgSqlTime t2
);

Operands

t1
t2

Return Type

A new PgSqlInterval structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%%

PgSqlTime Structure | PgSqlTime Members | Overload List

Language

Visual Basic

C#

Show All

t1
t2
See Also Languages Devart.Data.PostgreSql Send comments on this topic.

Subtraction(PgSqlTime,TimeSpan) Operator

Devart.Data.PostgreSql Namespace > PgSqlTime Structure > Subtraction Operator : Subtraction(PgSqlTime,TimeSpan) Operator

Subtracts the specified TimeSpan value from the PgSqlTime value and returns a new PgSqlTime structure.

[Visual Basic]
Overloads Public Operator -( _
   ByVal t1 As PgSqlTime, _
   ByVal t2 As TimeSpan _
) As PgSqlTime
[C#]
public PgSqlTime operator -(
   PgSqlTime t1,
   TimeSpan t2
);

Operands

t1
t2

Return Type

A new PgSqlTime structure.

See Also

PgSqlTime Structure | PgSqlTime Members | Overload List


%%PageItemTitle%% $$Events$$

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class

See Also Devart.Data.PostgreSql Send comments on this topic.

PgSqlTransaction Class Events

Devart.Data.PostgreSql Namespace : PgSqlTransaction Class

For a list of all members of this type, see PgSqlTransaction members.

Public Events

Public Event StateChanged (Inherited from Devart.Common.DbTransactionBase) | Occurs when the state of the transaction is changed.
Public Event StateChanging (Inherited from Devart.Common.DbTransactionBase) | Occurs when the state of the transaction is changing.

See Also

PgSqlTransaction Class | Devart.Data.PostgreSql Namespace | PgSqlDataReader Class | PgSqlConnection Class


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data.PostgreSql Assembly

See Also Devart.Data.PostgreSql Send comments on this topic.

Devart.Data.PostgreSql Namespace Inheritance Hierarchy

System.Object
Devart.Common.SelectStatement
Devart.Data.PostgreSql.PgSqlSelectStatement
Devart.Common.SelectStatementNode
Devart.Data.PostgreSql.PgSqlSelectLimit
Devart.Data.PostgreSql.PgSqlAttribute
Devart.Data.PostgreSql.PgSqlCursor
Devart.Data.PostgreSql.PgSqlDependency
Devart.Data.PostgreSql.PgSqlError
Devart.Data.PostgreSql.PgSqlErrorCollection
Devart.Data.PostgreSql.PgSqlLocalization
Devart.Data.PostgreSql.PgSqlMetaDataCollectionNames
Devart.Data.PostgreSql.PgSqlRangeType<PgSqlTimeStamp>
Devart.Data.PostgreSql.PgSqlDateRange
Devart.Data.PostgreSql.PgSqlTimeStampRange
Devart.Data.PostgreSql.PgSqlTimeStampTZRange
Devart.Data.PostgreSql.PgSqlRangeType<Decimal>
Devart.Data.PostgreSql.PgSqlNumericRange
Devart.Data.PostgreSql.PgSqlRangeType<Int32>
Devart.Data.PostgreSql.PgSqlIntRange
Devart.Data.PostgreSql.PgSqlRangeType<Int64>
Devart.Data.PostgreSql.PgSqlBigIntRange
Devart.Data.PostgreSql.PgSqlRangeType<T>
Devart.Data.PostgreSql.PgSqlRow
Devart.Data.PostgreSql.PgSqlRowType
Devart.Data.PostgreSql.SslOptions
System.Collections.CollectionBase
Devart.Common.DbLoaderColumnCollection
Devart.Data.PostgreSql.PgSqlLoaderColumnCollection
Devart.Data.PostgreSql.PgSqlAttributeCollection
System.ComponentModel.MarshalByValueComponent
System.Data.DataSet
Devart.Common.DbDataSet
Devart.Data.PostgreSql.PgSqlDataSet
System.Data.DataTable
Devart.Common.DbDataTable
Devart.Data.PostgreSql.PgSqlDataTable
System.Data.Common.DbConnectionStringBuilder
Devart.Common.DbConnectionStringBuilder
Devart.Data.PostgreSql.PgSqlConnectionStringBuilder
System.Data.Common.DbDataSourceEnumerator
Devart.Common.DbDataSourceEnumerator
Devart.Data.PostgreSql.PgSqlDataSourceEnumerator
System.Data.Common.DbProviderFactory
Devart.Data.PostgreSql.PgSqlProviderFactory
System.EventArgs
Devart.Common.DbStatementExecuteEventArgs
Devart.Data.PostgreSql.PgSqlStatementExecuteEventArgs
Devart.Data.PostgreSql.PgSqlAlerterAlertEventArgs
Devart.Data.PostgreSql.PgSqlAlerterErrorEventArgs
Devart.Data.PostgreSql.PgSqlAlerterStoppedEventArgs
Devart.Data.PostgreSql.PgSqlErrorEventArgs
Devart.Data.PostgreSql.PgSqlInfoMessageEventArgs
Devart.Data.PostgreSql.PgSqlLoaderErrorEventArgs
Devart.Data.PostgreSql.PgSqlNotificationEventArgs
Devart.Data.PostgreSql.PgSqlTableChangeEventArgs
System.Data.Common.RowUpdatedEventArgs
Devart.Data.PostgreSql.PgSqlRowUpdatedEventArgs
System.Data.Common.RowUpdatingEventArgs
Devart.Data.PostgreSql.PgSqlRowUpdatingEventArgs
System.Exception
System.SystemException
System.Runtime.InteropServices.ExternalException
System.Data.Common.DbException
Devart.Data.PostgreSql.PgSqlException
System.MarshalByRefObject
Devart.Common.DbLoaderColumn
Devart.Data.PostgreSql.PgSqlLoaderColumn
System.ComponentModel.Component
Devart.Common.DbDump
Devart.Data.PostgreSql.PgSqlDump
Devart.Common.DbLoader
Devart.Data.PostgreSql.PgSqlLoader
Devart.Common.DbMonitor
Devart.Common.DbMonitorHelper
Devart.Data.PostgreSql.PgSqlMonitor
Devart.Common.DbScript
Devart.Data.PostgreSql.PgSqlScript
Devart.Data.PostgreSql.PgSqlAlerter
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
Devart.Common.DbDataAdapter
Devart.Data.PostgreSql.PgSqlDataAdapter
System.Data.Common.DbCommand
Devart.Common.DbCommandBase
Devart.Data.PostgreSql.PgSqlCommand
System.Data.Common.DbCommandBuilder
Devart.Common.DbCommandBuilderBase
Devart.Common.DbCommandBuilder
Devart.Data.PostgreSql.PgSqlCommandBuilder
System.Data.Common.DbConnection
Devart.Common.DbConnectionBase
Devart.Data.PostgreSql.PgSqlConnection
System.Data.Common.DbDataReader
Devart.Common.DbDataReaderBase
Devart.Data.PostgreSql.PgSqlDataReader
System.Data.Common.DbParameter
Devart.Common.DbParameterBase
Devart.Data.PostgreSql.PgSqlParameter
System.Data.Common.DbParameterCollection
Devart.Common.DbParameterBaseCollection
Devart.Data.PostgreSql.PgSqlParameterCollection
System.Data.Common.DbTransaction
Devart.Common.DbTransactionBase
Devart.Data.PostgreSql.PgSqlTransaction
System.IO.Stream
Devart.Data.PostgreSql.PgSqlBlob
Devart.Data.PostgreSql.PgSqlText
Devart.Data.PostgreSql.PgSqlLargeObject

See Also

Devart.Data.PostgreSql Namespace | Devart.Data.PostgreSql Assembly


%%PageItemTitle%% $$Events$$

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

DbSyncProviderBase Class Events

Devart.Data.Synchronization Namespace : DbSyncProviderBase Class

For a list of all members of this type, see DbSyncProviderBase members.

Public Events

Public Event ApplyChangeFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ApplyMetadataFailed (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event BatchSpooled (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesApplied (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event ChangesSelected (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event DbConnectionFailure (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SelectingChanges (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncPeerOutdated (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)
Public Event SyncProgress (Inherited from Microsoft.Synchronization.Data.RelationalSyncProvider)

See Also

DbSyncProviderBase Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ApplicationTransactionSize Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ApplicationTransactionSize Property (DbSyncProviderBase)
[Visual Basic]
Public Property ApplicationTransactionSize As Long
[C#]
public long ApplicationTransactionSize {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ApplyChangeFailed Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ApplyChangeFailed Event (DbSyncProviderBase)
[Visual Basic]
Public Event ApplyChangeFailed() As EventHandler(Of DbApplyChangeFailedEventArgs)
[C#]
public event EventHandler<DbApplyChangeFailedEventArgs> ApplyChangeFailed();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ApplyingChanges Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ApplyingChanges Event (DbSyncProviderBase)
[Visual Basic]
Public Event ApplyingChanges() As EventHandler(Of DbApplyingChangesEventArgs)
[C#]
public event EventHandler<DbApplyingChangesEventArgs> ApplyingChanges();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ApplyMetadataFailed Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ApplyMetadataFailed Event (DbSyncProviderBase)
[Visual Basic]
Public Event ApplyMetadataFailed() As EventHandler(Of ApplyMetadataFailedEventArgs)
[C#]
public event EventHandler<ApplyMetadataFailedEventArgs> ApplyMetadataFailed();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

BatchApplied Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : BatchApplied Event (DbSyncProviderBase)
[Visual Basic]
Public Event BatchApplied() As EventHandler(Of DbBatchAppliedEventArgs)
[C#]
public event EventHandler<DbBatchAppliedEventArgs> BatchApplied();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

BatchingDirectory Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : BatchingDirectory Property (DbSyncProviderBase)
[Visual Basic]
Public Property BatchingDirectory As String
[C#]
public string BatchingDirectory {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

BatchSpooled Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : BatchSpooled Event (DbSyncProviderBase)
[Visual Basic]
Public Event BatchSpooled() As EventHandler(Of DbBatchSpooledEventArgs)
[C#]
public event EventHandler<DbBatchSpooledEventArgs> BatchSpooled();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ChangesApplied Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ChangesApplied Event (DbSyncProviderBase)
[Visual Basic]
Public Event ChangesApplied() As EventHandler(Of DbChangesAppliedEventArgs)
[C#]
public event EventHandler<DbChangesAppliedEventArgs> ChangesApplied();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ChangesSelected Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ChangesSelected Event (DbSyncProviderBase)
[Visual Basic]
Public Event ChangesSelected() As EventHandler(Of DbChangesSelectedEventArgs)
[C#]
public event EventHandler<DbChangesSelectedEventArgs> ChangesSelected();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ChangeTracking Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ChangeTracking Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property ChangeTracking As ChangeTrackingModel
[C#]
public virtual ChangeTrackingModel ChangeTracking {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CleanupBatchingDirectory Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : CleanupBatchingDirectory Property (DbSyncProviderBase)
[Visual Basic]
Public Property CleanupBatchingDirectory As Boolean
[C#]
public bool CleanupBatchingDirectory {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

CleanupMetadata Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : CleanupMetadata Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Function CleanupMetadata() As Boolean
[C#]
public virtual bool CleanupMetadata();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Configuration Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : Configuration Property (DbSyncProviderBase)
[Visual Basic]
Public ReadOnly Property Configuration As KnowledgeSyncProviderConfiguration
[C#]
public KnowledgeSyncProviderConfiguration Configuration {get;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DbConnectionFailure Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : DbConnectionFailure Event (DbSyncProviderBase)
[Visual Basic]
Public Event DbConnectionFailure() As EventHandler(Of DbConnectionFailureEventArgs)
[C#]
public event EventHandler<DbConnectionFailureEventArgs> DbConnectionFailure();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

DestinationCallbacks Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : DestinationCallbacks Property (DbSyncProviderBase)
[Visual Basic]
Public ReadOnly Property DestinationCallbacks As SyncCallbacks
[C#]
public SyncCallbacks DestinationCallbacks {get;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

Dispose Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : Dispose Method (DbSyncProviderBase)
[Visual Basic]
Public Sub Dispose()
[C#]
public void Dispose();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

syncSessionContext
See Also Languages Devart.Data.Synchronization Send comments on this topic.

EndSession Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : EndSession Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Sub EndSession( _
   ByVal syncSessionContext As SyncSessionContext _
)
[C#]
public virtual void EndSession(
   SyncSessionContext syncSessionContext
);

Parameters

syncSessionContext

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

batchSize
destinationKnowledge
changeDataRetriever
See Also Languages Devart.Data.Synchronization Send comments on this topic.

GetChangeBatch Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : GetChangeBatch Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Function GetChangeBatch( _
   ByVal batchSize As UInteger, _
   ByVal destinationKnowledge As SyncKnowledge, _
   ByRef changeDataRetriever As Object _
) As ChangeBatch
[C#]
public virtual ChangeBatch GetChangeBatch(
   uint batchSize,
   SyncKnowledge destinationKnowledge,
   out object changeDataRetriever
);

Parameters

batchSize
destinationKnowledge
changeDataRetriever

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

batchSize
lowerEnumerationBound
knowledgeForDataRetrieval
changeDataRetriever
See Also Languages Devart.Data.Synchronization Send comments on this topic.

GetFullEnumerationChangeBatch Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : GetFullEnumerationChangeBatch Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Function GetFullEnumerationChangeBatch( _
   ByVal batchSize As UInteger, _
   ByVal lowerEnumerationBound As SyncId, _
   ByVal knowledgeForDataRetrieval As SyncKnowledge, _
   ByRef changeDataRetriever As Object _
) As FullEnumerationChangeBatch
[C#]
public virtual FullEnumerationChangeBatch GetFullEnumerationChangeBatch(
   uint batchSize,
   SyncId lowerEnumerationBound,
   SyncKnowledge knowledgeForDataRetrieval,
   out object changeDataRetriever
);

Parameters

batchSize
lowerEnumerationBound
knowledgeForDataRetrieval
changeDataRetriever

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

GetScopeDescription Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : GetScopeDescription Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Function GetScopeDescription() As DbSyncScopeDescription
[C#]
public virtual DbSyncScopeDescription GetScopeDescription();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

batchSize
knowledge
See Also Languages Devart.Data.Synchronization Send comments on this topic.

GetSyncBatchParameters Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : GetSyncBatchParameters Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Sub GetSyncBatchParameters( _
   ByRef batchSize As UInteger, _
   ByRef knowledge As SyncKnowledge _
)
[C#]
public virtual void GetSyncBatchParameters(
   out uint batchSize,
   out SyncKnowledge knowledge
);

Parameters

batchSize
knowledge

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

IdFormats Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : IdFormats Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable ReadOnly Property IdFormats As SyncIdFormatGroup
[C#]
public virtual SyncIdFormatGroup IdFormats {get;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

MemoryDataCacheSize Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : MemoryDataCacheSize Property (DbSyncProviderBase)
[Visual Basic]
Public Property MemoryDataCacheSize As UInteger
[C#]
public uint MemoryDataCacheSize {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics
See Also Languages Devart.Data.Synchronization Send comments on this topic.

ProcessChangeBatch Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ProcessChangeBatch Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Sub ProcessChangeBatch( _
   ByVal resolutionPolicy As ConflictResolutionPolicy, _
   ByVal sourceChanges As ChangeBatch, _
   ByVal changeDataRetriever As Object, _
   ByVal syncCallbacks As SyncCallbacks, _
   ByVal sessionStatistics As SyncSessionStatistics _
)
[C#]
public virtual void ProcessChangeBatch(
   ConflictResolutionPolicy resolutionPolicy,
   ChangeBatch sourceChanges,
   object changeDataRetriever,
   SyncCallbacks syncCallbacks,
   SyncSessionStatistics sessionStatistics
);

Parameters

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics
See Also Languages Devart.Data.Synchronization Send comments on this topic.

ProcessFullEnumerationChangeBatch Method

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ProcessFullEnumerationChangeBatch Method (DbSyncProviderBase)
[Visual Basic]
Public Overridable Sub ProcessFullEnumerationChangeBatch( _
   ByVal resolutionPolicy As ConflictResolutionPolicy, _
   ByVal sourceChanges As FullEnumerationChangeBatch, _
   ByVal changeDataRetriever As Object, _
   ByVal syncCallbacks As SyncCallbacks, _
   ByVal sessionStatistics As SyncSessionStatistics _
)
[C#]
public virtual void ProcessFullEnumerationChangeBatch(
   ConflictResolutionPolicy resolutionPolicy,
   FullEnumerationChangeBatch sourceChanges,
   object changeDataRetriever,
   SyncCallbacks syncCallbacks,
   SyncSessionStatistics sessionStatistics
);

Parameters

resolutionPolicy
sourceChanges
changeDataRetriever
syncCallbacks
sessionStatistics

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

ScopeName Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : ScopeName Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property ScopeName As String
[C#]
public virtual string ScopeName {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectingChanges Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SelectingChanges Event (DbSyncProviderBase)
[Visual Basic]
Public Event SelectingChanges() As EventHandler(Of DbSelectingChangesEventArgs)
[C#]
public event EventHandler<DbSelectingChangesEventArgs> SelectingChanges();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectNewTimestampCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SelectNewTimestampCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property SelectNewTimestampCommand As IDbCommand
[C#]
public virtual IDbCommand SelectNewTimestampCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectOverlappingScopesCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SelectOverlappingScopesCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property SelectOverlappingScopesCommand As IDbCommand
[C#]
public virtual IDbCommand SelectOverlappingScopesCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectScopeInfoCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SelectScopeInfoCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property SelectScopeInfoCommand As IDbCommand
[C#]
public virtual IDbCommand SelectScopeInfoCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SelectTableMaxTimestampsCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SelectTableMaxTimestampsCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property SelectTableMaxTimestampsCommand As IDbCommand
[C#]
public virtual IDbCommand SelectTableMaxTimestampsCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncAdapters Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SyncAdapters Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable ReadOnly Property SyncAdapters As DbSyncAdapterCollection
[C#]
public virtual DbSyncAdapterCollection SyncAdapters {get;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncPeerOutdated Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SyncPeerOutdated Event (DbSyncProviderBase)
[Visual Basic]
Public Event SyncPeerOutdated() As EventHandler(Of DbOutdatedEventArgs)
[C#]
public event EventHandler<DbOutdatedEventArgs> SyncPeerOutdated();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProgress Event

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SyncProgress Event (DbSyncProviderBase)
[Visual Basic]
Public Event SyncProgress() As EventHandler(Of DbSyncProgressEventArgs)
[C#]
public event EventHandler<DbSyncProgressEventArgs> SyncProgress();

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

SyncProviderPosition Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : SyncProviderPosition Property (DbSyncProviderBase)
[Visual Basic]
Public Property SyncProviderPosition As SyncProviderPosition
[C#]
public SyncProviderPosition SyncProviderPosition {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UpdateScopeCleanupTimestampCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : UpdateScopeCleanupTimestampCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property UpdateScopeCleanupTimestampCommand As IDbCommand
[C#]
public virtual IDbCommand UpdateScopeCleanupTimestampCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%%

DbSyncProviderBase Class | DbSyncProviderBase Members

Language

Visual Basic

C#

Show All

See Also Languages Devart.Data.Synchronization Send comments on this topic.

UpdateScopeInfoCommand Property

Devart.Data.Synchronization Namespace > DbSyncProviderBase Class : UpdateScopeInfoCommand Property (DbSyncProviderBase)
[Visual Basic]
Public Overridable Property UpdateScopeInfoCommand As IDbCommand
[C#]
public virtual IDbCommand UpdateScopeInfoCommand {get; set;}

See Also

DbSyncProviderBase Class | DbSyncProviderBase Members


%%PageItemTitle%% $$Methods$$

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterConfigurationCollection Class Methods

Devart.Data.Synchronization Namespace : SyncProviderAdapterConfigurationCollection Class

For a list of all members of this type, see SyncProviderAdapterConfigurationCollection members.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>)

See Also

SyncProviderAdapterConfigurationCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Methods$$

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncProviderAdapterParametersCollection Class Methods

Devart.Data.Synchronization Namespace : SyncProviderAdapterParametersCollection Class

For a list of all members of this type, see SyncProviderAdapterParametersCollection members.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>)

See Also

SyncProviderAdapterParametersCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Methods$$

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncSqlParameterCollection Class Methods

Devart.Data.Synchronization Namespace : SyncSqlParameterCollection Class

For a list of all members of this type, see SyncSqlParameterCollection members.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<DbParameter>)

See Also

SyncSqlParameterCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% $$Methods$$

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace

See Also Devart.Data.Synchronization Send comments on this topic.

SyncTableProvisioningCollection Class Methods

Devart.Data.Synchronization Namespace : SyncTableProvisioningCollection Class

For a list of all members of this type, see SyncTableProvisioningCollection members.

Public Methods

Public Method Add (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Clear (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Contains (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method CopyTo (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method GetEnumerator (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method IndexOf (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Insert (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method Remove (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)
Public Method RemoveAt (Inherited from System.Collections.ObjectModel.Collection<SyncTableProvisioning>)

See Also

SyncTableProvisioningCollection Class | Devart.Data.Synchronization Namespace


%%PageItemTitle%% Delegates

Devart.Data.Synchronization Assembly

See Also Devart.Data.Synchronization Send comments on this topic.

Devart.Data.Synchronization Namespace Delegates

See Also

Devart.Data.Synchronization Assembly


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data.Synchronization Assembly

See Also Devart.Data.Synchronization Send comments on this topic.

Devart.Data.Synchronization Namespace Inheritance Hierarchy

System.Object
Devart.Data.Synchronization.SyncProviderAdapterConfiguration
Devart.Data.Synchronization.SyncProviderAdapterParameters
Devart.Data.Synchronization.SyncProviderFilterParameter
Devart.Data.Synchronization.SyncProviderScopeConfiguration
Devart.Data.Synchronization.SyncProviderScopeParameters
Devart.Data.Synchronization.SyncScopeDeprovisioning
Devart.Data.Synchronization.SyncScopeProvisioning
Devart.Data.Synchronization.SyncTableProvisioning
Microsoft.Synchronization.SyncProvider
Microsoft.Synchronization.KnowledgeSyncProvider
Microsoft.Synchronization.Data.RelationalSyncProvider
Microsoft.Synchronization.Data.DbSyncProvider
Devart.Data.Synchronization.DbSyncProviderBase
System.Collections.ObjectModel.Collection<SyncProviderAdapterConfiguration>
Devart.Data.Synchronization.SyncProviderAdapterConfigurationCollection
System.Collections.ObjectModel.Collection<SyncProviderAdapterParameters>
Devart.Data.Synchronization.SyncProviderAdapterParametersCollection
System.Collections.ObjectModel.Collection<SyncTableProvisioning>
Devart.Data.Synchronization.SyncTableProvisioningCollection
System.Collections.ObjectModel.Collection<DbParameter>
Devart.Data.Synchronization.SyncSqlParameterCollection

See Also

Devart.Data.Synchronization Namespace | Devart.Data.Synchronization Assembly


%%PageItemTitle%% $$Events$$

DbCommandBase Class | Devart.Common Namespace | DbCommand

See Also Devart.Data Send comments on this topic.

DbCommandBase Class Events

Devart.Common Namespace : DbCommandBase Class

For a list of all members of this type, see DbCommandBase members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBase Class | Devart.Common Namespace | DbCommand


%%PageItemTitle%% $$Events$$

DbCommandBuilder Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilder Class Events

Devart.Common Namespace : DbCommandBuilder Class

For a list of all members of this type, see DbCommandBuilder members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBuilder Class | Devart.Common Namespace


%%PageItemTitle%% $$Events$$

DbCommandBuilderBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbCommandBuilderBase Class Events

Devart.Common Namespace : DbCommandBuilderBase Class

For a list of all members of this type, see DbCommandBuilderBase members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbCommandBuilderBase Class | Devart.Common Namespace


%%PageItemTitle%% $$Events$$

DbDataAdapter Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataAdapter Class Events

Devart.Common Namespace : DbDataAdapter Class

For a list of all members of this type, see DbDataAdapter members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event FillError (Inherited from System.Data.Common.DataAdapter) | Returned when an error occurs during a fill operation.

See Also

DbDataAdapter Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbDataAdapter Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataAdapter Class Properties

Devart.Common Namespace : DbDataAdapter Class

For a list of all members of this type, see DbDataAdapter members.

Public Properties

Public Property AcceptChangesDuringFill (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value indicating whether AcceptChanges is called on a DataRow after it is added to the DataTable during any of the Fill operations.
Public Property AcceptChangesDuringUpdate (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether AcceptChanges is called during a Update.
Public Property Container (Inherited from System.ComponentModel.Component) | Gets the IContainer that contains the Component.
Public Property ContinueUpdateOnError (Inherited from System.Data.Common.DataAdapter) | Gets or sets a value that specifies whether to generate an exception when an error is encountered during a row update.
Public Property DeleteCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command for deleting records from the data set.
Public Property FillLoadOption (Inherited from System.Data.Common.DataAdapter) | Gets or sets the LoadOption that determines how the adapter fills the DataTable from the DbDataReader.
Public Property InsertCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to insert new records into the data source.
Public Property MissingMappingAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when incoming data does not have a matching table or column.
Public Property MissingSchemaAction (Inherited from System.Data.Common.DataAdapter) | Determines the action to take when existing DataSet schema does not match incoming data.
Public Property ReturnProviderSpecificTypes (Inherited from System.Data.Common.DataAdapter) | Gets or sets whether the Fill method should return provider-specific values or common CLS-compliant values.
Public Property SelectCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to select records in the data source.
Public Property Site (Inherited from System.ComponentModel.Component) | Gets or sets the ISite of the Component.
Public Property TableMappings (Inherited from System.Data.Common.DataAdapter) | Gets a collection that provides the master mapping between a source table and a DataTable.
Public Property UpdateBatchSize (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a value that enables or disables batch processing support, and specifies the number of commands that can be executed in a batch.
Public Property UpdateCommand (Inherited from System.Data.Common.DbDataAdapter) | Gets or sets a command used to update records in the data source.

See Also

DbDataAdapter Class | Devart.Common Namespace


%%PageItemTitle%% $$Events$$

DbDataSet Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbDataSet Class Events

Devart.Common Namespace : DbDataSet Class

For a list of all members of this type, see DbDataSet members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.MarshalByValueComponent) | Adds an event handler to listen to the Disposed event on the component.
Public Event Initialized (Inherited from System.Data.DataSet) | Occurs after the DataSet is initialized.
Public Event MergeFailed (Inherited from System.Data.DataSet) | Occurs when a target and source DataRow have the same primary key value, and EnforceConstraints is set to true.

See Also

DbDataSet Class | Devart.Common Namespace


%%PageItemTitle%% $$Events$$

DbDump Class | Devart.Common Namespace | PgSqlDump Class

See Also Devart.Data Send comments on this topic.

DbDump Class Events

Devart.Common Namespace : DbDump Class

For a list of all members of this type, see DbDump members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbDump Class | Devart.Common Namespace | PgSqlDump Class


%%PageItemTitle%% $$Events$$

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class

See Also Devart.Data Send comments on this topic.

DbLoader Class Events

Devart.Common Namespace : DbLoader Class

For a list of all members of this type, see DbLoader members.

Public Events

Public Event Disposed (Inherited from System.ComponentModel.Component) Occurs when the component is disposed by a call to the Dispose method.

See Also

DbLoader Class | Devart.Common Namespace | DbLoaderColumn Class | DbLoaderColumnCollection Class


%%PageItemTitle%% $$Methods$$

DbMonitor Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbMonitor Class Methods

Devart.Common Namespace : DbMonitor Class

For a list of all members of this type, see DbMonitor members.

Public Methods

Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.ComponentModel.Component) | Releases all resources used by the Component.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method ToString (Inherited from System.ComponentModel.Component) | Returns a String containing the name of the Component, if any. This method should not be overridden.

See Also

DbMonitor Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

DbProviderException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbProviderException Class Properties

Devart.Common Namespace : DbProviderException Class

For a list of all members of this type, see DbProviderException members.

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

See Also

DbProviderException Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

DbTransactionBase Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

DbTransactionBase Class Methods

Devart.Common Namespace : DbTransactionBase Class

For a list of all members of this type, see DbTransactionBase members.

Public Methods

Public Method Commit (Inherited from System.Data.Common.DbTransaction) | Commits the database transaction.
Public Method CreateObjRef (Inherited from System.MarshalByRefObject) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
Public Method Dispose (Inherited from System.Data.Common.DbTransaction) | Releases the unmanaged resources used by the DbTransaction.
Public Method GetLifetimeService (Inherited from System.MarshalByRefObject) | Retrieves the current lifetime service object that controls the lifetime policy for this instance.
Public Method InitializeLifetimeService (Inherited from System.MarshalByRefObject) | Obtains a lifetime service object to control the lifetime policy for this instance.
Public Method Rollback (Inherited from System.Data.Common.DbTransaction) | Rolls back a transaction from a pending state.

See Also

DbTransactionBase Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

ProxyException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyException Class Methods

Devart.Common Namespace : ProxyException Class

For a list of all members of this type, see ProxyException members.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

ProxyException Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

ProxyException Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

ProxyException Class Properties

Devart.Common Namespace : ProxyException Class

For a list of all members of this type, see ProxyException members.

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

See Also

ProxyException Class | Devart.Common Namespace


%%PageItemTitle%% $$Methods$$

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property

See Also Devart.Data Send comments on this topic.

QueryRecordCountException Class Methods

Devart.Common Namespace : QueryRecordCountException Class

For a list of all members of this type, see QueryRecordCountException members.

Public Methods

Public Method GetBaseException (Inherited from System.Exception) | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
Public Method GetObjectData (Inherited from System.Exception) | When overridden in a derived class, sets the SerializationInfo with information about the exception.
Public Method GetType (Inherited from System.Exception) | Gets the runtime type of the current instance.
Public Method ToString (Inherited from System.Exception) | Creates and returns a string representation of the current exception.

See Also

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property


%%PageItemTitle%% $$Properties$$

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property

See Also Devart.Data Send comments on this topic.

QueryRecordCountException Class Properties

Devart.Common Namespace : QueryRecordCountException Class

For a list of all members of this type, see QueryRecordCountException members.

Public Properties

Public Property Data (Inherited from System.Exception) | Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Public Property HelpLink (Inherited from System.Exception) | Gets or sets a link to the help file associated with this exception.
Public Property InnerException (Inherited from System.Exception) | Gets the Exception instance that caused the current exception.
Public Property Message (Inherited from System.Exception) | Gets a message that describes the current exception.
Public Property Source (Inherited from System.Exception) | Gets or sets the name of the application or the object that causes the error.
Public Property StackTrace (Inherited from System.Exception) | Gets a string representation of the immediate frames on the call stack.
Public Property TargetSite (Inherited from System.Exception) | Gets the method that throws the current exception.

See Also

QueryRecordCountException Class | Devart.Common Namespace | QueryRecordCount Property


%%PageItemTitle%% $$Properties$$

TransactionStateChangedEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangedEventArgs Class Properties

Devart.Common Namespace : TransactionStateChangedEventArgs Class

For a list of all members of this type, see TransactionStateChangedEventArgs members.

Public Properties

Public Property Action (Inherited from TransactionStateChangeEventArgs) Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangedEventArgs Class | Devart.Common Namespace


%%PageItemTitle%% $$Properties$$

TransactionStateChangingEventArgs Class | Devart.Common Namespace

See Also Devart.Data Send comments on this topic.

TransactionStateChangingEventArgs Class Properties

Devart.Common Namespace : TransactionStateChangingEventArgs Class

For a list of all members of this type, see TransactionStateChangingEventArgs members.

Public Properties

Public Property Action (Inherited from TransactionStateChangeEventArgs) Indicates the operation that is being performed or has been performed in the transaction when the DbTransactionBase.StateChanged or DbTransactionBase.StateChanging event occurs.

See Also

TransactionStateChangingEventArgs Class | Devart.Common Namespace


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Common Namespace (Devart.Data) Inheritance Hierarchy

System.Object
Devart.Common.ParentDataRelation
Devart.Common.ProxyOptions
Devart.Common.SqlStatement
System.Collections.CollectionBase
Devart.Common.DbLoaderColumnCollection
Devart.Common.SqlStatementCollection
System.ComponentModel.MarshalByValueComponent
System.Data.DataSet
Devart.Common.DbDataSet
System.Data.DataTable
Devart.Common.DbDataTable
System.Data.Common.DbConnectionStringBuilder
Devart.Common.DbConnectionStringBuilder
System.Data.Common.DbDataSourceEnumerator
Devart.Common.DbDataSourceEnumerator
System.EventArgs
Devart.Common.MonitorEventArgs
Devart.Common.ScriptErrorEventArgs
Devart.Common.ScriptProgressEventArgs
Devart.Common.TransactionStateChangeEventArgs
Devart.Common.TransactionStateChangedEventArgs
Devart.Common.TransactionStateChangingEventArgs
System.Exception
Devart.Common.DbProviderException
Devart.Common.ProxyException
Devart.Common.QueryRecordCountException
System.MarshalByRefObject
Devart.Common.DbLoaderColumn
System.ComponentModel.Component
Devart.Common.DbDump
Devart.Common.DbLoader
Devart.Common.DbMonitor
Devart.Common.DbScript
System.Data.Common.DataAdapter
System.Data.Common.DbDataAdapter
Devart.Common.DbDataAdapter
System.Data.Common.DbCommand
Devart.Common.DbCommandBase
System.Data.Common.DbCommandBuilder
Devart.Common.DbCommandBuilderBase
Devart.Common.DbCommandBuilder
System.Data.Common.DbDataReader
Devart.Common.DbDataReaderBase
System.Data.Common.DbParameter
Devart.Common.DbParameterBase
System.Data.Common.DbParameterCollection
Devart.Common.DbParameterBaseCollection
System.Data.Common.DbTransaction
Devart.Common.DbTransactionBase

See Also

Devart.Common Namespace | Devart.Data Assembly


%%PageItemTitle%% $$Events$$

DataLink Class | Devart.Data Namespace

See Also Devart.Data Send comments on this topic.

DataLink Class Events

Devart.Data Namespace : DataLink Class

For a list of all members of this type, see DataLink members.

Public Events

Public Event AddingNew (Inherited from System.Windows.Forms.BindingSource) | Occurs before an item is added to the underlying list.
Public Event BindingComplete (Inherited from System.Windows.Forms.BindingSource) | Occurs when all the clients have been bound to this BindingSource.
Public Event CurrentChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the currently bound item changes.
Public Event CurrentItemChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when a property value of the Current property has changed.
Public Event DataError (Inherited from System.Windows.Forms.BindingSource) | Occurs when a currency-related exception is silently handled by the BindingSource.
Public Event DataMemberChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the DataMember property value has changed.
Public Event DataSourceChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the DataSource property value has changed.
Public Event Disposed (Inherited from System.ComponentModel.Component) | Occurs when the component is disposed by a call to the Dispose method.
Public Event ListChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs when the underlying list changes or an item in the list changes.
Public Event PositionChanged (Inherited from System.Windows.Forms.BindingSource) | Occurs after the value of the Position property has changed.

See Also

DataLink Class | Devart.Data Namespace


%%PageItemTitle%% Delegates

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Data Namespace Delegates

See Also

Devart.Data Assembly


%%PageItemTitle%% Enumerations

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Data Namespace Enumerations

See Also

Devart.Data Assembly


%%ItemTitle%% $$INHERITANCE_HIERARCHY$$

Devart.Data Assembly

See Also Devart.Data Send comments on this topic.

Devart.Data Namespace Inheritance Hierarchy

System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.BindingSource
Devart.Data.DataLink

See Also

Devart.Data Namespace | Devart.Data Assembly


dotConnect for PostgreSQL Namespaces

dotConnect for PostgreSQL support@devart.com

dotConnect for PostgreSQL Reference

dotConnect for PostgreSQL provides you with two namespaces: Devart.Common and Devart.Data.PostgreSql. Classes in Devart.Common namespace represent functionality of ADO.NET 2 API. Namespace Devart.Data.PostgreSql extends Devart.Common functionality and adds PostgreSQL-specific features. Thus you can use advantages of ADO.NET 2 features regardless of what .NET framework you are using.

Namespace | Description
Devart.Common | Devart.Common namespace contains classes shared by the Devart data providers.
Devart.Data.PostgreSql | This namespace is the dotConnect for PostgreSQL.