|
If you create it using a FileStream then you can specify whether you get exclusive rights to it in the constructor. As long as you don't close the handle then other processes can't modify it.
|
|
|
|
|
Thanks Ed.Poore,
I have found it out. I think I need to FileStream.Close(), or else other thread/process can not use it?
regards,
George
|
|
|
|
|
|
Thanks Vasudevan,
I have found it out. I think I need to FileStream.Close(), or else other thread/process can not use it?
regards,
George
|
|
|
|
|
George_George wrote: I think I need to FileStream.Close(), or else other thread/process can not use it?
As long as the process holds sway on the file, other processes would be denied any access to it.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
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
|
|
|
|