|
Nope, not that, look for an exception caused by the service. Or even better, attach a debugger and see what happens.
|
|
|
|
|
Hi,
There is no exception.
|
|
|
|
|
arkiboys wrote: "Service on local computer started amd then stopped. Some services stop automatically if they have no work to do, for eaxample, the performance logs and alerts service."
This mean that the service has done what it was programmed to do and exited.
My guess is that there are some user property that prevents this user from doing the actual work inside the service:
-Searching for a file in the wrong directory
-Doesn't have the right settings
-Hasn't mapped the correct network drive
etc
Kjetil
|
|
|
|
|
It could also mean that the service stopped prematurely (crashed, or something else).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Services aren't role-based. They're account based. You have to install it for the account you want to use it under, and then log on with that account.
Go into the service manager, and change the user account to the desired one.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi,
Is there a possibility to do something like
if (File.Exists("*.txt"))
{...}
Thanks
|
|
|
|
|
|
Then share it with the world - the forum doesn't exist just for you!
|
|
|
|
|
you are right...
DirectoryInfo dir = new DirectoryInfo (Directory.getCurrentDirectory());
foreach (FileInfo f in dir.GetFiles("*.txt"))
{
....
}
|
|
|
|
|
|
Thanks, it's what i used.
|
|
|
|
|
Hi,
I have another 2 questions:
1. Programming datagrid related.
I have a datagridview that displays a dataset. If I change row 1 the validation is executed. And as long as I am parked on that row the data is as I changed. But as soon as I moved to the next row the changes i have done is unchecked for that row.
I need to be able to edit multiple lines before I save the data. Do anyone know what I am doing wrong.
2. Other
Does anyone know where I can subscribe to C#/VB.Net challenges? One of my friends subscribed to a MS SQL Server site... every day they send him a problem someone struggled with (this is not beginner problems) and the following day they send the solution. This is all done to develop that ultimate experience.
Thanks in advance for your help.
Chris
|
|
|
|
|
advice: use 1 post per question, you will get more ansers.
about 1) you saw you want to edit rows, do it in sql procedures and trigger in c#.
about 2) don´t know that but when launch visual studio they ask you about some kind of experiences to participate, but look in MS site!!!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Hello
I'm trying to extend a standard Windows Forms ComboBox, by adding a new property ImageMember which should display an image from database. It is supposed to be the databound property just like DisplayMember and ValueMember are.
At run-time everything works correctly. My question is how to allow one to choose a field from dataset for this property at design-time, just like you do for DisplayMember property.
The short question is: How can I make ImageMember property editor behave as DisplayMember's at design-time?
I've looked through internet and the closest solution seems to be the following:
public class ImageMemberEditor: UITypeEditor
{
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
if (context != null)
return UITypeEditorEditStyle.DropDown;
return base.GetEditStyle(context);
}
public override object EditValue(ITypeDescriptorContext context,IServiceProvider provider,object value)
{
if ((provider != null) && (context.Instance != null))
{
PropertyDescriptor descriptor = TypeDescriptor.GetProperties(context.Instance)["DataSource"];
if (descriptor == null)
{
return value;
}
object dataSource = descriptor.GetValue(context.Instance);
if (this.DesignBindingPicker == null)
{
this.designBindingPicker = new DesignBindingPicker();
}
DesignBinding initialSelectedItem = new DesignBinding(dataSource, (string)value);
DesignBinding binding2 = this.designBindingPicker.Pick(context, provider, false, true, true, dataSource, string.Empty, initialSelectedItem);
if ((dataSource != null) && (binding2 != null))
{
value = binding2.DataMember;
}
value = lb.SelectedItem.ToString();
}
return value;
}
}
However, Visual Studio can not resolve designBindingPicker and DesignBinding :
"Error 5 The type or namespace name 'DesignBinding' could not be found (are you missing a using directive or an assembly reference?)"
Any help will be greately appreciated.
Thanks in advance
|
|
|
|
|
Don't cargo cult program.
Presumably the thing where you lifted your code had a "DesignBinding" that has nada to do with your control. You're simply providing a type editor, so you need to implement a method that can edit your value. How you implmement it is up to you, but you don't need to keep any of the code in the one you lifted. Just write your own code.
|
|
|
|
|
dojohansen, thanks for reply.
Looks like these classes are private to .NET framework itself and therefore can not be accessed from user code.
Anyway, all I need is an advice of how to retrieve the DataSet fields at design-time from property editor.
I'd appreciate any help on this
|
|
|
|
|
Does anyone know if its possible to select table column names in c#.
I want something like
while dtr.read()
{
combo.items.add("dtr column name");
}
|
|
|
|
|
Your question is rather incomplete.
From your code it seems you'd like to get the column names of a result set from an open data reader. Whether or not you can do that depends on the reader implementation (there's nothing in the IDataReader interface for it). Check the documentation.
In any case, why would you WANT to get it from the reader!? You should presumably know what data you're getting!?
Depending on the database you might be able to use the INFORMATION_SCHEMA built-in views:
SELECT * FROM [INFORMATION_SCHEMA].[COLUMNS] WHERE [TABLE_NAME] = 'MY_TABLE';
Or you might use a data adapter instead of the reader directly (though it uses a reader internally, so it apparently has a way of getting schema information from the reader!).
Or you might rephrase your question...
|
|
|
|
|
Hi experts,
I would ask you how I can manage the properties of my sound device by C#.
At the moment I am using winmm.dll and I am able to set the volume but I also want to check if the sound is enable or not.
Thanks,
Antonio
|
|
|
|
|
Hi all.
I am currently facing a problem using HttpWeb Request ,
I iam able to download the attachments ,but the text message i am getting is in the format http://host/share/1_.000
but how to read the text message when it comes in this format ,
The attachments are of the format http://host/share/file.doc,I am able to get the stream and construct the file .
but if i dont have any attachment and have only the text message how can i read such messages.
any help in this regaurd will be appreciated
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
I have a question.
I have created a console application. It reads OPC Variable in loop.
If I started the application, it takes about 18000K of memory. If I
click at minimize button, it reduce the memory usage to 3000K.
But if I call "GC.Collect()", the memory usage will not be reduced
to 3000K. It happens only during minimizing.
If I maximize the window again, the memory usage still at 3000K-5000K.
Are there any code to reduce the memory usage without minimizing ?
Because it not happens, if I call only "GC.Collect()".
Thanks...
|
|
|
|
|
As far as i know, when you do something like GC.Collect(); your not telling the garbage collector to collect the object, your merely flagging that object for garbage collection. So when the garbage collector comes along(at a later point in time) it will collect the object you flagged.
If you post your code(specifically the loop) we might be able to get the memory usage down a bit...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
You're not flagging anything with GC.Collect. You're just telling the GC you'd LIKE a garbage collection to occur at this time. But, it's up to the GC if it wants to do it or not. When a collection runs, your app stops while the GC walks the heap looking for objects that need to be collected.
|
|
|
|
|
I believe it's not actual memory usage that you're seeing in Task Manager - just memory that Windows has pre-allocated to your app. Any memory allocated but unused will be reclaimed if needed elsewhere or when minimized which is why you're seeing those figures.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|