Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Files in SQL Server 2005

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-02-13 : 12:39:03
Hello,

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.
And at the same time 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.

I am creating the stored procedure and my .NET code in this moment so any advice would be great.

Thanks,
Miguel

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-02-14 : 14:58:05
In short, no, there is no standard way to name the files. You'll need to decide on the naming scheme yourself. If the files don't have existing names that you can just continue to use then the GUID would be as good a name as anything and you can just write a query to update the URLs after renaming all the files.
Go to Top of Page
   

- Advertisement -