saving xml file into the database table using C#

Posted by Kmathusudan under C# on 5/14/2010 | Views : 6172 | Status : [Member] | Replies : 5
how to save a xml file with many columns into the database table with out column matching.
i have tried sql bulcopy to copy the files using table name and column matching. Is there any other means to do the same thing.
Thanks and Regards
K.Mathusudan

K.Mathusudan


Responses

Posted by: Vuyiswamb on: 5/14/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Normaly when you write an insert to a table, the fields needs to match ,even the Data-types, unless you want to do something that will mimic a select into, that means a table with that name should not exist., but you insert data in a table that does not match with Column data-types


Thank you for posting at Dotnetfunda
[Administrator]

Kmathusudan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Er.deepakdalal on: 5/15/2010 [Member] Starter

Up
0
Down
Hi Kmathusudan

Try The below link you get your solution, if not then let me know i'll made a sample project for you.



http://support.microsoft.com/kb/311566

http://www.java2s.com/Code/CSharp/XML/SavedatainDataGridintoXMLfile.htm

Kmathusudan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vjunnu on: 6/22/2011 [Member] Starter | Points: 25

Up
0
Down
I need the following situation to be implemented:
I want to read the XML file(not the entire content but only 4 XML tags) and store in a database.
The link provided by Er.deepakdalal ask to create a new windows application.
My intention is that the program should run daily via windows scheduler, since there will always be a new file scanned every-time
However my question is :
is it possible that a program can be written in C# and its exe be executed daily via scheduler?
Could anyone please help me with a sample code to do this?


Kmathusudan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Susanthampy on: 6/23/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
http://www.java2s.com/Code/CSharp/XML/SavedatainDataGridintoXMLfile.htm

Regards,
Susan

Kmathusudan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vjunnu on: 6/23/2011 [Member] Starter | Points: 25

Up
0
Down
Thanks Susanthampy!







Kmathusudan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response