I want to replace a file with existing file in database - asp.net-mvc

enter image description here
Iam already uploaded a file in a database. Now i want to replace a file. So can anyone can tell me the logic to implement to do.

In my opinion you need to update the first file as disabled and add a new file as enabled.
Do you want to do this change on .net platform or you just wonder the sp logic?

Related

Save File with a custom property in Swift

My app has a custom Document type and create, edit, and save the Documents with custom extension. For saving I serialize the document and write Data to a file URL. For retrieving I use FileManager methods.
I want to save a custom value with File which I don't know how to do. I want to keep the File status as editing or done. When user create a new Document it's default status should be editing and he can make the file as done manually inside the app. I don't allow to edit done files , user can only view them.
Can I use appendOnly: FileAttributeKey for this purpose, assuming to make the file read-only if user marks it as done?
I also found this answer about extend file attributes Write extend file attributes swift example.
Is this a recommended way by Apple? If above attribute cannot help I guess I'll have to use extended file attributes.. please advice
Thanks in advance

How to store a signature into the application file?

I want to sign the user application with the user name if he makes a donation. For that I need to write the user name into the exe file. But the file cannot change itself because it is in use at that time. Do you know if anything can be done ? Of course, I can store the signature in a separate file or in registry, but in this way the signature can be lost. I want the modification to be permanent and cannot be changed by the user. I will accept any idea that help me accomplish this...
You can let the application make a copy of itself, then modify the copy, and then start the copy (with ShellExecute).
The modification could be inspired by the UpdateResource examples here: How to attach a resource file to an existing executable file?
The "signature" would be stored in a resource, so your application would have to read it from the resource, for example with Delphi's TResourceStream class.

Bind sqlite database with custom iOS framework

I have developed a custom ios framework for achieving some task, which is working perfectly but I have to add my sqlite database separately in my test app. I want to bind my sqlite database with my custom framework so that it will automatically added in any app where user want to user that framework.
I also don't want to show sqlite database to anyone. can anyone please tell me the best way to achieve this.
I believe you're looking to ship a sqlite database with your app, and have it installed invisibly to the user. Just add the database to your NSBundle, by including it in the application. The important part is that you must copy this bundled database to the file system (you probably want to also mark it as not being in the cloud), because the NSBundle'd files are read-only. So, here's your strategy: 1) on startup, check to see if the database is in the file system. 2) if not, copy it from the NSBundle to the file system, 3) open the database in the file system.
Maybe there is a better solution to your question but here is a suggestion on what you could: Programmatically create the database in your framework. As for hiding the database here is the solution to that! You may also encrypt the sqlite file.
Cheers

OpenERP 7: How to view/ download an uploaded file?

I have a field to upload a file to my form. Now I want to be able to view it without downloading the file (it's a photo and no editing of the file is required). When I do download the file I would like to have it keep its original name instead of being renamed to a generic name (ex. original_name.* stays original_name.* instead of becoming serial_number_22.*).
I have the following.
In my .py file:
'file_upload' : fields.binary('Sales Contract'),
In my .xml file:
<field name="file_upload"/>
With kind regards,
Please have a look at this module Document Management System. This helps you in uploading and associating files to individual records. And separately under knowledge menu you can organize, view, share files and folders and sharing via ftp is also an additional option.
I am sorry if your purpose is different. I thought this may help you.
If it's an image, you can use widget="image" to view it directly after upload.

Where is the settings stored for ExpressQuantumGrid

I am using Express Quantum Grid from developer express. From code i came to know that they are storing the user settings using TMemIniFile. I know the sections where they are storing but is there any way to open the Ini file and see the contents? If so where is the file located?
From code I came to know that they are storing the user settings using TMemIniFile.
The constructor of TMemIniFile receives the name of the file that stores the INI file. So, you simply need to find the call to TMemIniFile.Create and your answer will be revealed.

Resources