Hi fellows
I have a database with 24 fields but I only want to load a few selected fields to B4XTable.
I want to load only from row 16 to row 22, to my B4XTable with the same columns. How can I do it?
I have a database with 24 fields but I only want to load a few selected fields to B4XTable.
B4X:
B4XTable1.AddColumn("Name", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Surname", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Address1", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Address2", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Town", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Province", B4XTable1.COLUMN_TYPE_TEXT)
B4XTable1.AddColumn("Cell Number", B4XTable1.COLUMN_TYPE_TEXT)
dialog.Initialize(Activity)
InputTemplate.Initialize
Dim Data As List
Data.Initialize
Dim rs As ResultSet = sql.ExecQuery("SELECT Trip_No, Date, Time, Driver_Name, Driver_Surname, Driver_ID_No, Driver_License_Code, Driver_PrDP_Status, Vehicle_Make, Vehicle_Reg_No, Departure, Destination, Contact_Name, Contact_No, Luggage_Amt, Rank_Manager_Fee, Passenger_Name, Passenger_Surname, Passenger_Address_1, Passenger_Address_2, Passenger_Town, Passenger_Province, Passenger_Cell_No, No_of_Passengers FROM Passenger_Table")
Do While rs.NextRow
Dim row(24) As Object
row(0) = rs.GetString("Trip_No")
row(1) = rs.GetString("Date")
row(2) = rs.GetString("Time")
row(3) = rs.GetString("Driver_Name")
row(4) = rs.GetString("Driver_Surname")
row(5) = rs.GetString("Driver_ID_No")
row(6) = rs.GetString("Driver_License_Code")
row(7) = rs.GetString("Driver_PrDP_Status")
row(8) = rs.GetString("Vehicle_Make")
row(9) = rs.GetString("Vehicle_Reg_No")
row(10) = rs.GetString("Departure")
row(11) = rs.GetString("Destination")
row(12) = rs.GetString("Contact_Name")
row(13) = rs.GetString("Contact_No")
row(14) = rs.GetString("Luggage_Amt")
row(15) = rs.GetString("Rank_Manager_Fee")
row(16) = rs.GetString("Passenger_Name")
row(17) = rs.GetString("Passenger_Surname")
row(18) = rs.GetString("Passenger_Address_1")
row(19) = rs.GetString("Passenger_Address_2")
row(20) = rs.GetString("Passenger_Town")
row(21) = rs.GetString("Passenger_Province")
row(22) = rs.GetString("Passenger_Cell_No")
row(23) = rs.GetString("No_of_Passengers")
Data.Add(row)
Loop
rs.Close
B4XTable1.SetData(Data)
I want to load only from row 16 to row 22, to my B4XTable with the same columns. How can I do it?