Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
hobbes got SQLCODE -1 and SQLDBCODE 2 in PowerBuilder when fetching from one table, though the same query worked in an ESQL/C program. The cause appeared to be an LVARCHAR column mapped to a PowerBuilder string, using Client SDK 2.81.TC1 and its built-in driver. Recreating the column as CHAR(1500) made it work; hobbes still wanted to verify data integrity and asked about known issues.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Hi !
Little annoying problem :)
Here it is.
When i try to run a cursor in poerbuilder, i get a -1 error and a SQLDBCODE
= 2
If i keep the same query, but replace the table by anoter..
It work.
Privilege are the same on the two tables.
only name and date are different (that's a good explanation for what there
are 2 differents tables ;))
Anyway.
I can obtain an NOTFOUND result . but if the queyr return data it fails.
This is the way it happens.
DECLARE CURSOR....
(OK no problem)
OPEN CURSOR....
(No problem )
FETCH CURSOR with specific values
(OK it return a 100 cos' no record answer to the query)
CLOSE CURSOR....
COMMIT ....
OK the first loop is ok ...
then i return to the beginning.
and execute the same code:
DECLARE CURSOR....
(No problem..)
OPEN CURSOR....
(No problem )
FETCH CURSOR with specific values that return data
(SQLCODE -1 and SQLDBCODE 2)
EXIT.
Pretty hard to find what happens....
The same query works fine in an esqlc program.
If somebody have already seen this...or so.
Thanks !
Umm, what Informix API product are you using? Looking for something
like ODBC or ESQL/C from Client SDK 2.81.TC1.
"hobbes" <pasdespam@yahoo.fr> wrote in message news:<3f6981d4$0$20627$626a54ce@news.free.fr>...
> Hi !
>
> Little annoying problem :)
>
> Here it is.
>
> When i try to run a cursor in poerbuilder, i get a -1 error and a SQLDBCODE
> = 2
>
> If i keep the same query, but replace the table by anoter..
> It work.
>
> Privilege are the same on the two tables.
> only name and date are different (that's a good explanation for what there
> are 2 differents tables ;))
>
> Anyway.
> I can obtain an NOTFOUND result . but if the queyr return data it fails.
>
> This is the way it happens.
> DECLARE CURSOR....
> (OK no problem)
> OPEN CURSOR....
> (No problem )
> FETCH CURSOR with specific values
> (OK it return a 100 cos' no record answer to the query)
> CLOSE CURSOR....
> COMMIT ....
> OK the first loop is ok ...
>
> then i return to the beginning.
> and execute the same code:
> DECLARE CURSOR....
> (No problem..)
> OPEN CURSOR....
> (No problem )
> FETCH CURSOR with specific values that return data
> (SQLCODE -1 and SQLDBCODE 2)
> EXIT.
>
>
> Pretty hard to find what happens....
> The same query works fine in an esqlc program.
>
> If somebody have already seen this...or so.
> Thanks !
> Umm, what Informix API product are you using? Looking for something
> like ODBC or ESQL/C from Client SDK 2.81.TC1.
I got Client SDK 2.81.TC1
And no ODBC , since Powerbuilder had a built in driver, (which relies in a
way on he client SDK)
I've drop and re-create that table with char(1500), and now it work....
But i need to test to see if my data are not going to be altered by this
sort of column datatype.
Is there a known issue with the 2.81 TC1 on windows ?
thx!
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.