timestamp without time zone and datetime

Поиск
Список
Период
Сортировка
От danclemson
Тема timestamp without time zone and datetime
Дата
Msg-id 25910519.post@talk.nabble.com
обсуждение исходный текст
Список pgsql-general
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.


В списке pgsql-general по дате отправления:

Предыдущее
От: Christophe Pettus
Дата:
Сообщение: Re: SFPUG: Video from "Statistics and Postgres -- How the Planner Sees Your Data" Now on Vimeo
Следующее
От: "Bob Pawley"
Дата:
Сообщение: Many instances of postgres.exe