|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-10-03 06:35 UTC] kara at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 19:00:02 2025 UTC |
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 (?,?,?)"); $o[0]=1; $o[1]="image/gif"; $o[2]="rhabarber"; $result2=odbc_execute($result2,$o); 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: switch(sqltype){ case SQL_BINARY: case SQL_VARBINARY: case SQL_LONGVARBINARY: ctype=SQL_C_BINARY; break; default: ... } 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.