I try to retrive the doc file from sqlserver,when i execute the code ask me
Do you want to open save file? when i click open button the doc file open with error "System.Byte[]"
Dim sql As String
Dim strcon As New Configsetting
Dim cnn As New OleDb.OleDbConnection(Configsetting.ConnectString)
Session("Req_SeCode") = e.Item.Cells(1).Text
cnn.Open()
sql = "Select Doc from mst_CandidateInfo where Can_Code=" & Session("Req_SeCode")
Dim cmd As New OleDb.OleDbCommand(sql, cnn)
Dim obj As Byte() = CType(cmd.ExecuteScalar(), Byte())
Response.ContentType = "Application/msword"
Response.BinaryWrite(CType(cmd.ExecuteScalar(), Byte()))
Response.[End]()
con.Close()