blind leading blind ;\)

after reading glenn's post and revisiting the original I'm 100% sure it's the call's that don't work.

using the dbconnOpen() doesn't error as it only has 1 argument, so it is treated as string. but when the dbExecuteSQL has comma in it, this error is thrown.

in addition to Glenn's questions, try adding this on top of your script and see how it differs when using commandline versus drag/drop:
 Code:
@scriptdir ?
@curdir ?
get $
_________________________
!

download KiXnet