SQL1.BeginTransaction
txt="DROP TABLE IF EXISTS t1"
SQL1.ExecNonQuery(txt)
' txt="create table t1(a Int, b Text, c Int)" 'this works too
txt="create table t1(a Int, b Int, c Int)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(1,'a',0)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(2,'b',1)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(3,'c',0)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(4,'d',1)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(5,Null,0)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(6,Null,1)"
SQL1.ExecNonQuery(txt)
txt="insert into t1 values(7,Null,Null)"
SQL1.ExecNonQuery(txt)
SQL1.TransactionSuccessful
SQL1.EndTransaction
txt="SELECT a, case when b is null then '' else b end as b, " _
& "case when c is null then 'Reviewnow' else c end as c FROM t1"
Cursor1=SQL1.ExecQuery(txt)
Cursor1.Position=6
Msgbox(Cursor1.GetString("a") & " " & Cursor1.GetString("b") & " " & Cursor1.GetString("c"),"")