watesoft Active Member Licensed User Longtime User Jan 3, 2019 #1 In B4I , How to judge whether there are records in the sqlite query result? In B4A, I can use: B4X: If cur.RowCount>0 Then i=k+1 else i=k end if
In B4I , How to judge whether there are records in the sqlite query result? In B4A, I can use: B4X: If cur.RowCount>0 Then i=k+1 else i=k end if
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2019 #2 Don't use Cursor at all. Only ResultSet: B4X: Dim rs As ResultSet = sql.ExecQuery2(...) Do While rs.NextRow 'read records Loop Upvote 0
Don't use Cursor at all. Only ResultSet: B4X: Dim rs As ResultSet = sql.ExecQuery2(...) Do While rs.NextRow 'read records Loop
watesoft Active Member Licensed User Longtime User Jan 3, 2019 #3 Erel said: Don't use Cursor at all. Only ResultSet: B4X: Dim rs As ResultSet = sql.ExecQuery2(...) Do While rs.NextRow 'read records Loop Click to expand... Hi Erel I know ResultSet,but how to deal with "If Else" statement. Upvote 0
Erel said: Don't use Cursor at all. Only ResultSet: B4X: Dim rs As ResultSet = sql.ExecQuery2(...) Do While rs.NextRow 'read records Loop Click to expand... Hi Erel I know ResultSet,but how to deal with "If Else" statement.
Erel B4X founder Staff member Licensed User Longtime User Jan 3, 2019 #4 What exactly are you trying to do? If you are only interested in finding out whether there are results or not: B4X: If rs.NextRow Then 'There are results Else 'There are no results End If Upvote 0
What exactly are you trying to do? If you are only interested in finding out whether there are results or not: B4X: If rs.NextRow Then 'There are results Else 'There are no results End If
watesoft Active Member Licensed User Longtime User Jan 3, 2019 #5 Erel said: What exactly are you trying to do? If you are only interested in finding out whether there are results or not: B4X: If rs.NextRow Then 'There are results Else 'There are no results End If Click to expand... Yes,thanks Erel. Upvote 0
Erel said: What exactly are you trying to do? If you are only interested in finding out whether there are results or not: B4X: If rs.NextRow Then 'There are results Else 'There are no results End If Click to expand... Yes,thanks Erel.