Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot TTable.Post while using TDBMemo

Status
Not open for further replies.

MightySandman

Programmer
Nov 21, 2004
1
PL
I've noticed a strange problem in my (simple) DB app...

I'm using MySQL through ODBC driver. Through TTable I access table which has two BLOB fields ("Text" type in MySQL).

I'm filling this table in batch through the typical code sequence:
1. table.Edit / table.Insert
2. tablefield1.Value := blahblah...
3. table.Post

I've noticed that there is a problem when I fill memo field with some value (non empty string) and has TDBMemo control on my form. Then I got DB Exception "Non-blob column in table required to perform operation." I've found, that it's caused by TDBMemo control update procedure called during table.Post method while updating db controls (besides, that I call table.DisableControls before batch...).

I have no idea how to workaround this problem in other way than removing association with TDBMemo during update and restoring it after all. But it's a stupid solution... [sad]

Thanks a lot...
 
I tried on my pc and all works fine.
I have: D7 - MySQL 5.00 - MyODBC 3.51 - WinXP

are you sure you have linked all components in the right manner?

But why do you use table and not query?
(On my pc either if i use TTable or TQuery works fine)

Giovanni Caramia

 
Are there other fields in the table with the Blob fields? If not, that's where your problem is. Delphi only uses non-blob key fields to identify which record to update and whether or not the existing record was modified by another user while the current user was also editing it.

-Dell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top