Forum: Ruby Prepared Statements with ruby pg gem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
E4b70791838c01d54101d10e87c45233?d=identicon&s=25 Gaurav S. (gaurav_s94)
on 2012-12-20 09:25
I am trying to use the prepared statements in ruby with pg gem. This is
how my statement looks like

conn.prepare("insert_values", "insert into " + objectName + "(" +
headerStr + ") values (" + prep_values + ")")
conn.exec_prepared("insert_values", arr)
I keep getting the error

Prepared Statement insert_values already exists.

How Do i Fix this?? Thanks
This topic is locked and can not be replied to.