I have a program in Visual Studio that loads table data from SSMS. Right now, it's hard coded in to load specific tables no matter who logs in.
In SSMS, I have tables of college classes. When a user logs in, I want to run code in Visual Studio to insert the classes they've taken (located in SSMS) into tables in Visual Studio.
The root of my question is: How and in which program do I basically code "user with (current ID) has logged in. Get their data from SSMS and put it in the tables.
You don't have to answer the latter part necessarily but I'm really struggling with getting first part. Getting the persons ID who's logged in.Is it SCOPE_IDENTITY? Is it @@IDENTITY? Trying my best to understand this microsoft doc on scope identity.
Courses: https://i.stack.imgur.com/E34GW.png
Users: https://i.stack.imgur.com/QxFWv.png
Info (loads at top of program): https://i.stack.imgur.com/oMdlA.png