Blob File dans une bdd SQLServer
Bonjour,
j'ai le code suivant , sous mysql ça fonctionne alors que avec SQLserver il génére une exception .
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
.......
/**
* @var string
* @ORM\Column(name="LOGO_CGA", type="blob", nullable=true)
*/
private $logoCga;
private $file;
......
/**
* @ORM\PrePersist()
* @ORM\PreUpdate()
*/
public function upload() {
if (null === $this->file) {
return;
}
$strm = fopen($this->file->getRealPath(), 'rb');
$this->setLogoCga(stream_get_contents($strm));
} |
Exception:
Citation:
SQLSTATE[IMSSP]: An error occurred translating string for input param 9 to UCS-2: No mapping for the Unicode character exists in the target multi-byte code page.
merci d'avance