.NET API

ADO.NET

In C#, it is possible to connect to NitrosBase via the ADO.Net driver. The name of the driver is "Nitros.Net". The driver contains two libraries: Nitros.Net.Win.dll and nbclient.dll, and implements the following subset of the ADO.NET standard interface:

  • IDbConnection
  • IDbTransaction
  • IDbCommand
  • IDataReader
  • IDbDataParameter
  • IDataParameterCollection

IDbConnection: NitrosBaseConnection

The interface is implemented in the NitrosBaseConnection class.

Connection string format:

data source='dbserver';initial catalog='dbname'; userid='username';password='password';

Please see the official Microsoft documentation for more information on the interface properties and methods.

IDbTransaction: NitrosBaseTransaction

The interface is implemented in the NitrosBaseTransaction class. Currently, transactions are not supported by NitrosBase.

Please see the official Microsoft documentation for more info on the interface properties and methods.

IDbCommand: NitrosBaseCommand

The interface is implemented in the NitrosBaseCommand class.

  • The ExecuteNonQuery method always returns 0, because NitrosBase doesn't support retrieving the number of potentially affected rows.
  • The Cancel method doesn't do anything, because respective method is not present in the NitrosBase API.
  • The Prepare method just substitutes parameter values on the client side.

Please see the official Microsoft documentation for more information on the interface properties and methods.

IDataReader: NitrosBaseDataReader

The interface is implemented in the NitrosBaseDataReader.

The following methods are not implemented and throw the NotImplementedException exception:

  • GetBoolean
  • GetByte
  • GetBytes
  • GetChars

The RecordsAffected property is always -1.

Please see the official Microsoft documentation for more information on the interface properties and methods.

IDbDataParameter: NitrosBaseDataParameter

The interface is implemented in the NitrosBaseDataParameter class.

Scale, Precision, Size, ParameterDirection are not supported or partially supported:

  • Precision and Scale return 0; an attempt to set values throws NotImplementedException.
  • Size always throws NotImplementedException.
  • ParameterDirection returns InputDirection; an attempt to set values throws NotImplementedException.

Please see the official Microsoft documentation for more info on the interface properties and methods.

IDataParameterCollection: NitrosBaseDataParameterCollection

The interface is implemented in the NitrosBaseDataParameterCollection class.

Please see the official Microsoft documentation for more info on the interface properties and methods.

SSRS driver

The Microsoft Reporting Services driver allows you to build reports using data stored in NitrosBase. The process of SRSS driver registration is described in the official Microsoft documentation.

In RSReportDesigner.config:

  • for Visual Studio, use the 32-bit build (nbclient32.dll, Nitros.Net.Win.dll)
  • both libraries (nbclient32.dll, Nitros.Net.Win) have to be copied into all directories
  • tags for RSReportDesigner.config are the following:

<Extension Name="NB"
Type="NitrosData.Nitros.Net.NitrosBaseConnectionReporting,Nitros.Net.Win"/><Extension Name="NB"
Type="Microsoft.ReportingServices.QueryDesigners.SMQLQueryDesigner,
Microsoft. ReportingServices.QueryDesigners.Extensions"/>