Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 20th, 2007, 02:52 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Collection facility

Is it possible to save parent and child table data at a time using the class list object

 
Old November 20th, 2007, 12:34 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You are going to need to be more specific with this question.

-Peter
 
Old November 22nd, 2007, 12:36 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I need to add details in parent table and child table using transaction. Is it possible to store data in the list of class object and save them at a time

 
Old November 26th, 2007, 10:36 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not sure I understand. What do you mean by "save them at a time"? Do you mean you want to save all records simultaneously in a single transaction?

-Peter
 
Old November 27th, 2007, 07:05 AM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes,I want to saave the records in a single transsaction with out using collection

 
Old November 27th, 2007, 01:03 PM
Registered User
 
Join Date: Nov 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your question is not clear. Can you give a scenario ?
 
Old November 27th, 2007, 01:13 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Quote:
quote:Originally posted by AnjuSujith
 Yes,I want to saave the records in a single transsaction with out using collection

Well now I am really confused. A List<T> is a collection.


And since you have said:

Quote:
quote:Originally posted by AnjuSujith


Is it possible to store data in the list of class object and save them at a time
You could do:

Code:
foreach(<type> t in <List>)
{
  //construct SQL 
}
and you can employ the SqlTransaction class to create a transaction in code as shown here:

http://msdn2.microsoft.com/en-us/lib...ansaction.aspx

This uses Dynamic SQL which i am not a fan of but i think this will solve your problem.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor :.
Wrox Books 24 x 7
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Facility JayLou BOOK: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter ISBN: 978-0-7645-8807-5 0 March 26th, 2007 05:37 AM
Search Facility in site qazi_nomi Classic ASP Basics 3 March 14th, 2005 07:57 PM
Is there queing facility available in CDO? arulkumar Classic ASP Basics 1 March 4th, 2005 07:14 PM
How to give login logout Facility cbpanchal VB How-To 2 July 28th, 2004 06:42 AM
How to add attachment facility with JSP page. monika_jain_99 J2EE 2 July 9th, 2003 12:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.