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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
R

Runar

@Runar
About
Posts
3
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How can I show text and HTML with image extracted from DB.
    R Runar

    Form I use:

    I can now see that I can still view my image without multipart form, thanks. I'm not able to see my text fields / submit button with the image from DB. Here is the show ShowTheImage function: private void ShowTheImage(int FileID) { // Define SQL select statement string SQL = "SELECT FileSize, FileData, ContentType FROM tblFile WHERE FileID = " + FileID.ToString(); // Create Connection object SqlConnection dbConn = new SqlConnection("server=runar;database=ImgDb;user=sa"); // Create Command Object SqlCommand dbComm = new SqlCommand(SQL, dbConn); // Open Connection dbConn.Open(); // Execute command and receive DataReader SqlDataReader dbRead = dbComm.ExecuteReader(); // Read row dbRead.Read(); // Clear Response buffer Response.Clear(); // Set ContentType to the ContentType of our file Response.ContentType = (string)dbRead["ContentType"]; // Write data out of database into Output Stream Response.OutputStream.Write((byte[])dbRead["FileData"], 0, (int)dbRead["FileSize"]); // Close database connection dbConn.Close(); // End the page Response.End(); } Runar

    ASP.NET question html asp-net database com

  • Not able to update data in access db
    R Runar

    It is not a problem to view data in a datagrid. But when it comes to write to my access db, I get errormessage: System.Data.OleDb.OleDbException: Operation must use an updateable query. I checked the write permission in IIS. But have some problems to understand the properties to my db folder in explorer, under properties I can see in the General tab that there is a read-only attribute that is checked. When I try to uncheck the read-only attribute it seems ok, but if I get back to properties I can see that there was no changes. Please help.

    ASP.NET database help windows-admin announcement lounge

  • How can I show text and HTML with image extracted from DB.
    R Runar

    I have used article on how to save and show image from db: http://www.codeproject.com/aspnet/fileupload.asp?target=upload|image|database The form tag is set to

    I have tried to extract text and the image from db. I can see the image but not the text. I guess the form tag attribute enctype has something to do with this. Can anyone help me. Runar

    ASP.NET question html asp-net database com
  • Login

  • Don't have an account? Register

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