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 |
|
huge
Starting Member
31 Posts |
Posted - 2001-07-30 : 11:54:19
|
| Ok i have a table that looks like this-------------SessionLog-------------SID - UniqueIdentifier Default (NewID()) (PK)UserID - Null Values allowedOk now I have an ASP page that goes into this table and grabs a new SID number from a Stored Proc. So what this will do is every person, session that visits the site will get a new SID and when they login with username and password (in another table) it will put their userid into this SessionLog table under the SID (that will be in their querystring).So this is what I did:CREATE PROCEDURE sproc_getSIDASDECLARE @newid uniqueidentifierSET @newid = NewID()RETURN (@newid) INSERT SessionLog (SID) values (@newid)GOTHis attempts to get a value for a uniqueidentifier place it into a variable which then gets inserted into a table, then returns the value of the variable to the ASP page.However I keep getting this error:Error 206: Operand Type Clash: uniqueidentifier is incompatible with intwhats wrong here?ThanksMike |
|
|
|
|
|