Updating ADO.NET Client Code From Previous Driver Versions
Starting in release 5.1.1, the Vertica client drivers have been updated to improve standards compliance, performance, and reliability. As a result, some Vertica-specific features and past incompatibilities have been eliminated. You must update any client code written for the prior versions of the ADO.NET driver to work with the version 5.1.1 driver and beyond.
Auto Commit Change
- All queries are now Auto Committed. The only exception is that queries run using a Transaction are not committed until the Commit(); method is called.
Performance Improvements
- Prepared INSERT statements now run significantly faster than in previous driver versions. For the best performance, prepared statements should be executed as part of a transaction.
Namespace Change
- The namespace has changed from vertica to Vertica.Data.VerticaClient
Connection Properties
- DSN is no longer a valid connection string keyword. You cannot connect to Vertica using ADO.net with a DSN.
- The RowBufferSize connection property has been renamed to ResultBufferSize.
- Getters on the VerticaConnection to get various connection string options (CacheDirectoryPooling, MinPoolSize, MaxPoolSize, SyncNotification, Timeout, Enlist, UseExtendedTypes, Password, Pooling, MinPoolSize, MaxPoolSize) have been removed.
- There is no longer a locale connection string keyword and you cannot set the locale through the connection string. To change the locale, run the query "set locale to..."
- The connection property to enable or disable auto commit has been removed. All queries outside of transactions are auto-committed.
Result Buffering
-
The driver now buffers all results, and always uses streaming. Because of this, the following functionality has changed:
- VerticaCommandBehavior enum has been removed. This enum extended the ADO.NET CommandBehavior enum to add support for buffering results. Results are now buffered in Vertica 5.1.x.
- The VerticaCommand.ExecuteReader(CommandBehavior, bool) argument has been removed.
- CacheDirectory or PreloadReader connection string options have been removed.
Logging Changes
- Log properties are no longer configured on the connection string. Log properties are now configured through the VerticaLogProperties class.
Data Type Changes
The following data types have changed:
Old Datatype Name | New Datatype Name |
---|---|
verticaType.Integer |
VerticaType.BigInt |
verticaType.Bigint |
VerticaType.BigInt |
verticaType.Timestamp |
VerticaType.DateTime |
verticaType.Interval |
Changed to specific type of interval, for example:
|
verticaType.Real |
VerticaType.Double |
verticaType.Text |
VerticaType.VarChar |
verticaType.Smallint |
VerticaType.BigInt |
verticaType.Varbinary |
VerticaType.VarBinary |
Multiple Commands Now Supported
Multiple commands in a single statement are now supported, provided that parameters are not used in any of the commands in the statement. The exception is COPY commands. You cannot issue multiple COPY commands in the same statement.