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 |
Clara
Starting Member
4 Posts |
Posted - 2006-01-11 : 10:14:08
|
I hope I posted to the right forum...but here it goes...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 advanceCREATE PROCEDURE GetUserGroup @UserID nvarchar ASSELECT UserID, PWD from tblUser WHERE UserID=@UserIDGO |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2006-01-11 : 11:42:34
|
>>but with SP it gives just a message Did you mean ASP? If so you may want to post this in either ASP.NET or DEVELOPER forum. But since the SP works in query analyzer it sounds like it's a databinding issue with your Datagrid control.Be One with the OptimizerTG |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-01-11 : 12:25:59
|
Hello Clara,welcome to sqlteam. I really dont understand your "question" Are you trying to read the status code from your SP in your ASP page ?If so, you would use a return value and set a variable in your ASP page to read it |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-01-12 : 08:02:50
|
>>when I run that statement from the QAnalyzer it works,How did you run that from QA?Make sure the table has records for the UserId you're passingMadhivananFailing to plan is Planning to fail |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-01-12 : 08:22:57
|
if you use nvarchar without specifying any length, it is default to nvarchar(1)CREATE PROCEDURE GetUserGroup@UserID nvarchar(30) -- or set to the length of UserID in tblUserASSELECT UserID, PWD from tblUser WHERE UserID=@UserIDGO -----------------'KH'Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. |
|
|
|
|
|
|
|