|
Hi All,
I want to execute Log Parser query in my C# application.
Can any one guide me?
|
|
|
|
|
To answer with as much precision as you've asked: All you have to do is install it, configure it, and then use it.
Useful isn't it?
What's Log Parser?
|
|
|
|
|
How to export DataGridView to Excel without Microsoft.Office.Interop.Excel
|
|
|
|
|
|
And if I want a formatted report?
|
|
|
|
|
|
Thank you, but it is a hard way.
|
|
|
|
|
You can use oledb
using (OleDbConnection con = new OleDbConnection(string.Format("Data Source={0};" +
"Provider=Microsoft.Jet.OLEDB.4.0;" + "Extended Properties=Excel 8.0;", fileName)))
[edit](split over lines to make it easier to read)[\edit]
and you just create a sheet by using the create table command, insert just like a real database - but obviously you cannot format the sheet.
Bob
Ashfield Consultants Ltd
Proud to be a Code Project MVP
|
|
|
|
|
Dear friends,
i have some small clarification.
//-----------------------------
public struct a
{
private string s;
public string Val
{ set { s = value; }
get
{ return s;
}
}
//----------------------------
public class a
{
private string s;
public string Val
{
set
{ s = value; }
get
{ return s; }
}
}
/---------------------------
the functionality will be like these....... (Asume that there are more then one variable and properties .... but no methods and functions)
tell me the best way of writting?
and where both can be used?
By
joe
|
|
|
|
|
=>Joe<= wrote: tell me the best way of writting?
There is no "best", both options have their own characteristics.
=>Joe<= wrote: and where both can be used?
I suggest you learn the difference between those two, and then you'll probably have a good idea when to use one or the other.
I could simply say that you want a class if you need to inherit things, but it just isn't that simple. A struct may inherit from an Interface. There, rule of thumb number one broken.
Start reading here.
I are Troll
|
|
|
|
|
Dear friend ....
Thanks for reply ... given link is well explanatory...
i am going to use class ... because as i mentioned that i have many variables..
and both of these condition made me not to use structer
-- It has an instance size smaller than 16 bytes.
-- It is immutable.
Thank You
by
Joe
|
|
|
|
|
The big differenc is that the struct version is a value type, and the class version is a reference type. In addition, a struct is a "cut-down" struct - it cannot be used as a basis for a new struct or class (it cannot be inherited).
It is realy quite important to understand the difference between value and reference types as it makes a big difference when you start passing things to methods!
The difference is a bit complex, and otheres have explianed it better than I could here, so google "value type versus reference type" and you will get a pile of descriptions.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
|
hi guys...i have at least 10 textboxes in my form which allow ony to enter numeric values..but some of them will be codes like phone codes and the other textbox will be the rest of phone number like 342 2222222...to make it i wrote that codes to the txtKod_Keypress event the below codes
private void txtKod_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsNumber(e.KeyChar))
e.Handled = char.IsLetter(e.KeyChar);
if (txtKod.Text.Length == 3)
{
e.Handled = char.IsLetter(e.KeyChar);
e.Handled = char.IsNumber(e.KeyChar);
}
}
but it allows to enter letters after i entered 3 numbers actually allows everything...i dont know what is wrong there???
and another question do u suggest me to make a method like that and call it every time i need or to create my own numeric textbox by using Component Class ??
and i searched about masked textbox but there are underlines and not exactly the thing i wanted to see...so may i change its format ?
|
|
|
|
|
Why not just use MaskedTextBox?
The code you posted has a few quarks. Why do you set e.Handled equal to e.KeyChar being a letter if it isn't a digit? And then overwrite this value two times when the length of the textbox reaches 3?
To restrict the length to 3 the handler need only contain
e.Handled = (txtKod.Text.Length == 3);
However, doing a masked input properly is a bit more work. To get it right you need to handle pasting as well as typing, accept non-alphanumerical keys like backspace, left/right arrow key, and perhaps other things.
|
|
|
|
|
I re-read your post and see you're aware of the MaskedTextBox. But apparently not of it's PromptChar property. Set it to a space if you don't want to show the underline.
|
|
|
|
|
thanks man
i will use it as u said
|
|
|
|
|
.net framework has a maskedtextbox control.
More info can be found at:
http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.aspx
modified 27-May-14 4:58am.
|
|
|
|
|
I have a big canvas on which the image is drawn. I need to leave only the picture and cut off all unnecessary.
|
|
|
|
|
Why is your canvas so big? Why not use the size of the picture when you create the Image instance? If you don't, then the only option is to create a new insatnce the correct size and redraw the image into that, then dispose the original, big version. It would be a lot quicker (and more memory efficient) to get it right first time.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
You can create a new Bitmap and copy just the portion containing the picture to it. This is probably the simplest approach.
|
|
|
|
|
if you want crop any image, than i will suggest you to visit the link below
http://www.raiseitsolutions.com/forum/viewtopic.php?f=4&t=2
if you visit this link, you will know how to crop an image easily
thank you very much.
|
|
|
|
|
Hi,
The mapped drives of a server machine is not accessible, when i connect the server using WMI.
Please tell your suggestions, need anymore info?
My small attempt...
|
|
|
|
|
Uhhh....what? This doesn't make any sense at all.
Are you saying that you're trying to get which drives are mapped by the user logged into a particular server? In other words, are you trying to find out which shares are bein used by a user logged into a server?
|
|
|
|
|
I asked a question in the Hardware & Devices group, thought I'll throw it in here as well:
We are thinking of some Biometric integration into our app, and there seems to be some effort around standardization, does anyone have any first hand experience with an "open" API to biometrics? I would hate to have to code for each vendor etc...
(Our app will probably be a public app, so we won't know which device to target...)
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|