If you are using task manager to detect memory usage, what you are seeing is the programs working set and not the atuall memory usage.
You say you are using the Dispose method as you close windows. But do those child windows use any resources that are not automatically disposed?
Contrary to popular belief, .NET's automaticall memory management does not imply immediate 100% resource cleanup. Some resources have to be cleaned up manually to decrease memory footprint at any given time since the garbage collector funtions in a non-deterministic way.
Task manager show the program's working set, not the actual memory consumption at a given time. You can see this bi minimizing and then restoring your application. Task Manager refreshes the value and usually the new value is much less than the original one.
Although it is not a recommended practice, you can try forcing a garbage collection through GC.Collect().
How to Create a new Access database using C#?
i want create a new access database.i don't kown how to write the SQL expression.
and i want to kown is there other way to create a new database not use SQL language.beacause i kown there is ADOX in ado2.5 and it can create database.but i can't find anything can create database in ado.net.
The only other technique I know, and have used before, is to embed a blank database into the assembly and write it out to file using a binary stream whenever a new database is needed. I know, its ugly and bad, but it works. Though if you want to be able to create for different Access versions you'd need to embed each one, which is even more ugly and bad.
I've been trying to get the designer in visual studio to work for a class which isn't derived from "form".. It is a class derived directly from System..
I want the designer to work for my class so I can to drag the database connection from the "server explorer". And have it add all the code automatically to my class as is done for classes derived from "form"..
How can I do this??
Your help as always would be greatly appreciated!!
I'm doing something similar right now actually... Working on creating a GUI library and engine using DirectX that is designable.
You have to implement IComponent in your class (deriving from Component is a quick way to do this) because the DesignerHost (service provided and used by VS.NET) utilizes sites (ISite), which are the basis of components. Then you have to specify an IRootDesigner-implementing class in a DesignerAttribute for you IComponent class. You can try using ComponentDocumentDesigner for that if you don't need any custom designer stuff.
Also check out an article/sample named ShapeLibrary that gives a nice easy example of utilizing design-time services in .NET. You can find it here:
I inherited a MS Access database. One of the columns in a table happened to name with a SPACE in the middle, "FrameMaker Location". I know, it's not a smart way to name a column.
I was trying to insert some new records into the table. It only worked when I removed the SPACE from the column name (from my code and DB), like "FrameMakerLocation". Otherwise, I got an error like this "Syntax error in INSERT INTO statement".
Do you know any tricks so that I don't have to rename the column name???
Thanks so much in advance
Have a great Thur.
I am not sure but try enclosing the name in square brackets [ ].
Paul Watson wrote: "At the end of the day it is what you produce that counts, not how many doctorates you have on the wall." George Carlin wrote: "Don't sweat the petty things, and don't pet the sweaty things." Jörgen Sigvardsson wrote: If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.