Path Too Long Error
When I imported the database, some of the foreign key constraints generated errors stating that:
Error 4 Path for file C:\Documents and Settings\fritcheygr\My Documents\Visual Studio 2005\Projects\BoundBooked\BoundBooked\BoundBooked\Schema Objects\Tables\R_InsuranceFormTemplateConditionQualifier.C_PolicyConditionQualifierMsrDefintionType_FK_R_InsuranceFormTemplateConditionQualifier.fkey.sql is too long. C:\Documents and Settings\fritcheygr\My Documents\Visual Studio 2005\Projects\BoundBooked\BoundBooked\BoundBooked\Schema Objects\Tables\R_InsuranceFormTemplateConditionQualifier.C_PolicyConditionQualifierMsrDefintionType_FK_R_InsuranceFormTemplateConditionQualifier.fkey.sql 1 0 BoundBooked
Obviously I can work around this by storing the project off my root drive rather than under "My Documents\etc." but I was a little shocked to see this. I realize the foreign key name is long, but we auto generate them and they're self documenting.
[979 byte] By [
Granted] at [2008-2-4]
Granted wrote: |
| Obviously I can work around this by storing the project off my root drive rather than under "My Documents\etc." but I was a little shocked to see this. I realize the foreign key name is long, but we auto generate them and they're self documenting. |
|
I think this is an important issue even if we leave out the path problem since NTFS limits file names to 255 characters.
I just run a quick query, against the catalog of a couple of databases of a customer using self documenting names and concatenation techniques, and here are some figures (the query sums the length of the table name and the constraint name and then groups the result by constraint type showing min, max and average length):
-- Database 1
cnt_type length_avg length_min length_max
-- -- -- --
C 86 34 139
D 71 40 103
F 79 31 140
K 56 14 122
TR 77 35 117
-- Database 2
cnt_type length_avg length_min length_max
-- -- -- --
C 105 57 147
D 93 42 120
F 85 68 107
K 67 27 121
TR 108 91 131
Although these figures are still much below the 255 limit, the postfix used to identify the object is not included and these databases are not so complex.
NFTS has no such limitations, some windows API has, you can freely avoid it using some libraries that supports long paths like http://www.abtollc.com/product1733992.html
There is no need to rename files or perform any other actions, it just allows to work with files keeping their real long paths, thats all.