Forum: Ruby Prepared Statements with ruby pg gem

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
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.