ODBC Numeric field issue
am 07.05.2010 16:03:36 von Luciane
Hi everyone,
I'm trying to access postgres using a ODBC Driver on a Linux system RedHat,
but I'm getting errors with numeric fields, it works only with one numeric
field. Another erro is that it is inserting a NULL record as well.
Below is my ODBC configuration and extracts from the erros on the debug
file. I've tried different versions of ODBC Drivers with no success. If any
one more experient could help me I'll be very happy. Actually I don't know
what to do anymore.
Thanks in advance.
Luciane
------> Odbc Configuration .odbc.ini
[PostG]
#Driver=3D/usr/lib/libodbcpsql.so.2
#Driver=3D/produtos/unixODBC-2.2.14/Drivers/Postgre7.1/.libs /libodbcpsql.so
#Driver=3D/produtos/unixODBC-2.2.10/Drivers/Postgre7.1/.libs /libodbcpsql.so
#Driver=3D/produtos/unixODBC-2.2.12/Drivers/Postgre7.1/.libs /libodbcpsql.so
#Driver=3D/produtos/unixODBC-2.2.13/Drivers/Postgre7.1/.libs /libodbcpsql.so
Driver=3D/produtos/unixODBC-2.3.0/Drivers/Postgre7.1/.libs/l ibodbcpsql.so.2
#Driver=3D/usr/lib/psqlodbcw.so
Description=3Ddrive postgres odbc
ServerPort=3D10.4.3.21:5432
Servername=3Dpgs1dsv
Database=3Dpgs1dsv
sername=3Dc_gco
Password=3Dinicio
ReadOnly=3Dno
Protocol=3D7.4
RowVersioning=3DNo
ShowSystemTables=3DNo
ShowOidColumn=3DNo
FakeOidIndex=3DNo
Debug=3D1
DebugFile=3D/tmp/postgII.out
Trace=3Dyes
TraceFile=3D/tmp/ODBCTrace.log
UseServerSidePrepare=3D1
DisallowPremature=3D1
#Parse=3D1
------> Debug - inserting NULL Record
SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D'I=
NSERT
INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)'
stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n2")
VALUES (NULL,NULL,NULL,NULL)'
it's NOT a select statement: stmt=3D140373784
send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1", "i=
1",
"n1", "n2") VALUES (NULL,NULL,NULL,NULL)'
send_query: done sending query
------> Debug - Issue on the second numeric field
SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D'I=
NSERT
INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)'
copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D5
copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D4
copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2
copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2
stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n2")
VALUES (00001,0000000001,'0000000001") VALUES
'::numeric,'0000000110Hé'::numeric)'
it's NOT a select statement: stmt=3D140373784
send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1", "i=
1",
"n1", "n2") VALUES (00001,0000000001,'0000000001") VALUES
'::numeric,'0000000110Hé'::numeric)'
send_query: done sending query
read 1, global_socket_buffersize=3D4096
send_query: got id =3D 'Z'
read 62, global_socket_buffersize=3D4096
send_query: got id =3D 'E'
send_query: 'E' - ERROR: invalid byte sequence for encoding "UTF8":
0xe95d08
--=20
View this message in context: http://old.nabble.com/ODBC-Numeric-field-issu=
e-tp28486416p28486416.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.
--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: ODBC Numeric field issue
am 07.05.2010 22:53:32 von Hiroshi Inoue
Hi Luciane,
Luciane wrote:
> Hi everyone,
>=20
> I'm trying to access postgres using a ODBC Driver on a Linux system Red=
Hat,
> but I'm getting errors with numeric fields, it works only with one nume=
ric
> field. Another erro is that it is inserting a NULL record as well.
> Below is my ODBC configuration and extracts from the erros on the debug
> file. I've tried different versions of ODBC Drivers with no success. If=
any
> one more experient could help me I'll be very happy. Actually I don't k=
now
> what to do anymore.
>=20
> Thanks in advance.
>=20
> Luciane
>=20
>=20
> ------> Odbc Configuration .odbc.ini
> [PostG]
> #Driver=3D/usr/lib/libodbcpsql.so.2
> #Driver=3D/produtos/unixODBC-2.2.14/Drivers/Postgre7.1/.libs /libodbcpsq=
l.so
> #Driver=3D/produtos/unixODBC-2.2.10/Drivers/Postgre7.1/.libs /libodbcpsq=
l.so
> #Driver=3D/produtos/unixODBC-2.2.12/Drivers/Postgre7.1/.libs /libodbcpsq=
l.so
> #Driver=3D/produtos/unixODBC-2.2.13/Drivers/Postgre7.1/.libs /libodbcpsq=
l.so
> Driver=3D/produtos/unixODBC-2.3.0/Drivers/Postgre7.1/.libs/l ibodbcpsql.=
so.2
> #Driver=3D/usr/lib/psqlodbcw.so
> Description=3Ddrive postgres odbc
> ServerPort=3D10.4.3.21:5432
> Servername=3Dpgs1dsv
> Database=3Dpgs1dsv
> sername=3Dc_gco
> Password=3Dinicio
> ReadOnly=3Dno
> Protocol=3D7.4
> RowVersioning=3DNo
> ShowSystemTables=3DNo
> ShowOidColumn=3DNo
> FakeOidIndex=3DNo
> Debug=3D1
> DebugFile=3D/tmp/postgII.out
> Trace=3Dyes
> TraceFile=3D/tmp/ODBCTrace.log
> UseServerSidePrepare=3D1
> DisallowPremature=3D1
> #Parse=3D1
>=20
>=20
> ------> Debug - inserting NULL Record
> SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D=
'INSERT
> INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)'
> stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n=
2")
> VALUES (NULL,NULL,NULL,NULL)'
> it's NOT a select statement: stmt=3D140373784
> send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1"=
, "i1",
> "n1", "n2") VALUES (NULL,NULL,NULL,NULL)'
> send_query: done sending query
I can't see what kind of result you expect.
Could you send me directly the Mylog output?
> ------> Debug - Issue on the second numeric field
> SQLExecute: copying statement params: trans_status=3D1, len=3D66, stmt=3D=
'INSERT
> INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?)'
> copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D5
> copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D4
> copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2
> copy_statement_with_params: from(fcType)=3D1, to(fSqlType)=3D2
How do you bind the 4 parameters?
> stmt_with_params =3D 'INSERT INTO "teste_carga"("s1", "i1", "n1", "n=
2")
> VALUES (00001,0000000001,'0000000001") VALUES
> '::numeric,'0000000110Hé'::numeric)'
> it's NOT a select statement: stmt=3D140373784
> send_query(): conn=3D140316008, query=3D'INSERT INTO "teste_carga"("s1"=
, "i1",
> "n1", "n2") VALUES (00001,0000000001,'0000000001") VALUES
> '::numeric,'0000000110Hé'::numeric)'
> send_query: done sending query
> read 1, global_socket_buffersize=3D4096
> send_query: got id =3D 'Z'
> read 62, global_socket_buffersize=3D4096
> send_query: got id =3D 'E'
> send_query: 'E' - ERROR: invalid byte sequence for encoding "UTF8":
> 0xe95d08
--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: ODBC Numeric field issue
am 10.05.2010 15:31:44 von Luciane
Hiroshi Inoue,
I've uploaded the Mylog_ file.
I'm trying to use PostgresSQL with IBM DataStage.
The problem happens only with the second numeric fiel, I've tried all others
Postgres field types and it works properly.
the SQL shown by Datastage seams to be right to me look:
INSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?);
I've asked IBM support and they couldn't help me.
http://old.nabble.com/file/p28511550/mylog_a0251185604.log
mylog_a0251185604.log
Luciane
--
View this message in context: http://old.nabble.com/ODBC-Numeric-field-issue-tp28486416p28 511550.html
Sent from the PostgreSQL - odbc mailing list archive at Nabble.com.
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Re: ODBC Numeric field issue
am 11.05.2010 05:30:02 von Hiroshi Inoue
Luciane wrote:
>
> Hiroshi Inoue,
>
> I've uploaded the Mylog_ file.
> I'm trying to use PostgresSQL with IBM DataStage.
> The problem happens only with the second numeric fiel, I've tried all others
> Postgres field types and it works properly.
> the SQL shown by Datastage seams to be right to me look:
> INSERT INTO "teste_carga"("s1", "i1", "n1", "n2") VALUES (?,?,?,?);
> I've asked IBM support and they couldn't help me.
>
> http://old.nabble.com/file/p28511550/mylog_a0251185604.log
> mylog_a0251185604.log
Thanks.
What kind of psqlodbc driver are you using?
Judging from the log the driver seems far from the current.
regards,
Hiroshi Inoue
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc