|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1197 cannot insert long byte columns
Submitted: 1999-03-02 12:58 UTC Modified: 1999-10-03 06:35 UTC
From: tobi at web-arts dot de Assigned:
Status: Closed Package: Adabas-D related
PHP Version: 3.0.5 OS: linux 2.0.36 (SuSE 6.0)
Private report: No CVE-ID: None
 [1999-03-02 12:58 UTC] tobi at web-arts dot de
I am using the php3 module that came with SuSE Linux 6.0 and its apache server.

When I try to insert a long byte column (that is longvarbinary in ODBC), I get an "Error in assignment", SQLstate 22005 in SQLExecute.

The table was generated with Domain as a long byte column and I tried to write string data into it
using the following sequence of code:

$result2=odbc_prepare($connid1,"insert into blobs(ID,CONTENT_TYPE,BLOB) values (?,?,?)");

the error appears in odbc_execute.

It doesn't appear when I only insert the first and the second column (numeric and character data).

I don't know where php3 communicates with the Adabas D Database via ODBC, but it should determine the column type with SQLDescribeparam (hstmt, column, &sqltype, &sqllen, &sqlscane,&nullable). Then it should test if the column is of binary type:
  case SQL_BINARY:

and the variable ctype should be used in the SQLSetParam command:

  SQLSetParam(hstmt, column, ctype, sqltype, length,0,data,(SDWORD FAR*) (&length));

then Adabas D should eat it.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-03 06:35 UTC] kara at cvs dot php dot net
LONGs work ok
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 04:01:25 2020 UTC