DB and SQL Server -unknown error

From: Date: Sun, 06 Feb 2005 00:04:00 +0000
Subject: DB and SQL Server -unknown error
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17403@lists.php.net to get a copy of this message
Hello I have download the PEAR module and use the DB.php. I conected with my MS SQL Server without errors but when i try use INSERT or UPDATE in my query DB class display error msg: DB Error: unknown error INSERT INTO Users (firstName,lastName,profession,location,company,login,pass,email) VALUES ('aaa','vvv','programista','ELPL','ELPL','lesiu','pass','mich.lesi@arning.pl '); [nativecode=0 - Changed database context to 'Nawigator3'.] And it's my all code: ************************************ <?php require_once('DB.php'); $user='sa'; $pass='wiosna'; $host='192.168.0.2'; $db_name='Nawigator3'; $typedb="mssql"; $dsn="$typedb://$user:$pass@$host/$db_name"; $db=DB::connect($dsn); if (DB::isError($db)) { echo ($db->getMessage()); echo ($db->getDebugInfo()); } $sql="INSERT INTO Users (firstName,lastName,profession,location,company,login,pass,email) VALUES ('aaa','vvv','programista','ELPL','ELPL','lesiu','pass','mich.lesi@arning.pl ');"; $result=$db->query($sql); if (DB::isError($result)) { // echo "JEST!!!"; echo "<BR><BR>".($result->getMessage()); echo "<BR><BR>".($result->getDebugInfo()); } $db->disconnect(); ?> ************************************ PS. I use PHP5, SQL Server 2000, main char encoding- UTF8. Select statements works fine, problem is with INSERT,UPDATE. Please give me advise, what is wrong because i can't use flag -isError. Lesiu from Poland

« previous php.pear.general (#17403) next »