Postgresql and Parameters

Creating desktop or client-server database solutions?

Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller

Post Reply
jharris
Posts: 78
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
Windows 7/10 - OS X 10.11.6 - Linux Mint 17
LiveCode 9.0.1

jharris
Posts: 78
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
Windows 7/10 - OS X 10.11.6 - Linux Mint 17
LiveCode 9.0.1

Post Reply

Return to “Databases”