Hello,
In my ASP.NET 2.0 web site I need to upload many files to various
folders and add the information in an SQL 2005 database.
I am creating a documents table which includes the fields:
[DocumentId], [DocumentAuthor] and [DocumentUrl]
This table will have records for many files.
Is there a standard way to name the files?
Maybe renaming the files to "doc" + DocumentId?
However my DocumentId is a Guid so it would be to big ... I think.
I would need to create the record, get the DocumentId and then access
the record again to add the DocumentUrl after renaming the file in
my .NET code.
Anyway, is there a standard way to make sure that every file name is
unique and that at the same time won't have an unreadable name?
Thanks,
MiguelOn Feb 14, 4:05 pm, "shapper" <mdmo...@.gmail.com> wrote:
> Hello,
> In my ASP.NET 2.0 web site I need to upload many files to various
> folders and add the information in an SQL 2005 database.
> I am creating a documents table which includes the fields:
> [DocumentId], [DocumentAuthor] and [DocumentUrl]
> This table will have records for many files.
> Is there a standard way to name the files?
> Maybe renaming the files to "doc" + DocumentId?
> However my DocumentId is a Guid so it would be to big ... I think.
> I would need to create the record, get the DocumentId and then access
> the record again to add the DocumentUrl after renaming the file in
> my .NET code.
> Anyway, is there a standard way to make sure that every file name is
> unique and that at the same time won't have an unreadable name?
> Thanks,
> Miguel
one possible solution make DocumentId as identity and store document
as documentid value
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment