Click here to Skip to main content
15,887,985 members
Home / Discussions / C#
   

C#

 
Questioncontrol container design time problem Pin
bahaa_sa514-Feb-06 3:25
bahaa_sa514-Feb-06 3:25 
QuestionWMI problem Pin
sendmadhavan14-Feb-06 3:23
sendmadhavan14-Feb-06 3:23 
AnswerRe: WMI problem Pin
Dave Kreskowiak14-Feb-06 10:21
mveDave Kreskowiak14-Feb-06 10:21 
GeneralRe: WMI problem Pin
sendmadhavan14-Feb-06 16:37
sendmadhavan14-Feb-06 16:37 
GeneralRe: WMI problem Pin
Dave Kreskowiak15-Feb-06 2:29
mveDave Kreskowiak15-Feb-06 2:29 
QuestioncomboBox Problems Pin
pcaddict14-Feb-06 2:42
pcaddict14-Feb-06 2:42 
AnswerRe: comboBox Problems Pin
Koushik Biswas15-Feb-06 14:58
Koushik Biswas15-Feb-06 14:58 
GeneralRe: comboBox Problems Pin
pcaddict16-Feb-06 8:53
pcaddict16-Feb-06 8:53 
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
QuestionDiagramming in C# Pin
silverair14-Feb-06 2:33
silverair14-Feb-06 2:33 
AnswerRe: Diagramming in C# Pin
malharone14-Feb-06 3:31
malharone14-Feb-06 3:31 
AnswerRe: Diagramming in C# Pin
Paul Conrad14-Feb-06 4:13
professionalPaul Conrad14-Feb-06 4:13 
QuestionA Time Delay Pin
AlphaAddict14-Feb-06 2:00
AlphaAddict14-Feb-06 2:00 
AnswerRe: A Time Delay Pin
Colin Angus Mackay14-Feb-06 2:31
Colin Angus Mackay14-Feb-06 2:31 
AnswerRe: A Time Delay Pin
Amon.RA14-Feb-06 2:32
Amon.RA14-Feb-06 2:32 
QuestionHow to generate power point presentation from PP template ? Pin
JankoH14-Feb-06 1:07
JankoH14-Feb-06 1:07 
QuestionAdd to Favourites Pin
Brendan Vogt14-Feb-06 0:36
Brendan Vogt14-Feb-06 0:36 
AnswerRe: Add to Favourites Pin
CWIZO14-Feb-06 1:29
CWIZO14-Feb-06 1:29 
AnswerRe: Add to Favourites Pin
Guffa14-Feb-06 2:02
Guffa14-Feb-06 2:02 
QuestionRe: Add to Favourites Pin
Brendan Vogt14-Feb-06 2:09
Brendan Vogt14-Feb-06 2:09 
AnswerRe: Add to Favourites Pin
Guffa14-Feb-06 19:11
Guffa14-Feb-06 19:11 
GeneralRe: Add to Favourites Pin
Brendan Vogt14-Feb-06 19:29
Brendan Vogt14-Feb-06 19:29 
AnswerRe: Add to Favourites Pin
Guffa15-Feb-06 10:37
Guffa15-Feb-06 10:37 
Questionbuild Setup error Pin
Kyaw Soe Khaing14-Feb-06 0:28
Kyaw Soe Khaing14-Feb-06 0:28 
QuestionCreating a Toolbar like Visual Studio 2005 one Pin
Sasuko13-Feb-06 23:41
Sasuko13-Feb-06 23:41 
Questiondynamic path Pin
Ankit Aneja13-Feb-06 23:20
Ankit Aneja13-Feb-06 23:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.