ODBC malfunction ? - Mailing list pgsql-interfaces

From Adrien Hernot
Subject ODBC malfunction ?
Date
Msg-id 394FAC9A.EA04B978@proventum.net
Whole thread Raw
List pgsql-interfaces
Hi,

I am using Postgres 7.0.2 on linux slackware k2.2.13.
I am trying to set up a replication from a MS SQL 7.0, using the
ODBC driver version 06.50.5000 (the latest).

I recompiled the ODBC driver with visual C++, to enable debugging.
So I have the mylog_* files.

Problem:
All my char(30) attribute of my table toto are converted to char.
(implicitly char(1) ). For example the table:
toto {tutu char(30),didi varchar(50)
}

will be created on postgres as
"TOTO" {tutu char,didi varchar(50)
}

And the problem arise when trying to fill in some data (column too
small).

The debug mylog_* tells me that when MS SQL ask for some type info
using SQLGetTypeInfo(), the CREATE_PARAMS attribute for the 'varchar'
type
says:
type = 25
manual_result
value = 'max. length'

but the same attribute for the type 'char' says:
type = 25
manual_result
value = '<NULL>'

I think this means that the 'varchar' type declaration takes an optional
value which is the max value for this field. In my opinion, if the
'char'
type should return the same (it would solve my problem?).

I would like some help on this.
I tried to look into the ODBC driver code,
but it is above my competences, knowing nothing about the OBDC spec.

If some one could direct me to some interesting test to do,
Iit would be great.

regards,

Adrien Hernot
Proventum A/S

--
L'au-delà de la mort, confié au mystère de Dieu, n'est plus braqué sur
les
affres du purgatoire ou des peines éternelles, mais sur le feu d'un
amour
purifiant et vivifiant. (http://www.partenia.fr/cate_f.htm)


pgsql-interfaces by date:

Previous
From: Bob Kline
Date:
Subject: getMoreResults() returns false incorrectly
Next
From: "Christian Pröhl"
Date:
Subject: JDBC 7.0 driver: Metadata support