Hello!

MaxDB version: 7.5.0.19
MaxDB ODBC driver version: 7.5.0.19

When I use the following PHP code in Linux the content of the specified file is
inserted into my database correctly:

$stmt = odbc_prepare($connection, "INSERT INTO myfiles (id, filetype,
filecontent, filesize) VALUES( ?, ?, ?, ?)" );
$parms = array($id,$filetype,"'".$path.$filename."'", $filesize);
$exec = odbc_execute($stmt, $parms);

But when I use the same code on a Windows-Server only 1kbyte or less of the
filecontent is inserted into the database. So my file is corrupted when I try
to get it back from the database. The other parameters are inserted correctly
in the database. The type of the column "filecontent" is LONG (BYTE).

The ' before and after $path.$filename specifies that the content of the file
should be inserted into the database.

Because it's working in Linux, I believe the problem is related to the Windows
ODBC driver.

Has someone an idea to solve this problem ?? Or is their another way to insert
the content of a file into the database via ODBC ??

Bye

Claus




-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to