Click here to Skip to main content
15,894,337 members
Home / Discussions / Database
   

Database

 
GeneralRe: regarding foreignkey data Pin
kheer26-Aug-09 22:01
kheer26-Aug-09 22:01 
QuestionMerging multi results into one row Pin
Wouter Coinless24-Aug-09 9:12
Wouter Coinless24-Aug-09 9:12 
AnswerRe: Merging multi results into one row Pin
Luc Pattyn24-Aug-09 9:39
sitebuilderLuc Pattyn24-Aug-09 9:39 
AnswerRe: Merging multi results into one row Pin
Eddy Vluggen24-Aug-09 9:51
professionalEddy Vluggen24-Aug-09 9:51 
AnswerRe: Merging multi results into one row Pin
Wouter Coinless24-Aug-09 9:54
Wouter Coinless24-Aug-09 9:54 
QuestionXML Save and Load to SQL Server 2005 database. Pin
ashwath197924-Aug-09 1:55
ashwath197924-Aug-09 1:55 
AnswerRe: XML Save and Load to SQL Server 2005 database. Pin
Henry Minute24-Aug-09 2:18
Henry Minute24-Aug-09 2:18 
AnswerRe: XML Save and Load to SQL Server 2005 database. Pin
N a v a n e e t h24-Aug-09 6:19
N a v a n e e t h24-Aug-09 6:19 
You can have your column type as XML and SqlDbType[^] enum supports XML type. You can write something like,
using (SqlConnection conn = /* ... */)
using (SqlCommand cmd = new SqlCommand("insert into your_table VALUES(@xml_content)", conn))
{
     cmd.Parameters.Add("@xml_content", SqlDbType.Xml).Value = new SqlXml(reader);     
     // other code
}
SqlXml can take a Stream or a XmlReader instance.

For reading data, work with the SqlDataReader.GetSqlXml()[^] method. SqlXml.ReadOuterXml() will give you a string representation of the XML.

Smile | :)


GeneralRe: XML Save and Load to SQL Server 2005 database. Pin
ashwath197925-Aug-09 1:40
ashwath197925-Aug-09 1:40 
GeneralRe: XML Save and Load to SQL Server 2005 database. Pin
N a v a n e e t h25-Aug-09 2:06
N a v a n e e t h25-Aug-09 2:06 
RantFound some strange code. [moved] Pin
Gandalf_TheWhite24-Aug-09 1:23
professionalGandalf_TheWhite24-Aug-09 1:23 
GeneralRe: Found some strange code. Pin
PIEBALDconsult24-Aug-09 4:08
mvePIEBALDconsult24-Aug-09 4:08 
QuestionTransferring SQL Express data Pin
hairy_hats24-Aug-09 0:07
hairy_hats24-Aug-09 0:07 
AnswerRe: Transferring SQL Express data Pin
Henry Minute24-Aug-09 0:29
Henry Minute24-Aug-09 0:29 
GeneralRe: Transferring SQL Express data Pin
hairy_hats24-Aug-09 0:36
hairy_hats24-Aug-09 0:36 
GeneralRe: Transferring SQL Express data Pin
Henry Minute24-Aug-09 5:51
Henry Minute24-Aug-09 5:51 
QuestionDatabase design questions Pin
Saksida Bojan23-Aug-09 22:51
Saksida Bojan23-Aug-09 22:51 
AnswerRe: Database design questions Pin
Mycroft Holmes23-Aug-09 23:34
professionalMycroft Holmes23-Aug-09 23:34 
GeneralRe: Database design questions Pin
Saksida Bojan23-Aug-09 23:51
Saksida Bojan23-Aug-09 23:51 
AnswerRe: Database design questions Pin
N a v a n e e t h24-Aug-09 6:33
N a v a n e e t h24-Aug-09 6:33 
GeneralRe: Database design questions Pin
Saksida Bojan24-Aug-09 7:28
Saksida Bojan24-Aug-09 7:28 
GeneralRe: Database design questions Pin
N a v a n e e t h24-Aug-09 16:56
N a v a n e e t h24-Aug-09 16:56 
QuestionOracle Equalent for Systypes and Syscolumns... Pin
sandhya1423-Aug-09 22:48
sandhya1423-Aug-09 22:48 
Questionget all parent tables name with child from sql 2005 Pin
Abdul Rahman Hamidy23-Aug-09 18:26
Abdul Rahman Hamidy23-Aug-09 18:26 
AnswerRe: get all parent tables name with child from sql 2005 Pin
Mycroft Holmes23-Aug-09 19:34
professionalMycroft Holmes23-Aug-09 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.