[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Error populating list box #5063 (ViP Specific) ====
=== At 17 OCT 1997 02:11:41PM Donald Patti wrote: ===
{{tag>"ViP Specific"}}
Hi fellow VIPers:
I am having a little trouble populating my list box with data using the columncontentsunique method. I know the problem relates to the number of rows of the source column, but don't know a way around it.
If I limit query results to 25, all is fine. However, if I remove the limit, I receive the message:
Revelation Vip Runtime Error 5063
objectname.ColumnCotentsUnique: The data has been truncated.
Any ideas how to get around this?
Thanks for the help.
--dp
----
=== At 17 OCT 1997 03:51PM Stephen Bellefontaine Revelation wrote: ===
Hello Donald,
1. To work-around the issue place the following code in the Public Module ...
'********************************************************************************
'SUB FillComboList
'DESCRIPTION: Replacement function for columncontentsunique which fails on large
' amounts of data).
'********************************************************************************
public sub FillComboList( DataObj as Data, ListObj as ComboBox, SrcColumn as Long )
dim x as long
dim TempString as string
ListObj.Clear
for x=1 to DataObj.ResultRowCount
TempString=DataObj.CellGetString( x, SrcColumn )
if TempString "" then
if ListObj.ItemFindExact( TempString, 0 )=-1 then
status%=ListObj.ItemAdd( TempString )
end if
end if
next x
end sub
'********************************************************************************
'SUB FillList
'DESCRIPTION: Replacement function for columncontentsunique which fails on large
' amounts of data).
'********************************************************************************
public sub FillList( DataObj as Data, ListObj as ListBox, SrcColumn as Long )
dim x as long
dim TempString as string
ListObj.Clear
for x=1 to DataObj.ResultRowCount
TempString=DataObj.CellGetString( x, SrcColumn )
if TempString "" then
if ListObj.ItemFindExact( TempString, 0 )=-1 then
status%=ListObj.ItemAdd( TempString )
end if
end if
next x
end sub
2. In the AppWin1, Init event place the following code ...
Data1.ExecuteQuery
Call FillList(Data1,List1,1)
Call FillComboList(Data1,Combo1,1)
3. Add a connected Data Object(Data1) to your AppWindow with atleast one column.
4. Place one ListBox(List1) and one ComboBox(Combo1) on the AppWindow.
5. Run the application.
Note: Having a listbox with over 1000 records slows the data retrieval process for both your application and your users.As another workaround, I would suggest that you further filter the records within the data object. For example try setting selection criteria to match a date range. This will allow you to return a smaller result set of records that meet a certain date range, and you will be able to display them in your listbox and performance will also increase.
----
=== At 30 OCT 1997 10:07AM Donald Patti wrote: ===
This response was extremely helpful! I'd love to cut down on the data we have to churn through, but the application necessitates this route.
Thanks again for the outstanding support.
--dp
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=D68454CF7F80887D852565330063F279|View this thread on the forum...]]