I need a help, I am creating an application with PHP and DB2 but I'm getting an error I do not understand.
Could you help me?
Resultado da página
Code:
connecting to DB2...Connected!
Error: [IBM][CLI Driver][DB2] SQL0904N Execução mal-sucedida causada por um recurso indisponível. Código de razão: "UPDATABLE WORKFILE", tipo de recurso: "100" e nome de recurso: "TEMP DATABASE ". SQLSTATE=57011
SQL: SELECT * FROM DATAW.RESUMO_SLA
PHP Code:
<?php
class DB2
{
var $handle;
// bool connect(string $dsn, string $user, stirng $pass)
function connect($dsn, $user, $pass)
{
$this->handle = odbc_connect($dsn, $user, $pass);
if (!$this->handle)
return false;
return true;
}
// resourceid query(string $sql)
function query($sql)
{
$rs = @odbc_exec($this->handle, $sql);
if ($rs)
{
return $rs;
}
else
{
$sErr = "<b>Error:</b> " . $this->getErrorMsgs() . "<br><br>\n";
$sErr .= "<b>SQL:</b> " . $sql;
die($sErr);
}
}
// string getErrorMsgs()
function getErrorMsgs()
{
return odbc_errormsg($this->handle);
}
// void disconnect()
function disconnect()
{
if ($this->handle)
odbc_close($this->handle);
}
}
?>
<?php
//require_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/path/to/class.php");
$db = new DB2();
print "connecting to DB2...";
if (!$db->connect("DB9A", "******", "******"))
{
print "Error!\n";
exit();
}
print "Connected!<br>\n";
$sql = "SELECT * FROM DATAW.RESUMO_SLA";
$db->query($sql);
print "Disconnecting...";
$db->disconnect();
print "Disconnected!<br>\n";
?>

Helpppppp !!!!!!!
