ehsanez
Member
Hi. This is a problem that I did a lot of research on but failed to solve. Thank you for your help.
Error occurred on line: 449 (Main)
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=52 (# cursors opened by this proc=52)
at android.database.CursorWindow.<init>(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
...
and this is a code
Error occurred on line: 449 (Main)
android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed. # Open Cursors=52 (# cursors opened by this proc=52)
at android.database.CursorWindow.<init>(CursorWindow.java:108)
at android.database.AbstractWindowedCursor.clearOrCreateWindow(AbstractWindowedCursor.java:198)
...
and this is a code
B4X:
Dim cure As Cursor = mysql.ExecQuery("SELECT * FROM English WHERE English_Word LIKE '%"&userworden&"%' ")
lblecount.Text = cure.RowCount
lblecount.Visible = True
Imgerecord.Visible = True
If cure.RowCount > 0 Then
For i=0 To cure.RowCount - 1
cure.Position = i
Dim enide As Int = cure.GetString("Word_ID")
Dim cure2 As Cursor
cure2 = mysql.ExecQuery2("SELECT * FROM Farsi WHERE English_ID =? " , Array As String(enide))
line 449 cure2.Position = 0
Dim logate As String = cure2.GetString("Farsi_Word")
Dim loagatee As String = cure.GetString("English_Word")
Dim pe2 As Panel
pe2.Initialize("")
customenglist.Add(pe2 , 350dip , "" )
pe2.Left = 0
pe2.Width = 100%x
pe2.LoadLayout("Ltempe")
lblfaword.Height = 10%y
lblemani.Height = 12%y
lblemani.Top= 11%y
btnsen.Height = 11%y
btnsen.Top = 10%y
btnsen.Tag = loagatee
lblfaword.Text = logate
lblemani.Text = cure.GetString("English_Word")
Next
Else
ToastMessageShow("هیچ نتیجه ای یافت نشد" , False)
End If
cure.Close
cure2.Close