yes you are correct, you have to create a store procedure and call it from your code-behind before calling fill store procedure parameter with your class property. Inside store procedure you have to insert data in the tables.
If this post answered your question or solved your problem, please Mark it as Answer.
muhammadazee...
Member
4 Points
165 Posts
Assigninig Populated class to a SQL Server Table
Sep 26, 2012 03:28 PM|LINK
hi
I have populated a class from different tables.
Now i want that class to be assigned to a table (that has same fields as my class attributes) in SQL Server.
Should i create a store pocedure and pass all class attributes as parameters and then using Insert command.
Looking for Possible Solutions.
Thanks
Ramesh Chand...
Star
12922 Points
2672 Posts
Re: Assigninig Populated class to a SQL Server Table
Sep 26, 2012 05:44 PM|LINK
yes you are correct, you have to create a store procedure and call it from your code-behind before calling fill store procedure parameter with your class property. Inside store procedure you have to insert data in the tables.
m.koopman
Participant
1372 Points
294 Posts
Re: Assigninig Populated class to a SQL Server Table
Sep 26, 2012 05:48 PM|LINK
Sounds like you might need something like Entity Framework or an other ORM system.
http://en.wikipedia.org/wiki/Object-relational_mapping
http://msdn.microsoft.com/en-us/library/aa697427(v=vs.80).aspx
Please mark my reply as answer if you found it help full
muhammadazee...
Member
4 Points
165 Posts
Re: Assigninig Populated class to a SQL Server Table
Sep 26, 2012 06:02 PM|LINK
The problem is what if i have 10000 recors (rows). this means i am calling store procedure 10000 time. performace degraded..
any other solution would be helpful
thanks