Click here to Skip to main content
16,019,246 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am using asp.net web application Present Following 3-tire Architecture.

Asp.net-->Biussness layer--> Data Access layer--> DB

but I have to work even for Offline mode so I need a fuctionality
like

Asp.net -->BL-->

I need to save page data in to XML file if connection open to Data base then I have to push This Xml file into DataBase.

We are planning to use DOm. Can anyone help me in sending XML data into Database For each Recordset?
Posted
Updated 15-Nov-10 18:50pm
v2

 
Share this answer
 
Hi,

Across BL and DAL you might opt for dataset/xml whatever is as per your requirement.

1. When you have data stored in XML file then you can get the data from xml file as xml. So you have the objective of passing this xml data to database stored procedure.

In database SQL Server 2005 onwards there is datatype called "xml". You can pass the xml data from DAL to stored procedure as xml data. Inside stored procedure how you can extract data is found here,

http://weblogs.asp.net/jgalloway/archive/2007/02/16/passing-lists-to-sql-server-2005-with-xml-parameters.aspx


The above article is very nice and I am sure would be very much helpful.

Another one thing, people sometime passes xml data as a string from data access to stored procedure. But problem is their is restriction of max data length when you pass xml data is varchar. Hence it is better if you directly use type xml instead of varchar for sending data to stored procedure from DAL.

Let me know if the post is helpfull.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900