Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello. I am getting a table in the database with the select query.
And if this query returns greater than 0, I would like to remove the result log from the center.

I write ErrorFile include count 0 =>dont write log txt
I write ErrorFile value include count >0 => this values content is incorrect.

What I have tried:

C#
if(ErrorFile.Count !=0)
{
    //ErrorFile=...   //error file has 2 entries(For example select query return 2.)
    File.AppendAllText(ErrorFile, Environment.NewLine + Error);  //write log txt
}
Posted
Updated 16-Feb-19 7:52am
v7
Comments
Richard MacCutchan 16-Feb-19 5:15am    
Sorry but your question is not clear. Are you trying to read the contents of a pdf file, or just report its name?
[no name] 16-Feb-19 8:11am    
Hello.First of all, thank you for your help.If the error file content is greater than 0, the file also has pdf errors.Hence you want to print log txt sine has pdf errors.
Richard MacCutchan 16-Feb-19 8:39am    
Sorry, but that still does not make the problem clear. What does "error file content is greater than 0" mean? What does " file also has pdf errors" mean? What files are you talking about, and how are you processing them? Please edit your question and try to provide some more details of what your application is trying to do.
OriginalGriff 16-Feb-19 5:17am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with.
Use the "Improve question" widget to edit your question and provide better information.
[no name] 16-Feb-19 8:21am    
Thank you for your suggestion. So I want to get the error value in the file if the error is a faulty pdf, and if it is greater than 0 according to this value, it is wrong.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900