Re: Execute SQL statement on Dataset
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxxx>
- Date: Thu, 12 May 2005 18:45:17 -0700
This is irrelevant Scott. By executing an UPDATE against a table, he implied
that the operation would change all of the rows specified by the WHERE
clause. While you can use the "Select" method/property against a table, to
find a subset of the rows, this will not permit one to execute an action
against all of those rows--not without visiting each one.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Scott M." <s-mar@xxxxxxxxxxxxx> wrote in message
news:u5kOOnzVFHA.3152@xxxxxxxxxxxxxxxxxxxxxxx
> Not true,
>
> A DataSet contains a Tables collection that is made up of DataTable
> objects. A DataTable is what actually contains the data. A DataTable has
> a "Select" method and this method takes an optional filterExpression
> argument. This FilterExpression argument allows you to query a DataTable
> in a SQL fasion.
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemdatadatatableclassselecttopic.asp
>
> -Scott
>
>
>
> "Marina" <someone@xxxxxxxxxx> wrote in message
> news:O9fy0AzVFHA.132@xxxxxxxxxxxxxxxxxxxxxxx
>> The dataset is not an in memory database engine. You can't do anything
>> like that.
>>
>> "pierrev" <pierrev@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:6B435078-7D6C-4F86-ADED-D8B4A6C0CFBA@xxxxxxxxxxxxxxxx
>>> Hi,
>>>
>>> Is there a way to execute SQL statement on a Dataset?
>>>
>>> For example, my Dataset contains 1 table and I want to execute the
>>> following
>>> SQL statement:
>>>
>>> UPDATE table1 SET Field1='x' WHERE Field2='y'
>>>
>>> I know I can use filter and loop on the rows but I have many SQL
>>> statements
>>> I'ld like to reuse them.
>>>
>>> Thanks,
>>>
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Execute SQL statement on Dataset
- From: Scott M.
- Re: Execute SQL statement on Dataset
- References:
- Execute SQL statement on Dataset
- From: pierrev
- Re: Execute SQL statement on Dataset
- From: Marina
- Re: Execute SQL statement on Dataset
- From: Scott M.
- Execute SQL statement on Dataset
- Prev by Date: Re: Parameters Question
- Next by Date: Re: Parameters Question
- Previous by thread: Re: Execute SQL statement on Dataset
- Next by thread: Re: Execute SQL statement on Dataset
- Index(es):
Relevant Pages
|
Loading