Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2010
    Posts
    3

    Question Unanswered: insert image into table

    i ve a term project about php and mssql server. my project is to make a table about inventory stock tracking. i ve to add inventory stock images too into sql table. i ve inventory_stock_no (int) inventory_stock_name (nvarchar(50)) inventory_stock_piece (int) inventory_stock_image (image) columns. how can i add image files into inventory_stock_image column can anyone help me

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Old fogie developers like me will tell you that the database is not a file server and that you should place your files in the filesystem and store the path and name of those files (seperately) in the database.
    “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
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    And even us young'uns will agree with that sentiment!
    George
    Home | Blog

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Sean & G: Look at SQL 2008 - things have changed with the new datatypes.
    Also, David Portas posted a link to a white paper that was something of a myth buster on this topic. I'll see if I can find the link...

  5. #5
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912

  6. #6
    Join Date
    Apr 2010
    Posts
    3
    thnx alot for interest problem resolved

  7. #7
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Quote Originally Posted by pootle flump View Post
    Sean & G: Look at SQL 2008 - things have changed with the new datatypes.
    Also, David Portas posted a link to a white paper that was something of a myth buster on this topic. I'll see if I can find the link...
    I don't care. I was bullied once into taking loads of xml and text files from a Biztalk process and sticking them in my database and that database was growing at 25GB a month when I left. It was a maintenance nightmare for the size of the shop I was in at the time. Backups getting bigger, maintenance taking longer. Screw all of that noise. I will never let any half baked application developer do that to me again.

    Right now, the mothership database I work on is replicated or logshipped to 36 copies of itself. Start crowding my database with filesystem crap and the multiplier effect becomes untenable.
    “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.

  8. #8
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by Thrasymachus View Post
    I don't care.
    Lol. I imagine you with your fingers in your ears crying "LA LA LA LA LA LA LA".

    If you had followed up on either you would see that:

    • The new SQL Server FILESTREAM data type store the data on the NTFS system but provide an API interface to the application via SQL Server. So it is the best of both worlds - BLOBs on filesystem but you don't have to maintain a column storing the location (and deal with the inevitable integrity problems).
    • The white paper provides data that supports storing only small BLOBs in SQL Server, and the recommendations are based on different usage profiles. It just gives some scenarios where the blanket advice of "NEVER store BLOBs in an RDBMS" are not optimal, and also give you plenty of evidence for the many scenarios where you are quite right.

  9. #9
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    Too busy to read white papers atm. I am in the middle of trying to pull off my 2nd miracle this year of getting this archaic over night database build to complete in time to meet our 7am SLA for our legacy products.

    They keep finding new sources of data to pump into this monster and it keeps running longer and longer and I have to drop in on commando mission after commando mission to get this peice of crap to finish on time.

    I offered to re-engineer it, but they did not tak me up on it. Shortsighted bastards.
    “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.

Posting Permissions

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