Reply to Stored procedure returns no value

Your name:

Reply:


Posted by nikolacace on 03/01/06 12:09

Hi,
I have a stored procedure (the code is below) that I use to retrieve
one value from my database. I tested the code in Query Analyzer, and it
works (I get the value I was looking for). However, when I call the
same code from the stored procedure, I get no value. The code that is
executed is the same and the input parameter is the same. Does anybody
have an idea?

The code:

SELECT Top 1
CharID,
CharName,
CategoryName,
CharDescription,
UserID
FROM [Character]
WHERE CharName='Character'

-- returns the right value

The Stored Procedure:

CREATE PROCEDURE SpCharacters_SelectOneByUserName
@UserName NVarChar
AS
SELECT Top 1
CharID,
CharName,
CategoryName,
CharDescription,
UserID
FROM Character
WHERE CharName=@UserName
GO

-- returns no value

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация