21.10.1998 Byron Nikolaidis wrote:
>Please send me the psqlodbc.log files showing both the "0-value" error and
the
>"couldn't open large object for reading".
I have type 'lo' created
CREATE TYPE lo (
internallength=4,
externallength=10,
input=int4in,
output=int4out,
default='',
passedbyvalue
);
as it is recomended in
http://www.insightdist.com/psqlodbc/psqlodbc_faq.html#largeobjects
and a table
CREATE TABLE tmp_rq (
req_id int2,
req_content lo
);
I manually (to simplify debugging) insert record with req_id = 1.
In my application I have an SQL (RequestLive),
SELECT req_id, req_content FROM tmp_rq WHERE req_id = 1;
It binded to TDBRichEdit (TDBMemo) component.
I run the application, write text (long) to the large object field
fromTDBRichEdit, and exit.
I'm attaching psqlodbc.log file renaming it to WriteData.log
Then run the application again try to read data from large object field by
TDBRichEdit (nothing is showed), and exit.
This time I renamed psqlodbc.log file to ReadAfterWriteData.log
I can see there are some information you don't need, but I decided to leave
the files as is not to remove something valuable by ignorance.
>Also, send the odbc trace log files (sql.log) as well showing the results
of
>both the read and write attempts. Make sure the log file is clean before
you begin.
In both cases described above sql.log file was emty. To try to get the files
I did the following:
In MS 32-bit ODBC I checked
"All the time" ("When to trace" on "Tracing" page)" and press "Start tracing
Now" button.
In ODBC Administrator (PostOdbc driver) I set Trace mode = 0x0040
Here is quoting from "ODBC driver connection settings" help:
TRACE MODE A numeric value (bit mask) specifying how much trace information
to log. The Windows OutputDebugString call is used to output the requested
information to the debug window. The following table shows which information
is logged based on bit settings:
Bit Settings Logged Information
0x0001 prepared query statement
0x0002 executed query statements
0x0004 vendor errors
0x0008 statement options (that is: allocate, free)
0x0010 connect / disconnect
0x0020 transaction
0x0040 BLOB I/O
0x0080 miscellaneous
0x0100 vendor calls
But I do get 488 KB sql.log file when I create large object.
I'm not attaching it because I don't know whether you need it. If you do
I'll send it too.
I got a message from Sergey E. Levov <serg(at)informika(dot)ru>
he writes:
>If you have sources try the follwing:
>Find the string
> if (pcbValue && *pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET)
>in the file bind.c and change it into
> if (pcbValue && ((*pcbValue <= SQL_LEN_DATA_AT_EXEC_OFFSET) ||
> (*pcbValue == SQL_DATA_AT_EXEC)))
>and rebuild the driver. Perhaps it help.
I downloaded sources from www.insightdist.com/psqlodbc.
Unfortunatelly I need MS Visual C++ 4.0 to rebuild the driver which I
haven't. I am seeking an opportunity to do the job now.
Thank you, Mikhail.