hi,
i had stored the image in database. now i want 2 retrieve through asp.net. while running the program it shows the error like "cannot determine type".. i had given the codes below. can anyone help me to trace the problem. and i need know abut the content type. which site is useful to know abut content type.
Dim con As OleDbConnection
con = New OleDbConnection ("provider=micr osoft.jet.oledb .4.0; data source = c:\inetpub\wwwr oot\webapplicat ion1\reports.md b")
Dim k As Integer
Dim ds As New DataSet()
k = DataGrid1.DataK eys(e.Item.Item Index)
Dim da As New OleDbDataAdapte r("select inputs from problem where cc = " & k & " ", con)
da.Fill(ds, "problem")
Dim myRow As DataRow
myRow = ds.Tables("prob lem").Rows(0)
Dim MyData() As Byte
MyData = myRow("inputs")
Response.Conten tType = "applicatio n/octet-stream"
Response.Conten tType = "image/jpeg"
Response.AddHea der("content-disposition", "attachment;fil ename= nk.jpeg")
Response.Binary Write(MyData)
regards
m.arunachalam
i had stored the image in database. now i want 2 retrieve through asp.net. while running the program it shows the error like "cannot determine type".. i had given the codes below. can anyone help me to trace the problem. and i need know abut the content type. which site is useful to know abut content type.
Dim con As OleDbConnection
con = New OleDbConnection ("provider=micr osoft.jet.oledb .4.0; data source = c:\inetpub\wwwr oot\webapplicat ion1\reports.md b")
Dim k As Integer
Dim ds As New DataSet()
k = DataGrid1.DataK eys(e.Item.Item Index)
Dim da As New OleDbDataAdapte r("select inputs from problem where cc = " & k & " ", con)
da.Fill(ds, "problem")
Dim myRow As DataRow
myRow = ds.Tables("prob lem").Rows(0)
Dim MyData() As Byte
MyData = myRow("inputs")
Response.Conten tType = "applicatio n/octet-stream"
Response.Conten tType = "image/jpeg"
Response.AddHea der("content-disposition", "attachment;fil ename= nk.jpeg")
Response.Binary Write(MyData)
regards
m.arunachalam