إضغط لتفاصيل الإعلانات



Results 1 to 6 of 6
Share
  1. #1

    Default Hey all plz i need help..someone plz check with me this code and my logic

    i'm making a program that copmares between a folder contained pictures and an excel sheet that have the picture names...the idea is that the folder have the same pictures repeated but with a differnt name...i'm using w atool in .net framework named MD5 that encrypt all photos and return to me a 32 digit..that will be unique and through it i will be able to compare between all photos no matter how different are their names.
    First i compared between the 2 main things...excel sheet and my folder..if the xsl sheet contains a name exists in my folder...do the md5 thing comparison
    but the problem here is that my code deosn't return any thing..the code of comparing between both xsl and folder
    #region compare xsl & new folder
    string[] Files= Directory.GetFiles("C:\\Users\\Muca\\Pictures\\New Folder");
    PhotoConnection = newOleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\Muca\\Pictures\\Tesr.xls;Extende d Properties=Excel 8.0");
    PhotoCommand = newOleDbCommand(
    "select Singer from [Sheet1$]where Singer like '%"
    + Files + "%'"
    , PhotoConnection);
    PhotoConnection.Open();
    OleDbDataReader reader = PhotoCommand.ExecuteReader();
    while (reader.Read())
    {
    if (reader["Singer"].ToString().Contains(Files.ToString()))
    MessageBox.Show(reader["Singer"].ToString());
    }
    PhotoConnection.Close();
    #endregion

    please anyone can help do not hesitate reponding here or at my e-mail at yahoo as soon as possible
    *******@yahoo.com
    thanx alot in advance
    Last edited by Mohamed Fouad; 14-02-2009 at 07:26 PM. Reason: no email share on public! thanks..


  2. Facebook Comments - تعليقـك على الفيس بوك يسعدنا ويطور مجهوداتنـا


  3. Forum Ads:

  4. Forum Ads:

    اضفط هنا لمعرفة تفاصيل الإعلانات بالموقع


  5. Forum Ads:

    -->

  6. #2
    Join Date
    Nov 2007
    Location
    Arab world!
    Posts
    6,133
    Blog Entries
    4
    Rep Power
    10

  7. #3
    Join Date
    Jan 2009
    Location
    iN mY SElf
    Posts
    70
    Rep Power
    12

    Default

    dear MucaMucam

    i think u have to write the path with one backslash " / " not double "// "

    , may be this work with u

    actually i dont know other wrong in this code

    but make sure after each i/o operation that it's done correctly by simple if statment

  8. Forum Ads:

  9. #4

    Default

    try this ......



    bool flag=false;
    while (reader.Read())
    {



    foreach(string s in Files)
    {
    if (reader["Singer"].ToString()==s )
    {
    // true

    flag=true;
    MessageBox.Show(s);
    break;
    }
    }

    if(flage)
    {
    // do any thing
    }

    }
    }
    PhotoConnection.Close();

  10. #5
    Join Date
    Nov 2007
    Location
    Arab world!
    Posts
    6,133
    Blog Entries
    4
    Rep Power
    10

  11. Forum Ads:

  12. #6
    Join Date
    Sep 2011
    Location
    jingzhou
    Posts
    4
    Rep Power
    0

    Default

    thank you for your sharing, it is so useful to me.

Similar Threads

  1. Diagnostic check
    By warlock in forum Networks
    Replies: 0
    Last Post: 24-06-2011, 08:19 PM
  2. كتاب Logic Programming with Prolog
    By Mohamed Fouad in forum Computer and control systems
    Replies: 3
    Last Post: 06-06-2011, 06:58 AM
  3. Check Most Recent Vacancies
    By jobrpjobrp in forum Production
    Replies: 0
    Last Post: 27-01-2011, 02:39 PM
  4. How to check SRV records for OCS and Exchange!
    By Mohamed Fouad in forum Microsoft
    Replies: 0
    Last Post: 10-08-2010, 04:02 PM
  5. Logic game
    By Mohamed Fouad in forum Engineers discussions
    Replies: 11
    Last Post: 31-05-2008, 02:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

أقسام المنتدى

الروابط النصية

تابع جروبنا على الفيس بوك

صفحة Egypt Engineers على الفيس بوك

تابعنا على linkedin

جروبنا على الياهو جروب