Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Help with reading binary data (photos) using Oledb [modified]

Help with reading binary data (photos) using Oledb [modified]

Scheduled Pinned Locked Moved ASP.NET
databasehelpcsharpsql-serversysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    Infernojericho
    wrote on last edited by
    #1

    Hi there. I am currently working on a website assignment and I need some desperate help. I am using SQL Server 2005 Express Edition to store my data. I am using C# to write my site. I have used the OleDb to connect to the database, and to write and read the values. I have stored binary data (photo, jpeg) via Oledb, there is no problems at all. However I am stuck big time with retreiving photos. I am also using OleDb to connect to the database, then I placed the retreived data into a Dataset. I was able to retreive other information (such as name, phone numbers) from the dataset. However I am unable to retreive the binary data from the dataset. I've searched the web, it seemed everyone is using SQLDataReader, so I was curious it is possible to retreive binary data using OleDb at all? HELP! Any feedback would be appreciated, thanks!

    modified on Monday, March 3, 2008 12:15 AM

    C 1 Reply Last reply
    0
    • I Infernojericho

      Hi there. I am currently working on a website assignment and I need some desperate help. I am using SQL Server 2005 Express Edition to store my data. I am using C# to write my site. I have used the OleDb to connect to the database, and to write and read the values. I have stored binary data (photo, jpeg) via Oledb, there is no problems at all. However I am stuck big time with retreiving photos. I am also using OleDb to connect to the database, then I placed the retreived data into a Dataset. I was able to retreive other information (such as name, phone numbers) from the dataset. However I am unable to retreive the binary data from the dataset. I've searched the web, it seemed everyone is using SQLDataReader, so I was curious it is possible to retreive binary data using OleDb at all? HELP! Any feedback would be appreciated, thanks!

      modified on Monday, March 3, 2008 12:15 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Infernojericho wrote:

      I have used the OleDb to connect to the database, and to write and read the values.

      Why have you not used the SQL Server specific classes built in to .NET ? What have you tried to access your data ? If a datatable has a limit to how big a column can be, perhaps you have to use a datareader to get that byte stream out ?

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups