Click here to Skip to main content
11,708,116 members (66,959 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL Oracle C#4.0 , +
Hi Guys,

My page contains 34 fields (textboxes) who's contents are later saved into oracle database table on save button click.

Instead of sending 34 different parameters to my insert store proc, i created a XDocument and passes it store proc with a parameter of XMLType.

While executing my code I am getting expection like :

1. Unable to convert Xdoc to string
2. Incorrect number of parameters (I got after i passed xdoc.tostring() to proc)

I am using Enterprise LIbrary 5 to DB Utils.

any idea what can be done with this ?

also any tip / comment on why/whynot to use xml in insert
Posted 29-Apr-13 9:44am
Comments
jkirkerx at 29-Apr-13 16:04pm
   
I would of made a structure and populated first, then passed it on as the structure.

I store XML in table columns, but I use the XML else where in the program.

I do pass XML to a ship rate program, but I pass it as a memory stream and not a string.

[edit]
I not familiar with Enterprise Library, so I probably should not of commented here.
sinhasourabh at 30-Apr-13 0:30am
   
Thanks jkirkerx,

I have one question now, if i prepare a structure what will be the corresponding data type in oracle SP ?

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

  Print Answers RSS
0 Maciej Los 230
1 Mika Wendelius 180
2 OriginalGriff 168
3 Sergey Alexandrovich Kryukov 145
4 Peter Leow 140
0 OriginalGriff 9,198
1 Sergey Alexandrovich Kryukov 8,562
2 CPallini 5,189
3 Maciej Los 4,921
4 Mika Wendelius 3,856


Advertise | Privacy | Mobile
Web01 | 2.8.150819.1 | Last Updated 29 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100