pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feed[ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
3+ messages / 1 participants
[nested] [flat]
* [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
@ 2007-02-16 14:30 noreply@pgfoundry.org
0 siblings, 0 replies; 3+ messages in thread
From: noreply@pgfoundry.org @ 2007-02-16 14:30 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1002054, was opened at 2007-02-16 14:30
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
Initial Comment:
I discovered this as a side effect of something that seems to have changed. Seemingly, setting SQL_DESC_TYPE clears any information set during SQLBindCol (this is very different behaviour to all other ODBC drivers). Attempting to get around this by subsequently re-setting the indicator pointer seems to have no effect. Looking in pgapi30.c, it seems that this is the case:
break;
case SQL_DESC_DATA_PTR:
opts->bindings[row_idx].buffer = Value;
break;
case SQL_DESC_INDICATOR_PTR:
tptr = opts->bindings[row_idx].used;
if (Value != tptr)
{
ret = SQL_ERROR;
DC_set_error(desc,
DESC_INVALID_DESCRIPTOR_IDENTIFIER, "INDICATOR != OCTET_LENGTH_PTR");
}
break;
case SQL_DESC_OCTET_LENGTH_PTR:
opts->bindings[row_idx].used = Value;
break;
case SQL_DESC_OCTET_LENGTH:
opts->bindings[row_idx].buflen = CAST_PTR(SQLLEN,
Value);
break;
case SQL_DESC_PRECISION:
opts->bindings[row_idx].precision =
CAST_PTR(SQLSMALLINT, Value);
note, unlike all other options, SQL_DESC_INDICATOR_PTR doesn't seem to have any effect.
This all came about trying to determine why SQLFetch was throwing an error on a null data fetch (log file attached), erronously claiming that the strlen_or_ind pointer was null.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
^ permalink raw reply [nested|flat] 3+ messages in thread
* [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
@ 2007-02-16 14:31 noreply@pgfoundry.org
0 siblings, 0 replies; 3+ messages in thread
From: noreply@pgfoundry.org @ 2007-02-16 14:31 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1002054, was opened at 2007-02-16 14:30
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
Initial Comment:
I discovered this as a side effect of something that seems to have changed. Seemingly, setting SQL_DESC_TYPE clears any information set during SQLBindCol (this is very different behaviour to all other ODBC drivers). Attempting to get around this by subsequently re-setting the indicator pointer seems to have no effect. Looking in pgapi30.c, it seems that this is the case:
break;
case SQL_DESC_DATA_PTR:
opts->bindings[row_idx].buffer = Value;
break;
case SQL_DESC_INDICATOR_PTR:
tptr = opts->bindings[row_idx].used;
if (Value != tptr)
{
ret = SQL_ERROR;
DC_set_error(desc,
DESC_INVALID_DESCRIPTOR_IDENTIFIER, "INDICATOR != OCTET_LENGTH_PTR");
}
break;
case SQL_DESC_OCTET_LENGTH_PTR:
opts->bindings[row_idx].used = Value;
break;
case SQL_DESC_OCTET_LENGTH:
opts->bindings[row_idx].buflen = CAST_PTR(SQLLEN,
Value);
break;
case SQL_DESC_PRECISION:
opts->bindings[row_idx].precision =
CAST_PTR(SQLSMALLINT, Value);
note, unlike all other options, SQL_DESC_INDICATOR_PTR doesn't seem to have any effect.
This all came about trying to determine why SQLFetch was throwing an error on a null data fetch (log file attached), erronously claiming that the strlen_or_ind pointer was null.
----------------------------------------------------------------------
Comment By: Nobody (None)
Date: 2007-02-16 14:31
Message:
Forgot to mention, this is psqlodbc version 8.02.0200, working against PostgreSQL version 8.2.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
^ permalink raw reply [nested|flat] 3+ messages in thread
* [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
@ 2007-02-17 22:58 noreply@pgfoundry.org
0 siblings, 0 replies; 3+ messages in thread
From: noreply@pgfoundry.org @ 2007-02-17 22:58 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1002054, was opened at 2007-02-16 14:30
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect.
Initial Comment:
I discovered this as a side effect of something that seems to have changed. Seemingly, setting SQL_DESC_TYPE clears any information set during SQLBindCol (this is very different behaviour to all other ODBC drivers). Attempting to get around this by subsequently re-setting the indicator pointer seems to have no effect. Looking in pgapi30.c, it seems that this is the case:
break;
case SQL_DESC_DATA_PTR:
opts->bindings[row_idx].buffer = Value;
break;
case SQL_DESC_INDICATOR_PTR:
tptr = opts->bindings[row_idx].used;
if (Value != tptr)
{
ret = SQL_ERROR;
DC_set_error(desc,
DESC_INVALID_DESCRIPTOR_IDENTIFIER, "INDICATOR != OCTET_LENGTH_PTR");
}
break;
case SQL_DESC_OCTET_LENGTH_PTR:
opts->bindings[row_idx].used = Value;
break;
case SQL_DESC_OCTET_LENGTH:
opts->bindings[row_idx].buflen = CAST_PTR(SQLLEN,
Value);
break;
case SQL_DESC_PRECISION:
opts->bindings[row_idx].precision =
CAST_PTR(SQLSMALLINT, Value);
note, unlike all other options, SQL_DESC_INDICATOR_PTR doesn't seem to have any effect.
This all came about trying to determine why SQLFetch was throwing an error on a null data fetch (log file attached), erronously claiming that the strlen_or_ind pointer was null.
----------------------------------------------------------------------
>Comment By: Hiroshi Inoue (hinoue)
Date: 2007-02-17 22:58
Message:
IIRC this bug was fixed in 8.2.0201(2).
Could you try the snapshot dll at
http://www.geocities.jp/inocchichichi/psqlodbc/index.html
?
----------------------------------------------------------------------
Comment By: Nobody (None)
Date: 2007-02-16 14:31
Message:
Forgot to mention, this is psqlodbc version 8.02.0200, working against PostgreSQL version 8.2.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1002054&group_id=1000125
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2007-02-17 22:58 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16 14:30 [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect. noreply@pgfoundry.org
2007-02-16 14:31 [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect. noreply@pgfoundry.org
2007-02-17 22:58 [ psqlodbc-Bugs-1002054 ] SQLSetDescField with SQL_DESC_INDICATOR_PTR has no effect. noreply@pgfoundry.org
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox