|
600 records is a lot of data. Sometimes I have had similar problems based on memory usage. Check the memory usage and switch the 600 record update code into a worker thread allowing the UI free, independent reign and it could help.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Hello,
I thank you a lot for your time. Indeed the app works perfect and very fast if we run the operations on another thread but I am not supposed to use threads (my Manager does not like it. need more reason)however it would be of great help if you can explain why the app is running if I use multiple threads, will the allocated memory increase with another thread or something like that?.
Warm regards,
Krishna
|
|
|
|
|
What is the difference between bin\debug and obj\debug directories in a .NET project?
|
|
|
|
|
|
OK - So it looks like if I need to reference 3rd party dll's then the recommended practice is to put these dll's in the bin\Debug directory. Is this correct?
Since the name of the directory is "Debug", I wasn't sure about the implications of running the app in Release mode as opposed to Debug mode. Does this make a difference as far as the directory where the dll should be put?
|
|
|
|
|
Actually, the standard practice is to include them as a reference in the project. It handles them properly that way, so regardless of what build you're in..it places it into the proper folder.
1. Open your solution file.
2. Right click on the project file.
3. Select "Add Reference...".
4. Either select the third party dll's using the dialog (most likely the 'Browse' tab)
5. Build your project
6. Enjoy having Visual Studio handle the management of your third party dll's.
|
|
|
|
|
Of course - I know how to add a reference to a 3rd party dll.
The question is - where is the best place in my project to keep the physical dlls that I am adding a reference to?
|
|
|
|
|
I just put them in a folder called Include, but there may be a better way.
|
|
|
|
|
I think I've been on projects where there was a top-level "dlls" folder but I don't remember for sure.
I would imagine that Microsoft or FXCop has a best practice for this....
|
|
|
|
|
OK - The current project that I am working on has a top-level "ReferencedLibraries" directory under the solution with all of the 3rd part dlls. This seems like the way to go.
|
|
|
|
|
Yeah, that part is just completely arbitrary.
|
|
|
|
|
Hi,
Does any one know about any open source database library made in C# that contains implemnentation of select insert, update queries.
Thanks,
Mushq
|
|
|
|
|
Have you looked at SqlDataAdapter[^]? It's not open source, but it's included in the .NET framework.
If you're looking for something as a learning source, check out NHibernate.
Tech, life, family, faith: Give me a visit.
From my latest post: "It's sobering to watch: the whole country stops for 2 minutes as a siren is blast to remember the 22,437 victims of terror and soldiers who died in defense of Israel..."
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
What I want to do is create a table of sorts:
___________________
| |Key 1|Key 2|
|_____|_____|_____|
|Sub 1|Value|Value|
|_____|_____|_____|
|Sub 2|Value| |
|_____|_____|_____|
For example in the System.Collections.Generic.Dictionary class I can access values like so:
dictionary[key]
what I want to do is access the value like so:
table[key,sub]
Any ideas?
|
|
|
|
|
Use a multi-dimensional array[^].
Tech, life, family, faith: Give me a visit.
From my latest post: "It's sobering to watch: the whole country stops for 2 minutes as a siren is blast to remember the 22,437 victims of terror and soldiers who died in defense of Israel..."
The apostle Paul, modernly speaking: Epistles of Paul
Judah Himango
|
|
|
|
|
I believe he's asking for a two-key dictionary.
|
|
|
|
|
In practice a multi-dimensional array would do the same thing...
<br />
int key1 = 0;<br />
int key2 = 1;<br />
<br />
string[,] table = new string[2,2];<br />
string x = table[key1,key2];<br />
|
|
|
|
|
That would work if the keys are ints. Andrew is correct, I'm looking for a two key dictionary.
|
|
|
|
|
Another possibility is a Collection of Collections. For example, a Dictionary of Keys whose values are another Dictionary of SubKey/Value pairs.
|
|
|
|
|
Yes I was considering that and that may be the best way to go. I don't want to use nested switches because that looks messy.
|
|
|
|
|
Switches?? What switches?? I didn't say anything about any switches.
|
|
|
|
|
Yeah, I'd just suggest nesting two generic dictionaries.
Dictionary<Keycode, Dictionary<Keycode, T>>
Something of that sort...
|
|
|
|
|
Jordanwb,
Will you always know the key and sub values?, or would there be cases where you would only have one value?
If you know both, it might not be the best solution, but you could do "key:sub" as the key for your dictionary.
Just an idea.
Regards,
Gareth.
|
|
|
|
|
The two key types are enums, so yes I would always know.
How does the "key:sub" work?
|
|
|
|
|
I use a Dictionary of Dictionaries.
There is also this[^] article.
Even simpler would be to shift one key "up" and add it to the other. k = a * 1000 + b
But, as I see you also mentioned enums, I'll also mention this[^] article. (If you like that idea, and my comments on it, let me know.)
|
|
|
|