|
Hi All,
I am generating a set of datasets from few DataAdapters, and those generated datasets are referred in another project space as referenced dataset.
When i say
DataAdapter.Fill(datasetX, "tbl");
it does the task for me. The Memory size of the Exe in the runtime grows from 10mb to 20mb,but once i close the form the size never comes down. Even if i say
<br />
datasetX.Dispose();<br />
System.GC.Collect();<br />
And i was thinking of using 20 to 30 such datasets but will it not increase the size of my application ?
How can I bring down the runtime memory consumption ?
How can I Dispose the Dataset ?
Please help with this.
Thanks in advance
KSS
|
|
|
|
|
Are you disposing the connection object and DataAdapter object as well?
What happens when you open and dispose a bunch of datasets, does the memory size of the exe keep going up? System.GC.Collect(); is probably unnecessary.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
|
|
|
|
|
Are you disposing the connection object and DataAdapter object as well?
No i am not disposing them , as they are dragged on to a component. and from that Adapter ->Right Click ->Generate Dataset.then i refer that dataset from my UI project.
What happens when you open and dispose a bunch of datasets, does the memory size of the exe keep going up?
No the size of the Exe remains the same.
how vital enterprise application are for proactive organizations <br>leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that <br>focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the <br>bottom-line. But of course, that's all a "high level" overview of things
--thedailywtf 3/21/06
This really is cool but High Level also...
Thanks for the answer.
KSS
|
|
|
|
|
Hi ,
anyone please help me how to make multiple scenorio in case. i tried with , operator but it gives error.
example,
switch(a)
{
case q,y:
...
}
|
|
|
|
|
try
switch(a)
{
case q:
case y:
{
ur calculations......(it should work for both case q and case y)
}
break;
...
}
rahul
|
|
|
|
|
You don't need the additional body! {} wastes some time and is often unnecessary. (I bet it pushes and pops the stack)
switch(a){
case q:
case y:
...
break;
}
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
Hi.i have created application that has datagrid and texboxes.my application load data on datagrid on form load so i want display the same data on the texboxes,when ever i select a record on datagrid the the data on the texboxes must change according to the record.
|
|
|
|
|
Hello all,
How to get the size of reference type stucture,
ref Innerstruct
{
unsigned int j;
bool bl;
};
ref stuct sample
{
int i;
Byte b;
Innerstruct st;
};
sample s=gcnew sample;
int length=sizeof(s);
this returns 4, i thing it is the size of pointer. how to get the orginal size of structure and its members.
I posted it in C++, but didn't get reply if you know plz help
|
|
|
|
|
What makes you think that posting in the wrong forum will help?
With this being said, have you tried Marshal.SizeOf() ?
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
Hi all,
I'd like to get a book on C# and .NET which will act as a reference book and also be a gentle introduction for a C++ programmer - any suggestions?
TIA,
Steve.
"He's got a lot on his mind, and it's not a load-bearing structure." - John Weak
|
|
|
|
|
Wrok Programming in C# for Beginners is the best book available.
Vipin
|
|
|
|
|
C# Cookbook would be a good book to look at, you wont have any problem with syntax and OOAD, so no point in getting a book that steps you through that (since you are a C++ programmer). The C# cookbook will get you into the .Net framework and show you how to apply it correctly for a number of realworld/complicated problems from simple server side console application to remoting, threads and webservices.
|
|
|
|
|
hi all,
in my application when i double click a list view it opens a new form... if i double click it again it again opens a new form again .... is thr any method to find out how many forms are opened already before opening a new dialog...
thanks a million in advance.....
|
|
|
|
|
If you open a new form, you must put it in a collection.
Then you can read the "Count" from collection to know
how many forms are opened.
|
|
|
|
|
can you plz explain it more.... plzzzz
little e.g will be more helpful....
thanks a lot in advance.....
|
|
|
|
|
For example :
Just create an ArrayList.
ArrayList a = new ArrayList();
If you create a new form, for example:
Form form = new Form();
a.Add(form);
form.Show();
If you want to know the amount, then
get the a.Count
|
|
|
|
|
thank u very much..... u r gr8... simple and perfert.......
thank u.....
|
|
|
|
|
I would say that the prefered OOP style way is to use a Singleton object.
A Singleton object is an object with no visible constructors.
You declare every constructor as private, thus hiding them all.
In order to get your single instance of the class, you create a static function which checks if an instance was already created.
If it was, you return that existing instance.
If not, you create a new one and return it.
Example:
public class SingletonClass
{
SingletonClass instance;
private SingletonClass()
{
}
public static SingletonClass GetInstance()
{
if (instance = null)
instance = new SingletonClass();
return instance;
}
}
|
|
|
|
|
hi
i am trying to retrive image from sql server using asp.net 2.0 .i use vb.net as a code behind the language.
for saving image into sql database i wrote a code as fallow
Dim len As Integer = fileCompanyLogo.PostedFile.ContentLength
Dim pic(len) As Byte
fileCompanyLogo.PostedFile.InputStream.Read(pic, 0, len)
and insert pic into databse where database field is image type.
but i have a problem to retrive image from database.
so plz help me
|
|
|
|
|
Hi People¡¡ i have a question with Singleton pattern i dont use multithread development and the singleton structure that i use is that
<br />
public static GestorBD Instance<br />
{<br />
get<br />
{<br />
if (instance == null)<br />
instance = new GestorBD();<br />
<br />
return instance;<br />
}<br />
}<br />
but in new GestorBD(), i´d like to pass a parameter how can i do it??becouse i received "0" or "1" i have to read and xml or other xml
thanks for all
-- modified at 5:50 Tuesday 1st August, 2006
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
Legolas_Bilbao wrote: but in new GestorBD(), i´d like to pass a parameter how can i do it??becouse i received "0" or "1" i have to read and xml or other xml
If you pass a parameter to the constructor then what you are implicitly saying is that it may not be a singleton. If it is still a valid case for a singleton then create a property or method to take the parameter which will change the existing state of the object.
|
|
|
|
|
the one thing that the Singleton pattern ensures as that only one instance of the object exists in your application at any given time. you have a private parameterless constructor that instanciates that object if it doesnt exist (lazy loaded) and thats it. you want to rethink your design if you are having to pass in a parameter to the constructor. Why not have a method inside the GestorBD class called ReadXML(string xmlString)/ReadXML(int method) to do the reading of the xml? Its difficlut to say what is correct without looking at the entire purpose of your class.
|
|
|
|
|
thanks i understand it
thanks for all
-- modified at 13:59 Tuesday 1st August, 2006
Dios creo un equipo perfecto a los demas los lleno de extranjeros
|
|
|
|
|
Hi,
is there a way to disable the X (close) button in the title bar of a Form?
I don't want to completely remove the controls from the title bar because I want to have the icon and the minimize button still visible.
I tried a few ways based on the override of the WndProc method, but they didn't work, probably because they were in VB6 and porting them to C# broke something.
Thanks for any help.
|
|
|
|
|
I guess thats not possible. Even I wanted the same thing some time ago but failed to do it. i even tried with some java scripts there also i failed to get a result. So i guess it is not possible.
Vipin
|
|
|
|