Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-01-14 : 13:29:50
|
| Rajna writes "Hi,My problem is related to stored procedures. I have a test stored procedure with a simple sql statement and when I run that statement from the QAnalyzer it works, but with SP it gives just a message - return code = 0 and blank grid, no error, nothing. Here is the code and if somebody can tell me what's wrong with this simple SP, I'd appreciate it...thanks in advance.CREATE PROCEDURE GetUserGroup @UserID nvarcharASSELECT UserID, PWD from tblUser WHERE UserID=@UserIDGO-----If I change this so instead @UserID in a SQL statement put a value it works, I get result on the screen. What's wrong with the parameter I'm passing?Thanks for your helpRajna/Clara" |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-01-14 : 13:49:45
|
| you didnt put the size of the nvarcharsomething like thisCREATE PROCEDURE GetUserGroup @UserID nvarchar(20)ASSELECT UserID, PWD from tblUser WHERE UserID=@UserIDGO |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-14 : 17:59:15
|
quote: @UserID nvarchar
if you did not specify the size, the default size will be 1.-----------------'KH'if you can't beat them, have someone else to beat them |
 |
|
|
|
|
|