Hello,
I am using Visual Basic 5.0 SP3 and an Informix database OnLine Workgroup
Server, Informix-Cli Product including ODBC 2.5.
I have the following error when I try to execute a SQL statement to fill a
listview
The table "bug" contains 7 records, and 2 columns with type "Text".
Set en = rdoEngine.rdoEnvironments(0)
en.CursorDriver = rdUseClientBatch
Set cn = en.OpenConnection("Informix_Technical", rdDriverNoPrompt, False,
"UID=informix;PWD=informix)
....
msSqlBug = "select * from bug order by mod_id,prg_id,fcm_id,bug_id"
Set mqryBug = cn.CreateQuery("mqryBug", "")
mqryBug.SQL = msSqlBug
Set mrsBug = mqryBug.OpenResultset(rdOpenKeyset, rdConcurValues)
While Not mrsBug.EOF And Not mrsBug.BOF
' Create new Record in the List View
Set lviItem = lvwModule.ListItems.Add()
......
wend
The VB Program stops on the line : Set mrsBug = mqry.OpenResul... with the
MessageBox :
Run-time error '40002':
S1000: [INTERSOLV][ODBC Informix driver][Informix] Locator buffer size too
small
If I look at the rdoErrors Collection, I have error :
-451 S1000: [INTERSOLV][ODBC Informix driver][Informix] Locator buffer size
too small
The Informix Error -451 is :
Locator buffer size too small
The locator structure provided for a BYTE or TEXT value in this statement
specifies a memory buffer that is smaller than the value (in the loc_bufsize
field). The actual size is in loc_indicator. No data was transferred. Revise
the program to use a larger buffer, to locate the value in a file instead of
memory, or to pass the value in segments through a user-provided read
function. Alternatively, you can specify a substring of the value in the
SELECT statement. If this is a 4GL program, this error should not occur. If
the error recurs, please note all circumstances, and contact the Informix
Technical Support Department.
How can I fix this problem ?
Is it possible to increase buffer size ? How ?
I looked at the VB Doc. I found the GetChunk Method. In the example, they
are using this method to read column with binary datatype. They read also a
column with Text datatype (without Getchunk Method). I don't see how to use
this method in my case, because the problem occurs on the "Set Rs..."
statement, before I can use the getchunk method.
Thank you very much for your help.
Philippe Fornaciari
Summit Technologies International