D developer_123 Active Member Licensed User Longtime User Jan 12, 2021 #1 Hello! I'm using b4xtable in my multiplaform APP to save some data following the Erel example "https://www.b4x.com/android/forum/t...ditable-b4xtable-form-example.104766/#content". In this moment I need to put in the text of a some labels (label1.text) the data of some columns related a specific row, from the specific Query, but I'dont know wich are the sentence to make it possible. I need some like CURSOR that works in B4A that returns the complet field using firstly the query : Cursor1 = SQL1.ExecQuery("SELECT * FROM persons WHERE ID = " & ID) and then, put this reults inside a labels: label1.Text = Cursor1.GetString("FirstName") label2.Text = Cursor1.GetString("LastName") label3.Text = Cursor1.GetString("City") label4.Text = Cursor1.Getint("Age") . . . I appreciate any clue to use some thing similar that works in multiplatform Last edited: Jan 12, 2021
Hello! I'm using b4xtable in my multiplaform APP to save some data following the Erel example "https://www.b4x.com/android/forum/t...ditable-b4xtable-form-example.104766/#content". In this moment I need to put in the text of a some labels (label1.text) the data of some columns related a specific row, from the specific Query, but I'dont know wich are the sentence to make it possible. I need some like CURSOR that works in B4A that returns the complet field using firstly the query : Cursor1 = SQL1.ExecQuery("SELECT * FROM persons WHERE ID = " & ID) and then, put this reults inside a labels: label1.Text = Cursor1.GetString("FirstName") label2.Text = Cursor1.GetString("LastName") label3.Text = Cursor1.GetString("City") label4.Text = Cursor1.Getint("Age") . . . I appreciate any clue to use some thing similar that works in multiplatform
D developer_123 Active Member Licensed User Longtime User Jan 13, 2021 #2 Although I did not get responses to this thread, because now I think I know why, since testing this afternoon, I realized that cursor in B4A is the same as ResultSet in B4J and B4i. With this I can work on all 3 platforms, it is only necessary to include the following conditional for the declaration: B4X: Copy #if b4a Dim Cursor1 As Cursor #else Dim Cursor1 As ResultSet #end if definitely resolved Upvote 0
Although I did not get responses to this thread, because now I think I know why, since testing this afternoon, I realized that cursor in B4A is the same as ResultSet in B4J and B4i. With this I can work on all 3 platforms, it is only necessary to include the following conditional for the declaration: B4X: Copy #if b4a Dim Cursor1 As Cursor #else Dim Cursor1 As ResultSet #end if definitely resolved
Erel B4X founder Staff member Licensed User Longtime User Jan 13, 2021 #3 1. Please use [code]code here...[/code] tags when posting code. 2. You've reached the wrong solution. Use ResultSet in B4A as well. Upvote 0
1. Please use [code]code here...[/code] tags when posting code. 2. You've reached the wrong solution. Use ResultSet in B4A as well.