This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » support » General discussion » MSSQL: Error while doing propel-build-schema
MSSQL: Error while doing propel-build-schema [message #25483] Wed, 11 April 2007 17:47 Go to next message
patroqueeet  is currently offline patroqueeet
Messages: 6
Registered: April 2007
Junior Member
Hi,

I created my database inside mssql and tried to build my schema now. this did'nt work out printing the following error:

(PHP Error) mssql_query(): message: Falsche Syntax in der Nõhe des 'user'-Schluesselwortes. (severity 15) [line 47 of C:\Programme\PHP\PEAR\symfony\vendor\creole
\drivers\mssql\metadata\MSSQLTableInfo.php]
(PHP Error) mssql_query(): Query failed [line 47 of C:\Programme\PHP\PEAR\symfony\vendor\creole\drivers\mssql\metadata\MSSQLTableInfo.php]
[propel-creole-transform] There was an error building XML from metadata: Could not get column names [Native Error: Falsche Syntax in der Nõhe des \'user\'-Schluesselwortes.]
[propel-creole-transform] Propel - CreoleToXMLSchema finished


which complains about an error close to the 'user'-keyword


-----------------------------
Patroqueeet
http://www.tschitschereengreen.com
Re: MSSQL: Error while doing propel-build-schema [message #25557 is a reply to message #25483 ] Thu, 12 April 2007 16:41 Go to previous message
patroqueeet  is currently offline patroqueeet
Messages: 6
Registered: April 2007
Junior Member
ok, I solved the bug.

I had a table called user which is quite an often used word in SQL Syntax, even for MSSQL. so the error was in the creole driver as said in the error message. just change the according line to:

$res = mssql_query("sp_columns [".$this->name."]", $this->conn->getResource());


and you might use this debugging code: above the command.

	echo "------------------- \n\n SQL QUERY: \n\n";
        echo "sp_columns ".$this->name;
	echo "\n\n-------------------\n"


and change line 87:

$res = mssql_query("sp_indexes_rowset [".$this->name."]", $this->conn->getResource());


-----------------------------
Patroqueeet
http://www.tschitschereengreen.com
Previous Topic:How do I pass parameters to an image script?
Next Topic:validation problem
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software