[SQL] placeholders work for SQLite but not for mySQL

Peter Haworth pete at lcsql.com
Mon Aug 8 11:46:18 EDT 2016


SQLite is very forgiving about what data type it accepts for a column. It
will pretty much accept anything no matter what the defined data type is.
mySQL on the other hand rejects anything that doesn't match the declared
data type. That would explain the difference between the two systems.

It doesn't explain the difference between using a parameter vs an embedded
value, you should get the same result either way. I think you should submit
a bug report.

On Mon, Aug 8, 2016, 5:42 AM Ludovic THEBAULT <ludovic.thebault at laposte.net>
wrote:

>
> > Le 8 août 2016 à 13:36, Kay C Lan <lan.kc.macmail at gmail.com> a écrit :
> > Unfortunately:
> >
> > put null into pValue
> >
> > worked fine for SQLite, but I still got the exact same mySQL ERROR =
> > Incorrect integer value: '' for column 'postcode' at row 1
> >
>
> After the revexecuteSQL do a :
> if pValue = empty then ## (or null)
>         replace ":2" with "NULL" in tSQL
> end if
>
> ## where :2 is the placeholder which can be empty.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the Use-livecode mailing list