dataview.rowfilter property

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??


ex:
dv.rowfilter = " Country = ' France ' "


I want
dv.rowfilter = " Title = (from 'A' to 'J') "


This doesn't work :
dv.rowfilter = " Title like '[a-j]%' "


Neither does :
dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on


But this does work just for the Titles starting with 'a'
dv.rowfilter = " Title like 'a%' "


any idea ?
JMT
 
Thanks for trying DaveVB, but yes I tried it and got this error:
************************
Input string was not in a correct format.
Exception Details: System.FormatException: Input string was not in a correct
format.
Line 75: dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"
*********************************************
I even tried
dv1.RowFilter = "Pub_title like '[ABCDEFGHIJ]%'"
with no luck either. I'm really out of ideas but I'll keep on looking!!
THanks for trying to help!!!
Keep the ideas coming!! I appreciate!
JMT

DaveVB said:
JMT,
Did you try
dv.rowfilter = "Title like 'a%' OR Title like 'b%' OR..so on"

Dave

JMT said:
In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??


ex:
dv.rowfilter = " Country = ' France ' "


I want
dv.rowfilter = " Title = (from 'A' to 'J') "


This doesn't work :
dv.rowfilter = " Title like '[a-j]%' "


Neither does :
dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on


But this does work just for the Titles starting with 'a'
dv.rowfilter = " Title like 'a%' "


any idea ?
JMT
 
JMT,
Sorry I was out yesterday and didn't get back to you.
It seems that your quotation marks may be causing the problem.
The RowFilter property is a single string and should be enclosed in a single
pair of double quotes ""................"". Any needed quotes within the
filter should be single quote pairs.

Your row filter:
dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"

should be written as:

dv1.RowFilter = "Pub_title like 'a%' OR Pub_title like 'b%'"

Notice that there are not double quotes before and after the OR.

Hope this works,
Dave


JMT said:
Thanks for trying DaveVB, but yes I tried it and got this error:
************************
Input string was not in a correct format.
Exception Details: System.FormatException: Input string was not in a correct
format.
Line 75: dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"
*********************************************
I even tried
dv1.RowFilter = "Pub_title like '[ABCDEFGHIJ]%'"
with no luck either. I'm really out of ideas but I'll keep on looking!!
THanks for trying to help!!!
Keep the ideas coming!! I appreciate!
JMT

DaveVB said:
JMT,
Did you try
dv.rowfilter = "Title like 'a%' OR Title like 'b%' OR..so on"

Dave

JMT said:
In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??


ex:
dv.rowfilter = " Country = ' France ' "


I want
dv.rowfilter = " Title = (from 'A' to 'J') "


This doesn't work :
dv.rowfilter = " Title like '[a-j]%' "


Neither does :
dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on


But this does work just for the Titles starting with 'a'
dv.rowfilter = " Title like 'a%' "


any idea ?
JMT
 
Well DaveVB you just made my day!!!
That works just fine. Except that I'll be a long line of cut and paste but
it works just the way I want it!!
Thanks alot and keep up the great work!!!

JMT

DaveVB said:
JMT,
Sorry I was out yesterday and didn't get back to you.
It seems that your quotation marks may be causing the problem.
The RowFilter property is a single string and should be enclosed in a single
pair of double quotes ""................"". Any needed quotes within the
filter should be single quote pairs.

Your row filter:
dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"

should be written as:

dv1.RowFilter = "Pub_title like 'a%' OR Pub_title like 'b%'"

Notice that there are not double quotes before and after the OR.

Hope this works,
Dave


JMT said:
Thanks for trying DaveVB, but yes I tried it and got this error:
************************
Input string was not in a correct format.
Exception Details: System.FormatException: Input string was not in a correct
format.
Line 75: dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"
*********************************************
I even tried
dv1.RowFilter = "Pub_title like '[ABCDEFGHIJ]%'"
with no luck either. I'm really out of ideas but I'll keep on looking!!
THanks for trying to help!!!
Keep the ideas coming!! I appreciate!
JMT

DaveVB said:
JMT,
Did you try
dv.rowfilter = "Title like 'a%' OR Title like 'b%' OR..so on"

Dave

:

In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??


ex:
dv.rowfilter = " Country = ' France ' "


I want
dv.rowfilter = " Title = (from 'A' to 'J') "


This doesn't work :
dv.rowfilter = " Title like '[a-j]%' "


Neither does :
dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on


But this does work just for the Titles starting with 'a'
dv.rowfilter = " Title like 'a%' "


any idea ?
JMT
 
How about
dv1.RowFilter = "Pub_title < 'k'"
?

vbnetrookie said:
Well DaveVB you just made my day!!!
That works just fine. Except that I'll be a long line of cut and paste but
it works just the way I want it!!
Thanks alot and keep up the great work!!!

JMT

DaveVB said:
JMT,
Sorry I was out yesterday and didn't get back to you.
It seems that your quotation marks may be causing the problem.
The RowFilter property is a single string and should be enclosed in a single
pair of double quotes ""................"". Any needed quotes within the
filter should be single quote pairs.

Your row filter:
dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"

should be written as:

dv1.RowFilter = "Pub_title like 'a%' OR Pub_title like 'b%'"

Notice that there are not double quotes before and after the OR.

Hope this works,
Dave


JMT said:
Thanks for trying DaveVB, but yes I tried it and got this error:
************************
Input string was not in a correct format.
Exception Details: System.FormatException: Input string was not in a correct
format.
Line 75: dv1.RowFilter = "Pub_title like 'a%'" Or "Pub_title
like 'b%'"
*********************************************
I even tried
dv1.RowFilter = "Pub_title like '[ABCDEFGHIJ]%'"
with no luck either. I'm really out of ideas but I'll keep on looking!!
THanks for trying to help!!!
Keep the ideas coming!! I appreciate!
JMT

:

JMT,
Did you try
dv.rowfilter = "Title like 'a%' OR Title like 'b%' OR..so on"

Dave

:

In the dataview rowfilter property, how can I say that I just want
Titles that start with 'A' to 'J' ??


ex:
dv.rowfilter = " Country = ' France ' "


I want
dv.rowfilter = " Title = (from 'A' to 'J') "


This doesn't work :
dv.rowfilter = " Title like '[a-j]%' "


Neither does :
dv.rowfilter = " Title like 'a%'" AND "Title like 'b%'" AND..so on


But this does work just for the Titles starting with 'a'
dv.rowfilter = " Title like 'a%' "


any idea ?
JMT
 
Back
Top