1. Create table
2. Insert some data
3. Perform some operation on that data and update same.
4. Get that data from temp table.
I am able to perform all the operations while writing all queries in single statement, my sql mapper file look like this see below: -
But i have a requirement to split all queries into seprate sections, see below: -
Insert into ##TestTable values('1001-101','ABC')
Insert into ##TestTable values('1001-102','XYZ')
But in 2nd approach i am getting exception "Invalid object name #TestTable".
Can someone please suggest me, what should i do in that case?
Quick solution will highly appreciated.
Thanks
James AxsomPosted Jun 19, 2018, 10:06 PM
Hi Tarun
Move the scope (or visibility) of ##TestTable to the class level of your code. In other words declare ##TestTable at the class level so each section can see it.
Example in C# WinForms