Click here to Skip to main content
15,905,785 members
Home / Discussions / C#
   

C#

 
AnswerRe: SMDR Data Collection using Tcp/ip in c# Pin
sep_exambo29-Aug-13 3:08
professionalsep_exambo29-Aug-13 3:08 
GeneralRe: SMDR Data Collection using Tcp/ip in c# Pin
Richard MacCutchan29-Aug-13 3:20
mveRichard MacCutchan29-Aug-13 3:20 
AnswerRe: SMDR Data Collection using Tcp/ip in c# Pin
NotPolitcallyCorrect29-Aug-13 2:06
NotPolitcallyCorrect29-Aug-13 2:06 
GeneralRe: SMDR Data Collection using Tcp/ip in c# Pin
Richard MacCutchan29-Aug-13 3:22
mveRichard MacCutchan29-Aug-13 3:22 
QuestionMATLAB Builder NE deployment problem Pin
shwetanisha28-Aug-13 20:23
shwetanisha28-Aug-13 20:23 
QuestionRe: MATLAB Builder NE deployment problem Pin
Richard MacCutchan28-Aug-13 21:28
mveRichard MacCutchan28-Aug-13 21:28 
AnswerRe: MATLAB Builder NE deployment problem Pin
shwetanisha28-Aug-13 21:55
shwetanisha28-Aug-13 21:55 
GeneralRe: MATLAB Builder NE deployment problem Pin
Richard MacCutchan28-Aug-13 22:11
mveRichard MacCutchan28-Aug-13 22:11 
GeneralRe: MATLAB Builder NE deployment problem Pin
shwetanisha29-Aug-13 0:15
shwetanisha29-Aug-13 0:15 
GeneralRe: MATLAB Builder NE deployment problem Pin
Richard MacCutchan29-Aug-13 0:29
mveRichard MacCutchan29-Aug-13 0:29 
GeneralRe: MATLAB Builder NE deployment problem Pin
shwetanisha29-Aug-13 2:03
shwetanisha29-Aug-13 2:03 
GeneralRe: MATLAB Builder NE deployment problem Pin
Pete O'Hanlon29-Aug-13 2:38
mvePete O'Hanlon29-Aug-13 2:38 
GeneralRe: MATLAB Builder NE deployment problem Pin
Richard MacCutchan29-Aug-13 2:59
mveRichard MacCutchan29-Aug-13 2:59 
GeneralRe: MATLAB Builder NE deployment problem Pin
shwetanisha29-Aug-13 19:56
shwetanisha29-Aug-13 19:56 
GeneralRe: MATLAB Builder NE deployment problem Pin
Richard MacCutchan29-Aug-13 20:54
mveRichard MacCutchan29-Aug-13 20:54 
GeneralRe: MATLAB Builder NE deployment problem Pin
shwetanisha29-Aug-13 22:25
shwetanisha29-Aug-13 22:25 
QuestionWindows Services using C# and SQL data Pin
Member 1023886728-Aug-13 20:07
Member 1023886728-Aug-13 20:07 
AnswerRe: Windows Services using C# and SQL data Pin
OriginalGriff28-Aug-13 21:13
mveOriginalGriff28-Aug-13 21:13 
GeneralRe: Windows Services using C# and SQL data Pin
Member 1023886728-Aug-13 21:43
Member 1023886728-Aug-13 21:43 
GeneralRe: Windows Services using C# and SQL data Pin
OriginalGriff28-Aug-13 22:00
mveOriginalGriff28-Aug-13 22:00 
AnswerRe: Windows Services using C# and SQL data Pin
Bernhard Hiller28-Aug-13 21:17
Bernhard Hiller28-Aug-13 21:17 
GeneralRe: Windows Services using C# and SQL data Pin
Member 1023886728-Aug-13 21:46
Member 1023886728-Aug-13 21:46 
QuestionDataGridView Printing Pin
Tsukasa8328-Aug-13 7:33
Tsukasa8328-Aug-13 7:33 
AnswerRe: DataGridView Printing Pin
OriginalGriff28-Aug-13 21:15
mveOriginalGriff28-Aug-13 21:15 
QuestionRead XML string, Manipulate, Store in Dataset & SqlBulkCopy Pin
murugesan.ks28-Aug-13 7:32
murugesan.ks28-Aug-13 7:32 
Hi,

My requirement is to read a XML string, Manipulate and store it in MS SQL Server.

XML:
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Table1>
<Col1>Value1</Col1>
<Col2>Value2</Col2>
<Col3>Value3</Col3>
</Table1>
<Table1>
<Col1>Value1a</Col1>
<Col2>Value2a</Col2>
<Col3>Value3a</Col3>
</Table1>
...
...
...
...
</Data>

its available in string
string sXML = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><Data><Table><Col1>Value1</Col1><Col2>Value2</Col2><Col3>Value3</Col3></Table><Table><Col1>Value1a</Col1><Col2>Value2a</Col2><Col3>Value3a</Col3></Table></Data>"

MS SQL Server table structure and xml mapping

MyTable - XML
Column1->Col1
Column2->Col2
Column3->Col3
Column4->Col1+Col2
Column5->Col3+200
Column6-> {current system date}
Column-> {Default constraint stores '0' always}

Number of rows inserted will be max of 100 rows at a time
current clients accessing this app and passing XML would be around 20
Frequency of calling is 1 min

I use .NET 4.0, C# and MS SQL Server 2008

My Approach is read, xml file, manipulate it, store in dataset/datatable and do the bulk copy.

My Question is :
1. In this approach, How to manipulate and store it in dataset/datatable
1. Is there any better way to do it?

Thank you.

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.