hey guys i get this error when trying to execute a stored procedure in my SQl DB
Warning: mssql_query() [function.mssql-query]: message: SELECT failed because the following SET options have incorrect settings: 'CONCAT_NULL_YIELDS_NULL, ANSI_WARNINGS, ANSI_PADDING'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations. (severity 16) in C:\wamp\www\index.php on line 4
Warning: mssql_query() [function.mssql-query]: Query failed in C:\wamp\www\index.php on line 4
here is the php code i used
<?PHP
mssql_connect('Philip-Pc\DRAGONICA','sa','123456');
mssql_select_db('dr2_member');
$result = mssql_query("exec up_php 'test', 'test'");
echo $result;
?>
and here is the code in the stored procedure
USE [DR2_Member]
(
@ID nvarchar(20),
@PW nvarchar(50)
)
AS
SET NOCOUNT ON
BEGIN
DECLARE @Err int
SET @Err = 0
-- *** Added by IAHGames ***
-- To convert nvarchar to binary
-- ***
DECLARE @binarypassword varbinary(max);
DECLARE @hexstring nvarchar(max);
SET @hexstring = @PW;
SELECT @binarypassword = Cast('' as xml).value('xs:hexBinary( substring(sql:variable("@hexstring"), sql:column("t.pos")) )', 'varbinary(max)')
FROM (SELECT CASE SubString(@hexstring, 1, 2) when '0x' then 3 else 0 end) as t(pos)
-- ***
select * from dbo.Member where ID = @ID and PW = @binarypassword
any ideas? thanks in advance im using SQL 2008 enterprise R2 btw