Android Question b4xtable setdata arabic string not showing!

Discussion in 'Android Questions' started by HAH, Jun 17, 2019.

  1. HAH

    HAH Active Member Licensed User

    Following this tutorial the following example is working fine:
    Code:
    B4XTable1.AddColumn("Customer Id", B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "Name", B4XTable1.COLUMN_TYPE_TEXT)
       B4XTable1.AddColumn(
    "Company", B4XTable1.COLUMN_TYPE_TEXT)
       B4XTable1.AddColumn(
    "Address", B4XTable1.COLUMN_TYPE_TEXT)

       
    Dim Data As List
       Data.Initialize
       
    Dim rs As ResultSet = sql.ExecQuery("SELECT CustomerId, FirstName, LastName, Company, Address FROM customers")
       
    Do While rs.NextRow
           
    Dim row(4As Object
           row(
    0) = rs.GetDouble("CustomerId")
           row(
    1) = rs.GetString("FirstName") & " " & rs.GetString("LastName")
           row(
    2) = rs.GetString("Company")
           
    'Some of the values are Null. We need to convert them to empty strings:
           If row(2) = Null Then row(2) = ""
           row(
    3) = rs.GetString("Address")
           Data.Add(row)
       
    Loop
       rs.Close
       B4XTable1.SetData(Data)
    The problem when I retrieve Arabic string, it show 0 !!! no Arabic string displayed! Why?
     
  2. HAH

    HAH Active Member Licensed User

    I checked row object and rs object, they return arabic string correctly.
    But when added to b4xtable, column displays 0 instead of arabic string !
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    Please upload a small project that demonstrates it. Preferably without the database.
     
  4. HAH

    HAH Active Member Licensed User

    The project zip attached.
    The Name/Type/City columns should be display arabic strings "Not 0"
     

    Attached Files:

  5. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    B4XTable1.AddColumn("الرقم",B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "الاسم Name",B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "النوع Type",B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "الموبايل",B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "الايميل",B4XTable1.COLUMN_TYPE_NUMBERS)
       B4XTable1.AddColumn(
    "المدينة City",B4XTable1.COLUMN_TYPE_NUMBERS)
    ????
     
  6. HAH

    HAH Active Member Licensed User

    OH my god :D , sorry for unconcentration,
    Thank you @Erel
    GOT IT
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice