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 |
jrobin747
Starting Member
48 Posts |
Posted - 2013-08-22 : 17:34:48
|
I'm creating my first store procedure. I was told that I need to create a sessionID. Is that just a matter of declaring it.@x_strSessionGUID VARCHAR(50), |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2013-08-22 : 18:59:03
|
There is nothing inherent about a stored procedure that requires you to create a session id. Every user process will automatically be assigned a session id (SPID) by the system; you don't need to create it yourself. Is there something specific to your development effort that makes creating or knowing the session id necessary?=================================================The cure for anything is salt water -- sweat, tears, or the sea. -Isak Dinesen |
 |
|
jrobin747
Starting Member
48 Posts |
Posted - 2013-08-23 : 11:51:56
|
I was able to create a stored procedure with no errors.However when I ran the stored procedure I got this error.Msg 201, Level 16, State 4, Procedure spEdgeSalesDashBoad, Line 0Procedure or function 'spEdgeSalesDashBoad' expects parameter '@x_strSessionGUID', which was not supplied. |
 |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2013-08-23 : 18:17:42
|
When you called that procedure/function, did you supply a value for that parameter? For stored procedures, you can define a default value for a parameter at CREATE time. When you do this, you don't need to pass in a value for that parameter; however, for parameters that do not have a default value defined, a value MUST be passed in when calling.=================================================The cure for anything is salt water -- sweat, tears, or the sea. -Isak Dinesen |
 |
|
|
|
|
|
|