I believe you need to surround the placeholder with single quotes. >> put "UPDATE `t_test` SET `Text` = ':11' WHERE `Nummer` = ':22';" into StrSQL
Also you can lose the semicolon as LC will only execute one statement at a time. You cannot string statements. Bob S > On May 15, 2019, at 06:46 , axwald via use-livecode > <use-livecode@lists.runrev.com> wrote: > > Hi, > the notation for revExecuteSQL you mention only works with 1-digit numbers > (in my LC 6.7.10). > Named arrays and 2- or more digit entries don't work - LC doesn't translate > 'em. You can easily check this with your favorite network sniffer: > >> put "bText" into myArr[11] >> put "99" into myArr[22] >> put "UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22;" into StrSQL > sends this to the database: >> UPDATE `t_test` SET `Text` = :11 WHERE `Nummer` = :22; > and this fails, for sure. > > Correctly used: >> put "bText" into myArr[1] >> put "99" into myArr[2] >> put "UPDATE `t_test` SET `Text` = :1 WHERE `Nummer` = :2;" into StrSQL > sends this to the database: >> UPDATE `t_test` SET `Text` = "bText" WHERE `Nummer` = "99"; > > So the error is in LC, dunno if the newer versions do better. Or the > limitation just isn't mentioned in the dictionary. > And since LC obviously just does a simple & limited replace, you could use > merge() as well. > > Have fun! > > > > ----- > • Livecode programming until the cat hits the fan • > -- > Sent from: > http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode