You can't use DateTime as a variable as it is a reserved word. You need to be more clear and explain exactly what you want. Show your code.B4XTable1.SearchField.Text = DateTime
You can't use DateTime as a variable as it is a reserved word. You need to be more clear and explain exactly what you want. Show your code.
Do you want to show rowids of visible rows when you type a search string in the search box or what?
This is a totally different question from your first post.B4XTable1.SearchField.Text ="id"
i want find all my row have the same id in first column and get second column value for plotting
Use B4XTable1.BuildQuery. Here is an example:i want find all my row have the same id in first column and get second column value for plotting
Dim o() As Object = B4XTable1.BuildQuery(False) 'no page limit
Dim s As String ="SELECT c0, c1 FROM data WHERE c0 LIKE ?" 'c0 is first col, c1 is second
o(0)=s
' Dim s2 As String = $"%${B4XTable1.SearchField.Text}%"$ 'you can also use the prefix and suffix
Dim s2 As String = $"${B4XTable1.SearchField.Text}"$
o(1)=Array As String(s2)
Dim rs As ResultSet = B4XTable1.sql1.ExecQuery2(o(0), o(1))
' Log(rs.RowCount)
Do While rs.NextRow
Log(rs.GetString("c0") & " " & rs.GetString("c1"))
Loop
rs.Close
i checked it but not workUse B4XTable1.BuildQuery. Here is an example:
B4X:Dim o() As Object = B4XTable1.BuildQuery(False) 'no page limit Dim s As String ="SELECT c0, c1 FROM data WHERE c0 LIKE ?" 'c0 is first col, c1 is second o(0)=s ' Dim s2 As String = $"%${B4XTable1.SearchField.Text}%"$ 'you can also use the prefix and suffix Dim s2 As String = $"${B4XTable1.SearchField.Text}"$ o(1)=Array As String(s2) Dim rs As ResultSet = B4XTable1.sql1.ExecQuery2(o(0), o(1)) ' Log(rs.RowCount) Do While rs.NextRow Log(rs.GetString("c0") & " " & rs.GetString("c1")) Loop rs.Close
I tried this but it did not work and rs.RowCount=0Use B4XTable1.BuildQuery. Here is an example:
B4X:Dim o() As Object = B4XTable1.BuildQuery(False) 'no page limit Dim s As String ="SELECT c0, c1 FROM data WHERE c0 LIKE ?" 'c0 is first col, c1 is second o(0)=s ' Dim s2 As String = $"%${B4XTable1.SearchField.Text}%"$ 'you can also use the prefix and suffix Dim s2 As String = $"${B4XTable1.SearchField.Text}"$ o(1)=Array As String(s2) Dim rs As ResultSet = B4XTable1.sql1.ExecQuery2(o(0), o(1)) ' Log(rs.RowCount) Do While rs.NextRow Log(rs.GetString("c0") & " " & rs.GetString("c1")) Loop rs.Close
In that case, you need to zip and post your project or a small project and explain the exact issue. I am sure someone will figure it out and help you. Since you just became a member a couple of days ago, please follow the correct procedure to zip and post the project.I tried this but it did not work and rs.RowCount=0
thanksIn that case, you need to zip and post your project or a small project and explain the exact issue. I am sure someone will figure it out and help you. Since you just became a member a couple of days ago, please follow the correct procedure to zip and post the project.
i used bottom code but cant find item: Msec=۱۱/۰۶/۲۰۲۲%In that case, you need to zip and post your project or a small project and explain the exact issue. I am sure someone will figure it out and help you. Since you just became a member a couple of days ago, please follow the correct procedure to zip and post the project.