Click here to Skip to main content
15,905,614 members
Home / Discussions / C#
   

C#

 
GeneralRe: Fixed columns in DataGridview in windows C# Pin
Rami.P17-Mar-09 0:00
Rami.P17-Mar-09 0:00 
QuestionClose a Child Form Pin
yesu prakash16-Mar-09 21:05
yesu prakash16-Mar-09 21:05 
AnswerRe: Close a Child Form Pin
Xmen Real 16-Mar-09 21:15
professional Xmen Real 16-Mar-09 21:15 
AnswerRe: Close a Child Form Pin
12Code16-Mar-09 22:02
12Code16-Mar-09 22:02 
AnswerRe: Close a Child Form Pin
jaypatel51217-Mar-09 7:20
jaypatel51217-Mar-09 7:20 
QuestionSocket Exception "An address incompatible with the requested protocol was used" on Vista Pin
niharshukla16-Mar-09 20:50
niharshukla16-Mar-09 20:50 
AnswerRe: Socket Exception "An address incompatible with the requested protocol was used" on Vista Pin
Xmen Real 16-Mar-09 21:17
professional Xmen Real 16-Mar-09 21:17 
QuestionFile Not Getting Imported (Black Magic) Pin
Sandeep Kalra16-Mar-09 20:48
Sandeep Kalra16-Mar-09 20:48 
Confused | :confused: Confused | :confused: Confused | :confused:

Hi All

I have two files
1.Application File
2.Import File

I have some data to be imported to Application File from import file.
When the file to be imported is in the executing directory and i run the application the code is working fine and actually importing the data to the application file.


Now the challenge is when the Import File is not in the executing directory.My application do not give any error and also runs fine(i used breakpoints and checked the intermediate values of variables(all were correct)).From intermediate variables i conclude that my application is reading data from the file to be imported correctly.But it is not writing into it.And after closing the application The application file is supposed to have Imported data from the import file.But it donot have any imported data and shows the data of previous state.


After that I decided to go for an alternative
I decided to copy the import file from another location(say desktop)
to executing directory.
First I used
1.Fileinfo f = new FileInfo("Fully qualified path of import file");
f.CopyTo(@"tempdata.olf");

2. i used FileStream code to copy files using Binary reader and binary writer
The code works fine and do not throw any runtime errors or exception
But the import file is not copied to the tempdata.olf.


Note:
1.I have used FullName(fully Qualified Path) of both files
2.The application is working as desired only when both the files are in executing directory.
3.I am running the application in admin account

Does anyone has idea what may be wrong.

Thanks

Regards

THE SK
AnswerRe: File Not Getting Imported (Black Magic) Pin
Christian Graus16-Mar-09 21:00
protectorChristian Graus16-Mar-09 21:00 
GeneralRe: File Not Getting Imported (Black Magic) Pin
Sandeep Kalra16-Mar-09 21:08
Sandeep Kalra16-Mar-09 21:08 
GeneralRe: File Not Getting Imported (Black Magic) Pin
Xmen Real 16-Mar-09 21:19
professional Xmen Real 16-Mar-09 21:19 
GeneralRe: File Not Getting Imported (Black Magic) Pin
0x3c016-Mar-09 21:59
0x3c016-Mar-09 21:59 
QuestionConvert Docx document to doc programatically Pin
sumit703416-Mar-09 20:35
sumit703416-Mar-09 20:35 
AnswerRe: Convert Docx document to doc programatically Pin
dan!sh 16-Mar-09 20:53
professional dan!sh 16-Mar-09 20:53 
AnswerRe: Convert Docx document to doc programatically Pin
Christian Graus16-Mar-09 21:01
protectorChristian Graus16-Mar-09 21:01 
AnswerRe: Convert Docx document to doc programatically Pin
Xmen Real 16-Mar-09 21:11
professional Xmen Real 16-Mar-09 21:11 
Question[Message Deleted] Pin
osemia16-Mar-09 19:59
osemia16-Mar-09 19:59 
AnswerRe: How to pass detect activesync Pin
Christian Graus16-Mar-09 20:19
protectorChristian Graus16-Mar-09 20:19 
GeneralRe: How to pass detect activesync Pin
osemia16-Mar-09 20:56
osemia16-Mar-09 20:56 
GeneralRe: How to pass detect activesync Pin
Christian Graus16-Mar-09 21:03
protectorChristian Graus16-Mar-09 21:03 
AnswerRe: [Message Deleted] Pin
Mohammad Dayyan16-Mar-09 23:48
Mohammad Dayyan16-Mar-09 23:48 
QuestionNew VSTO programming using C# resource Pin
vivekthangaswamy16-Mar-09 19:32
professionalvivekthangaswamy16-Mar-09 19:32 
AnswerRe: New VSTO programming using C# resource Pin
Christian Graus16-Mar-09 19:40
protectorChristian Graus16-Mar-09 19:40 
QuestionHow to save Form what ever we create on it? ? Pin
Member 147969416-Mar-09 19:28
Member 147969416-Mar-09 19:28 
AnswerRe: How to save Form what ever we create on it? ? Pin
Christian Graus16-Mar-09 19:38
protectorChristian Graus16-Mar-09 19:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.