Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: large storage

  1. #1
    Join Date
    Apr 2008
    Posts
    3

    Unanswered: insert folder into sql database

    Hi,
    how we can insert the folder into the sql 2005 db using asp.net.

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you need to explain your problem in a little more detail.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    sql server is not a file system.

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    you mean it is not a big electronic filing cabinet. I have to rethink all of my development to date then. Geez, almost 10 years of misconcieved software.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by dsrawat8
    Hi,
    how we can insert the folder into the sql 2005 db using asp.net.
    you first have to make sure that you have a table that can actually accept folders

    for example...
    Code:
    CREATE TABLE MyFolders
    ( MySurrogate INTEGER NOT NULL IDENTITY(937,937)
    , MyAlternateSurrogate UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID()
    , MyFolder NTEXT NOT NULL
    )
    unfortunately, this will hold only 1 gig's worth of folder data...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,799
    Provided Answers: 11
    You should probably use binary(MAX) for SQL 2005. You never know if someone wants to put an executable in your folder.

  7. #7
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    One of my first jobs in the industry was for a company that basically did put a (lame) file system into sql server.

    There was a bug that you could login as a folder. that is, create a folder, name it, then use that name to login to the system. awesome! so much more flexible than silly NTFS.

  8. #8
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    the beauty of IDENTITY(937,937) apparently went unrecognized (if not merely unacknowledged)

    and having both MySurrogate and MyAlternateSurrogate -- sheer genius, i tell ya!!

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  9. #9
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I liked it!

    You probably ought to include a column for the folder name though.

    -PatP

  10. #10
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    nah, that should be stored in the AttributeValue table.

  11. #11
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    ROFL! and also LMAO!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  12. #12
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    AttributeValue is key. because then you can also add a Password attribute and login as a folder. flexibility baby.

  13. #13
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I get it! The AttributeValue table must be what the MyAlternateSurrogate is for. Why didn't I think of that? r937 did good.

    -PatP

  14. #14
    Join Date
    Apr 2008
    Posts
    3

    how to insert a folder

    we are working on digital repository system in which we are storing desired scan documents as a pdf file in a image data type in sql db.

    now, we want to insert all the contents of the any CD in image datatype in the sql database. suppose a cd contains the folder(ABC) and (ABC) folder contains 5 folders and other source code file and backup files. Now, We have to insert ABC folder and its all directories and files. How is it possible?

  15. #15
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Personally, I would probably drag all the files into a single folder and upload from there. Otherwise, if you want to be flasher or more automated, try using recursive code using the filesystem object in vb or even SQL Server. If you searcvh on google for recursive searches of sub directories using filesystemobject you'll find code.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •