Обсуждение: timestamp without time zone and datetime

Поиск
Список
Период
Сортировка

timestamp without time zone and datetime

От
danclemson
Дата:
Hi,

I have a stored procedure in db that takes a 'timestamp without time zone'
as its parameter.
The application uses c# and npgsql to access database.

When I call the stored procedure from c#, I got an exception says that the
stored procedure with 'timestamp with time zone' is unknown. It seems the
driver somehow maps the datatime to 'timestamp with time zone' in this case.

The code I used in c#;

            DbCommand command = conn.CreateCommand();
            command.CommandText = "getInfo";
            command.CommandType = CommandType.StoredProcedure;

            DbParameter param1 = command.CreateParameter();
            param1.DbType = DbType.DateTime;
            param1.Value = mission.StartTime //datetime value retrieved from
a database table 'timestamp without time zone' column
            command.Parameters.Add(param1);

            IDataReader dr = command.ExecuteReader();

Form npgsql user menu, both timestamp with/without time zone are mapped to
DbType.DateTime.
What is the issue here?

Thanks /dan
--
View this message in context: http://www.nabble.com/timestamp-without-time-zone-and-datetime-tp25910519p25910519.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.