php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57761 i5/OS problem with Stored Procedure DATE type parameter
Submitted: 2007-07-29 08:15 UTC Modified: 2015-09-03 13:21 UTC
From: sam at zend dot com Assigned:
Status: Not a bug Package: ibm_db2 (PECL)
PHP Version: 5.2.1 OS: i5/OS
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sam at zend dot com
New email:
PHP Version: OS:

 

 [2007-07-29 08:15 UTC] sam at zend dot com
Description:
------------
Stored procedure in i5/OS has a parameter as a DATE type. PHP extension IBM_DB2 running on i5/OS can not call this procedure. We are getting following SQL error in i5/OS 
SQL0180: Syntax of date, time, or timestamp value not valid. The problem appears only when using db2_bind_param function. 



Reproduce code:
---------------
db2_autocommit( $conn, DB2_AUTOCOMMIT_OFF );
$sql = "CALL louisa.test_a1(?)";
$val = '';
$stmt= db2_prepare($conn_resource, $sql);
db2_bind_param($stmt,1,"val", DB2_PARAM_IN);
$result = db2_execute($stmt);

Expected result:
----------------
The call to stored procedure should not get any SQL errors

Actual result:
--------------
We are getting following SQL error in i5/OS 
SQL0180: Syntax of date, time, or timestamp value not valid. The problem appears only when using db2_bind_param function. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-12 19:50 UTC] adc at us dot ibm dot com
Invalid issue:
DB2 does not allow '' as date

STRSQL
    > select cast('' as date) from sysibm.sysdummy1    
      Argument 1 of function CAST not valid.
 [2015-09-03 13:21 UTC] rangercairns@php.net
-Status: Open +Status: Not a bug
 [2015-09-03 13:21 UTC] rangercairns@php.net
Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC