Last post Sep 28, 2012 12:35 PM by cyberwin
Sep 26, 2012 12:33 PM|muhammadazeemazam|LINK
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.
Sep 27, 2012 09:48 PM|Decker Dong - MSFT|LINK
Not very clear about your meaning——would you mind telling me in details about what class model you have got now? And what tables you have got and what really you wanna do? What's the expected result?
Sep 28, 2012 12:35 PM|cyberwin|LINK
If your fields match up, I would create a SAVE method in the class. Within the method you could simply open a connection and save via text insert command, or (better option) access your data access layer which should already contain methods for reading from
and writing to the database.