Why do you need this line
B4X:
sql.ExecNonQuery2("ATTACH DATABASE ? AS clone",Array As String(DBFolder & "/testB.db"))
If you want to copy a record from table A (TestA) to table B (TestB) is al you need to do
B4X:
SQLA.Initialize(File.DirDocuments, DBFileNameA, False)
SQLB.Initialize(File.DirDocuments, DBFileNameB, False)
and then read from tableA and insert into tableB