Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

sqldatasource dal, wwwxxxenden, convert raid5 to raid 10 mdadm, apache force chunked, nrao wwwxxx, xxxxxdup, procmail change subject header, wwwXxx not20, Wwwxxx.doks sas, linux raid resync after reboot

Links

XODOX
Impressum

#1: SQLDescribeCol – schema cache not being updated completely?

Posted on 2011-05-05 16:38:06 by Jan-Peter.Seifert

Hello,

we looked into a problem caused by some changes to a dbâÂ=99s schema =
via psqlODBC - e.g.:

Creating table:
SQLExecDirect(stmt, âÂ=98CREATE TABLE tab1 (sp1 character varying(10)=
);âÂ=99, SQL_NTS)

Selecting from column:
SQLExecDirect(stmt, âÂ=98SELECT sp1 from tab1âÂ=99, SQL_NTS)

Getting column description:
SQLDescribeCol(stmt, 1, âÂ=A6) =3D>=20
ColumnName =3D "sp1", DataType =3D SQL_VARCHAR=3D12, ColumnSize =3D 10, D=
ecimalDigits =3D 0, Nullable =3D SQL_NULLABLE=3D1

SQLCloseCursor(stmt);

Altering the column:
SQLExecDirect(stmt, âÂ=98ALTER TABLE tab1 ALTER COLUMN sp1 TYPE char(=
25);âÂ=99, SQL_NTS)
SQLExecDirect(stmt, âÂ=98ALTER TABLE tab1 ALTER COLUMN sp1 SET NOT NU=
LL;âÂ=99, SQL_NTS)

Selecting from column again:
SQLExecDirect(stmt, âÂ=98SELECT sp1 from tab1âÂ=99, SQL_NTS)

Getting new column description:
SQLDescribeCol(stmt, 1, âÂ=A6)=3D>
ColumnName =3D "sp1", DataType =3D SQL_CHAR=3D1, ColumnSize =3D 10, Decim=
alDigits =3D 0, Nullable =3D SQL_NULLABLE=3D1

Obviously the Datatype information has been updated but ColumnSize und SQ=
L_NULLABLE have been not.

ItâÂ=99s the same for DecimalDigits/SQL_NUMERIC

This has been tested with version 8.04.02.00 and 9.00.02.00 of psqlODBC.

Could you check into this, please?

Thank you very much,

Peter

P.S. Is there a way to flush/refresh this âÂ=98schemaâÂ=99 cache =
completely or for a single table 'manually' during runtime?

--=20
NEU: FreePhone - kostenlos mobil telefonieren und surfen! =09
Jetzt informieren: http://www.gmx.net/de/go/freephone

--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Report this message

#2: Re: SQLDescribeCol – schema cache not being updated completely?

Posted on 2011-07-18 12:49:56 by BGoebel

Hello,

i have posted a similar item:
http://postgresql.1045698.n5.nabble.com/Error-Retrieving-Cat alog-Info-tt4598955.html
Maybe it is helpful.

regards
BGoebel

--
View this message in context: http://postgresql.1045698.n5.nabble.com/SQLDescribeCol-schem a-cache-not-being-updated-completely-tp4372956p4598967.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

Report this message