Обсуждение: Blank varchar and text fields

Поиск
Список
Период
Сортировка

Blank varchar and text fields

От
"Peter L."
Дата:
I'm using the latest release version of the driver dll psqlodbc-08_00_0101 with a report writing application called R&R Report writer.  When a report queries the database for data to display, all of the varchar and text fields come back blank.  After doing some research, the only evidence of the cause that I'm finding is that the cbValueMax for those fields is 1 instead of the actual length of the text buffer.  Can anyone suggest a solution or where in the code I should look to fix this problem?
 
Log snippets:
psqldobc.log
conn=43202584, query='select * from www.quote where 0 = 1'
    [ fetched 0 rows ]
conn=43202584, query='select u.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind from pg_catalog.pg_namespace u, pg_catalog.pg_class c, pg_catalog.pg_attribute a, pg_catalog.pg_type t where u.oid = c.relnamespace and (not a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = 'quote' and u.nspname = 'www'  and nspname !~ '^pg_' order by u.nspname, c.relname, attnum'
    [ fetched 72 rows ]
...
PGAPI_Columns: table='quote',field_name='quote_id',type=23,name='int4'
PGAPI_Columns: table='quote',field_name='account_name',type=1043,name='varchar'
PGAPI_Columns: table='quote',field_name='responses',type=25,name='text'
...
The 2th item was truncated
The buffer size = 1 and the value is 'Hydro Aluminum Automotive'
The 3th item was truncated
The buffer size = 1 and the value is ' The crimp specification is 15.9mm or .626 inch.  Unfortunataly there is not a 43 series die that goes that tight.'
mylog.log
 
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='quote_id', adtid=23, adtsize=4, atttypmod=-1
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='account_name', adtid=1043, adtsize=-1, atttypmod=80
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='responses', adtid=25, adtsize=-1, atttypmod=-1
...
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.3..
[940]PARSE: DescribeCol: icol=2, stmt=43230000, stmt->nfld=23, stmt->fi=43197072
[940]DescribeCol: getting info for icol=2
[940]PARSE: fieldtype=23, col_name='quote_id', column_size=10
[940]describeCol: col 2 fieldname = 'quote_id'
[940]describeCol: col 2 fieldtype = 23
[940]describeCol: col 2 column_size = 10
[940]describeCol: col 2 *pfSqlType = 4
[940]describeCol: col 2  *pcbColDef = 10
[940]describeCol: col 2  *pibScale = 0
[940]describeCol: col 2  *pfNullable = 1
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.16..
[940]PARSE: DescribeCol: icol=15, stmt=43230000, stmt->nfld=35, stmt->fi=43196648
[940]DescribeCol: getting info for icol=15
[940]PARSE: fieldtype=1043, col_name='account_name', column_size=80
[940]describeCol: col 15 fieldname = 'account_name'
[940]describeCol: col 15 fieldtype = 1043
[940]describeCol: col 15 column_size = 80
[940]getCharColumnSize: type=1043, col=15, unknown = 0
[940]describeCol: col 15 *pfSqlType = -9
[940]describeCol: col 15  *pcbColDef = 80
[940]describeCol: col 15  *pibScale = 0
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.9..
[940]PARSE: DescribeCol: icol=8, stmt=43230000, stmt->nfld=35, stmt->fi=43196648
[940]DescribeCol: getting info for icol=8
[940]PARSE: fieldtype=25, col_name='responses', column_size=8190
[940]describeCol: col 8 fieldname = 'responses'
[940]describeCol: col 8 fieldtype = 25
[940]describeCol: col 8 column_size = 8190
[940]describeCol: col 8 *pfSqlType = -10
[940]describeCol: col 8  *pcbColDef = 8190
[940]describeCol: col 8  *pibScale = 0
[940]describeCol: col 8  *pfNullable = 1
...
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 1
[940]**** : fCType=4 rgb=18a490 valusMax=4 pcb=16de88
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=17, num_columns=18
[940]exit extend_gdata_info
[940]       bound buffer[17] = 1614992
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 2
[940]**** : fCType=1 rgb=12d564 valusMax=1 pcb=cc008
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=6, num_columns=7
[940]exit extend_gdata_info
[940]       bound buffer[6] = 1234276
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 3
[940]**** : fCType=1 rgb=18a574 valusMax=16 pcb=16e088
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=20, num_columns=21
[940]exit extend_gdata_info
[940]       bound buffer[20] = 1615220


Start your day with Yahoo! - make it your home page

Re: Blank varchar and text fields

От
"Dave Page"
Дата:
Hi,
 
Can you try the snapshot driver at ftp://ftp.postgresql.org/pub/odbc/versions/snapshots/psqlodbclibpq-08_01_0002.zip please? It will install in parallel with the existing driver as PostgreSQL-libpq, so you may need to create a new DSN, or modify your connection string.
 
I've found this version seems to fix some string related issues I was seeing with the old version.
 
Regards, Dave.


From: pgsql-odbc-owner@postgresql.org [mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Peter L.
Sent: 21 July 2005 19:51
To: pgsql-odbc@postgresql.org
Subject: [ODBC] Blank varchar and text fields

I'm using the latest release version of the driver dll psqlodbc-08_00_0101 with a report writing application called R&R Report writer.  When a report queries the database for data to display, all of the varchar and text fields come back blank.  After doing some research, the only evidence of the cause that I'm finding is that the cbValueMax for those fields is 1 instead of the actual length of the text buffer.  Can anyone suggest a solution or where in the code I should look to fix this problem?
 
Log snippets:
psqldobc.log
conn=43202584, query='select * from www.quote where 0 = 1'
    [ fetched 0 rows ]
conn=43202584, query='select u.nspname, c.relname, a.attname, a.atttypid, t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules, c.relkind from pg_catalog.pg_namespace u, pg_catalog.pg_class c, pg_catalog.pg_attribute a, pg_catalog.pg_type t where u.oid = c.relnamespace and (not a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and (a.attnum > 0) and c.relname = 'quote' and u.nspname = 'www'  and nspname !~ '^pg_' order by u.nspname, c.relname, attnum'
    [ fetched 72 rows ]
...
PGAPI_Columns: table='quote',field_name='quote_id',type=23,name='int4'
PGAPI_Columns: table='quote',field_name='account_name',type=1043,name='varchar'
PGAPI_Columns: table='quote',field_name='responses',type=25,name='text'
...
The 2th item was truncated
The buffer size = 1 and the value is 'Hydro Aluminum Automotive'
The 3th item was truncated
The buffer size = 1 and the value is ' The crimp specification is 15.9mm or .626 inch.  Unfortunataly there is not a 43 series die that goes that tight.'
mylog.log
 
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='quote_id', adtid=23, adtsize=4, atttypmod=-1
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='account_name', adtid=1043, adtsize=-1, atttypmod=80
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='responses', adtid=25, adtsize=-1, atttypmod=-1
...
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.3..
[940]PARSE: DescribeCol: icol=2, stmt=43230000, stmt->nfld=23, stmt->fi=43197072
[940]DescribeCol: getting info for icol=2
[940]PARSE: fieldtype=23, col_name='quote_id', column_size=10
[940]describeCol: col 2 fieldname = 'quote_id'
[940]describeCol: col 2 fieldtype = 23
[940]describeCol: col 2 column_size = 10
[940]describeCol: col 2 *pfSqlType = 4
[940]describeCol: col 2  *pcbColDef = 10
[940]describeCol: col 2  *pibScale = 0
[940]describeCol: col 2  *pfNullable = 1
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.16..
[940]PARSE: DescribeCol: icol=15, stmt=43230000, stmt->nfld=35, stmt->fi=43196648
[940]DescribeCol: getting info for icol=15
[940]PARSE: fieldtype=1043, col_name='account_name', column_size=80
[940]describeCol: col 15 fieldname = 'account_name'
[940]describeCol: col 15 fieldtype = 1043
[940]describeCol: col 15 column_size = 80
[940]getCharColumnSize: type=1043, col=15, unknown = 0
[940]describeCol: col 15 *pfSqlType = -9
[940]describeCol: col 15  *pcbColDef = 80
[940]describeCol: col 15  *pibScale = 0
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.9..
[940]PARSE: DescribeCol: icol=8, stmt=43230000, stmt->nfld=35, stmt->fi=43196648
[940]DescribeCol: getting info for icol=8
[940]PARSE: fieldtype=25, col_name='responses', column_size=8190
[940]describeCol: col 8 fieldname = 'responses'
[940]describeCol: col 8 fieldtype = 25
[940]describeCol: col 8 column_size = 8190
[940]describeCol: col 8 *pfSqlType = -10
[940]describeCol: col 8  *pcbColDef = 8190
[940]describeCol: col 8  *pibScale = 0
[940]describeCol: col 8  *pfNullable = 1
...
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 1
[940]**** : fCType=4 rgb=18a490 valusMax=4 pcb=16de88
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=17, num_columns=18
[940]exit extend_gdata_info
[940]       bound buffer[17] = 1614992
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 2
[940]**** : fCType=1 rgb=12d564 valusMax=1 pcb=cc008
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=6, num_columns=7
[940]exit extend_gdata_info
[940]       bound buffer[6] = 1234276
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 3
[940]**** : fCType=1 rgb=18a574 valusMax=16 pcb=16e088
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=20, num_columns=21
[940]exit extend_gdata_info
[940]       bound buffer[20] = 1615220


Start your day with Yahoo! - make it your home page

Re: Blank varchar and text fields

От
"Miguel Juan"
Дата:
Hello,

You can use the version 7.x of the driver. Version 8.x of the driver
introduced this odd functionallity that returns blanks for all string data
if you work with some products. This happens to me with all tha applications
that use Borland BDE.

NOTE: I didn't try the last (libpq) version.

Regards

Miguel Juan


----- Original Message -----
From: Peter L.
To: pgsql-odbc@postgresql.org
Sent: Thursday, July 21, 2005 8:50 PM
Subject: [ODBC] Blank varchar and text fields


I'm using the latest release version of the driver dll psqlodbc-08_00_0101
with a report writing application called R&R Report writer.  When a report
queries the database for data to display, all of the varchar and text fields
come back blank.  After doing some research, the only evidence of the cause
that I'm finding is that the cbValueMax for those fields is 1 instead of the
actual length of the text buffer.  Can anyone suggest a solution or where in
the code I should look to fix this problem?

Log snippets:
psqldobc.log
conn=43202584, query='select * from www.quote where 0 = 1'
    [ fetched 0 rows ]
conn=43202584, query='select u.nspname, c.relname, a.attname, a.atttypid,
t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules,
c.relkind from pg_catalog.pg_namespace u, pg_catalog.pg_class c,
pg_catalog.pg_attribute a, pg_catalog.pg_type t where u.oid = c.relnamespace
and (not a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and
(a.attnum > 0) and c.relname = 'quote' and u.nspname = 'www'  and nspname !~
'^pg_' order by u.nspname, c.relname, attnum'
    [ fetched 72 rows ]
...
PGAPI_Columns: table='quote',field_name='quote_id',type=23,name='int4'
PGAPI_Columns:
table='quote',field_name='account_name',type=1043,name='varchar'
PGAPI_Columns: table='quote',field_name='responses',type=25,name='text'
...
The 2th item was truncated
The buffer size = 1 and the value is 'Hydro Aluminum Automotive'
The 3th item was truncated
The buffer size = 1 and the value is ' The crimp specification is 15.9mm or
.626 inch.  Unfortunataly there is not a 43 series die that goes that
tight.'

mylog.log

[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='quote_id', adtid=23, adtsize=4, atttypmod=-1
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='account_name', adtid=1043, adtsize=-1,
atttypmod=80
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='responses', adtid=25, adtsize=-1,
atttypmod=-1
...
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.3..
[940]PARSE: DescribeCol: icol=2, stmt=43230000, stmt->nfld=23,
stmt->fi=43197072
[940]DescribeCol: getting info for icol=2
[940]PARSE: fieldtype=23, col_name='quote_id', column_size=10
[940]describeCol: col 2 fieldname = 'quote_id'
[940]describeCol: col 2 fieldtype = 23
[940]describeCol: col 2 column_size = 10
[940]describeCol: col 2 *pfSqlType = 4
[940]describeCol: col 2  *pcbColDef = 10
[940]describeCol: col 2  *pibScale = 0
[940]describeCol: col 2  *pfNullable = 1
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.16..
[940]PARSE: DescribeCol: icol=15, stmt=43230000, stmt->nfld=35,
stmt->fi=43196648
[940]DescribeCol: getting info for icol=15
[940]PARSE: fieldtype=1043, col_name='account_name', column_size=80
[940]describeCol: col 15 fieldname = 'account_name'
[940]describeCol: col 15 fieldtype = 1043
[940]describeCol: col 15 column_size = 80
[940]getCharColumnSize: type=1043, col=15, unknown = 0
[940]describeCol: col 15 *pfSqlType = -9
[940]describeCol: col 15  *pcbColDef = 80
[940]describeCol: col 15  *pibScale = 0
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.9..
[940]PARSE: DescribeCol: icol=8, stmt=43230000, stmt->nfld=35,
stmt->fi=43196648
[940]DescribeCol: getting info for icol=8
[940]PARSE: fieldtype=25, col_name='responses', column_size=8190
[940]describeCol: col 8 fieldname = 'responses'
[940]describeCol: col 8 fieldtype = 25
[940]describeCol: col 8 column_size = 8190
[940]describeCol: col 8 *pfSqlType = -10
[940]describeCol: col 8  *pcbColDef = 8190
[940]describeCol: col 8  *pibScale = 0
[940]describeCol: col 8  *pfNullable = 1
...
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 1
[940]**** : fCType=4 rgb=18a490 valusMax=4 pcb=16de88
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=17,
num_columns=18
[940]exit extend_gdata_info
[940]       bound buffer[17] = 1614992
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 2
[940]**** : fCType=1 rgb=12d564 valusMax=1 pcb=cc008
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=6,
num_columns=7
[940]exit extend_gdata_info
[940]       bound buffer[6] = 1234276
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 3
[940]**** : fCType=1 rgb=18a574 valusMax=16 pcb=16e088
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=20,
num_columns=21
[940]exit extend_gdata_info
[940]       bound buffer[20] = 1615220



Start your day with Yahoo! - make it your home page



Re: Blank varchar and text fields

От
"Joel Fradkin"
Дата:
I switched to the zeos lib for my Delphi apps, so far so good.

Joel Fradkin



-----Original Message-----
From: pgsql-odbc-owner@postgresql.org
[mailto:pgsql-odbc-owner@postgresql.org] On Behalf Of Miguel Juan
Sent: Friday, July 22, 2005 4:00 AM
To: Peter L.
Cc: pgsql-odbc@postgresql.org
Subject: Re: [ODBC] Blank varchar and text fields

Hello,

You can use the version 7.x of the driver. Version 8.x of the driver
introduced this odd functionallity that returns blanks for all string data
if you work with some products. This happens to me with all tha applications

that use Borland BDE.

NOTE: I didn't try the last (libpq) version.

Regards

Miguel Juan


----- Original Message -----
From: Peter L.
To: pgsql-odbc@postgresql.org
Sent: Thursday, July 21, 2005 8:50 PM
Subject: [ODBC] Blank varchar and text fields


I'm using the latest release version of the driver dll psqlodbc-08_00_0101
with a report writing application called R&R Report writer.  When a report
queries the database for data to display, all of the varchar and text fields

come back blank.  After doing some research, the only evidence of the cause
that I'm finding is that the cbValueMax for those fields is 1 instead of the

actual length of the text buffer.  Can anyone suggest a solution or where in

the code I should look to fix this problem?

Log snippets:
psqldobc.log
conn=43202584, query='select * from www.quote where 0 = 1'
    [ fetched 0 rows ]
conn=43202584, query='select u.nspname, c.relname, a.attname, a.atttypid,
t.typname, a.attnum, a.attlen, a.atttypmod, a.attnotnull, c.relhasrules,
c.relkind from pg_catalog.pg_namespace u, pg_catalog.pg_class c,
pg_catalog.pg_attribute a, pg_catalog.pg_type t where u.oid = c.relnamespace

and (not a.attisdropped) and c.oid= a.attrelid and a.atttypid = t.oid and
(a.attnum > 0) and c.relname = 'quote' and u.nspname = 'www'  and nspname !~

'^pg_' order by u.nspname, c.relname, attnum'
    [ fetched 72 rows ]
...
PGAPI_Columns: table='quote',field_name='quote_id',type=23,name='int4'
PGAPI_Columns:
table='quote',field_name='account_name',type=1043,name='varchar'
PGAPI_Columns: table='quote',field_name='responses',type=25,name='text'
...
The 2th item was truncated
The buffer size = 1 and the value is 'Hydro Aluminum Automotive'
The 3th item was truncated
The buffer size = 1 and the value is ' The crimp specification is 15.9mm or
.626 inch.  Unfortunataly there is not a 43 series die that goes that
tight.'

mylog.log

[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='quote_id', adtid=23, adtsize=4, atttypmod=-1
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='account_name', adtid=1043, adtsize=-1,
atttypmod=80
[940]READING ATTTYPMOD
[940]CI_read_fields: fieldname='responses', adtid=25, adtsize=-1,
atttypmod=-1
...
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.3..
[940]PARSE: DescribeCol: icol=2, stmt=43230000, stmt->nfld=23,
stmt->fi=43197072
[940]DescribeCol: getting info for icol=2
[940]PARSE: fieldtype=23, col_name='quote_id', column_size=10
[940]describeCol: col 2 fieldname = 'quote_id'
[940]describeCol: col 2 fieldtype = 23
[940]describeCol: col 2 column_size = 10
[940]describeCol: col 2 *pfSqlType = 4
[940]describeCol: col 2  *pcbColDef = 10
[940]describeCol: col 2  *pibScale = 0
[940]describeCol: col 2  *pfNullable = 1
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.16..
[940]PARSE: DescribeCol: icol=15, stmt=43230000, stmt->nfld=35,
stmt->fi=43196648
[940]DescribeCol: getting info for icol=15
[940]PARSE: fieldtype=1043, col_name='account_name', column_size=80
[940]describeCol: col 15 fieldname = 'account_name'
[940]describeCol: col 15 fieldtype = 1043
[940]describeCol: col 15 column_size = 80
[940]getCharColumnSize: type=1043, col=15, unknown = 0
[940]describeCol: col 15 *pfSqlType = -9
[940]describeCol: col 15  *pcbColDef = 80
[940]describeCol: col 15  *pibScale = 0
[940][SQLDescribeColW][940]PGAPI_DescribeCol: entering.9..
[940]PARSE: DescribeCol: icol=8, stmt=43230000, stmt->nfld=35,
stmt->fi=43196648
[940]DescribeCol: getting info for icol=8
[940]PARSE: fieldtype=25, col_name='responses', column_size=8190
[940]describeCol: col 8 fieldname = 'responses'
[940]describeCol: col 8 fieldtype = 25
[940]describeCol: col 8 column_size = 8190
[940]describeCol: col 8 *pfSqlType = -10
[940]describeCol: col 8  *pcbColDef = 8190
[940]describeCol: col 8  *pibScale = 0
[940]describeCol: col 8  *pfNullable = 1
...
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 1
[940]**** : fCType=4 rgb=18a490 valusMax=4 pcb=16de88
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=17,
num_columns=18
[940]exit extend_gdata_info
[940]       bound buffer[17] = 1614992
[940][SQLBindCol][940]PGAPI_BindCol: entering...
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 2
[940]**** : fCType=1 rgb=12d564 valusMax=1 pcb=cc008
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=6,
num_columns=7
[940]exit extend_gdata_info
[940]       bound buffer[6] = 1234276
[940]**** PGAPI_BindCol: stmt = 43230000, icol = 3
[940]**** : fCType=1 rgb=18a574 valusMax=16 pcb=16e088
[940]extend_getdata_info: entering ... self=43230348, gdata_allocated=20,
num_columns=21
[940]exit extend_gdata_info
[940]       bound buffer[20] = 1615220



Start your day with Yahoo! - make it your home page



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq