List:MySQL++« Previous MessageNext Message »
From:Maarten Schrijvers Date:October 2 2007 11:48am
Subject:Re: Using a template query does not work
View as plain text  
>
> You must pass parameters to preview() when using template queries.  In
> this case, pass the same parameters you passed to execute().  It doesn't
> keep the assembled query in memory, it rebuilds it each time at need.
> preview() without arguments only works with fixed queries.
>
Thanks! That was it :)

After removing some silly errors, my execute-query still does not actually
insert the data into the database. When I copy-paste the query-string to
Toad, it works without further hickups. I also check it from within the
program:
if (qInsRel.success())
MessageBox::Show("Gegevens opgeslagen", "Succes!"); //data inserted
else
MessageBox::Show("Er ging iets niet helemaal goed...", "Ahhh"); //failure

Is there another step I have to take before a template-query actually
performs an action on the database?

Thread
Using a template query does not workMaarten Schrijvers27 Sep
  • Re: Using a template query does not workWarren Young28 Sep
    • Re: Using a template query does not workMaarten Schrijvers2 Oct
      • Re: Using a template query does not workWarren Young2 Oct
        • Re: Using a template query does not workMaarten Schrijvers3 Oct
          • Re: Using a template query does not workWarren Young3 Oct