I usually only set database information in the config file, the rest goes in the database.
I define it as key/value pairs, but also include "category" and/or machine/module information to be able to filter the necessary.
In addition you could add a "user" filter for settings that a user can change.
I also add a description on what the key/value pair is for.
my two cents.
PS: web services/WCF remain a major drag in this...
i'm write an listen connection (connection to Sql server database) application(APP):
if connection is not available (connection cable is unpluged or broken), my APP will sleep, until the connection is available,my APP will wake up and execute SLQ commands. if connection is broken again, my APP continue going to sleep until connection is available...
please explain for me or give me some key word about that problem.
Note: i think i need to understand a listen mechanism that similar to mechanism of MessageQueue.Receive() method. but i still don't understand this mechanism
If I understood your question correctly, why not create a loop which would
- loop while connection is established or other wait end condition is met
- define proper ^]
- try to ^] the connection
- if not successful, sleep[^] for awhile
If you need, you can monitor the network status changes as in ^]
the first, thanks for your answer!
i think if we use while loop, the performance is not very high.
now i am reading Simple Network Status Monitor Example[^].
if you have any about this topic's document. please send to me!
thanks so much!
Hmm... apparently, what I'm seeing is "expected" behavior. Standard regex behavior is to only keep the last group. I think that's insane and apparently so did the .Net folks as they have the only regex engine which keeps all capture groups. Thanks!
The .Net regex engine is "special" as it's the only regex engine in the known universe that doesn't throw away intermediate captures. If you look at the Group object that captured the last occurrence of the group in question, there is a Captures property. They give you the intermediate captures in that collection.
(aB)* will match aBaB, but it will only give you 1 aB. If you look in the Captures property, it'll give you the 2 you are after.
((aB)*) will match aBaB, but it will still only give you 1 aB. It will also give you aBaB which is not what you really want.
from this job we can get the submitter, and machine, no. of pages and filename. But unable to get the printer for the job(Not Default printer in the machine), No. of copies, paper size and other settings. Need help for this issue.
my job is print monitoring i.e. application print manager developing in c#. I catch the print job from printer queue. From that job I can get the print submitter,job name,hosted server,job time, no. of fro print and file name and some other details. but unable to get the printer selected for the print and no of pages,printer paper source, duplex or non duplex and some other details. this my problem.
foreach (var job in LocalPrintServer.GetDefaultPrintQueue().GetPrintJobInfoCollection())
UpdateText("Job Name : " + job.JobName.ToString());
UpdateText("Submitter :" + job.Submitter.ToString() + job.TimeJobSubmitted.ToString());
UpdateText("Hosted Server :" + job.HostingPrintServer.Name.ToString());
UpdateText("No of Pages :" + job.NumberOfPages.ToString());
I Need help.
please suggest any other way to complete my task.
Thanks in advance.