|
I am writting a program that connects to an access database, queries employee names, stores these names in an ArrayList, and are added to the comboBox item list. Currently, I have the program querying the database after I change the selectedIndex of the comboBox but the problem is this, dupelicate names are being added to the comboBox which are out of the Array Index (I am using ArrayList.Clear()). The next thing I have tried is having the comboBox items cleared after the Selected Index is changed but this poses a problem, the current selected index is cleared and there is no telling what employee you are looking at. Are there any other solutions to this problem or do I just have to settle with the selected index being cleared?
Thanks in advance,
Patrick
|
|
|
|
|
Your question is an absolute mess. Just try reading it as somebody who does not have any background. First of all, if your program "queries the database on selected index changed", then question that comes to any sane mind is what was in the listbox before the database was queried (what was in it that resulted in selected index changed, and how it had come in the first place?). Next question is after selected index (of whatever), you query the databse - and then what? What happens to your existing combobox data? It all goes away? What kind of combobox is that - you click it and it gets refreshed? (My god!)
No doubt your question was not answered by anybody in so many hours. You are lucky that I logged in after a hard day's work looking for unanswered posts. I mean if you are still waiting for an answer! If you are not, grab a beer buddy...
Koushik Biswas
|
|
|
|
|
After I re-read my post I couldn't agree with you more on how messy it is, so I will try to clear this mess up.
Here's what the program does:
1)opens an access database and gathers employee information such as name, social security number, and a ref number that will be used to link the employee to corresponding images.
2)an arraylist is made and contains of the social security numbers.
3)the names and SSNs are added to the combobox.
4)when a name is selected a listbox fills with the employees documents.
a. when a document name is clicked on it is displayed in a picturebox.
5)when the name is changed in the combobox the whole connectToAccess procedure is run again, queries database, fills datasets/datatables, fills combobox, populates arraylist with SSNs.
you should get the idea now.
The problem is this:
Every time the employee is changed items are added to the combobox that are not indexed in the arraylist, thus adding items that have no index causing the program to crash. A few people I have talked with have said that I should just clear the combobox, which solves the problem above but creates another problem, clear the combobox and you clear the selected employee name, leaving the user of the program no reference to what employee they are looking at. It was also suggested that I create a var and store the selected employee's name in it, while this would work I would rather modify the ConnectToAccess procedure so that I can just read from the datatables I created and never actually query the access database again during the runtime of the program. I can send the code if it is needed.
Patrick
|
|
|
|
|
Hello communitiy,
I'm looking for diagramming software (written in C#) which is performant enough to manage a huge amount of shapes (1 - 50.000 shapes) with an acceptable speed. It should be able to render wihout flickering even while moving hundrets of shapes around or scrolling. Something like Visio but more flexible and faster.
Does anybody know such a software (no matter whether freeware or not)?
Any suggestion is welcome!
|
|
|
|
|
Is this "50" (fifty) or "50,000" (fifty thousand) objects? If latter, then I'd recommend that you draw them first on a separate image object and the load that image on your form. If you cannot, use double-buffering. Graphics are always expensive oeprations. You could always utilize OpenGL, Direct3D but dont have any expertise in this area.
- Malhar
|
|
|
|
|
Hello silverair,
Have you looked at the diagramming tool from Dundas? I don't know what kind of budget you have, but their tools are worth looking into.
Paul
|
|
|
|
|
Can anyone tell me how to create a time delay between my file copy operations or whatever
ie
voidcopy file.....
{
Copy file 1 code
wait 10 seconds < Time Delay
Copy file 2 code
}
Thank you
|
|
|
|
|
Thread.Sleep(milliseconds);
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
Using System.Threading;
voidcopy file.....
{
Copy file 1 code
Thread.Sleep(10000);
Copy file 2 code
}
Good luck...
|
|
|
|
|
Hello,
what is the best way of generating PP presentations from code ?
Currently I have a template with textfields where I put the data ...
But in some versions of PP, when I change and save the template, the textfield names are changed and I have to rewrite the code (because i cannot set the textfield name in PP)
Maybe there is a better aproach to this
|
|
|
|
|
Hi,
I have posted this question, but got no response.
I have a link, or button on my page which says something like "Add this website to your favourites". How do I add a page to my browsers favourites? Irrespective of what browser is used.
Regards,
ma se
|
|
|
|
|
Search google for "add to favorites javascript".
But you will have to get 2 scripts, one for IE and one for mozilla.
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
ma se wrote: I have posted this question, but got no response.
That is probably because most people think that you could very easily find this information yourself: Google result[^]
ma se wrote: How do I add a page to my browsers favourites? Irrespective of what browser is used.
You don't. You can make it work in some specific browsers, but not all.
---
b { font-weight: normal; }
|
|
|
|
|
So this can't be done at all with C# or VB.NET?
|
|
|
|
|
Favorites are added in the browser, not on the server, so you use Javascript, not ASP.NET.
---
b { font-weight: normal; }
|
|
|
|
|
OK thanks for that. I was just wondering if it could be done via .NET because you can test for a browser type via .NET code.
Regards,
ma se
|
|
|
|
|
The browser sends along an identifier string in the request header, that's why the server can identify the browser.
---
b { font-weight: normal; }
|
|
|
|
|
I create new Deploy Project.VS.Net automatically add Lunch Condition called ".NET Framework" and InstallURL is "http://go.microsoft.com/fwlink/LinkId=9832".When i build setup i got the following error.
ERROR: A name contained an invalid character.
i can't delete this Lunch Condition.even i change Lunch Condition name ".NET Framework" to "FrameWork",error still happen.
pls help me.
-- modified at 6:29 Tuesday 14th February, 2006
|
|
|
|
|
Hello friend i want to create a toolbar like VisualStudio 2005 one.
I explain better what is my goal.
I want to create differents controls i can scroll with VScrollbar.
For the base control i've thought about a simple enpty control with a label, and an image.
then i need another control with the "+" button to show or hide its sons controls.
Help me to create this.
Tnx
|
|
|
|
|
My service is running fine
when i give full path like this
"E:\c# windows\clamservice\bin\Release\database"
but when i tried for dynamic
"/database"
it compiles well but when i go to Computer Management ->Services and start
it ,it gives
"The clamservice on local computer started and then stopped.Some services
stop automatically
if they have no work to do,for example performance logs and alerts service"
I also tried
pathdb=Environment.CurrentDirectory.ToString();
pathdb=pathdb+@"\database";
but still same problem
but works fine when using windows form application
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
Try :
string exepath = System.IO.Path.GetDirectory( System.Reflection.Assembly.GetEntryAssembly().Location);
|
|
|
|
|
System.IO.Path doesn't contain definition for GetDirectory
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
System.IO.Path.GetDirectoryName(String)
|
|
|
|
|
pathdb=System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);
pathdb=pathdb+@"\database";
Thanks problem solved
Ankit Aneja
"Nothing is impossible. The word itself says - I M possible"
|
|
|
|
|
I want to run a flash animated file when the client open my project,
send me det
Balu
|
|
|
|