Best Practices for uploading files to database

前端 未结 4 547
暖寄归人
暖寄归人 2020-12-03 16:19

I am looking for any best practices or ideas on how you would create an interface with a DB from a .NET web application to upload data from Excel files Should I use a mechan

4条回答
  •  甜味超标
    2020-12-03 16:31

    do you want to put the excel files in the DB as a blob? or do you want to parse the files and put the records in the files into the db?

    I'm assuming it is the latter.

    As a user I'd like to have the option to know what the errors are so I can fix them and try again. I think how I try again depends on how much data I'm uploading.

    I'd try to do a hybrid solution .. if there are only a few errors show a screen to correct those errors so the user can move on quickly. If there are a ton of errors you should just can it and have the user try all over again.

    As far as the DB. Either have a separate table that uploads go into until they are checked and get with your "real" data, or have a UploadUniqueId column so you can roll-back any upload without much fuss.

    delete tableName where UploadUniqueId = 'GUID'

提交回复
热议问题