timestamp without time zone and datetime - Mailing list pgsql-general

From danclemson
Subject timestamp without time zone and datetime
Date
Msg-id 25910519.post@talk.nabble.com
Whole thread Raw
List 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 by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: SFPUG: Video from "Statistics and Postgres -- How the Planner Sees Your Data" Now on Vimeo
Next
From: "Bob Pawley"
Date:
Subject: Many instances of postgres.exe