Using DateTime as parameter for a Date field
Posted: Wed 24 Jul 2013 19:45
Hi,
I'm having issues pasing DateTime (dato is a DateTime) to a parameter... This is the right way to construct the parameter isn't it?!?
The Oracle field that the parameter is generated for, is a Date field....
-Kurt
I'm having issues pasing DateTime (dato is a DateTime) to a parameter... This is the right way to construct the parameter isn't it?!?
The Oracle field that the parameter is generated for, is a Date field....
Code: Select all
OracleParameter param1 = dataAdapter.SelectCommand.CreateParameter();
param1.OracleDbType = OracleDbType.Date;
param1.Direction = System.Data.ParameterDirection.Input;
param1.ParameterName = "Dato";
param1.Value = dato;
dataAdapter.SelectCommand.Parameters.Add(param1);