pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Inserting dates instead of varchar?
2+ messages / 2 participants
[nested] [flat]

* Inserting dates instead of varchar?
@ 2005-02-17 23:28  Schuhmacher, Bret <Bret.Schuhmacher@Aspect.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Schuhmacher, Bret @ 2005-02-17 23:28 UTC (permalink / raw)
  To: pgsql-odbc

 Hello all - I've checked the bug list and didn't see 
 anything, so here goes...
 
 I have the following dataset I want to store in PostgreSQL (this shows two columns):
 
 1009	Timeout/Invalid Entries. HRSC Top menu.
 1010	0 out. Main NCAL menu.
 1014	NCAL Employment Verification.
 1019	Timeout/Invalid Entries. Main NCAL menu.
 1024	NCAL Direct Deposit.
 2050	0 out. SCAL Benefits menu.
 2052	SCAL 401K plans.
 2053	SCAL Life & LTD Insurance.
 2054	SCAL Spending Accounts.
 2055	SCAL Retirement Information.
 2059	Timeout/Invalid Entries. SCAL Benefits menu.
 
My table has two columns:
CREATE TABLE dnismap
(
  dnis varchar(40) NOT NULL,
  dnisdesc varchar(150),
  CONSTRAINT dnismap_pkey PRIMARY KEY (dnis)
) 
WITH OIDS;
ALTER TABLE dnismap OWNER TO postgres;
GRANT ALL ON TABLE dnismap TO postgres;
GRANT ALL ON TABLE dnismap TO public;

 When I attempt to insert this data this table via the ODBC driver I get *dates* (without time or tz) instead of the given data, like this:

	dnis				dnisdesc
 2005-02-17 00:00:00	 2005-02-17 00:00:00
 
 This is on Win2KAS, with PostgreSQL 8.0.1, and the PostgreSQL ODBC driver v8.00.00.04 that came with my windows setup package I downloaded today from the PostgreSQL.org site.  
 
 The application that uses the ODBC DSN and does the inserting 
 has been well tested with Oracle and TimesTen ODBC drivers.  
 This is my first attempt at using PostgreSQL with this application, though.

Can anyone provide any insight into this odd issue?  Is there a mapping issue when binding text into varchar fields or something?

Thanks in advance,

Bret
--
Bret A. Schuhmacher 
Sr. Architect
Aspect Communications
1310 Ridder Park Drive
San Jose, CA  95131
 
423.837.7563 Office/Mobile
www.aspect.com




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Inserting dates instead of varchar?
@ 2005-02-18 14:33  Jeff Eckermann <jeff_eckermann@yahoo.com>
  parent: Schuhmacher, Bret <Bret.Schuhmacher@Aspect.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeff Eckermann @ 2005-02-18 14:33 UTC (permalink / raw)
  To: Schuhmacher, Bret <Bret.Schuhmacher@Aspect.com>; pgsql-odbc

--- "Schuhmacher, Bret" <Bret.Schuhmacher@Aspect.com>
wrote:

>  Hello all - I've checked the bug list and didn't
> see 
>  anything, so here goes...
>  
>  I have the following dataset I want to store in
> PostgreSQL (this shows two columns):
>  
>  1009	Timeout/Invalid Entries. HRSC Top menu.
>  1010	0 out. Main NCAL menu.
>  1014	NCAL Employment Verification.
>  1019	Timeout/Invalid Entries. Main NCAL menu.
>  1024	NCAL Direct Deposit.
>  2050	0 out. SCAL Benefits menu.
>  2052	SCAL 401K plans.
>  2053	SCAL Life & LTD Insurance.
>  2054	SCAL Spending Accounts.
>  2055	SCAL Retirement Information.
>  2059	Timeout/Invalid Entries. SCAL Benefits menu.
>  
> My table has two columns:
> CREATE TABLE dnismap
> (
>   dnis varchar(40) NOT NULL,
>   dnisdesc varchar(150),
>   CONSTRAINT dnismap_pkey PRIMARY KEY (dnis)
> ) 
> WITH OIDS;
> ALTER TABLE dnismap OWNER TO postgres;
> GRANT ALL ON TABLE dnismap TO postgres;
> GRANT ALL ON TABLE dnismap TO public;
> 
>  When I attempt to insert this data this table via
> the ODBC driver I get *dates* (without time or tz)
> instead of the given data, like this:
> 
> 	dnis				dnisdesc
>  2005-02-17 00:00:00	 2005-02-17 00:00:00

Bizarre.  Try ODBC logging, if you aren't already, and
check to see what queries are being sent to
PostgreSQL.  What interface are you using to handle
the inserting?

>  
>  This is on Win2KAS, with PostgreSQL 8.0.1, and the
> PostgreSQL ODBC driver v8.00.00.04 that came with my
> windows setup package I downloaded today from the
> PostgreSQL.org site.  
>  
>  The application that uses the ODBC DSN and does the
> inserting 
>  has been well tested with Oracle and TimesTen ODBC
> drivers.  
>  This is my first attempt at using PostgreSQL with
> this application, though.
> 
> Can anyone provide any insight into this odd issue? 
> Is there a mapping issue when binding text into
> varchar fields or something?
> 
> Thanks in advance,
> 
> Bret
> --
> Bret A. Schuhmacher 
> Sr. Architect
> Aspect Communications
> 1310 Ridder Park Drive
> San Jose, CA  95131
>  
> 423.837.7563 Office/Mobile
> www.aspect.com
> 
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-02-18 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-02-17 23:28 Inserting dates instead of varchar? Schuhmacher, Bret <Bret.Schuhmacher@Aspect.com>
2005-02-18 14:33 ` Jeff Eckermann <jeff_eckermann@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox