timestamp without time zone and datetime

From: danclemson <danclemson(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: timestamp without time zone and datetime
Date: 2009-10-15 15:20:27
Message-ID: 25910519.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-10-15 15:38:56 Re: SFPUG: Video from "Statistics and Postgres -- How the Planner Sees Your Data" Now on Vimeo
Previous Message Nathan Boley 2009-10-15 15:20:08 Re: SFPUG: Video from "Statistics and Postgres -- How the Planner Sees Your Data" Now on Vimeo