|
I do not want to filter these records but show them and to not show 0 but ' ' (blank space)
|
|
|
|
|
hi all,
I need monitor the MS SQL Server (both 2000 and 2005) database changes.
like Sql Profiler.
how to do it?
Thanks in advance.
|
|
|
|
|
I don't believe there's any way to get notifications of tables changing.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for your reply.(f)
If there was the way to monitor the text file.
I have an idea that,
1, create trigger with the table
2, write the operations to a text files.
3, monitor text files changes to get the special table changes.
Any assistance would be really appreciated.
|
|
|
|
|
Yeah, that would work
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for your reply.
(f)
|
|
|
|
|
It's a bit grim, but if you're on Sql Server 2005, you can write managed stored procedures in C#, so you could use some mechanism like Remoting to send an update from your managed proc to the listening process. You'd then need to link your managed proc into the trigger.
As far as monitoring file changes, the following code snippet may give you some pointers:
using System.IO;
_watcher = new FileSystemWatcher();
_watcher.Path = folder;
_watcher.IncludeSubdirectories = true;
_watcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.DirectoryName | NotifyFilters.FileName;
_watcher.Changed += new FileSystemEventHandler(OnChanged);
_watcher.Created += new FileSystemEventHandler(OnChanged);
_watcher.Deleted += new FileSystemEventHandler(OnChanged);
_watcher.Renamed += new RenamedEventHandler(OnRenamed);
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for your reply.
Rob Philpott wrote: Sql Server 2005
we use MS Sql Server both 2000 and 2005
Rob Philpott wrote: managed stored procedures in C#, so you could use some mechanism like Remoting to send an update from your managed proc to the listening process. You'd then need to link your managed proc into the trigger.
I didn't know about 'Managed stored procedures', can you give me more information about this?
|
|
|
|
|
Hi,
I worked out a decimal value and return the value like this:
return objWine.CurrencySymbol + (decUnitPrice * intQty);
But the it will display something like:
$100.0000
How do I format this number to display $100.00, and will this function round the decimal numbers?
I hope someone can help.
Regards
ma se
|
|
|
|
|
|
|
try
<br />
decimal d = 100.0000m;<br />
string s = string.Format("{0:000.00}", d);<br />
Console.WriteLine(s);<br />
the result :
<br />
100.00<br />
|
|
|
|
|
This doesn't display right:
String strUnitPrice = String.Format("{0:#,##0.00}", "100.3456");
I want it to round it off to 100.35 (rounded), but it just displays 100.3456.
What am I doing wrong??
|
|
|
|
|
It should be:
<br />
String strUnitPrice = String.Format("{0:#,##0.00}", 100.3456);<br />
no quote, it must be a number.
And I would suggest you read the reply above mine.
There are more information about String.Format.
or search in on MSDN.
hoping this help.
|
|
|
|
|
Yeah I did just that and worked, but thanks any how!!
Cheers
|
|
|
|
|
Hi,
Get the value in a string and use System.Math.Round(x,2).Tostring();
Thanks,
Mirunalini
|
|
|
|
|
Dear All,
I am doing a project which needs to load different "child" Forms in a specific area in the Main Frame Form.
I tried to create a "child" Form instance inside the Main Form, and every time when Main Form move, it will update the "child" Form's location. But by using this method, the Form keeps flickering even "double buffering" is already enabled.
I am thinking that if it is possible to create a ControlContainer that can load the Forms accordingly, but I am new to C# and not sure what should do.
Anyone knows can please point out which area I should read or any place has the existing sample can refer?
Thanks a lot!
Best Regards,
Jacky Ha
|
|
|
|
|
I suppose your's is the fit case of MDI application. Set ISMDIContainer property of the Main form to true and load child forms as MDI Child
|
|
|
|
|
Hi, KrunalC,
Thanks for your reply!
Yes, this method can work if the Main Form and Child Form are standard ones.
In my case, the Main Form is a shaped Form (using Background Image and Transparent Color), so if set IsMdiContainer, the previously transparent Form Edge will have an edge now.
Another issue is that I only need a specific area in the Main Form to be able to load different "child" Forms. If set IsMdiContainer, it will apply to the whole Main Form. Is there any method to set its size and starting position?
Thanks again!
Best Rgds,
Jacky Ha
|
|
|
|
|
Do your child forms really need to be forms? Probably UserControl s or maybe even simple Panel s will be more suitable.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi, Stefan,
You are right! I will try Panel first and then UserControl if Panel can't.
Thanks a lot!
Best Rgds,
Jacky Ha
|
|
|
|
|
Well!, i think if u made the main form MdiContainer and then make the other child forms childs for the main form u can get wat u need
here is wat u have to do
First for the main form "parent form" make the property
mainForm.IsMdiContainer = true;
and b4 u show the child forms u have to put this lines of code
childForm NewMdiChild = new childForm();
// Set the Parent Form of the Child window.
NewMdiChild.MdiParent = this;
// Display the new form.
NewMdiChild.Show();
i hope it helps
good luck
Keep Prayin
|
|
|
|
|
lo,
i want to change a cell constantly for example
for (int i = 0; i < 100; i++)
{
// the shown value of a certain cell, say column 1 row 3, is i
sleep 100; not sure about this either
}
so in the datagrid in column 1 row 3 i see a nr counting up to 100
and i dont want my datagrid to shake
anybody tips?
thx
|
|
|
|
|
Hi All,
I should write a help for my application in C#.NET at the command prompt.
And the format at command prompt should be
sample.exe /? or sample.exe/?
Plz provide me the code to write this and i should show some help abt what that appliaction do when i press sample.exe/? at command prompt..
Plz HELP!!
|
|
|
|
|
Change your main method so it looks similar to the following code snippet:
static void Main(string[] args)
{
if (args.Length != 0)
{
for (int index = 0; index < args.Length; index++)
{
if (args[index] == "/?")
{
return;
}
}
}
else
{
}
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|