Note that there are some explanatory texts on larger screens.

plurals
  1. POSQLite searching so slowly
    primarykey
    data
    text
    <p>this is my code to search from SQLite database:</p> <pre><code>flResults.Controls.Clear() If con.State = ConnectionState.Closed Then con.Open() End If Dim Querytxt As String = "Select * from trancebeats Where Cat LIKE '%" &amp; txtSearch.Text &amp; "%' OR Title LIKE '%" &amp; txtSearch.Text &amp; "%' OR Artist LIKE '%" &amp; txtSearch.Text &amp; "%' OR Album LIKE '%" &amp; txtSearch.Text &amp; "%' OR Year LIKE '%" &amp; txtSearch.Text &amp; "%' OR Genre LIKE '%" &amp; txtSearch.Text &amp; "%' OR Publisher LIKE '%" &amp; txtSearch.Text &amp; "%' OR Site LIKE '%" &amp; txtSearch.Text &amp; "%' Group By Album Order By Album" Dim Adp As SQLiteDataAdapter = New SQLiteDataAdapter Dim Cmd As SQLiteCommand = New SQLiteCommand Dim TableSRC As New DataTable TableSRC.Rows.Clear() Dim i As Integer With Cmd .CommandText = Querytxt .Connection = con End With With Adp .SelectCommand = Cmd .Fill(TableSRC) End With If TableSRC.Rows.Count &gt; 0 Then lblResultsFound.Text = TableSRC.Rows.Count &amp; " Results founds" For i = 0 To TableSRC.Rows.Count - 1 Threading.Thread.Sleep(10) Dim pic As New PictureBox Dim lblArtist As New Label Dim lblAlbum As New Label Dim lblLabel As New Label Dim lblCat As New Label Dim fl As New Panel pic.Size = New Size(75, 75) pic.SizeMode = PictureBoxSizeMode.StretchImage pic.Cursor = Cursors.Hand pic.BorderStyle = BorderStyle.Fixed3D pic.Tag = TableSRC.Rows(i)("Cat") pic.Name = TableSRC.Rows(i)("Cat") &amp; "pic" pic.Location = New Point(7, 7) Try If System.IO.File.Exists(TableSRC.Rows(i)("Cover")) Then Dim xx As Image Using str As Stream = File.OpenRead(TableSRC.Rows(i)("Cover")) xx = Image.FromStream(str) End Using pic.Image = xx End If Catch ex As Exception End Try lblAlbum.AutoEllipsis = True lblArtist.AutoEllipsis = True lblLabel.AutoEllipsis = True lblCat.AutoEllipsis = True lblAlbum.AutoSize = False lblArtist.AutoSize = False lblLabel.AutoSize = False lblCat.AutoSize = False lblAlbum.Size = New Size(100, 15) lblArtist.Size = New Size(100, 15) lblLabel.Size = New Size(100, 15) lblCat.Size = New Size(100, 15) lblAlbum.Text = TableSRC.Rows(i)("Artist") lblArtist.Text = TableSRC.Rows(i)("Album") lblLabel.Text = TableSRC.Rows(i)("Publisher") lblCat.Text = TableSRC.Rows(i)("Cat") fl.Size = New Size(200, 95) fl.BackColor = System.Drawing.Color.SteelBlue fl.Controls.Add(pic) fl.Controls.Add(lblArtist) fl.Controls.Add(lblAlbum) fl.Controls.Add(lblLabel) fl.Controls.Add(lblCat) fl.Name = TableSRC.Rows(i)("Cat") &amp; "fl" AddHandler pic.Click, AddressOf CatClick lblArtist.Location = New Point(87, 12) lblAlbum.Location = New Point(87, 30) lblLabel.Location = New Point(87, 66) lblCat.Location = New Point(87, 48) AddHandler fl.Click, AddressOf flClick AddHandler lblArtist.Click, AddressOf flClick1 AddHandler lblAlbum.Click, AddressOf flClick1 AddHandler lblLabel.Click, AddressOf flClick1 AddHandler lblCat.Click, AddressOf flClick1 flResults.Controls.Add(fl) Next Else Dim lblNothing As New Label lblNothing.Text = "No Results Found!!" lblNothing.ForeColor = System.Drawing.Color.White flResults.Controls.Add(lblNothing) End If </code></pre> <p>I have more than 5000 rows</p> <p>when I make a search it takes time to put the results....</p> <p>is my code wrong or I have to change the way to search???</p> <p>and when it show me the results ... for example it will show 100 results....I have to wait till it finish showing the results then I can find what I'm searching.....</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload