Click here to Skip to main content
15,920,633 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
//Check for JPG File Format 
                if (fileExtension == ".jpg" || fileExtension == ".JPG")
                // or // ImageFormat.Jpeg.ToString()
                {
                    try
                    {
                        //OCR Operations ... 
                        MODI.Document md = new MODI.Document();
                        md.Create(Convert.ToString(files.Current));
                        md.OCR(MODI.MiLANGUAGES.miLANG_ENGLISH, falsefalse);getting error in this linehow to solve this
                        MODI.Image image = (MODI.Image)md.Images[0];

                        StringWriter output = new StringWriter();
                        string temp;
                        temp = image.Layout.Text;


                        bool tr = temp.Contains(content_txt.Text);
                        if (tr)
                        {
                            using (SqlCeConnection con = cm.GetConnection())
                            {
                                string temp11 = files.Current.ToString();
                                string tempfilename = Path.GetFileName(temp11);
                                string sql = "SELECT Documents.wardrobe AS Stack_name,Documents.rack AS Rack_Name,Documents.filename As File_Name,Documents.title As Title,Documents.document_type AS Document_Type,Documents.tag1 AS Tag1, Documents.tag2  AS Tag2, Documents.tag3  AS Tag3, Documents.tag4  AS Tag4, Documents.date AS Created_Date from Documents where Documents.title='" + tempfilename + "' and Documents.tag1 like'" + keyword + "%' or Documents.tag2 like'" + keyword + "%' or Documents.tag3 like '" + keyword + "%' or Documents.tag4 like'" + keyword + "%';";
                                sql11 = sql;
                                SqlCeCommand cmd = new SqlCeCommand(sql, con);
                                SqlCeDataAdapter da = new SqlCeDataAdapter(cmd);
                                DataSet ds = new DataSet();
                                da.Fill(ds);
                                DataTable dt = ds.Tables[0];
                                finaltable.Merge(dt);


                            }
                        }



                    }
                    catch (Exception)
                    {
                        //uncomment the below code to see the expected errors

                    }
                }
Posted
Updated 23-May-13 21:58pm
v2

1 solution

This is just a code dump. There is no hint about 'where it happens'. You should spend some time reading the FAQ in order to make a better use of Quick Answer (and get better help).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900