Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:53:40+00:00 2026-06-15T12:53:40+00:00

A table in my database has stored pictures, documents, dll halyards and so on.

  • 0

A table in my database has stored pictures, documents, dll halyards and so on. How do I implement the mapping of all this for a user?
I bind these data to a data table, and want to have hyperlinks in each cell, which when clicked, invokes/opens the corresponding item from the database.

OracleCommand oracleCom = new OracleCommand();
oracleCom.Connection = oraConnect;
oracleCom.CommandText = "Select * From " + Session["tableNameIns"];
OracleDataAdapter adapter = new Oraenter code herecleDataAdapter();
DataTable tableD = new DataTable();
tableD.Locale = System.Globalization.CultureInfo.InvariantCulture;
adapter.SelectCommand = oracleCom;
adapter.Fill(tableD);
changeTableAtributs(tableD);
tableResults.DataSource = tableD.AsDataView();
tableResults.DataBind();

In DB next atributes: i_id(number), i_objecttype_id(number), s_code(nvarchar), s_name(nvarchar), m_content(blob), m_description(nvarchar)
dbview

On client I see next: i_id(number), i_objecttype_id(number), s_code(nvarchar), s_name(nvarchar), m_description(nvarchar).
Without atribute m_content.
clienview

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:53:41+00:00Added an answer on June 15, 2026 at 12:53 pm

    It seems your question is “incomplete”. So if the blob is a picture you want the picture to be displayed? What should happen if the blob is a dll?

    In your database the M_CONTENT field is a blob so if you databind that to a GridView the GridView has no way of knowing what is in that field.

    If you want an image displayed to show the type of the file in the blob then you need to know the type. Either you store the type in the database (Optimal) or you parse the blob at runtime and figure out the file type.

    It seems to me that you already have the type (I_OBJECTTYPE_ID). If that is the case then you can define a column under asp:GridView/Columns

    <asp:TemplateField HeaderText="File type">
        <ItemTemplate>
            <asp:Image runat="server" ID="mediaImage"
                ImageUrl='<%# GetImageUrl(Eval("type") as string) %>' />
        </ItemTemplate>
    </asp:TemplateField>
    

    In your case the type column is called I_OBJECTTYPE_ID. The GetImageUrl is a function in the codebehind:

    switch (type)
    {
        case "video":
            return "~//Images//video.png";
        case "audio":
            return "~//Images//audio.png";
    }
    return ""; // Something is wrong
    

    And using this technique you can make Hyperlinks and other stuff under the ItemTemplate markup.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL Server 2008 database. This database has a stored procedure that
My MySQL database table has dates stored in the MySQL format (YYYY-MM-DD). I need
I have a database with many tables.. and each table has stored only IDs.
I have a database that has a table email_eml that stores 3 attributes name_eml,
I have a database table A which stores records, A has a primary key
I am using an sqlite database to store log data. My table has a
I'm using http://keith-wood.name/countdown.html . Each 'Event' table in my database has a 'date' column.
My database has a table with thousands of records. The primary key is an
My database has an organisation table and an address table. In the address table,
Imagine the following database: Table 'companies' has fields id, name and flagship_product_id. Table 'products'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.