|
If the application terminates unexpectedly the connection will be closed and any transaction will be rolled back.
|
|
|
|
|
Hi,
On my machine i installed two languages.
I wrote some application that using keyboard hook ( low level keyboard hook ).
In the run time i want to know witch of those languages is active.
How can i do it ?
Thanks for any help.
|
|
|
|
|
Why not just look up the Threads Current Culture?
|
|
|
|
|
OK,
I dont know how to do it -
can you please explain ?
|
|
|
|
|
So you wanna be spoonfed
System.Threading.Thread.CurrentThread.CurrentCulture
|
|
|
|
|
Hi,
I'm currently working on a C# app using MS Access as the database. In the database, it contains a SELECT stored procedure where one of its columns is something like Sum(IIf(WorkingDays(startDate, endDate)<=3,1,0)) AS Within3BusinessDays .
The WorkingDays(...) function basically counts the number of business days from the startDate to the endDate. Business days are weekdays (excluding Saturday and Sunday) AND non-holidays (holidays are listed in a separate Holiday table).
Now, my problem is... when I call this stored procedure in C#, it is getting an OleDbException with message "Undefined function 'WorkingDays' in expression." How can I fix this problem? I thought about removing the macro and just create a stored procedure that returns the # of working days instead but I don't know if that is possible since MS Access does NOT seem to use Transact-SQL.
Thank you in advance.
Rafferty
Rafferty
|
|
|
|
|
IIRC prefix the function with the qualifier, eg "dbo."
|
|
|
|
|
leppie wrote: IIRC prefix the function with the qualifier, eg "dbo."
Sorry I did not get what you meant by that. Going back to the stored procedure, are you suggesting that I simply change the Sum(IIf(WorkingDays(... to Sum(IIf(dbo.WorkingDays(...? I tried it but it didn't work. I'm now also getting an error even when I run the stored procedure in MS Access.
Please clarify.
Thanks again.
Rafferty
|
|
|
|
|
Sorry I cant help then
|
|
|
|
|
haha! okay, thanks for trying.
Rafferty
|
|
|
|
|
Hello everyone,
I want to monitor whether the handles of my C# application is released timely. The handles I mean various native handles wrapped by various Stream classes, like XMLReader/XMLWriter, Request.InputStream of Http request, etc.
(I do not use any native handles directly, and I only use C# wrap class like StreamReader.)
Currently, I am using Process Explorer --> Select the specific process for my C# application --> Select Properties --> Select Performance Tab --> Watch for "Handles" (including Handles, GDI Handles and USER Handles).
My questions are,
1. Is it the correct method to serve my purpose?
2. Any better tools or methods to use?
thanks in advance,
George
|
|
|
|
|
You could also use Perfmon (perfmon.msc) to track the number of handles open in the process. Perfmon can also log the information, which will be useful if you run the application for an extended period of time.
|
|
|
|
|
Thanks Senthil,
Do you mean the Handle Count for process counter? Or anything better?
regards,
George
|
|
|
|
|
George_George wrote: Do you mean the Handle Count for process counter?
Yes, I meant that.
That apart, if the objects wrapping the handles implement finalizers, and you don't accumulate references to such objects, the handle count should remain relatively constant.
|
|
|
|
|
Thanks Senthil!
1.
"That apart, if the objects wrapping the handles implement finalizers, and you don't accumulate references to such objects, the handle count should remain relatively constant." -- means if Finalizer is not called, the handle to be released in Finalizer is still counter as part of the Handle Count counter, but when Finalizer is called, the handle will not be counter as part of the Handle Count counter?
2.
If I call Close immediately after using the handle or using "using" block, then handle could be closed immediately, and and Handle Count is reduced immediately?
regards,
George
|
|
|
|
|
George_George wrote: means if Finalizer is not called, the handle to be released in Finalizer is still counter as part of the Handle Count counter, but when Finalizer is called, the handle will not be counter as part of the Handle Count counter?
There is no magic there. The finalizer, if implemented properly, will close any handles held by that object and therefore the counter will go down.
George_George wrote: If I call Close immediately after using the handle or using "using" block, then handle could be closed immediately, and and Handle Count is reduced immediately?
Yes, as long as the object correctly implements the IDisposable pattern.
|
|
|
|
|
Thanks Senthil!
Question answered.
regards,
George
|
|
|
|
|
Here is the code what is the probelm any one can help me plzzzzz
protected override void OnClosed(EventArgs e)
{
if (this.appWorkspace.ActiveDocumentWorkspace != null)
{
appWorkspace.ActiveDocumentWorkspace.SetTool(null);
}
base.OnClosed(e);
//n send image to frmedit in cc13
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
// s.mSetPicture(PictureBox, "true");
//s.VarEditImg
//s.VarEditSig
s.PicImage.Image = null;
s.PicImage.Image = Image.FromFile(@"C:\Temp\Temp1.jpg");
s.PicImage.Refresh();
s.picSig.Image = null;
s.picSig.Image = Image.FromFile(@"C:\Temp\Temp2.jpg");
s.picSig.Refresh();
//s.Con
s.Showimg();
CCI3.Myimg g = new CCI3.Myimg();
g.Showimg2();
//CCI3.Forms.frmEdit ss = new CCI3.Forms.frmEdit();
//ss.setEditPictures(@"C:\Temp\Temp1.jpg", @"C:\Temp\Temp2.jpg");
}
|
|
|
|
|
nomi wrote: Here is the code what is the probelm any one can help me plzzzzz
nomi wrote: CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit();
You are creating form and not adding it anywhere to you application, so it will fail.
|
|
|
|
|
You have just given a bunch of code which one else is aware of. If you need a proper solution you have to explain your problem correctly.
Ok, Here is the clue. In the following line of code you are creating a new object which will be disposed once the scope is over.
CCI3.Forms.frmEdit s = new CCI3.Forms.frmEdit(); Instead refer to the existing instance of your form.
Note: If you are using CAB, you can take the help of event broker.
|
|
|
|
|
hello nomi
mujay apkay maslay ka pata chel gya hay
f.show();
ki jaga
f.showDialog(); use kero subkhuch tik ho ji ga.
Begham ho jao Nomi
if this answere is helpfull then donot forget to mark [Smile]
wasim khan
|
|
|
|
|
I have already explained why it doesn't work, and I am not the only one who has done that.
Don't repost the same question. That way it seem like you are simply ignoring the people who tries to help you. In the long run you will just end up being ignored by everyone.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi i have cascading dropdown,
In that i have bind some datas from my database,
Now based on the selection my grid want to bind with out postback event,
Anypossiblity is there to do?,
Plz hlp me,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: Anypossiblity is there to do?,
Yes, in the ASP.NET forum.
|
|
|
|
|
use ajax
wasim khan
|
|
|
|