If i use byte then it return an error message as i understand this occur due to datatype conversion, but how can i read the binary data from table. When the above line is reached then i got the error as specified cast is not valid. Var SelectQueryForFileContent = dc.ExecuteQuery("Select file_content from FILE_MASTER") Var SelectQueryForFileFormat = dc.ExecuteQuery(Convert.ToString(Session)) Var SelectQueryForFileName = dc.ExecuteQuery(Convert.ToString(Session)) String datatype3 = "System.String" string datatype4 = "System.Int64" ĭataContext dc = new DataContext(Convert.ToString(Session)) ĭataColumn dc_filename = new DataColumn(Convert.ToString(Session)) ĭc_filename.DataType = (datatype1) ĭataColumn dc_filecontent = new DataColumn(Convert.ToString(Session)) ĭc_filecontent.DataType = (datatype2) ĭataColumn dc_fileformat = new DataColumn(Convert.ToString(Session)) ĭc_fileformat.DataType = (datatype3) ĭataColumn dc_filesize = new DataColumn(Convert.ToString(Session)) ĭc_filesize.DataType = (datatype4) String datatype1 = "System.String" string datatype2 = "System.Byte" I upload some files(image,text file) to image datatype column as binary format using LINQ, now i want to retrieve those files, i have write the following codeĪrrayList alFileContent = new ArrayList() ĪrrayList alFileFormat = new ArrayList() Hai am using Asp.net 3.5, Visual Studio 2008.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |