ODBC malfunction ?

From: Adrien Hernot <ahernot(at)proventum(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: ODBC malfunction ?
Date: 2000-06-20 17:40:42
Message-ID: 394FAC9A.EA04B978@proventum.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jeremy Buchmann 2000-06-20 19:18:39 Re: Perl interface
Previous Message Constantin Teodorescu 2000-06-20 17:33:46 Re: pgaccess deletes function in database