|
A dataset allows you to set a filter. Then I'm not sure if there's a quicker way than just to iterate over the records and store them.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi ..
There is a quicker way ... use the Select Method of the DataTable
ds.Tables[0].Select(filterExpression); ... read this MSDN article regarding the Select method ... it will help you ...
http://msdn.microsoft.com/en-us/library/det4aw50.aspx[^]
Hope this helps ...
Sincerely Samer Abu Rabie
Note: Please remember to rate this post to help others whom reading it.
|
|
|
|
|
Use a dataview to do the filtering and you can copy the filtered dataview to a new table (dvData.CopyTable I think)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi evryone
i have big problem using com1
i have 9 pin cable (rs232)
i need to light LED from rs232
i try to wright:
port.Write(new byte[] { 0x1B, 0x4C, 0x30, 0x1B, 0x1A }, 0, 5);
but the LED not light
how can i know what to send to recive signal that light the LED,
and what pin's i need to connect to the LED
thank's alot for any help
|
|
|
|
|
Try network byte order?
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
what ??
|
|
|
|
|
still no answer
any one ??....
|
|
|
|
|
Hi,
you failed to sufficiently explain the problem:
- how is the LED connected to the PC? is it attached to a microcontroller of some kind?
if so, which one, what is the command set of the interface?
if not, I must assume it is connected straight to one of the RS232C control pins, so which one, and why would you need to send data bytes then? 5 bytes sent at an unknown baud rate take a few milliseconds at most, so if the LED is connected to the RS232C TxD pin, it gets energy for that long, and the human eye will not notice it al all.
- you did include a series resistor I hope, otherwise the LED has been killed already.
- how does this relate to C#?
|
|
|
|
|
Can/would somebody tell me how to display an icon on a form in C# please (Windows CE 5.0)? I have to display the battery level of a remote sensor on a form. I created several icons, with VS, and depending on its battery level I will pick the corresponding icon file. I'm new to C# and Windows CE 5.0 and I'm sure it’s easy to do but I'm not having any luck with the searches.
Thanks,
Bob
|
|
|
|
|
|
Which wire did you cut at last?
Life is 5: 3 me, 1 you.
|
|
|
|
|
hi to all.
i have a html file that contains a "select" control (dropdown) with a few "option"s i need to read the option and the value of each of them,
is it possible to load a html code into a HtmlDocument and then read the control by getElemementByName?
Or does any one have the regex pattern to read the options and values of a dropdown control?
Thanks
|
|
|
|
|
Eli Nurman wrote: is it possible to load a html code into a HtmlDocument and then read the control by getElemementByName?
Yes. However if it is XHTML it would be simpler to use an XML Parser
led mike
|
|
|
|
|
how is that possible to to?
|
|
|
|
|
Eli Nurman wrote: how is that possible to to?
Not sure what they call it on the planet you come from, but round here we call it programming.
led mike
|
|
|
|
|
Try Html Agility Pack:
http://www.codeplex.com/htmlagilitypack[^]
For a one-off it may be overkill, but if you're going to be doing alot of html parsing it can be incredibly useful to use xpath on html.
|
|
|
|
|
after getting the inner html of the control how do i process it? i need a regex pattern
|
|
|
|
|
Eli Nurman wrote: after getting the inner html of the control how do i process it? i need a regex pattern
Have you ever used xpath before? With xpath, you can do something like
htmlDoc.SelectNodes("//yoursubdiv/your_option_box/select");
And you will get a collection of nodes back whose values are the text of the selections. No need for regex, no need for html parsing.
This is the best suggestion I can make. Otherwise you'll need to spend some time studying regex and figuring out the exact pattern required to pick out the right dropdown, etc. It can be an irritating and mind-numbing process.
If your document is guaranteed to be XHTML valid, you can even use Xml navigators straight out of the .NET framework with no need to use the Html Agility Pack (HAP is designed to provide XPATH functionality to html documents, which are not strict xml and so will not validate in the XmlDocument constructor).
|
|
|
|
|
Please don’t confuse here is my exact problem.
1)I have an class say A. which has few properties say
a. Int I;
b. String str;
c. Object[] B ;
2) now I am have an object of class A
3) Now I am using reflection on A
Like
Foreach(PropertyInfo Aproperty in A.GetProperties )
{if (Aproperty.PropertyType.IsArray)
{
Type t = Aproperty.PropertyType.GetElementType();
PropertyInfo[] Bproperty = t.GetProperties(); //For fetching the properties are that are present in object B
foreach(PropertyInfo p1 in Bproperty)
var x = p1.getvalue(?,null) //getbvalue takes the object whose property you are fetching but I am stuck up here not able to fetch this object.
}
so the problem i am facing is i am not able to fetch the object of B(?),so it would me really great if someone can provide an answer to this.
|
|
|
|
|
Hello All
I have a group of applications that working on a LAN and there was another application -reporting tool- that may use the databases of all other applications through web services -each application provide a web service to give access to its database-, and this is working good, the problem is that I had to make a new build for the reporting tool each time a new application added to the group, this is absolutely not happening every day, but I was think in an optimized solution, which I think is to make the reporting tool call the IIS in every machine on the network to get the web services that is available, and then provide the admin by a list of the web services then prompt him to add reference to the web services that he wish to connect with, this means that I should add web references at the runtime.
I don’t know if I can call the IIS to do that, or if I can add web references at runtime, but I thought on the problem as a logic which I don’t know if it can be done or not.
my question is, is this can be done?, and how to do it?
|
|
|
|
|
If the methods you use in the reporting tool, are the same in each of the web services, you can create your own (single) proxy.
The easiest way is to use WSDL tool and possibly strip off everything you don't need from the generated file. Now you can better control the change of the URL and also other properties of the proxy. Also when you add the generated class to you code, you don't need to add web references anymore.
Hope this helps you,
Mika
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
sorry i can't understand this, please give me a link for an example or article
|
|
|
|
|
|
Evening all !
Can anyone tell how i declare a list in my class so all the methods can see/access it or is this not possible ?
I've created a list in button code in a form -
List<Animal> zooAnimals = new List<Animal>();
but can't seem to figure out how to make it global so other methods can access it.
I tried
public List <zooAnimals>;
but that doesn't work
Thanks in advance
|
|
|
|
|
use the word static before the declaration. But then the list will belong to the class and not the object
|
|
|
|