Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 4th, 2004, 03:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default SqlCommand & DataSet

Hi friends:
How can I fill DataSet with SlqCommand Obj. ?!
Any help appreciated & Tnx in advance.

Always:),
Hovik Melkomian.
__________________
Always,
Hovik Melkomian.
 
Old April 5th, 2004, 06:05 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

<s>Usually, you do this like so:

objSqlCommandObject.Fill(objDataSet, "tablename")</s>

(My mistake, responded too quick.)
 
Old April 5th, 2004, 09:10 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

no dear it for DataAdapter Obj. not for Command Obj.

Always:),
Hovik Melkomian.
 
Old April 5th, 2004, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I was looking around in the MSDN, and the only thing I can think of is:
Code:
objXMLReader = objCommand.ExecuteXMLReader()
objDataSet.ReadXML(objXMLReader.ToString())
Didn't test it out. Hope this helps,

Brian
 
Old April 5th, 2004, 11:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Oh, that response was also assuming you didn't want to use the SQLDataAdapter? If you do, then you could do:
Code:
objAdapter.SelectCommand = objCommand
objAdapter.SelectCommand.CommandType = <type>
objAdapter.Fill(objDataSet)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dataset & Stored Procedure Problem clioz BOOK: Professional Crystal Reports for VS.NET 0 July 21st, 2006 07:42 PM
idea of report & DataSet melvik Crystal Reports 1 May 18th, 2004 02:10 AM
DataSet & data melvik ADO.NET 6 April 28th, 2004 07:58 AM
update table (SQL & DataSet) melvik ADO.NET 1 July 24th, 2003 04:40 PM
Command & DataSet melvik ADO.NET 2 July 3rd, 2003 01:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.