Deane Yang
2013-04-04 13:44:12 UTC
I was able to get this to work with sqlite, but am having difficulty doing
this with postgresql. I've confirmed that SOCI is successfully connecting
to the database. When I ask for the number of rows in the table "trades",
it returns the correct number.
The code that isn't working looks like this:
statement get_trades =
(sql.prepare <<
"select * from trades where trade_date=20090111",
into(record));
get_trades.execute();
while (get_trades.fetch())
{
...
}
An exception is thrown when executing "get_grades.fetch()" and return the
following message:
ERROR: prepared statement "st_1" does not exist
Could someone help me with this?
this with postgresql. I've confirmed that SOCI is successfully connecting
to the database. When I ask for the number of rows in the table "trades",
it returns the correct number.
The code that isn't working looks like this:
statement get_trades =
(sql.prepare <<
"select * from trades where trade_date=20090111",
into(record));
get_trades.execute();
while (get_trades.fetch())
{
...
}
An exception is thrown when executing "get_grades.fetch()" and return the
following message:
ERROR: prepared statement "st_1" does not exist
Could someone help me with this?