Please provide the following:
- SDK Version: 40.0.0
- Platforms(Android):
- “SQLite”
The ? works when I use it to replace values however what if I want to use it for the Table name
Like so…
const insertInit = (table) => {
db.transaction((tx) => {
tx.executeSql(
"insert into '?' values('undefined')",
[table],
(tx, res) => console.log(`Succeeded to Insert undefined Into Table '${table}'`,),
(tx, err) => console.log(`Falied to Insert undefined Into Table '${table}'`, err)
)
});
}
When I do this I get this error
Falied to Insert undefined Into Table 'Document' [Error: no such table: ? (code 1 SQLITE_ERROR): , while compiling: insert into '?' values('undefined')]
However when I hard code the Table Name and placehold the value, it works. But thing is I want to do it for the Table Name. Or is that even Possible?