in what case does SELECT SCOPE_IDENTITY() return null?
i am doing this:
Set rs = cn.Execute("SELECT SCOPE_IDENTITY()", , adCmdText)
capture_id = rs.Fields(0)
and i getting capture_id=null
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to MSDN, “The SCOPE_IDENTITY() function will return the null value if the function is invoked before any INSERT statements into an identity column occur in the scope.”