sqlYoga: sqlite primary key and a few detailed questions
David Bovill
david.bovill at gmail.com
Thu Apr 8 05:52:33 EDT 2010
Thanks Andrew - I'll start looking and the logging in the plugin, and as you
suggested I switched to looping through individual ids. The problem seems
even more basic as:
command hdb_DeleteHandler handlerID
> put sqlrecord_CreateObject ("handler") into theRecordA
> sqlrecord_set theRecordA, "id", handlerID
> sqlrecord_delete theRecordA
> put the result into someError
> put it into recordsDeleted
> end hdb_DeleteHandler
>
is not working for handler ids that are clearly there. I'm thinking it is to
do with how the database is set up, as the id field is a primary key, but I
think may not showing in yoga's imported schema, or I've set a default value
for the "type" field as "c" - basically I don't know how record arrays like
theRecordA match records as they contain more information than simply the
ID?
On 7 April 2010 22:58, Andrew Kluthe <andrew at rjdfarm.com> wrote:
>
> Look into using sqlquery_ commands where sqlrecord_ fails you. I have
> noticed
> that it is easier in some cases to use sqlquery_ over sqlrecord_.
>
>
> http://www.bluemangolearning.com/revolution/docs/sql_yoga/api_docs/Documents/stack_libSQLYoga_package_SQLp20Query.htm
>
> There is a link to the documentation.
>
> And what about a looped function that takes a list of Id numbers and
> deletes
> the record?
>
> sIDList = "67,54,39,112"
>
> reapeat for each item theID in sIDList
> Delete theID
> end repeat
>
> This pulls each comma delimited item out of sIDList and deletes the record.
>
> --
> View this message in context:
> http://n4.nabble.com/sqlYoga-sqlite-primary-key-and-a-few-detailed-questions-tp1753188p1755712.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list