On Nov 19, 2007 9:21 AM, Mark Marsh <poco@flambe.me.uk> wrote:

I'm having a problem inserting records using ODBC. The string insert uses the length of the column that is first inserted (I'm inserting into a varchar with plenty of room) - so longer strings inserted later are truncated.

I've altered the sample binding program to demonstrate...


This happens with both postgreSQL and SQL server. Any ideas?


You have stumbled across a problem in the ODBC connector when manually binding input parameters. This will be taken care of in the upcoming bugfix release. In the mean time, there is an easy workaround - set automatic binding for the session prior to executing:

sesion.setFeature("autoBind", true);

If you want to keep manual binding, using a vector of tuples with only one execute() (or ', now'), will do the job properly (see the Tuple sample).

If you are using 1.3.1 release archive, make sure you have patched the code:

You can find new features decribed in the blog, documentation and SVN repository. I do not, however, recommend SVN code for production in the next few weeks, since there were many new things introduced.

I'm assessing POCO with a view to using it to replace our current reliance on .Net which is proving to be a bit of a pain due to problems with visual studio. It looks very good so far and I hope it will prove suitable as I like the overall design very much.

Good choice ;-). Welcome to POCO community :-)

Best regards,