Storing and retrieving data from a SQL database
pete at lcsql.com
Fri May 20 22:38:33 EDT 2016
Tabs shouldn't be a problem so I suspect something else.
Have you tried using LC to select the data after updating it? As mentioned
in an earlier post, if you use revDataFromQuery to do the SELECT, be sure
to use something other than tab/return for the column/row delimiters.
I'm wondering if whatever program you used to "directly check" the data has
a problem with the tabs (fingers crossed it wasn't SQLiteAdmin!).
On Fri, May 20, 2016 at 6:33 PM Paul Dupuis <paul at researchware.com> wrote:
> Apparently, you either DO need to escape certain characters even when
> using parametrized queries.
> I have the code below: I pass it an array where the description
> pArray contains several lines of text from a field and the second
> line contains a tab
> command updateInDatabase pArray
> put the databaseID of this stack into tDatabaseID
> put "UPDATE mytable SET
> id=:1" into tQuery
> revExecuteSQL tDatabaseID,tQuery,"pArray"
> get the result
> if it is not a number then
> -- error
> put it
> -- number of rows changed
> end if
> end updateInDatabase
> This executes and indicates a row was update in the database and a
> direct check of the SQLite database shows that columns were updated
> EXCEPT for description where any content that was in pArray AFTER and
> including the TAB is missing. So apparently TABs can not be included in
> data passed by parameters.
> OR is this a LiveCode 8 bug?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the Use-livecode