SC 5.1 : strange behaviour of BLOB-Fields and document filename

Hello,
I have a table with a BLOB-Field for bills in MYSQL-Database (database document).

Field Dokument defined as BLOB
Field Dokument_Filename defined as varchar(80)

In Field Dokument_Filename I store the name of the document in BLOB-Field. This filed Dokument_Filename is connected with Dokument in grid definition.

In all Dokument_Filename I have the constant value “bill.doc”, but of course in different records with different BLOB-Fields.

In GriD I see the link to open the document, but because of the same name in all Dokument_Filename, SC takes the wrong (latest record) in the grid and opens the wrong document !!!
I’m very astonished, why SC does not take the primary key of the grid to get the right document ??

If I make the field Dokument_Filename as 1376_bill.doc, 1377_bill.doc … 1378_bill.doc everything works. So the content of Dokument_Filename must be something like a
-primary key- …

Is this the way SC works or I’m doing wrong something ??

Best regards
Uwe Pfeiffer

Re: SC 5.1 : strange behaviour of BLOB-Fields and document filename

Hi Uwe,

because the filename is the same, any record is found … if you want to use the id, combine the file name and id or link to the id field.

Re: SC 5.1 : strange behaviour of BLOB-Fields and document filename

Hello,
meanwhile the developer said, that this is a bug in SC and they will try to repair it next version … (Answer to my ticket)
To make a workaround I now construct a unique name for the field and so it works.

Best regards
Uwe Pfeiffer