|
You're welcome. I read your other post[^] and you don't have to use the FullName of the Type, you can just pass the Type directly which is faster IMHO.
Eslam Afifi
|
|
|
|
|
Yes indeed! I have corrected my code to use the Activator.
Thanks again!
|
|
|
|
|
i am looking for a way to list all the share on a given computer and also list all groups on users who have access and what access they have
|
|
|
|
|
Here[^] you go. There is an article right here[^] at CP.
For the other part, I guess this[^] would help.
|
|
|
|
|
what i am really looking to do is check the total right a users has to a share do i have to find out all the groups they are in and get all the rights for each group and calulate it my self or is there and easier way?
|
|
|
|
|
Hi All,
I accedentailly deleted a Sql Table .Can you give me an Idea how to recover it?
Thanks
|
|
|
|
|
Wrong forum.
Restore the back up if you have taken it.
|
|
|
|
|
I am not good in Sql ? Can you please get me a little bit of hint?
|
|
|
|
|
All i have is a Database.dat file ? is it the one i have to pick up.
|
|
|
|
|
|
How can i restore a database from a *.dat file?
|
|
|
|
|
When you reply to yourself do you get an email saying you have sent yourself a message?
Life goes very fast. Tomorrow, today is already yesterday.
modified on Friday, September 25, 2009 5:14 AM
|
|
|
|
|
Only if you checked the "Send me an e-mail if someone replies to this message" checkbox. You should know that by now.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Huh, I don't think I have ever looked at those option before
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
If a reply falls in a forest do we, existentially, care?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
kibromg wrote: Can you please get me a little bit of hint?
WRONG FORUM this is C# not SQL
How's that for small hint?
only two letters away from being an asset
|
|
|
|
|
In this windows service, I have a log configured to record the Windows Service Start and Stop state and the process triggered by a timer. The process is sending an email notification once a day.
Currently, the Windows Service Start and Stop state is recoding successfully in the log. The email notification process triggered by the timer however is not doing anything. Any help is much appreciated.
See my script below:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;
using System.IO;
using System.Timers;
namespace IRISEmailNotifier
{
public partial class IRISEmailNotifier : ServiceBase
{
public IRISEmailNotifier()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
try
{
LogEntry le = new LogEntry("Start - " + DateTime.Now.ToString() + "\n");
this.timer1.Interval = 10000;
this.timer1.Enabled = true;
this.timer1.Tick += new EventHandler(timer1_Tick);
}
catch (Exception ex)
{
LogEntry le = new LogEntry(ex.ToString());
}
}
void timer1_Tick(object sender, EventArgs e)
{
try
{
LogEntry le = new LogEntry("Send Email - " + DateTime.Now.ToString() + "\n");
}
catch (Exception ex)
{
LogEntry le = new LogEntry(ex.ToString());
}
}
protected override void OnStop()
{
try
{
LogEntry le = new LogEntry("Stop - " + DateTime.Now.ToString() + "\n");
this.timer1.Enabled = false;
}
catch (Exception ex)
{
LogEntry le = new LogEntry(ex.ToString());
}
}
private void SendEmailNotification()
{
try
{
LogEntry le = new LogEntry("Send Email - " + DateTime.Now.ToString() + "\n");
}
catch (Exception ex)
{
LogEntry le = new LogEntry(ex.ToString());
}
}
}
}
Thanks, Steve C.
Steve C.
kstv@netzero.net
|
|
|
|
|
Are you using a Windows Form timer? IIRC, System.Timers.Timer has an elapsed event, not a tick event but I could be wrong.
|
|
|
|
|
I am. I picked it from the toolbox and dropped in the design page. Am I using the wrong timer? If so, please advice.
Steve C.
kstv@netzero.net
|
|
|
|
|
Well, I'm guessing your windows service doesn't have a form so I'm not sure Windows.Forms.Timer would work, if I were you I'd try using System.Timers.Timer, it might not solve your problem but you never know...
|
|
|
|
|
Thank you for the help. The timer is now working.
Steve C.
kstv@netzero.net
|
|
|
|
|
astv wrote: Am I using the wrong timer?
yes you are. A Forms Timer is great for WinForm apps as it ticks on the GUI thread.
Without a Form, do you have a message pump at all?
Try using a Threading.Timer or a Timers.Timer (not sure which would work/work best for you; they invented that great "documentation" thingy for such purposes).
and make sure your Elapsed handler does call the email code.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Thank you for the help. The timer is working and I am inserting the send email process.
Steve C.
kstv@netzero.net
|
|
|
|
|
Try using the timer from the System.Timers namespace.
private System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 60000;
timer.Elapsed += new ElapsedEventHandler(onTimer_Elapsed);
timer.Start();
private void onTimer_Elapsed(object sender, ElapsedEventArgs e)
{
}
|
|
|
|
|
Thank you for the help. The timer object instantiation was very helpful. I'll remember not to use the form timer next time.
Steve C.
kstv@netzero.net
|
|
|
|