|
I am getting aeInbox:Null
|
|
|
|
|
Hi,
I'm want to access all the running services in a remote machine in different username and password.
I know, I know the connection options and Management query to access the services but i dont what is the MANAGEMENT SCOPE to be used for this query, need help on this.
Thanks,
D.Vinoth
|
|
|
|
|
Hi,
I need an article on developing custom user control in c# (not trivial one) from the very beginning to the final product. It must include "full" UML (not only class diagrams) support which is main reason for this post (since there are plenty of excellent control examples on CodeProject).
Thank you in advance!
|
|
|
|
|
matixsc wrote: I need an article on developing custom user control in c# (not trivial one) from the very beginning to the final product. It must include "full" UML (not only class diagrams) support
Chances are very less to find one like that. Why don't you start developing and search for specific help?
Best wishes,
Navaneeth
|
|
|
|
|
matixsc wrote: I need an article on developing custom user control in c# (not trivial one) from the very beginning to the final product.
Microsofts' Component Authoring Walkthrough[^]?
I are Troll
|
|
|
|
|
Very usefull resource but, certainly, not the tutorial. Thank you anyway.
|
|
|
|
|
Hello all,
I have a windows application which updates multiple rows (using a stored procedure in the db) in a SQL Server database, but this updates run many times sequentially in a for loop.
For the update methos I have tried the following methods:
- The SqlCommand object running my stored procedure as a text commnand and executing it with the ExecuteNonQuery method.
- An SqlDataAdapter using its UpdateCommand attribute and executing using the ExecuteNonQuery method.
In both ways the running time is really slow.
Can anyone suggest me an other way to do the updates. It would be good if I could save my updates n a dataset or a datatable and after save it to the db.
Thanks in Advance
Dimitris
|
|
|
|
|
Are you just updating rows, or are you inserting new ones and deleting them too?
One approach you might consider is rather than repeatedly calling an update proc, instead insert each modification into a temporary table and then call a proc which would do the update in one single atomic shot.
The advantage of this would be that you could bulk load that temporary table really quickly.
If that's too much, have you 'prepared' the proc so that you just change the value of the SqlParameters rather than create new ones each time?
Regards,
Rob Philpott.
|
|
|
|
|
Thank you Rob,
Actually my stored procedure has a double functionality.
Updates rows in my table (depending on a key) and in case of non existing rows it inserts them.
I haven't tried to bulk insert in a temp table and after update mine because I have to do this many times and I'm afraid that it would be realy time consuming to do this every time, because every time I should delete the temp table.
That's why I would like to fill somehow a datatable in the memory and after my insert/update queries (maybe without using stored procedure) to update this in the db.
Thanks again,
Dimitris
|
|
|
|
|
I wouldn't be too concerned about the overhead of creating a table each time, this would be far more effecient than multiple calls to an update proc. AFAIK, there isn't really a way to bulk update a database, but you can bulk insert into it very quickly.
So, if you did want to try this approach, create a new prepare proc which creates the table, use the SqlBulkCopy class to rapidly write to this, and then call a commit proc which updates and inserts based on this table and deletes it afterwards.
Regards,
Rob Philpott.
|
|
|
|
|
Yes maybe you are right.
I have tried I think everything else.
So I'll try this solution.
Thank you very much for your help Rob
|
|
|
|
|
I use a parameterized statement with ExecuteNonQuery, usually with a transaction.
|
|
|
|
|
Hi,
I have listbox and im retriving text in listbox by selection.
When i selected item, the SeletionChanged function get invoked twice.
private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
string str = (String)listBox1.SelectedItem;
listBox1.SelectedIndex =-1;
}
When i set breakpoint in bolded line first time it shows "",then when i press F5 it again comes to that place and shows the correct Text.
I want to get the text in first execution itself.
Anu
|
|
|
|
|
Several Controls fire their XxxChanged event more than once; AFAIK the exact behavior isn't documented, so you can't rely on it, nor rightfully expect a particular behavior. You can think of it as: in a first step the current selection gets unselected, then the new selection becomes in effect.
You will have to cope with such behavior; having the first event with an empty selection should make that not too hard.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
hi,
listBox1.SelectedIndex =-1 will raise the SelectionChanged event too, because the current selection changed to -1.
check on the selectionchangedeventargs if the new index is -1 to return before doing the stuff you want to.
greetz
|
|
|
|
|
Yes you are correct.
When i comment that listBox1.SelectedIndex =-1 line,when i work its works fine.
But i want to deselect the selected item after i seleted that.
How can i do that?
Because after selecting,the selected item is in blue color.I dont want tht.
Anu
|
|
|
|
|
Hi everyone,
Does anyone knows how to get shared folder sharing permission for certain user name or group? For example, for username "Everyone", how do get the info whether the sharing permission is Full Control, Change or Read?
Thanks in advance
|
|
|
|
|
There are classse called DirectorySecurity and DirectoryInfo . Although I haven't done this but I think one of them should provide this information.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi ALL,
I have a list of point coordinates (x,y) to draw a line. The line is curve. I need to draw 2 parallel line, at left and at right of this line. My scope is to draw a rounded line of intere line.
Help me please, with example.
Thanks.
Alex
|
|
|
|
|
Could you please make it clear what do you want to do?
AlexB47 wrote: My scope is to draw a rounded line
Rounded line? Did you mean a Curve??
|
|
|
|
|
|
AlexB47 wrote: The line is curve
Is it a curve or a straight line?
AlexB47 wrote: My scope is to draw a rounded line of intere line
You mean circle?
Graphics class has methods like DrawLine , DrawCurve and DrawEllipse . Read about them and you should be able to do this.
Make sure you do your drawing in the Paint event and use PaintEventArgs.Graphics object to draw.
Drawing the parallel lines should be simple: get the X coordinate of the "end" from where you need to draw the parallel line. Then with same X coordinate, just change the Y and draw the line. Choice of Y coordinate would depend on the length of the parallel line segment you need to draw.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
curved line.
I have to build 2 parallel lines of a GPS track (so curved path). Building a sort of lane of the road.
Alex
|
|
|
|
|
That's tricky. You can only draw lines on the left and the right when the road runs north to south. With east to west, you'd need to draw them top and bottom.
I think you're going to be need some trigonometry to do this. You could probably cheat by drawing a thick line and overlaying a thin line and let windows do the rounding of intersections.
Are you in GDI or WPF?
Regards,
Rob Philpott.
|
|
|
|
|
in GDI (I use DrawLine etc...).
Alex
|
|
|
|