How to view a binarydata type in sql server

Last post 06-06-2005 8:17 AM by haidar_bilal. 2 replies.

Sort Posts:

  • How to view a binarydata type in sql server

    04-25-2005, 8:28 PM
    • Member
      5 point Member
    • thebeginner
    • Member since 04-26-2005, 12:21 AM
    • Posts 1
    Big Smile [:D] i have a project in hr department  may i know how to view a picture, document in like, msword, msexcel ang other application that will save in the sql. how to view in the datagrid. please help me.... to may project. thanks.mHmm [^o)]
  • Re: How to view a binarydata type in sql server

    05-06-2005, 5:22 PM
    • All-Star
      26,551 point All-Star
    • Caddre
    • Member since 06-23-2003, 9:53 AM
    • Indy
    • Posts 5,308

    Try the CREATE TABLE statement below in your Query Analyzer and when you run  the SELECT statement click on show results in a grid in the Query Analyzer.  Another solution is what I recommended in the post below.    Hope this helps.

    http://forums.asp.net/871599/ShowPost.aspx


    CREATE TABLE [EmployeePhoto] (
     [EmployeePhotoID] [int] IDENTITY (1, 1) NOT NULL ,
     [ThumbNailPhoto] [image] NULL ,
     [ThumbnailPhotoFileName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
     [LargePhoto] [image] NULL ,
     [LargePhotoFileName] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
     [ModifiedDate] [datetime] NOT NULL CONSTRAINT [DF_EmployeePhoto_ModifiedDate] DEFAULT (getdate()),
     CONSTRAINT [PK_EmployeePhoto_EmployeePhotoID] PRIMARY KEY  CLUSTERED
     (
      [EmployeePhotoID]
     )  ON [PRIMARY]
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
    GO


     


     

    Kind regards,
    Gift Peddie
  • Re: How to view a binarydata type in sql server

    06-06-2005, 8:17 AM
    • All-Star
      45,563 point All-Star
    • haidar_bilal
    • Member since 07-13-2003, 9:43 PM
    • Lebanon - Beirut
    • Posts 8,726
    Well to have an image in a database, you've better have a field in a table of type either "image" or "varbinary"

    regards
    Bilal Hadiar, MCP, MCTS, MCPD, MCT
    Microsoft MVP - Telerik MVP
Page 1 of 1 (3 items)