Re: Ok... I got most of it working but . . .

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Ok... I got most of it working but . . .
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3415C2EBA@Herge.rcsinc.local
обсуждение исходный текст
Ответ на Ok... I got most of it working but . . .  (Bob Caryl <bob@fis-cal.com>)
Список pgsql-odbc
> >> However, when the odbc driver tries to update the new added record,
I
> >> get the following error message server side (and at my
application):
> >>
> >>    ERROR:  invalid input syntax for type double precision:
> >> "{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}"
> >>
> >> Evidently,  the odbc driver is deciding to optimize my query
> >> perhaps?  What am I doing wrong this time?

Doesn't look like it.  I tested in psql and server converted from array
of zeroes to array of double precision just fine.  Maybe you have some
older version of the server that doesn't have the cast.

What it looks like to me is that the server is trying to convert the
entire string to double precision.  Are you sure your tables has an
array type?

Observe: (note the last error message)
esp=# create table test (d character varying[]);
CREATE TABLE
esp=# drop table test;
DROP TABLE
esp=# create table test (d numeric(12,3)[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,0}');
INSERT 1121797 1
esp=# drop table test;
DROP TABLE
esp=# create table test (d double precision[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,0}');
INSERT 1121803 1
esp=# drop table test;
DROP TABLE
esp=# create table test (d double precision[]);
CREATE TABLE
esp=# insert into test values ('{0,0,0,0,0,0,a}');
ERROR:  invalid input syntax for type double precision: "a"
esp=#

Merlin

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: MS Access & foreign encoding bug
Следующее
От: Pailloncy Jean-Gerard
Дата:
Сообщение: iODBC & Mac OS