Inserting dates instead of varchar?

From: "Schuhmacher, Bret" <Bret(dot)Schuhmacher(at)Aspect(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Inserting dates instead of varchar?
Date: 2005-02-17 23:28:45
Message-ID: 98E4F4D46DACD0479C96D7356D5C37356B04E8@sac1exch3.aspect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Steve Backman 2005-02-18 11:43:52 More Problems with ODBC and Access
Previous Message laurie.burrow 2005-02-17 18:55:40 Cannot link to postgres 8.0.0 databases using ODBC from Access