ERROR in Table Class

JTmartins

Active Member
Licensed User
Longtime User
Just a quick note, on something I've just found

If we use the table class together with an SQL DB, if a field is empty (null), the class will thrown an error, and will not work.

So if you use it make sure all your fields are populated, or check programmatically and change to something as NA, before calling Table.AddRow.

Thanks
José
 

Mahares

Expert
Licensed User
Longtime User
@Jose:
Did you try to replace in the Table class module this:
B4X:
Values() As String
with this:
B4X:
Values() As Object
There are about 5 places or so. Also, replace in the man module this:
B4X:
Table1.AddRow(Array As String(
with:
B4X:
Table1.AddRow(Array As Object(
I tried it and it worked for me with one field with its data all blank (empty)
 

JTmartins

Active Member
Licensed User
Longtime User
Wil try

Thanks.

I will try that.

As a novice, I always am afraid of touching classes..I examine them, to learn, and there are still many things I do not understand.

Thanks

José
 

Harris

Expert
Licensed User
Longtime User
Yes, I find this also in many samples and classes I try.

Is there a rule when to use Object vrs String when defining Array As?

My rule is if string throws error - I try object... Sometimes, string works with numbers and other times not.

Thanks
 
Top