Click here to Skip to main content
15,922,533 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: mod in C# Pin
Christian Graus23-Jun-08 23:58
protectorChristian Graus23-Jun-08 23:58 
AnswerRe: mod in C# Pin
Colin Angus Mackay23-Jun-08 23:58
Colin Angus Mackay23-Jun-08 23:58 
QuestionPlz Give me the solution : An existing connection was forcibly closed by the remote host. Pin
Virendrak23-Jun-08 23:44
Virendrak23-Jun-08 23:44 
AnswerRe: Plz Give me the solution : An existing connection was forcibly closed by the remote host. Pin
Arindam Tewary23-Jun-08 23:48
professionalArindam Tewary23-Jun-08 23:48 
AnswerRe: Plz Give me the solution : An existing connection was forcibly closed by the remote host. Pin
eyeseetee23-Jun-08 23:49
eyeseetee23-Jun-08 23:49 
QuestionTreeview FirstClick Porblem. Pin
Hasan Mohiuddin Farooqi23-Jun-08 23:44
Hasan Mohiuddin Farooqi23-Jun-08 23:44 
AnswerRe: Treeview FirstClick Porblem. Pin
windhopper24-Jun-08 1:19
windhopper24-Jun-08 1:19 
QuestionDisplaying image in image control Pin
garga123-Jun-08 23:40
garga123-Jun-08 23:40 
Can anybody tell me how to retrieve a image from ms access 2003 and bind it to image control.. i hv retrieved image successfully in a new page. But want to bind it to Image control.


My code is as following :

Uploading to Ms access // This code works fine

Dim intImageSize As Int64
Dim strImageType As String
Dim ImageStream As Stream
intImageSize = File1.PostedFile.ContentLength
strImageType = File1.PostedFile.ContentType
ImageStream = File1.PostedFile.InputStream

Dim ImageContent(intImageSize) As Byte
Dim intStatus As Integer
intStatus = ImageStream.Read(ImageContent, 0, intImageSize)


Dim MyConnection As New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\MyDataBase.mdb") & "")
Dim MyCommand As New Data.OleDb.OleDbCommand("INSERT INTO Images (ImageType,ImageData) VALUES (@ImgType,@img)", MyConnection)
Dim prImageType As New Data.OleDb.OleDbParameter("@ImgType", 255)
prImageType.Value = strImageType
MyCommand.Parameters.Add(prImageType)


Dim prImage As New Data.OleDb.OleDbParameter("@img", 255)
prImage.Value = ImageContent
MyCommand.Parameters.Add(prImage)

MyConnection.Open()
MyCommand.ExecuteNonQuery()
MyConnection.Close()


Retrieving Images from Msaccess

Dim MyConnection As New Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\MyDataBase.mdb") & "")
Dim MyCommand As New Data.OleDb.OleDbCommand("Select * from Images", MyConnection)
MyConnection.Open()
Dim myDataReader As Data.OleDb.OleDbDataReader
myDataReader = MyCommand.ExecuteReader()
' myDataReader = MyCommand.ExecuteReader(CommandBehavior.CloseConnection)
Do While (myDataReader.Read())
'Response.ContentType = myDataReader.Item("ImageType")
'Response.BinaryWrite(myDataReader.Item("ImageData"))
Loop

MyConnection.Close()

Thanks..
AnswerRe: Displaying image in image control Pin
eyeseetee23-Jun-08 23:51
eyeseetee23-Jun-08 23:51 
AnswerRe: Displaying image in image control Pin
Christian Graus23-Jun-08 23:59
protectorChristian Graus23-Jun-08 23:59 
GeneralRe: Displaying image in image control Pin
Krazy Programmer24-Jun-08 0:09
Krazy Programmer24-Jun-08 0:09 
QuestionDecent FREE rtf to pdf converter Pin
Mission31623-Jun-08 23:23
Mission31623-Jun-08 23:23 
AnswerRe: Decent FREE rtf to pdf converter Pin
eyeseetee23-Jun-08 23:50
eyeseetee23-Jun-08 23:50 
GeneralRe: Decent FREE rtf to pdf converter Pin
Mission31624-Jun-08 0:35
Mission31624-Jun-08 0:35 
GeneralRe: Decent FREE rtf to pdf converter Pin
eyeseetee24-Jun-08 0:59
eyeseetee24-Jun-08 0:59 
GeneralRe: Decent FREE rtf to pdf converter Pin
Mission31624-Jun-08 1:03
Mission31624-Jun-08 1:03 
QuestionRe: Decent FREE rtf to pdf converter Pin
Mission31624-Jun-08 20:51
Mission31624-Jun-08 20:51 
QuestionMapping another systems Pin
VanithaVasu23-Jun-08 23:08
VanithaVasu23-Jun-08 23:08 
AnswerRe: Mapping another systems Pin
eyeseetee23-Jun-08 23:18
eyeseetee23-Jun-08 23:18 
QuestionUsing ajax view only current week date......, [modified] Pin
Member 387988123-Jun-08 22:40
Member 387988123-Jun-08 22:40 
AnswerRe: Using ajax view only current week date......, Pin
eyeseetee23-Jun-08 23:18
eyeseetee23-Jun-08 23:18 
GeneralRe: Using ajax view only current week date......, Pin
Member 387988123-Jun-08 23:54
Member 387988123-Jun-08 23:54 
GeneralRe: Using ajax view only current week date......, Pin
eyeseetee24-Jun-08 0:15
eyeseetee24-Jun-08 0:15 
QuestionDropDown: display fields on selectitem Pin
Member 278944423-Jun-08 22:16
Member 278944423-Jun-08 22:16 
AnswerRe: DropDown: display fields on selectitem Pin
Christian Graus23-Jun-08 22:19
protectorChristian Graus23-Jun-08 22:19 

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.