[yunqa.de] Re: BLOB field is incorrectly being written into DB and truncated by BindDataSet - FIXED.

  • From: Jone Word <corabelster@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Fri, 19 Jun 2009 13:40:20 +0400

Hi, Ralf!

This problem is somehow connected with the BLOB problem. Because it's new
BindDataSet
that is causing it. When I change BindDataSet to a previous version, or a
version of mine,
all is working ok.

I'm using ModifySql like this ModifySQL := 'update Tasks set
field=:field,...  where no=:no;';
and SelectSQL := 'select field, case when (Status=1) then 'complete' when
(Status=2) then 'pending'  else 'missed' end as StatusTitle from Tasks;';

then I'm modifying this field (together with others) using provider &
datasource. and doing ApplyUpdates(-1);
If the recent version of BindDataSet is being used - the error is fired. If
the previous version
is used - it's all ok - all fields except StatusTitle are being modified as
expected.

Thank you


2009/6/19 Delphi Inspiration <delphi@xxxxxxxx>

> At 21:42 18.06.2009, Jone Word wrote:
>
> > I'm writing concerning this old bug with BLOB field that was being
> >incorrectly written
> >into database. I'm sorry to report that the new, (fixed by Ralf)
> >BindDataSet function is
> >causing a new error. My solution for fixing this problem doesn't cause
> >this type of an error.
> >I can't tell why, because I still don't have enough time.
>
> When you find the time, could you please tell me more about the problem so
> it can be fixed?
>
> >The error is appearing when you have a blob field in the table
> >together with a field that
> >is not physically presented in DB, but rather it's generated dynamically
> >(something like WHEN ... THEN ....clause). So when this field is being
> post into
> >the table by ApplyUpdates - the "no such column" error is being fired.
> >It's only being
> >fired in the newer versions of BindDataSet that deal with BLOB problem.
>
> TDataSetProvider can not update all queries, and CASE clauses are
> especially likely to cause problems. Use the TDISQLite3UniDirQuery.ModifySql
> to specify your update statement.
>
> If you still experience difficulties, please send a short code example for
> me to reproduce.
>
> Ralf
>
> _______________________________________________
> Delphi Inspiration mailing list
> yunqa@xxxxxxxxxxxxx
> //www.freelists.org/list/yunqa
>
>
>
>

Other related posts: