|
You can't. There is no "Autodestruct" data for files.
You would have to maintain a list of "monitored files" with their expiry date, and run an application or service on a regular basis to removed "old" files.
We can't tell you how to do that without knowing a load more about exactly what environment you are running in - it could be very different if it's a website instead of a Win10 desktop, or an Android phone instead of an iPad for example.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Secondly, as long as the file is being used you cannot remove or delete it, Windows won't let you do it. So, of course you can delete the file itself after the playing mode has stopped on the media player.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: So, of course you can delete the file itself after the playing mode has stopped on the media player. Video or audio is usually data, does not contain instructions. The file probably cannot delete "itself" if it is finished playing.
Also, I think he is informing about DRM, not the technical option to have a data-file delete itself.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Based on the "problem definition":
If I had a file that I wanted to get rid of in "one hour", I would launch "something" (service; console app; timer; etc.) that after a one hour had elapsed (via "sleep"; interval elapsed; etc.) simple runs and deletes the file.
(Assumes no file contention; etc.)
|
|
|
|
|
I have an Excel file to read out data as an object.
I don't know can i read as Object just on memory or not ?
(I just want to save on memory, not on Database or i don't want to show Datagrid or...)
Currently , i try to change Excel file to XML format and I will serialize again.
I think that it is too many step to do,right ?
And so, anyone can advice to me ?
Thanks
|
|
|
|
|
Sorry, but that doesn't make any sense - it's probably a comprehension problem at my end, but what you are trying to do doesn't really come through very well.
Try again, and explain what task you are trying to do and why, instead of concentrating on "Object" and "memory"; "XML" and "serialize". It may make it easier for us to help you if we know why you think "an object" will help you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Message Closed
modified 2-Dec-16 0:58am.
|
|
|
|
|
Since you are talking about "upload" you will have the file data as a stream or an array of bytes - which both technically are already objects, just not ones that are directly much use to you!
What I'd suggest is look here: c# - Read data from an Excel file - Stack Overflow[^] - the Velkumar solution uses the ExcelDataReader package and shows you how to convert a stream into a DataTable, which sounds like where you want to be.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thanks for ur suggestion
Let me try
I am newbie and so all are still confusing
|
|
|
|
|
NB: If you're writing a web application, don't use Excel Interop. It's not supported:
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment.
Assuming you're uploading a new format file (.xlsx ), any of the following libraries should do what you need:
If you need to support old format files as well (.xls ), then you'll need to use NPOI[^].
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Excel work sheets / files can be saved as CSV or XML (among other things); which are, in other words, "strings".
You can store or transport Excel files anywhere if you simple treat the file (contents) as a "long string".
|
|
|
|
|
i have a rdl report which is already created. how to display in mvc application using (visualstudio)
|
|
|
|
|
|
Hi
I am developing c# application with sql notification and sqldependency.
if particular record is updated in database table in sql server,I want to get that record details in c# application
but now i am getting all records popup if one record is updated
Please help me .
Thanks and regards
N.Ramachandran
|
|
|
|
|
Member 3080470 wrote: Please help me With what? You have not given any information about where and how this is happening in your code.
|
|
|
|
|
Hi
I am updating record in c#
table name 'Person' .Table structure
Manager_ID int
Employee_ID int
Approved bit
Manager_ID Employee_ID Approved
123 1 0
the Manager who logs in is Manager_ID
the person targeted is Employee_ID
Approved is set 1 or 0
we assume already record is inserted.
query to be Updated is given below.
Update Person set Approved=1 where Manager_ID = 123 and Employee_ID =1
now alert will go to Employee(Employee_ID =1 ,if he logs in) from Manager .
both update query and alert will occur at same time
I am using visual studio 2012 ultimate ,dot net framework 4.6 ,sql server 2008 ,c# and windows 8.1
Thanks and regards
N.Ramachandran
|
|
|
|
|
Member 3080470 wrote: but now i am getting all records popup if one record is updated That's how it works.
You could add a timestamp to your recordset that is updated whenever something is written; that way you could ask for the changes of the last five minutes, for example. Alternative, you could calculate a quick hashcode, and compare those to see which of them changed.
Good luck
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Why don't you create a separate record for each update so that the live versions are not tweaks every now and then?
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
hi all,
i have html markup i .xslt file, then i generate from this file pdf with spire.pdf
when data is short everything is perfect, fixed footer and all goods,
but if data going big i need to divide footer end of the last page...
any ideas?
|
|
|
|
|
Jorjini wrote: any ideas? Yes, please explain what this has to do with C#.
|
|
|
|
|
I'm writing application in C# (WPF, .net 4.5). I need library for decoding barcodes (EAN128, GS1, code 128, EAN13). Can anyone suggest me ready to use library (free or paid). My scanner connected by USB reads a barcode and sends string od chars (mostly numbers) and I need to decode it to separated PLU, LOT, BBD etc.
|
|
|
|
|
does your bar code scanner manufacturer not have any examples to start from?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
I think what you need to do is to start looking at what is in a barcode: GS1 isn't a barcode (it's an allocation system for barcode numbers), EAN-13 only provides an Article Number, and Code128 is a transport mechanism that allows EAN128 to contain more than just numeric values. Only EAN128 contains specific fields you can decode into PLU, Serial Number, batch codes, etc. And most of them don't bother: they just contain the Article Number.
Normally what happens is that the AN is read from the barcode, and used as a lookup to your stock database to determine what type of goods it is, what price you are selling it as, and so forth.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I know how barcodes work. I'm working about 12 years with ERP systems that use barcodes. You're right - GS1 it's not a code - it's non-profit organization. I thought about GS1-databar.
EAN13 not only provides Article Number - it also can contain weight or price of article.
My application send string from barcode scanner and only one think I need is to get this string separated into detailed data for example batch after 10, BBD after 15/17, weight after 310x etc. I know many of AI but I need solution which knows all of possible AI and will search string from barcode and seperate data after AI. I don't want to write it from the beggining because I don't want to miss any AI etc.
|
|
|
|
|
EAN13 holds only a 13-digit article number: you are thinking about EAN13+2 and EAN13+5 which are extensions to the basic EAN13 spec - and there isn't anything which says what those additional digits must be: they do not have to be weight or price.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|