tags:

views:

40

answers:

1

My scenario.... I dynamically(dicval.add(Tkey,Tvalue) create set of columns and now i need to insert values and save those values using Stored procedures..how to achieve this

A: 

not sure exactly what you are trying to accomplish, what your schemas are, etc.

  • w/i dynamic sql, one can run DDL statements - create table, alter table add col, etc
  • from what little I see in your answer, you may be
  • If you are using linq, perhaps it contains structures for building tables?
  • Again, from what little I see of your question, maybe the correct question to be asking is, "how can I change the structure of this app so that I'm not having to dynamically add columns"
  • As far as interacting with dynamically, recently created tables via stored procedures - that seems to say to me that the sprocs would need to be dynamically created as well.

If you can't change the structure, and insist on doing some sort of string manipulation to create DDL of tables, columns and sprocs, I highly recommend you be very, very organized and make use of tokenized templates.

MaasSql