PC Review


Reply
Thread Tools Rate Thread

Dataview rowfilter

 
 
Patrice Lamarche
Guest
Posts: n/a
 
      23rd Nov 2005
Hello Everyone!

I'm currently having trouble with a rowfilter where the name of the
column containt bracket.

Here the name of the column [Measures].[PointX]

when i sort the dataview it's ok no trouble
DataView dv = new DataView(dt);

dv.Sort = "[[Measures].[PointX]] ASC"; //it's ok working

But if I add the line it crash

dv.RowFilter = "[[Measures].[PointX]] = 0"; with the exception ..

An unhandled exception of type 'System.Data.SyntaxErrorException' occurred
in system.data.dll

Additional information: Cannot interpret token ']' at position 21.

Anyone know a workaround?

Thanks you

Best Regards,

Patrice Lamarche


 
Reply With Quote
 
 
 
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      23rd Nov 2005
Why do you use double brackets?
Alsom you don't table name as dataview is view on one table...

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

"Patrice Lamarche" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hello Everyone!
>
> I'm currently having trouble with a rowfilter where the name of the
> column containt bracket.
>
> Here the name of the column [Measures].[PointX]
>
> when i sort the dataview it's ok no trouble
> DataView dv = new DataView(dt);
>
> dv.Sort = "[[Measures].[PointX]] ASC"; //it's ok working
>
> But if I add the line it crash
>
> dv.RowFilter = "[[Measures].[PointX]] = 0"; with the exception ..
>
> An unhandled exception of type 'System.Data.SyntaxErrorException' occurred
> in system.data.dll
>
> Additional information: Cannot interpret token ']' at position 21.
>
> Anyone know a workaround?
>
> Thanks you
>
> Best Regards,
>
> Patrice Lamarche
>



 
Reply With Quote
 
Patrice Lamarche
Guest
Posts: n/a
 
      23rd Nov 2005
Hello,
I used the bracket because the server return name with bracket. And i dont
understand your second phrase.



"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:(E-Mail Removed)...
> Why do you use double brackets?
> Alsom you don't table name as dataview is view on one table...
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>
> "Patrice Lamarche" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> Hello Everyone!
>>
>> I'm currently having trouble with a rowfilter where the name of the
>> column containt bracket.
>>
>> Here the name of the column [Measures].[PointX]
>>
>> when i sort the dataview it's ok no trouble
>> DataView dv = new DataView(dt);
>>
>> dv.Sort = "[[Measures].[PointX]] ASC"; //it's ok working
>>
>> But if I add the line it crash
>>
>> dv.RowFilter = "[[Measures].[PointX]] = 0"; with the exception ..
>>
>> An unhandled exception of type 'System.Data.SyntaxErrorException'
>> occurred in system.data.dll
>>
>> Additional information: Cannot interpret token ']' at position 21.
>>
>> Anyone know a workaround?
>>
>> Thanks you
>>
>> Best Regards,
>>
>> Patrice Lamarche
>>

>
>



 
Reply With Quote
 
Miha Markic [MVP C#]
Guest
Posts: n/a
 
      23rd Nov 2005

"Patrice Lamarche" <(E-Mail Removed)> wrote in message
news:efn%(E-Mail Removed)...
> Hello,
> I used the bracket because the server return name with bracket. And i dont
> understand your second phrase.


If Measures.PointX means Table.Column then Table prefix is not necessary as
DataView is set over Table.
What is the actual column name in dataset?

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/


 
Reply With Quote
 
Patrice Lamarche
Guest
Posts: n/a
 
      23rd Nov 2005
Hello,

well the table is call table1 ... dans the name of the column is
"[measures].[PointX]"

if a flattened cellset from analysis service

but i worked it around by renaming the column before doing operation.

thanks

Patrice Lamarche
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:(E-Mail Removed)...
>
> "Patrice Lamarche" <(E-Mail Removed)> wrote in message
> news:efn%(E-Mail Removed)...
>> Hello,
>> I used the bracket because the server return name with bracket. And i
>> dont understand your second phrase.

>
> If Measures.PointX means Table.Column then Table prefix is not necessary
> as DataView is set over Table.
> What is the actual column name in dataset?
>
> --
> Miha Markic [MVP C#]
> RightHand .NET consulting & development www.rthand.com
> Blog: http://cs.rthand.com/blogs/blog_with_righthand/
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataView.RowFilter bug? =?Utf-8?B?V2ViSnVtcGVy?= Microsoft Dot NET Compact Framework 3 23rd Sep 2005 05:22 PM
DataView - RowFilter Daniel Groh Microsoft C# .NET 2 22nd Apr 2005 12:01 AM
DataView.RowFilter Magne Ryholt Microsoft ADO .NET 2 4th Aug 2004 09:27 AM
Dataview Rowfilter Martin Microsoft ADO .NET 1 24th Feb 2004 02:01 PM
RE: DataView RowFilter =?Utf-8?B?dHJpbml0eXBldGU=?= Microsoft ADO .NET 1 4th Feb 2004 10:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:24 PM.