|
An 'Answer' was already marked out there. You can try figuring out any open handles on the files. But you may need to delve into P/Invoke for this.
|
|
|
|
|
I think u didn't read all the messages...
Thanks
|
|
|
|
|
You can prevent other users from accessing the file by specifying exclusive access when you open/create the file. Check the FileAccess versions of FileStream's constructor documentation for more info:
new FileStream(filePathName, FileMode.Open, FileAccess.Read, FileShare.None);
caveats:
- if you can't open the file with FileShare.None then a System.IOException will be thrown.
- ALWAYS code FileStream with the keyword "using" so that resources are freed if an exception is thrown.
Source Courtesy: http://www.dotnet247.com/247reference/msgs/55/279414.aspx[^]
|
|
|
|
|
I have a seperate project in my application with a great deal of code in that can take upto a minute to perform when performing a save on the main UI. The saving of this information is not required for the UI to continue working.
I have been investigating the BackgroundWorker class, I was hoping somebody would know of good code examples which would allow me to change the application so that when the main UI calls any methods on the seperate project these methods are all run on a seperate thread so that the main
UI does not wait for them to complete which results in a moderate amount of the hanging.
It seems I would have to use the BackgroundWorker on the method calls in the Main UI whereas I would like to simply have anything on this seperate project always run on a seperate thread.
I hope I have made sense as it is rather early.
Thank you for any help and sugestions you may have.
|
|
|
|
|
|
Hey everyone,
I might be doing it the wrong way, but I had to filter a dataset and view it in a datagrid to match a value in an outer control "treeview node in this case", anyhow, after filtering that, I had to fill the entire column which's supposed to be the foriegn key column with value of that outer control value "primary key", is there an easier/other way to do it?? other wise how do you manage to fill a datagrid control entire available column with copies of my primary key value??
Please help.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
ok i did it...
int iRowCount = MyDataset.Tables[TableName].Rows.Count;
if (iRowCount > 0)
{
for (int x = 0; x < iRowCount; x++)
MyDatagrid[x, MyTree.SelectedNode.Level] = MyValue;
}
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I develop using VC before,and changed to C# now.
In VC,there is an active control named CMSChart,which can be used to draw bar,line and pie chart arbitarily.
Anybody would like to tell me is there have such a component to do the same job in C#?
Thanks.
GOOD LUCK
|
|
|
|
|
|
|
Which is this language?
Sonia Gupta
Soniagupta1@yahoo.co.in
Yahoo messengerId-soniagupta1
Love is Friendship and Friendship is Love....
|
|
|
|
|
Sonia Gupta wrote: Which is this language?
BrainFuck[^]
|
|
|
|
|
l;aksdj fl;k alksdj flkajs dfklja dsf?? alskdjf ;als df ;klas djflk;a dsjf..
asdj alkjsd lkajsd lkfj a?? alsdkf a;lskd fj lkajs dklfj asdlk;f??
dlaksdj:->
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
However, this looks for me like a definitive language instead of just scribble but my system missing fonts. Just like viewing Tamil blogs in FireFox with Indic IME disabled.
|
|
|
|
|
'Newbie Learning to Type' on a QWERTY keyboard.
|
|
|
|
|
Not necessarily. These keys have the same location on other keyboards, such as AZERTY.
Lets await his progress.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Luc Pattyn wrote: AZERTY
I just knew about one more type of keyboard layout and made a research on this from Wikipedia (http://en.wikipedia.org/wiki/AZERTY[^])
But wouldn't such diversified standards be daunting for frequent business travellers?
|
|
|
|
|
Hi,
there are a lot of different keyboard layouts, in Europe there is a specific one
for half of the countries. Belgium and France have AZERTY, Germany has QWERTZU, etc.
Major reason is the existence and usage of accented characters (needed all the time
in French, Spanish, etc); the Netherlands have a 27th letter; etc.
Frequent business travellers are advised to carry their own laptop!
Only one keyboard really suits programmers if you ask me, and that's QWERTY,
with unshifted digits (AZERTY has them shifted!), easily accessible square brackets, etc.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi friend's
yesterday i said a question about how to write a program by parallel programming method.
and i recieve many replies from my friend's.
but i am confusing still...
i read a bool that say me to work with multi-pascal for learning parallel programming. in this software that simulate the multi proccessor OS, allow you to change your code from sequential into parallel code.such as use forall instead of for command.
but this software just is a simulate software and do not work really on a multi proccessor OS.so i say my question again:
i have a loop in my program with for statement and this loop run for 1000,000 times. i want to create 10 process that each process perform 100,000 action.so please guide me to do it.
thank you very mutch
msma
|
|
|
|
|
|
I believe parallel programming libraries use multiple or multi-core chips. Currently, the .NET languages have multi-threading code which is not adequate for parallel programming. The Professional VS version of native C++ has a library called OpenMP to do parallel programming: http://msdn2.microsoft.com/en-us/library/tt15eb9t(VS.80).aspx[^].
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
I am creating a Log On page where I am trying to extract UserName and Password from a StoredProcedure. This code below is trying to return a boolean value.
But no matter what UserName and Password I enter I always get access to the FileManager.aspx file. It gives access to anybody who logson. Where should I change the code to make it work??
try
{
sqlconSource.Open();
if (sqlcmdSource.ExecuteScalar().ToString() == "0")
Response.Redirect("AccessDenied.aspx");
}
catch
{
}
finally
{
Response.Redirect("FileManager.aspx");
sqlconSource.Close();
}
}
|
|
|
|
|
Not sure what the query is in your stored procedure, but maybe this snippet from MSDN will shed some light for you...
SqlCommand.ExecuteScalar executes the query, and returns the first column of the first row in the result set returned by the query. Additional columns or rows are ignored.<br />
<br /> So, the only way you will be redirected to AccessDenied.aspx is if the first column in the first row of the results provided by your stored procedure evaluates to "0".
|
|
|
|
|
Hi everyone, i need a regular expression that can extract the name and content section from each class in a css file...
.Data1{color:#000000}
.Data2{ color:#111111
}
.Data3{
color:#222222
}
the regexp should extract :
.Data1 => color:#000000
.Data2 => color:#111111
.Data3 => color:#222222
Without the { or } chars
Ive tried but nothing seems to work....im only be able to parse .Data1{color:#000000} using this expression (\.(.+){(.+)})
Thanks in advance.
|
|
|
|