SaveCSV doesn't handle null values

RB Smissaert

Well-Known Member
Licensed User
Longtime User
When a table control has null values then Table1.SaveCSV will cause an error.
I can work around that, but it would be nice if SaveCSV could handle this itself. Save as an empty string would be fine.

RBS
 

RB Smissaert

Well-Known Member
Licensed User
Longtime User
Yes, from a SQLite DB:

select * from sqlite_master

I know I can do instead:

select
type,
name,
tbl_name,
rootpage,
coalesce(sql, '') as sql
from
sqlite_master

but I thought maybe the SaveCSV method could handle NULL values internally, so you wouldn't have to worry about them. I suppose though that if it did that there might be some performance penalty.


RBS
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I suppose though that if it did that there might be some performance penalty.
Exactly.

I think it will be better that ExecuteTable will handle the null values and convert them to "" or 0.
It will be added in the next SQL library update.
Null values can cause all kinds of errors if they get into a table control.
 
Top