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
PDF Error BlobField loadfromfile
-
DemetrionQ
- Devart Team
- Posts: 271
- Joined: Wed 23 Jan 2013 11:21
Re: PDF Error BlobField loadfromfile
Hello.
Please provide the following data:
- MySQL Server version;
- create table script.
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
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".
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
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).
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
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
Hello.
Please, install Update 3 for RAD Studio 2009 and check, whether the error repeats.
Please, install Update 3 for RAD Studio 2009 and check, whether the error repeats.