note 92334 added to function.oci-bind-by-name

From: Date: Mon, 20 Jul 2009 13:14:29 +0000
Subject: note 92334 added to function.oci-bind-by-name
Groups: php.notes 
Request: Send a blank email to php-notes+get-158503@lists.php.net to get a copy of this message
Sometimes you get the error "ORA-01461: can bind a LONG value only for insert into a LONG column". This error is highly misleading especially when you have no LONG columns or LONG values. From my testing it seems this error can be caused when the value of a bound variable exceeds the length allocated. To avoid this error make sure you specify lengths when binding varchars e.g. <?php oci_bind_by_name($stmt,':string',$string, 256); ?> And for numerics use the default length (-1) but tell oracle its an integer e.g. <?php oci_bind_by_name($stmt,':num',$num, -1, SQLT_INT); ?> ---- Server IP: 87.124.35.190 Probable Submitter: 193.61.197.65 ---- Manual Page -- http://www.php.net/manual/en/function.oci-bind-by-name.php Edit -- https://master.php.net/note/edit/92334 Del: integrated -- https://master.php.net/note/delete/92334/integrated Del: useless -- https://master.php.net/note/delete/92334/useless Del: bad code -- https://master.php.net/note/delete/92334/bad+code Del: spam -- https://master.php.net/note/delete/92334/spam Del: non-english -- https://master.php.net/note/delete/92334/non-english Del: in docs -- https://master.php.net/note/delete/92334/in+docs Del: other reasons-- https://master.php.net/note/delete/92334 Reject -- https://master.php.net/note/reject/92334 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158503) next »