Click here to Skip to main content
15,908,673 members
Home / Discussions / C#
   

C#

 
QuestionLogic/Syntax for shifting all items in List<string> by +1 place</string> Pin
Abydosgater19-Jan-09 11:02
Abydosgater19-Jan-09 11:02 
AnswerRe: Logic/Syntax for shifting all items in List by +1 place Pin
Pete O'Hanlon19-Jan-09 11:08
mvePete O'Hanlon19-Jan-09 11:08 
AnswerRe: Logic/Syntax for shifting all items in List by +1 place Pin
DaveyM6919-Jan-09 11:24
professionalDaveyM6919-Jan-09 11:24 
AnswerRe: Logic/Syntax for shifting all items in List by +1 place Pin
User 665819-Jan-09 11:37
User 665819-Jan-09 11:37 
AnswerRe: Logic/Syntax for shifting all items in List by +1 place Pin
Luc Pattyn19-Jan-09 12:08
sitebuilderLuc Pattyn19-Jan-09 12:08 
AnswerRe: Logic/Syntax for shifting all items in List by +1 place Pin
Mark Churchill19-Jan-09 13:07
Mark Churchill19-Jan-09 13:07 
QuestionThreads / Class / Array Pin
Planker19-Jan-09 9:51
Planker19-Jan-09 9:51 
AnswerRe: Threads / Class / Array Pin
SeMartens19-Jan-09 21:27
SeMartens19-Jan-09 21:27 
Hi Planker,

i will try to answer your question.

1. I don't know it exactly but it seems that there is only one connection to the db at one time (I think because it is file based). This issue will be solved if you move to a database supporting multiple connections at once. To use multiple threads with the access database you can think about using the producer-consumer pattern. The threads processing your files will produce data. This data will be stored in a single datastructure (attention: must be thread-safe!). If data is passed into this structure the thread containing the db connection will "consume" this data and store it within the db. (search for the producer-consumer-pattern to get an idea of it).

2. Here I would nearly do the same using the producer-consumer-pattern. Store the files in a thread-safe datastructure (single static instance, so that it can be accessed from everywhere in your application), the threads working with the files will "consume" the filenames stored within the datastructure.

The perfect datastructure for this is a Queue. For using the producer-consumer-pattern take a look here:

http://msdn.microsoft.com/en-us/library/yy12yx1f(VS.80).aspx[^][^].

Let me know if this helps you.

Regards
Sebastian

It's not a bug, it's a feature!

Check out my CodeProject article Permission-by-aspect.

Me in Softwareland.

QuestionHow create professional docu? Pin
Frygreen19-Jan-09 8:49
Frygreen19-Jan-09 8:49 
AnswerRe: How create professional docu? Pin
Eddy Vluggen19-Jan-09 9:07
professionalEddy Vluggen19-Jan-09 9:07 
AnswerRe: How create professional docu? Pin
Colin Angus Mackay19-Jan-09 10:27
Colin Angus Mackay19-Jan-09 10:27 
AnswerRe: How create professional docu? Pin
Not Active19-Jan-09 10:33
mentorNot Active19-Jan-09 10:33 
AnswerRe: How create professional docu? Pin
Frygreen20-Jan-09 8:05
Frygreen20-Jan-09 8:05 
Questionread byte[] from file, save byte[] in new file, different size Pin
arturw8219-Jan-09 8:22
arturw8219-Jan-09 8:22 
AnswerRe: read byte[] from file, save byte[] in new file, different size Pin
Jimmanuel19-Jan-09 9:46
Jimmanuel19-Jan-09 9:46 
GeneralRe: read byte[] from file, save byte[] in new file, different size Pin
arturw8219-Jan-09 10:01
arturw8219-Jan-09 10:01 
GeneralRe: read byte[] from file, save byte[] in new file, different size Pin
Jimmanuel19-Jan-09 10:25
Jimmanuel19-Jan-09 10:25 
GeneralRe: read byte[] from file, save byte[] in new file, different size Pin
arturw8220-Jan-09 6:23
arturw8220-Jan-09 6:23 
GeneralRe: read byte[] from file, save byte[] in new file, different size Pin
Jimmanuel20-Jan-09 7:12
Jimmanuel20-Jan-09 7:12 
QuestionProgramming Web In C# Pin
trinm198719-Jan-09 7:45
trinm198719-Jan-09 7:45 
AnswerRe: Programming Web In C# Pin
EliottA19-Jan-09 9:28
EliottA19-Jan-09 9:28 
AnswerCP IGNORE USER...THIRD time he's posted this. Pin
leckey19-Jan-09 10:20
leckey19-Jan-09 10:20 
QuestionPrint Start event Pin
spiritboy19-Jan-09 7:30
spiritboy19-Jan-09 7:30 
QuestionDeveloping a small DBMS software tool Pin
Calma19-Jan-09 7:27
Calma19-Jan-09 7:27 
AnswerRe: Developing a small DBMS software tool Pin
spiritboy19-Jan-09 7:39
spiritboy19-Jan-09 7:39 

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.