1

What I need to do is to create a table within my database at runtime to store some data then store it in another table and delete the current or Temp table. It is a security issue where I can not use session or caching in my application any help will be appreciated .

5
  • Can't you just create this table directly in your Database, setup the app to insert whatever rows you need, and then upon exiting your app, copy the data to another table and clear the one you were using temporarily? Commented Aug 22, 2011 at 13:39
  • If I understand, you want to store some data at run time only and you're not sure if you should create a table on the database and then delete it or if you should persist this temporary data in memory? Commented Aug 22, 2011 at 13:40
  • this is another good solution for the same case yest make a temp table and clear it after finishing Commented Aug 22, 2011 at 13:41
  • 1
    no i do not any temp table i want to delete it because i create another one with another attribute each time according to the user category and any user can combine between 2 categories at the same time Commented Aug 22, 2011 at 13:46
  • You may be able to use: INSERT INTO #MyTempTable ... to create a local temporary table without actually having to issue a CREATE TABLE statement. It will evaporate when you close the connection. Commented Aug 22, 2011 at 14:48

1 Answer 1

1

you can do it using ado.net like any other sql statement create table with your attributes then insert the table data in another table then delete the table but i am not sure for delete the table

Sign up to request clarification or add additional context in comments.

2 Comments

can i create it with different attribute each time and would you pleas send me a code snippet
you ca do any thing with ado.net it is embed sql statement within string so you can write any thing

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.