Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
QuestionRefresh in a property grid Pin
gantww5-May-06 7:44
gantww5-May-06 7:44 
AnswerRe: Refresh in a property grid Pin
leppie5-May-06 12:38
leppie5-May-06 12:38 
GeneralRe: Refresh in a property grid Pin
gantww6-May-06 15:13
gantww6-May-06 15:13 
QuestionDoes really nobody has answer for my ask? i think it is really simple Pin
m.rastgar5-May-06 7:12
m.rastgar5-May-06 7:12 
AnswerRe: Does really nobody has answer for my ask? i think it is really simple Pin
gantww5-May-06 7:46
gantww5-May-06 7:46 
GeneralRe: Does really nobody has answer for my ask? i think it is really simple Pin
m.rastgar5-May-06 21:45
m.rastgar5-May-06 21:45 
AnswerRe: Does really nobody has answer for my ask? i think it is really simple Pin
George L. Jackson5-May-06 8:56
George L. Jackson5-May-06 8:56 
QuestionDetermine datatype, column length info using SqlDataAdapter, XmlDataDocument classes in C# Pin
PrashantJ5-May-06 6:24
PrashantJ5-May-06 6:24 
Hello,

This is my code which will convert the ADO resultset to XML in C#.
I actually need the column type, column max length etc also in the xml, like the column type/length of id, loginuserid, deptid, wrkstnid etc.
So I am not sure whether I need to pass some parameters to SqlDataAdapter class while executing the SQL command or the XmlDataDocument class has some methods which would print out the datatype and column length information in the XML. Looked at both the classes, didnt find any method, anybody has any ideas about this? Thanks

DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(ds);

if (ds.Tables.Count>0)
{
_sBody = new StringBuilder("", _bodySize);
//Get xml representation of the dataset
XmlDataDocument srcXML = new XmlDataDocument(ds);
srcXML.Save("c:\\XMLDocument.xml");
....
}

<NewDataSet>
<Table>
<id>1</id>
<LoginUserId>tpmadmin</LoginUserId>
<DeptId>1</DeptId>
<WrkstnId>1</WrkstnId>
</Table>
<Table>
<id>2</id>
<LoginUserId>sysadmin</LoginUserId>
<DeptId>2</DeptId>
<WrkstnId>2</WrkstnId>
</Table>
</NewDataSet>


-- modified at 12:25 Friday 5th May, 2006
AnswerRe: Determine datatype, column length info using SqlDataAdapter, XmlDataDocument classes in C# Pin
Paul Brower5-May-06 9:29
Paul Brower5-May-06 9:29 
GeneralRe: Determine datatype, column length info using SqlDataAdapter, XmlDataDocument classes in C# Pin
PrashantJ5-May-06 10:16
PrashantJ5-May-06 10:16 
Questionprogramaticaly scrolling a listbox Pin
Dan Neely5-May-06 4:54
Dan Neely5-May-06 4:54 
AnswerRe: programaticaly scrolling a listbox Pin
Josh Smith5-May-06 5:03
Josh Smith5-May-06 5:03 
GeneralRe: programaticaly scrolling a listbox Pin
Dan Neely5-May-06 5:37
Dan Neely5-May-06 5:37 
GeneralRe: programaticaly scrolling a listbox Pin
Josh Smith5-May-06 5:42
Josh Smith5-May-06 5:42 
QuestionWM5.0 Screen Capture - gif format Pin
Handheld Programmer5-May-06 4:48
Handheld Programmer5-May-06 4:48 
AnswerRe: WM5.0 Screen Capture - gif format Pin
Guffa5-May-06 6:42
Guffa5-May-06 6:42 
GeneralRe: WM5.0 Screen Capture - gif format Pin
Handheld Programmer5-May-06 10:01
Handheld Programmer5-May-06 10:01 
AnswerRe: WM5.0 Screen Capture - gif format Pin
Guffa5-May-06 23:26
Guffa5-May-06 23:26 
GeneralRe: WM5.0 Screen Capture - gif format Pin
Handheld Programmer6-May-06 6:29
Handheld Programmer6-May-06 6:29 
AnswerRe: WM5.0 Screen Capture - gif format Pin
Guffa6-May-06 11:25
Guffa6-May-06 11:25 
GeneralRe: WM5.0 Screen Capture - gif format Pin
Handheld Programmer6-May-06 14:41
Handheld Programmer6-May-06 14:41 
AnswerRe: WM5.0 Screen Capture - gif format Pin
Guffa8-May-06 4:36
Guffa8-May-06 4:36 
GeneralRe: WM5.0 Screen Capture - gif format Pin
Handheld Programmer9-May-06 16:56
Handheld Programmer9-May-06 16:56 
AnswerRe: WM5.0 Screen Capture - gif format Pin
Phil C5-May-06 15:00
Phil C5-May-06 15:00 
GeneralRe: WM5.0 Screen Capture - gif format Pin
Handheld Programmer5-May-06 16:03
Handheld Programmer5-May-06 16:03 

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.