|
Thanks Vasudevan,
If a process holds a file handle in exclusive mode, and the process terminates without close the handle. Will kernel release the handle automatically, so that other process can access?
regards,
George
|
|
|
|
|
hellow frinds...
How to add a dateTime picker in a Datagrid cell.It wil e helpful if you are explaining with code
|
|
|
|
|
|
Hi!
Can any one help me, how to work with omni scanners. Do u have any sample code in C# for reading data from omniscanner with carriage return functionality...
Rashmi.M.K
|
|
|
|
|
|
Hi,
We have a web service in .NET framework version 2.0 (C#). We need to create a function
in that web service with name ilke, say, 'ABC'.
We want this function to be displayed as "A B C" - in other words, its display name
should contain spaces.
In .NET framework 1.1, we are able to do this, by using the message_name attribute of
the web method. We gave the function name, with spaces, in the message_name attribute
and it displayed alright. When we give it in message_name attribute of web method in
version 2.0, it is displaying the function name itself.
Is there a way where we can display a function name in a web service WITH spaces, in
.NET framework version 2.0.
Thansk in advance
RS
|
|
|
|
|
string spaceName = string.Join(" ", (function.Name.Split(new char{''}))); maybe??
I make no promise that the code above follow "good" code design, furthmore that the code above even works; due to me just spitting it out. If you do want to use something like this it would be better to used a StringBuilder
|
|
|
|
|
Hi,
We are using a .Net application developed in VS Net 2005 to read the images from an Excel file, which refer office 2003 dll. But our application reads only the first 200 images from the
excel file. if we are refering office 2007 in our application means it reads all the images from the Excel file. Actually what is the problem here.
Can anybody help me.
Thanks in advance
Bejoy
|
|
|
|
|
Hi,
I create application in VS 2003 to connect to SAP, but I have the error like this ERROR : Missing R3NAME=... or ASHOST=... in connect_param in RfcOpenEx. THe user name and password is successfull to login SAP if I login through SAP.
Here is my code :
Me.SapLogon.Username = Me.txtName.Text
Me.SapLogon.Password = Me.txtPassword.Text
Me.SapLogon.Client = ConfigurationSettings.AppSettings("SAPClient")
Me.SapLogon.DestinationName = ConfigurationSettings.AppSettings("SAPDestName")
Dim myproxy As New PCNNPdll.Login
Dim myReturn As New PCNNPdll.BAPIRETURN
Dim myinfo As New PCNNPdll.ZHR_PCNNP_LOGIN
myproxy.Connection = New SAP.Connector.SAPConnection(Me.SapLogon)
myproxy.Zhr_Pcnnp_Login("", myinfo, myReturn)
myproxy.Connection.Close()
Thx
|
|
|
|
|
THis looks like VB code. Guess you in the wrong forum.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
i m facing problems while connecting my c# project with a database.
when i use MS Access database, then after succeeding the test connection... when i click OK button ...then a message comes that "THE SYSTEM CANNOT FIND THE FILE SPECIFIED."
I have other option to use MYSQL database.. but i don't know how to connect it?
please, help me out...
csetopper_bhanu
|
|
|
|
|
hi csetopper_bhanu
I don't think connecting a database is a difficult thing .. Maybe you should read the document refer to the ado.net.. and you will get the answer..
Dreams about all the sweet things.
|
|
|
|
|
|
Hi, I have Visual Studio 2005 and I have to use .NET 1.1. Can I set the studio to use .NET 1.1?
|
|
|
|
|
As I know, this is possible in VS 2008, but not in VS 2005.
However there is a configuration setting that tells the application to run under the specific version of the framework.
It goes like this in the app setting file:
supportedruntime version="v1.1.4322"
More info here[^]
|
|
|
|
|
Zoltan Balazs wrote: As I know, this is possible in VS 2008, but not in VS 2005
VS2008 has support for .net 2.0, 3.0 and 3.5. Not 1.0/1.1.
Simon
|
|
|
|
|
I've seen some *hacks*... errr "plugins" to make VS2k5 have a .NET select box to pick from the different .NET versions 1.0/1.1, 2.0, 3.0, and 3.5
As to how they work, I don't know never used them, as I like .NET 2.0 1000x better than 1.1, and 3.5 2x better than 2.0
|
|
|
|
|
|
Thank for all answers. Is it possible if I install both VS2005 and VS2003 together in the same machine. Currently I already installed VS2005.
|
|
|
|
|
Hello all,
I have a userControl that has a TeeChart embbeded. In this control, I have a method that reads data from a data source and fills up a teechart serie using serie.Add.
Everything seems to work fine, but, sometimes, I get a System.OverflowException, and my control becomes a white box with a red X in it.
I understand that the overflow exception can happen when casting numbers from double to int, for example, or dividing by zero. But I have already made sure that this is not happening in my code.
I have also used the 'unchecked' statement to prevent this exception to be shown, whith no success. And my compiler option is set to not check for overflows.
The error message shown is:
"An unhandled exception of type 'System.OverflowException' occurred in System.Windows.Forms.dll
Additional information: Overflow error."
Nothing more.
It does not say aritmethic overflow like a have seen with overflow error in number operations.
And what really bothers me is that the try catch block doesn't get the error. When I try to debug it, the cursor stops right after the Application.Run line at the Main method.
I have seen userControls ending with a red X before. This usually happens when we make another thread update the control. But I'm not doing this here. At least I don't think I am. I think this could be the case if the serie.Add method updates the teeChart from another thread. And if so, how can I get ride of this problem?? How can I even know if the teeChart is using another thread to update itself??
Anyone has any idea of what I can do to prevent this problem??
Thanks
Peterson
|
|
|
|
|
I suspect you have an endless loop. You would get a different error for divide by zero.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks, but that no way the code can enter an endless loop.
Peterson
|
|
|
|
|
Oh, you're right that's a stackoverflow. Well, I guess you need to check your data. And look at the control, it should handle it better IMO.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
My program request data over the internet, I need to request this data back to back using the same array and changing the data within it (basically the handle). When I get the data coming from the internet I have already removed the handle from my array and cleared the info from the program through which I requested it. I found the following code (see below) in the help files for delaying the request until I receive the first request. But this does not work either, was this designed for use over the internet or just on the local computer. How can I have my request delayed until I have received all data.
Thanks in advance,
Michael
// Timer
The Elapsed event is raised on a ThreadPool thread, so the event-handling
method might run on one thread at the same time that a call to the Stop
method runs on another thread. This might result in the Elapsed event being
raised after the Stop method is called. The code example for this topic shows
one way to prevent the race condition.
Example
The following code example shows one way to prevent the thread that calls the
Stop method from continuing until a currently executing Elapsed event ends,
and also to prevent two Elapsed events from executing the event handler at the
same time (often referred to as reentrancy).
The example executes 100 test runs. Each time the test is run, the timer is
started with an interval of 150 milliseconds. The event handler uses the
Thread.Sleep method to simulate a task that randomly varies in length from 50
to 200 milliseconds. The test method also starts a control thread that waits
for a second and then stops the timer. If an event is being handled when the
control thread stops the timer, the control thread must wait until the event
is finished before proceeding.
The Interlocked.CompareExchange(Int32,Int32,Int32) method overload is used to
avoid reentrancy and to prevent the control thread from continuing until an
executing event ends. The event handler uses the CompareExchange(Int32,Int32,
Int32) method to set a control variable to 1, but only if the value is
currently zero. This is an atomic operation. If the return value is zero, the
control variable has been set to 1 and the event handler proceeds. If the
return value is non-zero, the event is simply discarded to avoid reentrancy.
(If it were necessary to execute every event, the Monitor class would be a
better way to synchronize the events.) When the event handler ends, it sets
the control variable back to zero. The example records the total number of
events that executed, that were discarded because of reentrancy, and that
occurred after the Stop method was called.
The control thread uses the CompareExchange(Int32,Int32,Int32) method to set
the control variable to -1 (minus one), but only if the value is currently
zero. If the atomic operation returns non-zero, an event is currently
executing. The control thread waits and tries again. The example records the
number of times the control thread had to wait for an event to finish.
[MTAThread]
public static void Main()
{
Timer1.Elapsed += new ElapsedEventHandler(Timer1_ElapsedEventHandler);
Timer1.Interval = timerInterval;
Console.WriteLine();
for(int i = 1; i <= testRuns; i++)
{
TestRun();
Console.Write("\rTest {0}/{1} ", i, testRuns);
}
Console.WriteLine("{0} test runs completed.", testRuns);
Console.WriteLine("{0} events were raised.", numEvents);
Console.WriteLine("{0} events executed.", numExecuted);
Console.WriteLine("{0} events were skipped for concurrency.", numSkipped);
Console.WriteLine("{0} events were skipped because they were late.", numLate);
Console.WriteLine("Control thread waited {0} times for an event to complete.", numWaits);
}
public static void TestRun()
{
// Set syncPoint to zero before starting the test
// run.
syncPoint = 0;
Timer1.Enabled = true;
// Start the control thread that shuts off the timer.
Thread t = new Thread(ControlThreadProc);
t.Start();
// Wait until the control thread is done before proceeding.
// This keeps the test runs from overlapping.
t.Join();
}
|
|
|
|
|
Hi everybody,
I have a simple application with a couple of dlls and an OCX.
I have created a standard installer, which works fine under administrator priviledges.
Problem is, when running under a "limited user account" (windows xp), i get a System.Security.SecurityException.
Do not understand why and all i get is a standard windows error reporting screen. it is not possible to install Visual studio on the machine i am testing on.
any ideas?
i have tried setting the register property of each of the Dlls to "COM", the OCX defaults to "COMSelfReg".
your thoughts and comments and much appreciated,
many thanks
Jonathan Harker
|
|
|
|