Click here to Skip to main content
15,899,679 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionExcel Error :( Pin
Mugdha_Aditya10-Aug-10 3:12
Mugdha_Aditya10-Aug-10 3:12 
GeneralRe: Excel Error :( Pin
Paladin200010-Aug-10 3:51
Paladin200010-Aug-10 3:51 
AnswerRe: Excel Error :( Pin
Prosanta Kundu online10-Aug-10 18:07
Prosanta Kundu online10-Aug-10 18:07 
QuestionMore than one programmer working on the EF4 model file Pin
Brendan Vogt10-Aug-10 2:48
Brendan Vogt10-Aug-10 2:48 
QuestionReplace ImagePlaceHolder1 in Word 2007 with the image selected in Combo box in C#.net Windows Application Pin
raghvendrapanda10-Aug-10 0:02
raghvendrapanda10-Aug-10 0:02 
AnswerRe: Replace ImagePlaceHolder1 in Word 2007 with the image selected in Combo box in C#.net Windows Application Pin
Prosanta Kundu online10-Aug-10 18:02
Prosanta Kundu online10-Aug-10 18:02 
GeneralRe: Replace ImagePlaceHolder1 in Word 2007 with the image selected in Combo box in C#.net Windows Application Pin
raghvendrapanda10-Aug-10 22:42
raghvendrapanda10-Aug-10 22:42 
Questionhex string to sql and to website Pin
meenu s9-Aug-10 12:32
meenu s9-Aug-10 12:32 
dears,i am using vs2005 web application.

one image information in hex format is like as follows.

000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A

my requirement is this hex data need to store in sql db and need to display in a website.
can anybdy help me to solve my problem??



In sql i inserted this data in an image coloumn like as follows(added ox).

INSERT INTO [Test_mm].[dbo].[PictureTable]
([Title]
,[DateAdded]
,[MIMEType]
,[Image])
VALUES
('jjj'
,'6/22/2010 3:12:04 PM'
,'hjhg'
,0x000125262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A73740D0A)

after inserting the data i tried to display this using the code below.But the picture box is coming with a red colour cross button?


Dim ImageID As Integer = Convert.ToInt32(Request.QueryString("ImageID"))
Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("NorthwindConnection").ConnectionString)
Const SQL As String = "SELECT [MIMEType], [Image] FROM [PictureTable] WHERE [ImageID] = @ImageID"

Dim myCommand As New SqlCommand(SQL, myConnection)
myCommand.Parameters.AddWithValue("@ImageID", ImageID)

myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader

If myReader.Read Then
Response.ContentType = myReader("MIMEType").ToString()
Response.BinaryWrite(myReader("Image"))
End If

myReader.Close()
myConnection.Close()
End Using

can anybdy help me to solve this ?i am troubling lot..pls pls help me
MEENU

QuestionQuestion about saving an image to SQL database Pin
Aptiva Dave9-Aug-10 10:09
Aptiva Dave9-Aug-10 10:09 
AnswerRe: Question about saving an image to SQL database Pin
NeverHeardOfMe9-Aug-10 10:32
NeverHeardOfMe9-Aug-10 10:32 
GeneralRe: Question about saving an image to SQL database Pin
InderK10-Aug-10 1:29
InderK10-Aug-10 1:29 
QuestionThread from code behind aspx Pin
devvvy9-Aug-10 2:34
devvvy9-Aug-10 2:34 
AnswerRe: Thread from code behind aspx Pin
Prosanta Kundu online9-Aug-10 2:52
Prosanta Kundu online9-Aug-10 2:52 
AnswerRe: Thread from code behind aspx Pin
NeverHeardOfMe9-Aug-10 3:27
NeverHeardOfMe9-Aug-10 3:27 
QuestionNeed example code for making an universal table editor... Pin
Hrizip8-Aug-10 21:14
Hrizip8-Aug-10 21:14 
AnswerRe: Need example code for making an universal table editor... Pin
R. Giskard Reventlov8-Aug-10 21:48
R. Giskard Reventlov8-Aug-10 21:48 
GeneralRe: Need example code for making an universal table editor... Pin
Hrizip9-Aug-10 1:41
Hrizip9-Aug-10 1:41 
Questionsum of work hours in rdlc Pin
Thanusree Duth8-Aug-10 19:14
Thanusree Duth8-Aug-10 19:14 
AnswerRe: sum of work hours in rdlc Pin
Tej Aj9-Aug-10 23:54
Tej Aj9-Aug-10 23:54 
QuestionPOP Up control Extender validation Pin
Amit Patel19858-Aug-10 19:01
Amit Patel19858-Aug-10 19:01 
AnswerRe: POP Up control Extender validation Pin
T M Gray9-Aug-10 11:17
T M Gray9-Aug-10 11:17 
GeneralRe: POP Up control Extender validation Pin
Amit Patel19859-Aug-10 19:42
Amit Patel19859-Aug-10 19:42 
GeneralRe: POP Up control Extender validation Pin
Mugdha_Aditya10-Aug-10 3:17
Mugdha_Aditya10-Aug-10 3:17 
GeneralRe: POP Up control Extender validation Pin
Mugdha_Aditya10-Aug-10 3:18
Mugdha_Aditya10-Aug-10 3:18 
Questionrdlc page break Pin
Thanusree Duth8-Aug-10 18:47
Thanusree Duth8-Aug-10 18:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.