|
As a usual file (e.g. System.IO.File.ReadAllText(...) ) Doesn't it work?
|
|
|
|
|
my file resides in remote system. from that system only i want to read a file. can you please tell me how can i do that?
Regards
Lijo
|
|
|
|
|
This can be done in 3 ways:
1. Map the remote drive (this means, assing e.g. Z: letter to the drive)
2. Read from this location: \\remote-computer\Share\path\file.txt . In this case, the file must be shared in Share folder on the remote computer.
3. If you are running under the credentials of the administrator on the remote computer (this means that two computers are in the same domain), you can read directly from this path: \\remote-computer\C$\path\file.txt .
|
|
|
|
|
Please see also my answer in this thread on CodeProject: [^]
|
|
|
|
|
It's the same as when you read a file from your local drive.
Why would you think it would be any different?
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Hi,
I have a C# application that generates an organization chart using the Microsoft Visio Org Chart Wizard. It works just fine but i was wondering if it were possible to place the items on the chart at a custom position. Right now, the items are placed starting at the top of the page and i'd like them to start a bit lower.
Thanks
|
|
|
|
|
hi, it is posible that you share your code????
=)
|
|
|
|
|
how i can remove this full tag
<item><br />
<tag1>OK</tag1><br />
<tag2>button OK</tag2><br />
<!-- button2 --><br />
</item>
in this resource file
<resources>
<item>
<tag1>OK</tag1>
<tag2>button OK</tag2>
<!-- button2 -->
</item>
<item>
<tag1>0,0</tag1>
<tag2>button OK</tag2>
</item>
<item>
<tag1>75,23</tag1>
<tag2>button OK</tag2>
</item>
</resources>
|
|
|
|
|
|
|
hi,
i have created a report using report viewer nw i want to make border of some cells double on the basis of a criteria.hw can i do this.
Regards
Ali
|
|
|
|
|
|
i created crystal report,in that i use database expert option and crate new connection take one table from database(SQL SERVER 2005) and drag and drop some field,finally report is run,this is done in integrated security=true,
when that project i run on other local machine,report ask for login,so i wnt change connection string,how it to done?
|
|
|
|
|
Look under Settings.Settings in the proprties. Usaly connection string is saved there if you used automatic generated code
|
|
|
|
|
How to get free Library for Math graph 3D?
|
|
|
|
|
This forum is related to C# and other programming language from Microsoft. Use google
|
|
|
|
|
hi i have made an application which reads outlook events. while reading outlook events a warning popup comes with message "A program is trying to access your mail information...... " this is annoying for my users of application. Is there any way i can bypass this message i have useed Microsoft.Office.Interop.Outlook dll to read events. and code is written in c# .Net.
plz help
Thanks
|
|
|
|
|
Your code cannot bypass this message. Outlook has to be told to trust the code. Look under Tools -> Macro -> Security.
|
|
|
|
|
but how come google calendar sync does that. Do they have some collaboration or something.
|
|
|
|
|
Because it's not using the Outlook object model.
There is also a library ($$$) that solves the problem, but it is not free.
|
|
|
|
|
hello,everyone:
i'm a beginner of C#,i use crystal report do report.
Now,in my project,i use Dategridview to show datebase,the serach Condition is two
DataTimerPicker.now,i just want the dates which is searched to report,but everytime when i do the report,it'll report all the dates in my datebase,but i just want report some of them,no all!i know Crystal Report can do this job very good,but i do not know how to make my code,so please everyone show me some method or give some others to teach me!Very appriate!
Student miss YY
modified on Wednesday, January 6, 2010 9:51 PM
|
|
|
|
|
hi,
you can try the following links,
http://www.codeproject.com/KB/cs/CreatingCrystalReports.aspx
http://csharp.net-informations.com/c...stepbystep.htm
There are examples of a step by step help for crystal reports in C#,
it may help you.
modified 27-May-14 5:04am.
|
|
|
|
|
thanks very much!
i can't login "
|
|
|
|
|
If I want to know what kind of encoding a certain file is already saved as, which method do I use?
I can't use following because by creating streamwriter constructor, it will save the file as UTF-8 encoding:
StreamWriter sw = new StreamWriter(@filepath);
so by providing a path to a file, not sure how I can detect which encoding the file has..
can anyone please help me?
|
|
|
|
|
Hi,
you could open the file for reading and get the first few bytes of the existing file; then check those for the special codes that are present in UTFx encoded files, something along these lines:
if (len>=3 && buffer[0]==0xEF && buffer[1]==0xBB && buffer[2]==0xBF) {
encoding=65001;
} else if (len>=2 && buffer[0]==0xFF && buffer[1]==0xFE) {
encoding=1200;
} else if (len>=2 && buffer[0]==0xFE && buffer[1]==0xFF) {
encoding=1201;
} else {
encoding=1252;
}
later on, you can create a StreamWriter that takes the encoding into account, by using one of the constructor overloads and an Encoding instance.
|
|
|
|