An error keeps coming up for a TEXT field when there is a space between characters when trying to insert into an In-Memory db.
I am not sure if this normal behaviour.
An error keeps coming up for a TEXT field when there is a space between characters when trying to insert into an In-Memory db.
I am not sure if this normal behaviour.
Can you please post an example?
var sql = "INSERT INTO rows (code,description,tooth,surface,amount,provider) VALUES ($$\(codeText.text)$$,$$\(descriptionText.text)$$,$$\(toothText.text)$$,$$\(surfaceText.text)$$,$$\(amountText.text)$$,$$\(providerText.text)$$)";
SQLiteDatabase1.execute(sql);
Console.write("\(SQLiteDatabase1.errorMessage)");
if descriptionText.text = "oral" , no error message while " oral exam" produces an error
$$ is a PostgreSQL specific escaping sequence. For sqlite replace $$ with ' or use a DatabaseRecord object to abstract the long sql sequences and escaping.
Actually didn't use the $$ initially , was part of testing despairation,
var sql = "INSERT INTO rows (code,description,tooth,surface,amount,provider) VALUES (\(codeText.text),\(descriptionText.text),\(toothText.text),\(surfaceText.text),\(amountText.text),\(providerText.text))";
was the original code but adding '' fixed it .
Thanks