I need to retrieve and open a file stored on a Unix server on



  • 1. How delete rows from DataTable and avoid "no row at position" error?
    Consider the following DataTable: FoodId FoodName FoodType 1 Apple Fruit 2 Pear Fruit 3 Corn Vegetable 4 Bread Starch 5 Cereal Starch 6 Carrot Vegetable 7 Grapes Fruit I want to delete all records where FoodType = Starch. If I do the below, however, the rowcount will decrement with every delete and I end up with a "No row at position... " error. for (int i=0; i <= FoodDataTable.Rows.Count- 1; i++) { if (FoodDataTable.Rows(i)("FoodType").ToString() == "Starch" FoodDataTable.Rows(i).Delete(); } Can anyone help me around this? Thanks for any help, Ron
  • 2. It compiles OK in Debug mode, but fails in Release mode
    My console application generates PDF documents on the fly using PDFSharp (MigraDoc) library. When I Build it using VS 2005, it compiles OK with no problem and also executes perfectly in Debug mode. But if Release is selected in the dropdown, build fails with dozens of errors, all of which complain that The type or namespace name 'MigraDoc' could not be found (are you missing a using directive or an assembly reference?) But, I do have those MigraDoc libraries in the References folder, plus I have using statements in the code for these libraries. In any case, it compiles, executes with no problem when in Debug mode. Am I missing something really easy? Thank you. Please give me a hint.
  • 3. Converting textfile from Mac to Windows
    Hello, I have tried to convert a Mac text file to Windows using code below. Encoding Win = Encoding.GetEncoding("Windows-1252"); Encoding Mac = Encoding.GetEncoding("macintosh"); byte[] macBytes = Mac.GetBytes(Row); byte[] WinBytes = Encoding.Convert(Mac, Win, macBytes); char[] WinChars = new char[Win.GetCharCount(WinBytes, 0, WinBytes.Length)]; Win.GetChars(WinBytes, 0, WinBytes.Length, WinChars, 0); string WinString = new string(WinChars); return WinString; But, it does not convert e.g. German and Scandinavian characters written in Mac to proper format in Windows. How can a textfile written in MAc could be converted into Windows environment? Cheers!

Re: I need to retrieve and open a file stored on a Unix server on

Postby UHVjY2E » Thu, 29 Mar 2007 15:02:04 GMT

Thank you.  I found an example using FTP and yet to try it to connect to the 
unix server then I'll use the steamReader to read the file.

Similar Threads:

1.I need to retrieve and open a file stored on a Unix server on a ne

I need to retrieve and open a file stored on a Unix server on a network and 
opens the file as a delimited text file.  I'm using VS2005, .net 2.0 and C#. 
What's the best way to do this and if there's any sample code online?
The user would enter something like;

2.Powershell: Script to retrieve path of file given the filename on a remote unix server

3.problem opening freehand files stored in linux server

 i have mac and i work using a file server that has a linux. The problem is 
that when i saved a freehand file, after cloosing the program and reconect to 
the local server, i try to open the file but freehand ask me for the images the 
the document has. Is like freehand forget the links of the images or can't find 
it in a linux server where they are when i create the file.

 Anyone knows what can i do?

4.WinForm Retrieve Excel file from SQL Server and Open it


My Excel .xls files are stored as image on the SQL Server.
Now I would like to retrieve the .xls files and open it.
I use the FileStream and write it on client pc's C;\.
How do I open it in the C# code, so that user won't need to go the file 
explorer to open?
Thanks for help.


5.Need reference for storing/retrieving .wav files in Sql2000

I can successfully write the binary data to an image data type, and 
successfully retrieve it, but when I attempt to play the file in media player 
after retrieving it, I get the file type isn't supported.

I must be losing something somewhere, but the byte lengths match up.  Is 
there some encoding I need to do.

Please take a look, and suggestions would be appreciated.

//Writing to sql from file

FileStream fs = new FileStream("xxx.wav", FileMode.Open, FileAccess.Read);

BinaryReader br = new BinaryReader(fs);
long size = fs.Length;

byte[] data = new byte[size];


Database db = DatabaseFactory.CreateDatabase("IvrRecordingDB");
DBCommandWrapper cmd = db.GetStoredProcCommandWrapper("uspInsertRecording");

cmd.AddInParameter("@recording", DbType.Binary, data);

//Retrieving data and writing to file

byte[] data = new byte[0];

Database db = DatabaseFactory.CreateDatabase("IvrRecordingDB");
DBCommandWrapper cmd = db.GetStoredProcCommandWrapper("uspGetRecording");
object audioBinary = db.ExecuteScalar(cmd);
data = (byte[])(audioBinary);

FileStream fs = new FileStream("new.wav",FileMode.CreateNew);
BinaryWriter bw = new BinaryWriter(fs);


6. Need to Retrieve an Image File on Another LAN Server

7. Storing Jet database on unix server

8. ANN: The Open Group online UNIX store updates

Return to C#


Who is online

Users browsing this forum: No registered users and 26 guest