We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


[54000] ERROR: Cannot prepare statement - too many prepared statements — Vertica Forum

[54000] ERROR: Cannot prepare statement - too many prepared statements

joergschaberjoergschaber Vertica Customer
edited May 2020 in General Discussion

Hi,
at the risk to ask this question again, but I could not find a solution that suits me.
I'm using the Vertica.Data 7.2.3. nuget package to insert many data sets into my database. The code for a single row is basically something like:
string cols = string.Join(", ", keys.ToArray());
string values = string.Join(", ", data.Values.ToArray());
_command.CommandText = "INSERT INTO " + table + "(" + cols + ") SELECT " + values;
affectedRows = _command.ExecuteNonQuery();
This snippet runs fine for a couple of hundred rows, but then I get
[54000] ERROR: Cannot prepare statement - too many prepared statements
Where do I 'prepare statements' and how can I reset? It looks like I need to reset the 'prepared statement' buffer or soemthing like that.
I also tried a commit after each insert, but then I got a message that the statement was alread commited.
Thanks , Joerg

Best Answers

  • joergschaberjoergschaber Vertica Customer
    Answer ✓

    Where can I find version 8.0.0-3? Cannot find it on nuget.org.

  • joergschaberjoergschaber Vertica Customer
    Answer ✓

    Yes, that did the trick! Thanks for the quick reply. Best forum ever.

Answers

  • sahil_kumarsahil_kumar Vertica Employee Employee

    Thanks :)

  • abhaya2608abhaya2608 Vertica Customer

    Hi,
    I am using "Vertica Analytic Database v9.3.1-17" still facing this issue. Have you got any solution for this ?

  • joergschaberjoergschaber Vertica Customer

    I am using Vertica Analytic Database v10.0.1-6 with corresponding ADONET Driver and also face this issues.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file