Upgrade Guide > Upgrade Guide > D. Features Introduced in Ingres 10.0 > Connectivity Enhancements > IngresType.IngresDate Parameter Type in .NET Data Provider
Was this helpful?
IngresType.IngresDate Parameter Type in .NET Data Provider
The Ingres .NET Data Provider sends .NET DateTime parameter data to the Data Access Server and the DBMS Server. A new IngresType.IngresDate parameter type allows the application to specify that the DateTime parameter data be sent to the DBMS with an INGRESDATE data type and format.
As of Ingres 9.1 (also know as Ingres 2006 Release 2), the Ingres .NET Data Provider sends DateTime data as ANSI TIMESTAMP_WITH_TIMEZONE type, rather than INGRESDATE type. In some cases, the change in data type can produce unwanted effects after upgrading to new releases of Ingres.
The new parameter type directs the data provider to send the parameter data as an INGRESDATE data type and format. This feature should be used only in applications that access only INGRESDATE columns. Applications that access ANSI DateTime columns may experience side effects of this feature due to loss of fractional second information and time zone format differences when the DateTime parameter data is sent as INGRESDATE.
Example:
IngresConnection conn = new IngresConnection();
IngresCommand cmd;
cmd = new IngresCommand();
cmd.CommandText = "INSERT INTO my_table VALUES (?)";
cmd.Connection = conn;
cmd.Parameters.Add(new IngresParameter("mydateparm", IngresType.IngresDate));
cmd.Parameters[0].Value = DateTime.Now;
For details about the IngresType.IngresDate parameter type, see the Connectivity Guide.
Last modified date: 01/30/2023