|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-09 13:29 UTC] jani@php.net
[2007-07-11 17:59 UTC] rnerovich at gmail dot com
[2007-08-17 10:56 UTC] jani@php.net
[2008-05-28 16:10 UTC] dmeglio at rightreasontech dot com
[2008-05-28 16:21 UTC] rnerovich at gmail dot com
[2008-12-15 22:30 UTC] timbob1000 at gmail dot com
[2014-12-29 01:05 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: fmk
+Assigned To:
[2016-10-15 23:07 UTC] kalle@php.net
-Status: Open
+Status: Wont fix
[2016-10-15 23:07 UTC] kalle@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 17:00:02 2025 UTC |
Description: ------------ When inserting an image into MSSQL using SQLVARCHAR, this error is thrown with mssql_bind()... Warning: mssql_bind() [function.mssql-bind]: Unable to set parameter (not expected) If SQLTEXT is used the bind succeeds, but the execute fails with... Operand type clash: text is incompatible with image (expected) Reproduce code: --------------- // $filedata read in from drive, $filelen = lenth of data $sp = mssql_init('MSG_PROC_TEST',$dblink->dbresource); $mrecnum = '{1C296DF1-EE73-436E-BC55-09C58F53C132}'; $mfilename = '1075318802KUZMA.WAV'; mssql_bind($sp,"@MRECNUM", $mrecnum,SQLVARCHAR,FALSE,FALSE,38); mssql_bind($sp,"@MFILENAME",$mfilename, SQLVARCHAR,FALSE,FALSE,strlen($mfilename)); mssql_bind($sp,"@MID",&$mid,SQLVARCHAR,true,false,38); mssql_bind($sp,"@MWAVS",$filedata, SQLVARCHAR,false,false,$filelen); if(mssql_execute($sp)){ ... sp example CREATE PROCEDURE MSG_PROC_TEST @MRECNUM UNIQUEIDENTIFIER, @MFILENAME VARCHAR(50),@MID UNIQUEIDENTIFIER OUTPUT, @MWAVS IMAGE Expected result: ---------------- Insert file into image field in MSSQL successfully. Actual result: -------------- mssql_bind() or mssql_execute() fails because the data conversion to an image type doesn't work correctly.