|
|
Winforms .net 2 application is running a bit slow.
How to find which methods take most of the time?
I'm using Visual C# 2005 Express Edition.
I havent found any way to create list of executed method calls ordered by execution time.
There a a lot of PostgreSQL database calls to show report.
I think some database calls take too lot time in summary.
Andrus
|
|
|
|
|
I would say that it's most likely that the performance problems are in the sql queries, at least without seeing any of the code.
The SqlConnection object can collect statistics about all queries made with it. Check if the connection object that you are using has something similar.
---
single minded; short sighted; long gone;
|
|
|
|
|
I checked NpgsqlConnection object documentation.
I does not contain any method for statistics collection.
Andrus
|
|
|
|
|
I use this tool to find bottlenecks in my application, it's a really powerful profiler.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I would like to know how to search for a certain record by a value in a non keyed column, then being able to update that record to the values in another table. Here is what I have used in the past to locate a record by a primary key, is there a way to do the same with out a keyed column as a search value.Do I need to set the primary key temporarily to the new column I need to search?
DataSet1.HorseJoinTableDataTable dth = new DataSet1.HorseJoinTableDataTable();
DataSet1TableAdapters.HorseJoinTableTableAdapter tah = new FBWinMobileSync.DataSet1TableAdapters.HorseJoinTableTableAdapter();
dataSet1.EnforceConstraints = false;
tah.FillByMod(dth);
fB7MobileDBDataSet.EnforceConstraints = false;
foreach (DataSet1.HorseJoinTableRow dr in dth.Rows)
try
{ How can I accomplish this below on a non keyed column search
FB7MobileDBDataSet.HorseRow newMobileHorse = this.fB7MobileDBDataSet.Horse.FindByCODEHorseName(dr.CODE, dr.HORSENAME);
newMobileHorse.CODE = dr.CODE;
newMobileHorse.Stable = dr.STABLE;
newMobileHorse.HorseName = dr.HORSENAME;
newMobileHorse.Active = dr.ACTIVE;
newMobileHorse.AngleLF = dr.ANGLELF;
newMobileHorse.AngleLH = dr.ANGLELH;
newMobileHorse.AngleRF = dr.ANGLERF;
newMobileHorse.AngleRH = dr.ANGLERH;
dataSet1.EnforceConstraints = false;
//if(dr.DUEDATE.ToString().Trim()=="")
if (dr.IsNull("DUEDATE"))
dr.DUEDATE = DateTime.Today;
newMobileHorse.DueDate = dr.DUEDATE;
if (dr.IsNull("LASTCOST"))
dr.LASTCOST = "0";
double D = Convert.ToDouble(dr.LASTCOST);
newMobileHorse.LastCost = D; //Convert.ToDouble(dr.LASTCOST);
newMobileHorse.Totals = 3;
//Equals no change to record
if (dr.IsNull("LASTDATE"))
dr.LASTDATE = DateTime.Today;
newMobileHorse.LastDate = dr.LASTDATE;
newMobileHorse.LengthLF = dr.LENGTHLF;
newMobileHorse.LengthLH = dr.LENGTHLH;
newMobileHorse.LengthRF = dr.LENGTHRF;
newMobileHorse.LengthRH = dr.LENGTHRH;
newMobileHorse.MainWork = dr.MAINWORK;
newMobileHorse.NickName = dr.NICKNAME;
newMobileHorse.SizeLF = dr.SIZELF;
newMobileHorse.SizeLH = dr.SIZELH;
newMobileHorse.SizeRF = dr.SIZERF;
newMobileHorse.SizeRH = dr.SIZERH;
newMobileHorse.Weeks = Convert.ToInt16(dr.WEEKS);
newMobileHorse.Delete = dr.DELETE;
newMobileHorse.LengthList = dr.LENGTHLIST;
newMobileHorse.NeedsNewFr = dr.NEEDS_NEW_FR;
newMobileHorse.NeedsNewHd = dr.NEEDS_NEW_HD;
newMobileHorse.StartAngleLF = dr.START_ANGLE_LF;
newMobileHorse.StartAngleLH = dr.START_ANGLE_LH;
newMobileHorse.StartAngleRF = dr.START_ANGLE_RF;
newMobileHorse.StartAngleRH = dr.START_ANGLE_RH;
newMobileHorse.StartLengthLF = dr.START_LENGHT_LF;
newMobileHorse.StartLengthLH = dr.START_LENGTH_LH;
newMobileHorse.StartLengthRF = dr.START_LENGHT_RF;
newMobileHorse.StartLengthRH = dr.START_LENGTH_RH;
newMobileHorse.Front = dr.FRONT;
newMobileHorse.Hind = dr.HIND;
--------------------------------------------------------------------------------
Jon Stroh
Thanks Jon Stroh
|
|
|
|
|
DataSet ds = new DataSet();
DataTable table = new DataTable();
ds.Tables.Add(table);
DataRow rows[] = table.Find("MyField = 'Hello World');
That should do the trick.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
Thank You very much, I sure wish I could learn how to search vs2005's help file. Even after you gave me this code I can't find any help on .Find for tables. Thanks for your reply though with out it I would be dead in the water
Jon Stroh
|
|
|
|
|
I am using a Repeater to make a menu off a SiteMap. I also made a custom user control that is a cool looking button. The button's events work fine and the properties work fine as long as I am not in a repeater control. If I use the repeater control I get a NullReferenceException because as far as I can see all my properties are null on postback.
How can I get all my properties to save?
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Found the solution. I had to go add ViewState objects to my custom control to get it to have ViewState properties, I assumed it would do it itself, I don't know why I made that assumption.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Iam currently in the middle of writing a screen grabbing app in c#. One of the requirements for the application is that the form or window of my application doesnt appear in the grabed images. Under XP this was easy as I just set the form to not appear in the task manager in the form properties in visual studio and when it was minimised you couldnt see it at all.
The same nearly applies to vista, I cant see the window when minimised and it doesnt appear on the taskbar. However when it is minimised I seem to get a floating tab of the window in the main desktop.
I dont know if this can be disabled with a vista control panel setting or there is some other way of doing it with code but I cant seem to find it either way. Can anyone possibley help with this.
Much appreciated Mike
|
|
|
|
|
How can i get the content of selected row on the double click event of datagridview for 2005?
reply immediatly
thanks
|
|
|
|
|
nilam11 wrote: reply immediatly
Please request humbly.
Regards,
Arun Kumar.A
|
|
|
|
|
nilam11 wrote: reply immediatly
Please Don't put this. This is not good.
Please go with Soft and Humble Request.
Regards,
Satips.
|
|
|
|
|
Hi
Is it possible to create a database SQL application without using asp.net. Only C#.Net.
There is one project to create an application for a school with 8000 students. So have to keep record of all the students and stuff , n things like registeration etc etc...SO need a heavy database...So what do you guys suggest in this case...
Thanks
|
|
|
|
|
Try to write a subject line that says something about the thread.
Software_Specialist wrote: Is it possible to create a database SQL application without using asp.net. Only C#.Net.
Yes, of course.
Software_Specialist wrote: There is one project to create an application for a school with 8000 students. So have to keep record of all the students and stuff , n things like registeration etc etc...SO need a heavy database...So what do you guys suggest in this case...
If you are going to be running a single instance of the application, any database will be able to handle that amount of data, even an Access database.
If you are building something that are going to be used from several instances of the program, or is going to be incorporated into an intranet/extranet, or if you see any of this as a likely development in the future, you should use a more stable database solution, like MS SQL Server.
You don't have to forsee any future needs, though. MS SQL Express is fully compatible with a full grande MS SQL server, so it would be fairly easy to upgrade if needed. Any type of database can be imported to another, but there are some differences in connection, data types and sql queries.
-- modified at 9:28 Sunday 17th June, 2007
---
single minded; short sighted; long gone;
|
|
|
|
|
But i guess these kind of applications are better if done using ASP.Net as it could be worked via webpage(internet) or intranet(if want to use it locally with in campus).
Please correct me if am wrong.
If i am right then i should build this application using ASP.NET, C#.NET, ADO.NET, SQL server 2005
Thanks
|
|
|
|
|
It depends on what the application has to be able to do, really.
Most applications that work against a database doesn't really benefit much from being windows applications, as they are working against a central database anyway.
Web applications have some benefits over windows applications, though. All that you need to use it is a browser, you don't need any .NET framework or specific datbase drivers installed. You actually don't need the computer to run Windows at all.
Unless you have some special requirements in the application that needs it to be a windows application, you can very well make it a web application.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I have written a script where user can upload a file into a pre-defined destination file. But I want to add couple features to this
1) I want to validate so that only preferred users can access this application.
2) Everytime a user uploads a file, a log table needs to be updated with the user name(may be windows login name), upload date& time, File name etc.
Can some one help me with the scripting part for this pls.
Thank You
|
|
|
|
|
how we used rdlc report throw code with Parameter / or How make a rdlc report With Runtime,
Thanks
|
|
|
|
|
Can you tell me a bit more? I don't understand what you're asking.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
<b>Suppose I have numeric values in my listbox. How do I add(addition) them and display the result in textbox. Plz help me guyz. I need the code both in VB.NET as well in C#.NET. plz plz help me out.</b>
Mash
|
|
|
|
|
hi,
one way is to iterate through all the items in the list and add them.
you could try the following:
object[] obj= new object[listBox1.Items.Count];<br />
listBox1.Items.CopyTo(obj,0);<br />
int sum = 0;<br />
foreach( object o in obj)<br />
{<br />
int tmp = Int32.Parse((string)o);<br />
sum += tmp;<br />
}<br />
textBox1.Text = sum.ToString();
and one more thing please don't post the same message in multiple forums.
hope this helps
regards
|
|
|
|
|
Iterate over the items of the listbox and sum them
|
|
|
|
|
Well the concept of listbox is that it holds multiple values just like an array but the listbox control treats every data as string .lets assum that we are having a listbox name lbt1 holding seven values each value on each index.
We have to apply a loop first untill the total number of items in lbt1.e.g
// declar/initiate variables
int val=0;
int addval=0;
int total=0;
for(int i=0;i<this.lbt1.items.count;i++)
{
val=int.parse(this.lbt1.items[i].tostring());
addval=addval+val;
}
this.txt1.text=addval.tostring();
<div="" class="ForumSig">By Lucky Hamad
|
|
|
|