Postgresql and Parameters

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jharris
Posts: 84
Joined: Wed Jan 26, 2011 3:28 am
Location: Arkansas - USA

Postgresql and Parameters

Post by jharris » Sun Jul 31, 2016 6:26 pm

Hey everyone,

I've been away from Livecode for a while and trying to get back into it.

I've been trying to save a record to a Postgresql database using the ":" placeholder.

My query:

Code: Select all

put "INSERT INTO groups ( group_id, group_name, is_active ) VALUES ( :1, :2, :3 )" into sql
revExecuteSQL gCon, sql, tId, tTitle, bActive
The error message after the query is: syntax error at or near ":"

Are placeholders supported with Postgresql?

Best Regards,
Johnny Harris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8

jharris
Posts: 84
Joined: Wed Jan 26, 2011 3:28 am
Location: Arkansas - USA

Re: Postgresql and Parameters

Post by jharris » Mon Aug 01, 2016 3:53 pm

I got it working. I didn't catch in the documentation that variable names have to be quoted.

J. Harris
Operating System: macOS Monterey Version 12.5
LiveCode Version: 9.6.8

Post Reply

Return to “Databases”