Re: Database SQL statement
Jim Wagner <[email protected]> Wed, 20 Sep 2017 14:20:28 -0700
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
You are right - I tried it JUST before you responded. I got caught in memories of having to do something special in the previous incarnation. Thanks for responding, Jim James Wagner Oregon Research Electronics http://www.orelectronics.net <http://www.orelectronics.net/> > On Sep 20, 2017, at 1:46 PM, Keith DeLong <keith-ga5nS8A/[email protected]> wrote: > > Hi Jim, I think this may be what you’re looking for: > > Dim N as integer = (row ID obtained elsewhere) > Dim deleteSQL as string = “DELETE FROM Event WHERE ID = “ + Str(N) > > In SqlLite only strings need to be encased in quotes > > Keith DeLong > >> On Sep 20, 2017, at 12:57 PM, Jim Wagner <[email protected] <mailto:[email protected]>> wrote: >> >> Greetings - >> >> Database = MySQL >> >> I have been through the LR and the Tutorials and now the Users Guide (Framework > Databases) and I am stumped. I remember that something special was needed for this on the RBDatabase but I cannot recall what. >> >> I want to have a WHERE statement to be defined by a program-generated variable, as in >> >> Dim N as integer = (row ID obtained elsewhere) >> Dim deleteSQL as string = “DELETE FROM Event WHERE ID = ’N'” >> >> But that won’t work because N must be a number defined by the program and the previous expression will take N literally as a string. >> >> I’ve also been though a fair amount of MySQL documentation and have yet to find anything that illuminates this. Its probably there, but just not yet found. >> >> Can someone help? >> >> Many Thanks >> Jim >> >> James Wagner >> Oregon Research Electronics >> http://www.orelectronics.net <http://www.orelectronics.net/> >> >> >> >> >> >> To unsubscribe, email us here. <mailto:[email protected]> > > To unsubscribe, email us here. <mailto:[email protected]> To unsubscribe, email [email protected]