Error on OpenResultset Method - Locator buffer size too small

Error on OpenResultset Method - Locator buffer size too small

Post by Philippe Fornaciar » Wed, 21 Jan 1998 04:00:00



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

 
 
 

1. OpenResultset Error : Locator buffer size too small

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

2. Patch 5935

3. Error 451 Locator Buffer Size Too Small when using dbexport in Informix Online Workgroup Server 7.22

4. SOLID Server

5. Error 451 Locator Buffer Size too small?????

6. How to run an SP/job when SQLServer starts

7. Locator buffer size to small

8. sql 6.5 datatype

9. Locator Buffer Size too Small

10. Q: TDS Buffer Size too small

11. dbcc checkstorage error 16K Buffer Too Small

12. Buffer too small, data truncated error ??? please help