|
Well it sounds good. If you could explain about your application then it would be much better for us to guide. other wise we can say just start from there....
Do one thing ... at the end of every event ,Procedure , Function write
GC.Collect()
this will collect the garbage which your system is not releasing. Secondly if you are using datasets and datatables then close them and set them to nothing after using them and right after that write GC.collect line to collect the garbage. I am sure this will help you out and will brought you back to the orignal memory.
|
|
|
|
|
I forgot to include some more info...
I have tried using GC.Collect()... it does not seem to release the memory... it just promotes most of it to Gen2 ( Gen2 will show around 500MB after 2 hours of 14 users using the app ). So the references are still alive somewhere. I'll try closing the datasets.
Datasets are used extensively throughout this application. The application is an asp.net interface to a large database.
The biggest memory hog appears to be the forms for data entry. The forms have up to 70 different entry fields with some of them being drop down lists that are populated by the database. The drop down lists are cached in a hash table.
// TODO: Write code.
|
|
|
|
|
well from your point I am quite afraid that you are might be using wrong queries. like to fetch ID from Table you are using select * from Table... and then you are puting them in a session to save them from fetching again. if it is true then dont do this. try to destroy maximum memory at server side MANUALLY ... instead of waiting
like
DataTable or Dataset.Dispose()
GC.GetTotalMemory(True)
GC.WaitForPendingFinalizers()
GC.Collect
means destory every thing... second thing is how many session variables you have and how many of them are datatables and datasets etc..... like asking for the variables which can consume unlimited space... Same with the application level variable....
hope this will help and let me know if nothing goes fine....
cheers......
|
|
|
|
|
I have inherited a data-access UI project in need of a bit of work. Currently, there is an MDI parent form, and a single form available as a child form. Within this child form, there are about 20 fairly complex panel containers -- each with a variety of controls (labels, textboxes, comboboxes, etc.) -- which are either moved offscreen or rendered invisible to give the impression of multiple forms.
My instincts tell me that the panel approach is a poor strategy (and a royal pain when it comes to design changes), and I want to pursue a fuller implementation of the MDI foundation in place, but I need some convincing arguments to demonstrate how this is a more stable approach, and not a waste of time.
Any suggestions/ideas would be greatly appreciated.
Thanks!
|
|
|
|
|
Hi Stew,
I'm not sure if this will convince you, but I have dealt with this same situation in developing my own applications that have many different forms with similar uses.
If you are designing a simple application that will not be developed any further (no future expansion or additions) then one big form could be useful because all of the functionality you will ever need is right in front of you, without having to switch from form to form.
Chances are your will at some point need to add to this design, be it new features, new controls or just a new look.
I would suggest always using the MDI format as it has proven to be the most reliable when upgrading existing forms. I live and code like this due to a very helpful acronym I adopted from my years in the Marines, K.I.S.S. (“Keep it Simple Stupid”). Simple is usually always the better route unless you just can’t do more with less.
Even though areas of a form may be in panels, there is always some distinct use for that panel from the rest of the panels on the form. In other words, it should prove beneficial to choose the MDI approach when designing an application. It is better to repeat very subtle similarities on different forms then to maintain all of the code on one gigantic form.
You can also create your own user controls that contain repeatedly needed functionality, then simply place the user control on any form you need to use it from.
Hope my tangents didn't do more harm them good,
Scott Page
|
|
|
|
|
I created a payroll program that will generate hours and tax deductions. I would like to print the results. How can I do that?
bravo659
|
|
|
|
|
You need to create a report. VB.NET comes with crystal reports and they are easy to create but hard to deploy. Other guys in here talk about XML and .CSV but i am not too familiar with either for reporting purposes.
|
|
|
|
|
I appreciate for your feedback. Yes i heard of the xml it is structure, but not sure how to really use it. It's becoming prevalent, so i better get with program and learn it, before i'm left behind. Hey, thanks again.
bravo659
|
|
|
|
|
i have a pdf file to learn how to creat reports . if u need mail me at
onlymadni@gmail.com
|
|
|
|
|
I would like this pdf file if you dont mind. i will email and request it.
|
|
|
|
|
Dear Friends,
I have problem in opening SQL Server Database when i run the application it gives error
an unhandled exception of type system.data.sqlclient.sqlexception occured in system.data.dll
Additional information System Error
Please help me in solving this problem
your help will be highly appriciated.
my app.config contains string like below
<appsettings>
<add key="ConnectionString" value="server=(MURTUZA);database=NorthWind;uid=sa;pwd=sumayya">
Thanks
Murtuza
|
|
|
|
|
can u send the lines u written for connection? it may be query problem that u r trying to open
|
|
|
|
|
Dear Abbasi,
The connection string i m using is as below
<add key="ConnectionString" value="server=(MURTUZA);database=NorthWind;uid=sa;pwd=sumayya" />
when i am reaching at rs.open i m getting the error as i mention before.
rs is an instanse of my class called Recordset.
Rs has the below Open method
Public Sub Open()
cnn = New SqlConnection(mConnectionString)
cmd = cnn.CreateCommand()
conn.Open()
cmd.CommandText = "SELECT COUNT(*) FROM (" & mSelectString & ") tbl"
mRecordCount = cmd.ExecuteScalar
' Cursor declared with a SQL-92 syntax (BooksOnLine)
cmd.CommandText = "DECLARE crsr SCROLL CURSOR FOR " & mSelectString
cmd.ExecuteNonQuery()
cmd.CommandText = "OPEN crsr"
cmd.ExecuteNonQuery()
GetTableName()
mBOF = True
mEOF = (mRecordCount = 0) ' If there are not records: EOF=BOF=True
mAbsolutePosition = -1
End Sub
|
|
|
|
|
Thanks all Friend
My problem solved and its working fine
|
|
|
|
|
Did you use the
Imports System.Data.SqlClient
Imports System.Configuration
Namespaces????
|
|
|
|
|
no need ; it wouldn't have compiled if the namespaces weren't resolved...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
add the crashinc code into a try catch block to have a more precise decription of the problem :
Try
...
Catch ex As Exception
MessageBox.Show("SQL error : " & ex.Message, _
"Error", _
MessageBoxButtons.OK, _
MessageBoxIcon.Error, _
MessageBoxDefaultButton.Button1)
End Try
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I am installing my vb.net app on a client computer. I have included the merge modules with the project but i still get "load report failed" when i try and open my report. Does anyone know a solution to this or another free easy to use report writer i can use with .NET???
|
|
|
|
|
|
|
nevermind i found it. It works halfway. I do not get the error message anymore but my parameter prompt comes up, i enter the parameter, click OK and nothing happens. NO report shows. Help???
|
|
|
|
|
now it is asking me for my sql server logon information, how do i get rid of this???
|
|
|
|
|
enter database user name and password to logon
|
|
|
|
|
use RefreshReport property of crystal report viewer control.
|
|
|
|
|
i ve embedded a Windows Media Player component in the ASP.NET Web Application interface.. but dunno how to play a media(audio/video) file in it...
i ve tried giving a URL path to a Hyperlink, when this Hyperlink is clicked, another Windows Media Player pops up and plays that media file... but i want the embedded media player(on the interface) to play the file..
how to do this.. ??
and also how to go for dynamic URL path for the media files.. like when a user clicks on any file, its URL shud be invoked n played in the Embedded Windows Media Player(on interface)...
|
|
|
|