|
The MSDN page on BindingSource.Filter refers to DataColumn.Expression which shows some operators inluding AND, OR, NOT.
And in SQL there isn't a != operator, however there is a basic-like <> operator.
At least one of those approaches should do it for you.
|
|
|
|
|
hi luc,
thanks for replay
i do read the full page in MSDN before posting here
what i want to do is the following
i have a list of type int named execludedFields which holds the codes for unwanted records
i want to loop through the collection to build a filter like this
"FieldCode != 1 OR FieldCode != 5 .... and so on"
i couldn't figure out how to do it because there is no negative operator
of course i can do it the other way around by getting a list called watntedFields but that requires a lot coding more than
using the execludedFields approach
so I'm asking if there is a way to build a filter that do that using the Filter property
|
|
|
|
|
1. I already told you what I know about the subject.
2.
why bother?
Hussam Fattahi wrote: FieldCode != 1 OR FieldCode != 5
is always true!
PS: and then there are parentheses, handy when the default operator precedence is not what you want, e.g. with a NOT operator.
|
|
|
|
|
sorry, my Bad
i meant AND
by using NOT do you mean i can write it like this
NOT( FieldCode = 1 AND FieldCode = 5 ....)
or like this NOT( FieldCode IN(1,5,...))
thanks again
|
|
|
|
|
I don't know. Try it, or search for documentation or examples.
|
|
|
|
|
hi
i try to inport csv file to my database in my C# winform program.
for example the csv file:
code ,name ,price
101010,computer,200$
and i done this:
char[] BI = { ',' };
string[] WI = TEMP.Split(BI);
A = WI[0].Trim().ToString();
B = WI[1].Trim().ToString();
C = WI[2].Trim().ToString();
but what i can do if the name contain (,) ?
for example
code ,name ,price
101010,computer 12,200.00,200$
if i get this type of csv:
code ,name ,price
"101010","computer 12,200.00","200$"
how to deal with this ?
|
|
|
|
|
Perhaps this link[^] will help you.
|
|
|
|
|
Thank you.
|
|
|
|
|
10!
|
|
|
|
|
Well done!
You should be seeing a small spike in your reputation score today...
Will Rogers never met me.
|
|
|
|
|
Recently I have seen this thread[^] which will help you.
thatraja |Chennai|India|
Brainbench certifications Univotes are like kid's kisses don't reject it Do what you want quickly because the Doomsday on 2012 My childhood story
|
|
|
|
|
goldsoft wrote: code ,name ,price
"101010","computer 12,200.00","200$"
For this there's a solution, You can use regex to use. follow the step
1. Replace the ',' Char inside "abc,xyz" with some Character not conflicted with CSV delimeter, Say @, using Regex.
2. Now you will get exact split in three words, Once splitted further Replace the '@' with ',' in Splitted string.
goldsoft wrote: code ,name ,price
101010,computer 12,200.00,200$
if i get this type of csv:
For this I don't think of any Intelligent detection.
|
|
|
|
|
Why not treat the csv as a db. You could use Jet OleDb, or odbc.
Details here.
I used to think....
Finally I realized it's no good.
|
|
|
|
|
Yeah, what they said, especially Rive .
goldsoft wrote: WI[0].Trim().ToString();
You don't need the ToString.
|
|
|
|
|
Could be a deja vu, but I think I have seen this question in random forums (or a very similar one) every two weeks in the last months. Please, write csv in the search text box at the top of this forum. Maybe you'll get what you need.
|
|
|
|
|
|
This is not a right place to post your article Ad.
|
|
|
|
|
sorry
message removed now
thanks for your replies
|
|
|
|
|
Oh man, It's a programming forum for Questions/Answers, better you can keep this in your CP signature. Cheers.
thatraja |Chennai|India|
Brainbench certifications Univotes are like kid's kisses don't reject it Do what you want quickly because the Doomsday on 2012 My childhood story
|
|
|
|
|
sorry guys
message removed now
thanks for your replies
|
|
|
|
|
Well done, but was the original post a link to your article? If so, then it isn't really an advert - it's a bit tacky pushing for votes, but it's not something we'd expect you to have to pay for.
|
|
|
|
|
HOw can do to insert a bulk data to Oracle database ( Store procedure ) using c#
Thanks
|
|
|
|
|
This[^] article may help.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
|
Thanks for Reply...
Is it possible to achieve without using ODP.Net
Defaultly i not get the properity "ArrayBindCount" in OracleParameter.
Thanks
|
|
|
|