PDF Error BlobField loadfromfile

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
developerwg
Posts: 3
Joined: Mon 04 Feb 2013 02:32

PDF Error BlobField loadfromfile

Post by developerwg » Mon 04 Feb 2013 02:42

I'm using Delphi 2009 and MyDac 7.1.6, and when I try to do something like this:

myquery.edit;
TBlobField(myquery.fieldByname('fieldname')).loadFromFile('mypdffile.pdf');
myquery.post;

Show this error:

Incorrect string value...

What I do I need to do to fix this problem ?

Thanks in advanced

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: PDF Error BlobField loadfromfile

Post by DemetrionQ » Tue 05 Feb 2013 10:58

Hello.

Please provide the following data:
- MySQL Server version;
- create table script.

developerwg
Posts: 3
Joined: Mon 04 Feb 2013 02:32

Re: PDF Error BlobField loadfromfile

Post by developerwg » Tue 05 Feb 2013 19:17

mysql 5.1.48


CREATE TABLE `caddocumentos` (
`iddocumento` varchar(36) NOT NULL,
`idlink` varchar(36) DEFAULT NULL,
`descricao` varchar(256) DEFAULT NULL,
`lastupdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`extensaoarq` varchar(3) DEFAULT NULL,
`conteudo` longblob,
`iduser` varchar(36) DEFAULT NULL,
PRIMARY KEY (`iddocumento`),
KEY `caddocumentos_idx1` (`idlink`),
KEY `iduser` (`iduser`),
CONSTRAINT `caddocumentos_fk1` FOREIGN KEY (`iduser`) REFERENCES `caduser` (`USU_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;

The field name is "conteudo".

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: PDF Error BlobField loadfromfile

Post by DemetrionQ » Thu 07 Feb 2013 16:07

Hello.

We cannot reproduce the issue. Please provide the exact version of Delphi 2009 you are using (for example: Delphi 2009 Version 12.0.3420.21218).

developerwg
Posts: 3
Joined: Mon 04 Feb 2013 02:32

Re: PDF Error BlobField loadfromfile

Post by developerwg » Fri 08 Feb 2013 03:35

CodeGear™ RAD Studio 2009 Version 12.0.3170.16989

DemetrionQ
Devart Team
Posts: 271
Joined: Wed 23 Jan 2013 11:21

Re: PDF Error BlobField loadfromfile

Post by DemetrionQ » Fri 08 Feb 2013 10:38

Hello.

Please, install Update 3 for RAD Studio 2009 and check, whether the error repeats.

Post Reply