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. qldatasource to link data from sql to gridview

qldatasource to link data from sql to gridview

Scheduled Pinned Locked Moved ASP.NET
databasesql-serversysadmin
4 Posts 3 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.
  • Y Offline
    Y Offline
    y_mmohd
    wrote on last edited by
    #1

    I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.

    H A Y 3 Replies Last reply
    0
    • Y y_mmohd

      I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.

      H Offline
      H Offline
      Herman T Instance
      wrote on last edited by
      #2

      please show your aspx code. Did you use a TemplateField with an asp:Image control to display the image? Does the database store a BLOB field or a URL to an image?

      In Word you can only store 2 bytes. That is why I use Writer.

      1 Reply Last reply
      0
      • Y y_mmohd

        I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        y_mmohd wrote:

        SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross.

        So, did you you set the image url for the imaage box. Here is an article which describe, how to show image in grid view from database, isplaying Image in Gridview from Database

        cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net View My Recent Article

        1 Reply Last reply
        0
        • Y y_mmohd

          I’m using sqldatasource to link data from sql to gridview. Using the following SELECT itemName, itemEmail, itemPhone, itemImage, itemDate, itemPrice, itemDescription FROM Item All the data appear in the gridview except the itemimage. Itemimage should show an image from sql. I try to use imagefield in the gridview, but instead of the image a small white box with a red cross. What option should I use in the imagefield to link data from sql server.

          Y Offline
          Y Offline
          y_mmohd
          wrote on last edited by
          #4

          Dear, Thanks you for answering. I had read many articles about this topic, my problem is that i can't retrieve the image that i saved in sql server as binary to grid view. I make DataImageUrlField for the ImageField is itemImage, but instead of the image a white box with red cross appear. What is the problem? Thanks in advance....

          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