|
|
Hi,
Thanks in advance. I have an application which loads the database tables with five different site codes. In future the number of site codes may increase. For each site code 14 files are sent from another server to our server.
I have to write an application which checks for all the files to arrive and converts it into UTF-8 format and then calls the PL/SQL package and this should run parallely.
So I thought of using Multithreading with one thread for each of the site codes with site code as parameter.
Here is the problem I face. For instance, I have a flag which would be set to "No" if the files are missing and "Yes" if the files exist. In multithreading if I have to preserve the variable I have to block the variable from the other threads using it. Suppose for the site code where files arrival get delayed for 5-6 hrs or for some reason and it's thread blocks the variable then the other threads has to wait for this and this is not what I want. And I have set a lot many flags for in this application. Is Multithreading useful in this scenario? Please let me know your suggestions.
Thanks & Regards,
Das.
|
|
|
|
|
I think you would probably want to create the boolean flag with the <threadstatic()> attribute, so that each thread has its own copy of the flag to work with.
This blog explains the usage of ThreadStatic (it's in C#, but you should get the general idea)
ThreadStatic[^]
Hope this helps.
Keith
|
|
|
|
|
why not create a class to process a single site code, and a manager class that creates an array of instances of the first (sitewatcher) class based on a configuration file entrly (list of the site codes). In ieach sitewatcher class, create volatile booleans to represent the states you are interesed in (make them volatile so that the compiler doesn't optimize their usage in loops, etc. Have your manager class periodically iterate the array of sitewatches, if any is not complete, check for files, if there are any, start a filemover theread on that instance, mark it as busy, then move on to the next. repeat the iteration until all are complete...at the end of the day, if all are complete, move or remove tthe files for each, clear the complete flag for each instance, and start all over.
Using a configuration file to specify the sitewatcher entries in the list will make it easy to add another site, just edit the config file and restart the app.
|
|
|
|
|
Hi:
I am using a multiview inside of a formview. The multiview represents different tabs that I have (5 tabs in total).
The problem I have is when I switch modes of the formview. When I am in the readonly mode and want to edit the record, on clicking the "edit" button, the multiview goes back to the first tab instead of staying on the tab that I was on when I clicked on the button.
Any ideas as to how to make it stay on the current tab?
Thanks.
|
|
|
|
|
Same problem here... Anyone who has the solution ???
|
|
|
|
|
I would like to set a property that takes an argument as the data mapping value of a datagrid column. So in instead of
mappingname = "Name"
I would like to be able to say
mappingname = "fields(name)"
Is this possible, and does anyone know how it could be done? And yes, I promise that I really, honestly have a good reason for wanting to do it
Thanks
Luke
|
|
|
|
|
What is 'fields'? Could you not do this? mappingName = fields["name"]
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi Josh,
Thanks for the reply. 'Fields' should have been 'FieldValues' - signature below.
Public ReadOnly Property FieldValue(ByVal dataSource As String) As String
Basically, I have a collection of objects which are wrappers to their underlying field values (eg datasouce and value string). However, I want to be able to access the field values directly, through my FieldValue property, rather than indirectly though the various other accessors. I know this sounds a lot like a datatable, but trust me
Tried you suggestion, but no luck. A string is required, and I thought the following would have worked:
.MappingName = "FieldValue(" & vbQuote & "wmsName" & vbQuote & ")"
where 'wmsName' is the argument I want to pass to the FieldValue property. No joy though.
Thanks for your help,
Luke
|
|
|
|
|
You're making the assumption that the MappingName property will dynamically invoke your FieldName property, based on some type of parsed interpretation of the string value. I assume that MappingName is not built that way.
Why did setting MappingName to FieldValues("whatever") not work? What was the actual problem?
:josh:
My WPF Blog[^]
|
|
|
|
|
Hi Josh,
Why did setting MappingName to FieldValues("whatever") not work? What was the actual problem?
Just the usual problem when mapping names don't match a property in the bound type: the column is not displayed. No exception or anything useful to help debug! .
I accept your points about dynamic invokation - maybe I was hoping for too much.
Thanks
Luke
|
|
|
|
|
Hi Folks,
I would like to write an installer for my C# program. I have no experience with installers, but I know there are some programs/tools to help me do it.
Can you recommend to me how to approach this? Maybe there are some tutorials that can help me.
In addition to the common installation tasks (copying files, registering, uninstalling) I would like to do the following in the installer:
Check if the required version of the .NET framework is installed, and if not, install it;
and the same for the Managed DirectX version.
Thanks for your help!
|
|
|
|
|
Add a Setup Project (or a Web Setup Project) to your solution. Search CP for articles about how to configure it.
:josh:
My WPF Blog[^]
|
|
|
|
|
|
NSIS[^] is by far the best installer I've come across, although it will take a short while to become experienced in it.
VenisIX[^] is a good editor with a built-in wizard for generating scripts.
Take a look at SharpDevelop's[^] installer for functions to check for .NET Framework existance.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Hi All,
I have a problem, recently i deployed an app on windows 2003 server, when i try to run the app its giving this error:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
here is the even log info
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 Access is denied.
can some one please help me?
Mk
|
|
|
|
|
It probably means that the user account under which the worker process is running cannot read the disk directory in which the files are stored.
Ensure that the permissions on the directory include the account which the worker process runs under. You can change the worker process identity by editing the properties of the application pool containing the application experiencing the problem. By default this is the NETWORK SERVICE account.
|
|
|
|
|
I get a DevicePath using SetupDiXxx functions:
\\?\usbstor#disk&ven_fujitsu&prod_memorybird&rev_1.14#0739035033a1&0#{53f563
07-b6bf-11d0-94f2-00a0c91efb8b}.
How can I use this device path to retrieve a drive letter in format of "F:\" ???
When I use GetVolumeNameForVolumeMountPoint function, I always receive "error C3861: 'GetVolumeNameForVolumeMountPoint': identifier not found, even with argument-dependent lookup" even though I've already add statement in my code : #define _WIN32_WINNT 0x0502
-- modified at 10:15 Wednesday 19th July, 2006
|
|
|
|
|
Hi All,
I'm a complete newbie to coding and the like, but I have been given an urgent deadline to create something, and I haven't a clue at all what to do.
I have been asked to create a a progamme that will have a desktop Icon, and will launch a window with no bottons or anything like that (similar to an IE popup window) and only have a title bar at the top (with the name of the programme), and simply display a .html or .php page that I have already created for it.
I'd assume that for a seasoned code guru, this probably sounds so simple and a silly request for help, but I really don't have a clue!
Any help will be most appreciated, and many thanks in advance!!
Regards
Kevin
|
|
|
|
|
Sounds a bit odd to me but here a short description:
1. Download and install the Visual Studio C# Express Edition.
2. Start it and create and new windows forms application.
3. You will see an empty form. Click it and change the properties as you like.
4. Look at the tool box at the left. There is a WebBrowser control int it. Drag it onto the form.
5. Change the properties of it as you like (in one of them you can choose which file should be displayed)
Robert
|
|
|
|
|
Hi,
Thanks for the quick response!
I have followed your instructions, and it works well to create the application, although none of the video in the window will load. However, if I launch the HTML file in IE, the video does work.
I assume I'm doing something wrong somewhere?
The video is Windows Media, four seperate feeds embedded on a webpage, using activeX
|
|
|
|
|
Hi there,
I want to use a custom configuration section of the following form
(using the new .NET 2.0 classes, not the old
IConfigurationSectionHandler interface):
<mySection>
<Setting1>Value1</Setting1>
<Setting2>Value2</Setting2>
</mySection>
But all examples I have found only describe this form:
<mySection>
<Setting1 Value="Value1" />
<Setting2 Value="Value2" />
</mySection>
I have this second form working, but I would like to know if the first
form is even possible, and if yes, how to do it. I'm using the
attributed model, so a small example with the attributed approach would
be appreciated.
Thanks!
cu, banzai
|
|
|
|
|
Hi,
I am student of MS.I have got a project of Mobile Agent in course of distributed system. I have not worked on such kind of thing. I want to implement it in .NET. So plz help me . Tell me some articles /guidelines so i can implement it.I will be very thankful
nabeel
|
|
|
|
|
i downloaded an example of property grid custom properties.
this is the example link:
http://www.codeproject.com/cs/miscctrl/Menu_in_PropertyGrid.asp
when i clicked on "sturct" property i get a button on the right side of the property.
i dont want this button to be shown.
how do i do it?
waiting for your answer.....
thanks and have agood day
|
|
|
|
|
There is a board at the bottom of the article. If you place your question there than the author will be automatically notified. He probably knows best how to help you.
|
|
|
|