Hi.
I'm having a problem with that code.
Im getting this error: Warning: mssql_execute() [function.mssql-execute]: message: Error de conversi�n al convertir una cadena de caracteres a datetime. (severity 16) (Translate: error converting string to datetime)
Warning: mssql_execute() [function.mssql-execute]: stored procedure execution failed

But I dont use datetime in this script!
The code:

$cero = 0;
$proc = mssql_init('sp_calculates_contract_account',$conn);

mssql_bind($proc,'@id_contract',$idContrato,SQLINT1,false,false);
mssql_bind($proc,'@id_holder',$idSocio,SQLINT1,false,false);
mssql_bind($proc,'@cant',$cero,SQLINT2,true,true);
mssql_bind($proc,'@value',$cero,SQLFLT8,true,true);


if ($resultado = mssql_execute($proc)) 
{
	if ($row = mssql_fetch_row($resultado)) 
	{
		// now you can deal with the $row array to check out your results
		echo $row;
	}
}

Anyone can help me?
THANKS A LOT!

Hi my friend.
There are no queries before the code.
Only server connection.

I have already try what you point.

I have replaced the variables at the stored proc for their values and it works fine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.