SyntaxFix
Write A Post
Hire A Developer
Questions
Change the query to
"INSERT INTO Mem_Basic(Mem_Na,Mem_Occ) VALUES(@na,@occ); SELECT SCOPE_IDENTITY()"
This will return the last inserted ID which you can then get with ExecuteScalar
ExecuteScalar