Before I have tried about doing one attachment (upload) for each record of my table with using sql server and ASP.NET.
Now I like to do multiple attachments (uploads) for each record. Now I don’t know what changes I have to do to my database and ASP.NET.
Some explanation or article or sample about that will be very helpful.
Best regards.
Before I have tried about doing one attachment (upload) for each record of my
Share
If you are allowing for an infinite number of attachments, you’re best out splitting those into another table and putting a foreign key on your parent table.
So, assuming this is your main table and fields
Then you should probably create a second table to hold all the attachments, that way you can potentially 0 or 100s of attachments for each item. The Attachment table would be like:
This way to find all attachments for an Item you could just query the Attachment table based on the Foreign key of Item, like so: