How can i compare two XML files storeds in a LONG column

Hi,
I need to compare two xml files. My xmls are stored in two table like this:
Table 1
ID_COL number(5);
XML1 LONG()
Table 2
ID_COL number(5);
XML2 LONG()
I need compare the values of the tags of this xmls files e to list de differences.
Tks,
Fernando.

yes odie you are right...i think that my xml is wrong...
I would like to compare every element/attribute...
Bellow is another xml...this is ok....tks
<?xml version="1.0" encoding="UTF-8" ?>
- <nfeProc xmlns="http://www.portalfiscal.inf.br/nfe" versao="2.00">
- <NFe xmlns="http://www.portalfiscal.inf.br/nfe">
- <infNFe Id="NFe31121059106377000172550010003957681605366269" versao="2.00">
+ <ide>
<cUF>31</cUF>
<cNF>60536626</cNF>
<natOp>VDAS PROD ESTABELECIMENT</natOp>
<indPag>1</indPag>
<mod>55</mod>
<serie>1</serie>
<nNF>395768</nNF>
<dEmi>2012-10-03</dEmi>
<dSaiEnt>2012-10-03</dSaiEnt>
<hSaiEnt>18:30:00</hSaiEnt>
<tpNF>1</tpNF>
<cMunFG>3159605</cMunFG>
<tpImp>1</tpImp>
<tpEmis>1</tpEmis>
<cDV>9</cDV>
<tpAmb>1</tpAmb>
<finNFe>1</finNFe>
<procEmi>0</procEmi>
<verProc>1.0</verProc>
</ide>
+ <emit>
<CNPJ>59106377000172</CNPJ>
<xNome>METAGAL IND E COM LTDA</xNome>
<xFant>METAGAL INDUSTRIA E COMERCIO LTDA</xFant>
- <enderEmit>
<xLgr>ROD BR 459</xLgr>
<nro>333</nro>
<xCpl>KM 121</xCpl>
<xBairro>DISTRITO INDUSTRIAL</xBairro>
<cMun>3159605</cMun>
<xMun>SANTA RITA DO SAPUCAI</xMun>
<UF>MG</UF>
<CEP>37540000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>3534719100</fone>
</enderEmit>
<IE>5969141300009</IE>
<IM>01183</IM>
<CNAE>2949299</CNAE>
<CRT>3</CRT>
</emit>
+ <dest>
<CNPJ>59275792000150</CNPJ>
<xNome>GENERAL MOTORS DO BRASIL LTDA</xNome>
- <enderDest>
<xLgr>AV GOIAS</xLgr>
<nro>1805</nro>
<xBairro>BARCELONA</xBairro>
<cMun>3548807</cMun>
<xMun>SAO CAETANO DO SUL</xMun>
<UF>SP</UF>
<CEP>09501970</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
</enderDest>
<IE>636003724112</IE>
<email>[email protected]</email>
</dest>
- <det nItem="1">
+ <prod>
<cProd>XM20C9500PPR</cProd>
<cEAN />
<xProd>ESPELHO RETROVISOR EXTERNO</xProd>
<NCM>70091000</NCM>
<CFOP>6501</CFOP>
<uCom>PC</uCom>
<qCom>80.0000</qCom>
<vUnCom>35.8700000000</vUnCom>
<vProd>2869.60</vProd>
<cEANTrib />
<uTrib>PC</uTrib>
<qTrib>80.0000</qTrib>
<vUnTrib>35.8700000000</vUnTrib>
<indTot>1</indTot>
<xPed>XRW001RV</xPed>
<nItemPed>000001</nItemPed>
</prod>
- <imposto>
- <ICMS>
- <ICMS00>
<orig>0</orig>
<CST>00</CST>
<modBC>3</modBC>
<vBC>2869.60</vBC>
<pICMS>12.00</pICMS>
<vICMS>344.35</vICMS>
</ICMS00>
</ICMS>
- <IPI>
<CNPJProd>00000000000000</CNPJProd>
<cEnq>0</cEnq>
- <IPINT>
<CST>54</CST>
</IPINT>
</IPI>
- <II>
<vBC>0.00</vBC>
<vDespAdu>0.00</vDespAdu>
<vII>0.00</vII>
<vIOF>0.00</vIOF>
</II>
- <PIS>
- <PISNT>
<CST>08</CST>
</PISNT>
</PIS>
- <COFINS>
- <COFINSNT>
<CST>08</CST>
</COFINSNT>
</COFINS>
</imposto>
<infAdProd>PC.93378954-COMPL.PED.XRW001RV</infAdProd>
</det>
+ <total>
- <ICMSTot>
<vBC>2869.60</vBC>
<vICMS>344.35</vICMS>
<vBCST>0.00</vBCST>
<vST>0.00</vST>
<vProd>2869.60</vProd>
<vFrete>0.00</vFrete>
<vSeg>0.00</vSeg>
<vDesc>0.00</vDesc>
<vII>0.00</vII>
<vIPI>0.00</vIPI>
<vPIS>0.00</vPIS>
<vCOFINS>0.00</vCOFINS>
<vOutro>0.00</vOutro>
<vNF>2869.60</vNF>
</ICMSTot>
<retTrib />
</total>
+ <transp>
<modFrete>0</modFrete>
- <transporta>
<CNPJ>00980331000488</CNPJ>
<xNome>THALE TRANSPORTES E LOG. LTDA</xNome>
<IE>5963866160070</IE>
<xEnder>ROD BR 459-KM 121 - DIST INDL, S/N</xEnder>
<xMun>SANTA RITA DO SAPUCAI</xMun>
<UF>MG</UF>
</transporta>
- <veicTransp>
<placa>DPF8048</placa>
<UF>SP</UF>
</veicTransp>
- <vol>
<qVol>20</qVol>
<esp>OUTROS</esp>
<pesoL>64.000</pesoL>
<pesoB>104.000</pesoB>
</vol>
</transp>
+ <cobr>
- <fat>
<nFat>000000395768</nFat>
<vOrig>2869.60</vOrig>
</fat>
- <dup>
<nDup>1</nDup>
<dVenc>2012-11-20</dVenc>
<vDup>2869.60</vDup>
</dup>
</cobr>
- <infAdic>
<infCpl>VIA DE TRANSPORTE RODOVIARIA CODIGO : 108061 PEDIDO NRO : ACIMA FABRICA :72480 REDESPACHO ATRAVES DE VELOCE LOGISTICA S/A ESTRADA DOS ALVARENGAS SAO BERNARDO CAMPO ASSUNCAO SP CNPJ : 10.299.567/0003-26 IE : 635.600.028.11 IPI - IMUNE CFE.ART.18, INCISO II, DO RIPI - DECRETO No.7.212/2010. REMESSA COM FIM ESPECIFICO DE EXPORTACAOMERC.A SER EXPORT.P/GENERAL MOTORS DO BRASIL LTDA.DECEX=3-0322/10-0007 ESTOCA-GEM TEMPORARIA NA VELOCE LOGISTICA S.A. ESTR.ALVARENGAS,4018 B.ASSUNCAO S.B.C. CNPJ10.299.567/0003-26IE.635.600.028.110 FT NR.431.183 ROMANEIO :131.588</infCpl>
</infAdic>
</infNFe>
+ <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
- <SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1" />
- <Reference URI="#NFe31121059106377000172550010003957681605366269">
- <Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>jN2ozPH3/GvAS8Q5lh/t9bzuXCw=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>GAXPLvMCtIYdwMxXDcyL0kr5hCDPCFw8/uNYHFcdTMqBhLgIcEtzHRf8qioWlUVSHNf5jnCLKGjhDV4bEJqkcBhWsKouMzojQ+Z6hkFQAWNuJfPIzutmtRy3AePc5tHK0lI3tF3ws9memboJ8sW21IOWHB6eB0jK2gmhcOlDejc=</SignatureValue>
- <KeyInfo>
- <X509Data>
<X509Certificate>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</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</NFe>
- <protNFe versao="2.00">
- <infProt>
<tpAmb>1</tpAmb>
<verAplic>13_0_32</verAplic>
<chNFe>31121059106377000172550010003957681605366269</chNFe>
<dhRecbto>2012-10-03T17:35:55</dhRecbto>
<nProt>131120853536488</nProt>
<digVal>jN2ozPH3/GvAS8Q5lh/t9bzuXCw=</digVal>
<cStat>100</cStat>
<xMotivo>Autorizado o uso da NF-e</xMotivo>
</infProt>
</protNFe>
</nfeProc>

Similar Messages

  • How can i compare two excel files with different no. of records.

    Hi
    I am on to a small project that involves us to compare two excel files. i am able to do it but am struck up at a point. When i compare 2 different .csv files with different no. of lines i am only able to compare upto a point till when the number of lines is same in both the files.
    Eg. if source file has 8 lines and target file has 12 lines. The difference is displayed only till 8 lines and the remaining 4 lines in source lines are not shown.
    Can you help me in displaying those extra 4 lines in source file. I am attaching my code snippet below..
    while (((strLine = br.readLine()) != null) && ((strLine1 = br1.readLine())) != null)
                     String delims = "[;,\t,,,|]";
                    String[] tokens = strLine.split(delims);
                    String[] tokens1 = strLine1.split(delims);
                   if (tokens.length > tokens1.length)
                    for (int i = 0; i < tokens.length; i++) {
                        try {
                            if (!tokens.equals(tokens1[i])) {
    System.out.println(tokens[i] + "<----->" + tokens1[i]);
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + tokens1[i]);
    out.println();
    sno++;
    } catch (Exception exception)
    out.write(sno + " \t" + lineNo1 + " \t\t" + tokens[i] + "\t\t\t\t" + "");
    out.println();
    Thanks & Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    A CSV file is not an Excel file.
    But apart from that your logic makes no sense.
    If the 2 files are of different sizes the files are different by definition, so further comparison isn't needed, you're done.
    If you want to compare individual records, you need to compare all records from one file with all records from the other, unless the order of records is important in which case your current system might work.
    That system however is overly complicated for comparing CSV files.
    As you assume a single record per line, and if one can assume those records to have identical layout (so no leading or trailing whitespace in or between columns in one file that's not in the other) comparing records is simply a matter of comparing the entire lines.

  • How can compare two xml files.........

    Hi developers..........
    I have a problem in compare two xml files.My project description is I take two xml(file1,file2) files.Compare file1 with file2. Now I want what are the same words in to the file2.
    file1:
    <hello>
    <html>
    <jsp:plugin>
    file2:
    <hello>
    <jsp:usebean>
    <html>
    result:
    <hello>
    any give the code for this logic.....

    hi...can u pls send me the code which compares two
    xml files and gives the output as difference between
    two fileshttp://www.bmsi.com/java/#diff

  • How can I delete two .jpg files from my desktop that refuse to be deleted?

    How can I delete two .jpg files from my desktop that refuse to be deleted?

    The two icons refused to be moved to the garbage. The good part in all this is that ater I turned off the computer at night and turned it back on the next morning they were gone!
    Thanks.

  • How can (parse) i use XML file with missing EndTag

    hi,
    i have an application which writes an "XML file".
    another application should read that XML file, build an DOM and
    access the nodes with xpath.
    my problem. if the first application is not finished there are tags
    missing. e.g. </xml>. but the seconds application cannot wait until the first application finishes it task.
    if i now read the XML file the parser cannot load it because the end tags are missing.
    my question:
    how can i deactivate the check or how can i read the XML file and access it via XPath (my application is using at the moment XPath to access the nodes and i dont want to change that)
    as parser i am using XERCES
    alex

    As far as I know, you can't do this - xml must be well formed (this is sort of a bedrock of xml). There may be some work around's, but I'm not aware of any - and they would most likely be hacks.

  • Compare two XML files: Analysis and Design

    Hi, Java/XML/JDOM experts,
    I realised that an open source of Java utility to compare two XML is still missing. So I would like to write one for my JDOM excises.
    I plan to do it in three steps:
    1.Define the problem domain.
    2.Design the classes to be developed.
    3.Coding
    Below is the problem domain. Would you review it and tell me if it is fine?
    Best regards,
    AG
    Compare two XML files
    Schema assumption:
    The xml files used for the comparison must have the same schema.
    Definition:
    1. Two elements of simple type are said equal if their name and value are identical.
    2. Two elements of complex type are said comparable if their name, attributes are identical.
    3. Two elements of complex type are said equal if they are comparable and their children elements are identical.

    Hi,
    Thanks for reviewing my idea.
    The xml files used for the comparison must have the
    same schema.Including not having a schema at all? And if they do
    have a schema, must they be valid according to the
    schema?I will only support schema based xml files. To include a schema is a good practice. So I will valid them agaisnt schema (is this possible with JDOM? I am testing ...)
    >
    2. Two elements of complex type are said comparableif
    their name, attributes are identical.
    3. Two elements of complex type are said equal ifthey
    are comparable and their children elements are
    identical.Do you plan to require child elements to appear in the
    same order for the two documents to be equal? (Note
    that XML specifically says that the order of
    attributes is not significant.)No. The order is not significant as I use the attributes as the keys to find comparable element counterpart.
    Here is the sample code already tested. Any comments are welcome!
    The next step is to define the "delta xml schema" that will guide me to store the comparasion results. Do you have any suggestions?
    Regards.
    AG
    public static boolean comparable(Element element1, Element element2)
         boolean returnValue=false;
         if (element1.getName()!=element2.getName()) {
              return returnValue;
    } else {
              returnValue=true;
                        System.out.println ("place 2");
         List attributeList=element1.getAttributes();
         Iterator attributeIterator=attributeList.iterator();
         Attribute workingAttribute=null;
         while (attributeIterator.hasNext()) {
                             if (!workingAttribute.getValue().equals(
                             element2.getAttribute(workingAttribute.getName(), workingAttribute.getNamespace()).getValue()))
                                  returnValue=false;
                                  break;
         return returnValue;

  • How can I compare two summary field in cross-tab?

    <p>Dear expert:</p><p>I have one question for how can I compare two summary field in cross-tab?  I have following cross-table:</p><p>Type          Sector1     Sector2    Sector3       Total </p><p>Outlook         10            11           9              30         </p><p>Target            5              3           1               9</p><p>I want to compare the summary field(total) relationship percent, I want to get "9/30". Someone told me I must create the DB view or table via SQL, then can implete in Crystal Report. Can I implete it in Crystal Report via fomula or other function?</p><p>Thanks so much for your warm-hearted help!</p><p>Steven</p>

    Hello Steven, yes you can compare summary fields, If you are comparing Summary to Target, or vice versa - you can do it within Crystal Reports.
    1. In Suppress conditional formula, create 2 Global variables: CurrentOutlook and CurrentTarger and get the current value.
    2. In Display String formula for Total show ToText(CurrentTarget/CurrentOUtlook) + "%".
    For more difficult cases of compariing fields in cross--tab, you may look into http://www.relasoft.net/KB10001.html.
    Best,
    Alexander

  • How can I pass a xml file to the webservice?

    Hello friends,
    How can I pass the XML file to any webservice API ?
    I have all the inputs of API in to the XML file.
    Please note:- I don't intend to do any .NET or Java coding to populate the data in the objects .Instead I plan to input the data to the webservice direcly from the XML file required schema.
    If necessary I can use Oracle Bpel process manager for it.
    Thanks and regards
    Ram Krishna Tripathi
    [email protected]

    Well, I've used it (or rather: tried it); did not/could not find the many options to export at a nearly lossless conversion for HD footage (hence my disclaimer "don't know"). Here is a screenshot of the Handbrake options:
    And here are the choices and settings from MPEG Streamclip:
    Maybe not empirical, but enough for me to have an opinion.

  • How can i write a XML file with oracle data ?

    How can i write a XML file using PL/SQL.
    Can i do as follows.
    1.Open a file using UTL_FILE.FOPEN(LC_DIR_LOC,'abc.xml','W')     ;
    2.write all the required tag and value using UTL.put_line
    that is enough. Is not, please guide me to write.
    gk

    Having Oracle 9i.
    One more doubt. In the speck, some constand values are there, When i write the same into file, How can i write ?.
    1. l_str := ' "E27" '
    or
    2. l_str := ' E27 '
    UTL_FILE.PUT_LINE(L_FILE_POI,l_str,TRUE);          
    1 case : in XML file : "E27"
    In 2 case : E27
    When we write a XML file through editors , we have to define the constant within quote . is it?      
    Which one can i use ? Or any other way is there ..
    Thanks and Regards
    gopi

  • Compare two xml files

    hi all,
    i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
    can any body tell me, how two xml files can be compared.
    for example
    i have file 1(standard)
    <Message-Header>
    <Message-Id>1234</Message-Id>
    <Sender-Company-ID>4569</Sender-Company-ID>
    <Sender-Company-Name>abc company</Sender-Company-Name>
    <Sender-User-ID>AA</Sender-User-ID>
    <Recv-Company-ID>050</Recv-Company-ID>
    <Recv-Company-Name>XYZ pvt.ltd</Recv-Company-Name>
    <Creation-Time>20101019 15:59:39</Creation-Time>
    <cons>
    <con>
    <con_number>xsu667</con_number>
    </con>
    </cons>
    </Message-Header>
    i have file 2(came from user)
    <Message-Header>
    <Message-Id>1234</Message-Id>
    <Sender-Company-ID>4569</Sender-Company-ID>
    <Sender-Company-Name>abc company</Sender-Company-Name>
    <Sender-User-ID>AA</Sender-User-ID>
    <Recv-Company-ID>050</Recv-Company-ID>
    <Recv-Company-Name>XYZ pvt.ltd</Recv-Company-Name>
    <Creation-Time>20101019 15:59:39</Creation-Time>
    <cons>
    <con>
    <con_number>xsu667</con_number>
    </con>
    <con>
      <con_number>xsu669</con_number>
    </con>
    </cons>
    </Message-Header>how to map two files. do we have to compare line by line?
    the file2 have to match with respect to structure and also data.
    any suggestions are welcome.
    Edited by: user13329002 on Oct 24, 2010 5:48 AM

    user13329002 wrote:
    hi,
    i am not aware of these things(merge file).
    can u tell me,what is the ultimate result of this merging.
    and can u tell the stepts to acheive this..
    Thanks..a) write files down to temporary directory by using text_io
    b) call an external program you installed on the client like winmerge, windiff or about 100000 other programs out ther that can show you the differences of two files
    this programs you pass the two files you wrote to disk at step a

  • Can we Concatinate two XML files to a single output?

    I was stuck up with one scenario where I am getting a XML file output from a File Adapter say x1.
    And another XML file output say x2 from other adapter. Now I want to club this two XML files into a single output where it should contain the contents of x1 and x2
    When I am doing the Transformation I am getting the two files in the output folder but I want single file as output. Is it possible with ESB? If so Please suggest.
    --Chandra                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Chandra,
    Maybe the enrichment interaction scenario would work in your case.
    My colleague Lucas Jellema wrote a blog post on it: http://technology.amis.nl/blog/?p=1464.
    Or putting the same in a larger perspective: http://www.oracle.com/technology/pub/articles/jellema-esb.html.
    Hth,
    Sjoerd

  • How can i compare two databases and their tables

    i have a text.txt file then
    i will insert it into db_header and db_details
    db_header has tbl_pcountheader with fld_Rack_No(char) PK and fld_DateAdded(date) PK
    db_details has tbl_pcountdetails with fld_Rack_No(char) PK, fld_Barcode(char) PK and fld_Quantity(int)
    then i will lookup in db_products
    db_products has tbl_products and tbl_barcodes
    tbl_products has fld_ItemCode
    tbl_barcodes has fld_Barcode and fld_ItemCode
    now i want to make a prompt contains
    Rack No: Date:
    Counter No:
    Barcode | Item Code | Item Description | Quantity
    how can i fill up this by comparing db_details and db_products?
    Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
    If saveCheckBox.Checked = False Then
    MsgBox("Please click the box to continue.")
    Return
    End If
    If lb_file.SelectedItem Is Nothing Then
    MessageBox.Show("Please select a file.")
    Exit Sub
    End If
    ' Obtain the file path from the list box selection.
    Dim filePath = lb_file.SelectedItem.ToString
    ' Verify that the file was not removed since the Browse button was clicked.
    If System.IO.File.Exists(filePath) = False Then
    MessageBox.Show("File Not Found: " & filePath)
    Exit Sub
    End If
    ' Obtain file information in a string.
    Dim fileInfoText As String = GetTextForOutput(filePath)
    'LookUP db_header, db_details and db_products
    Dim cs As String = "Database=;Data Source=localhost;" _
    & "User Id=root;Password=1234"
    Dim conn As New MySqlConnection(cs)
    Dim ds As New DataSet
    Dim da As New MySqlDataAdapter
    Dim cmd As New MySqlCommand
    Dim dt As New DataTable
    Dim stm As String = "SELECT tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded, tbl_pcountdetails.fld_Barcode, tbl_products.fld_ItemCode, tbl_products.fld_ItemDesc, tbl_pcountdetails.fld_Quantity FROM db_header.tbl_pcountheader INNER JOIN db_details.tbl_pcountdetails ON db_details.tbl_pcountdetails.fld_Rack_No = db_header.tbl_pcountheader.fld_Rack_No INNER JOIN db_products.tbl_barcodes ON db_details.tbl_pcountdetails.fld_Barcode = db_products.tbl_barcodes.fld_Barcode INNER JOIN db_products.tbl_products ON db_products.tbl_barcodes.fld_ItemCode_fk = db_products.tbl_products.fld_ItemCode GROUP BY tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded ORDER BY tbl_pcountheader.fld_Rack_No"
    ds = New DataSet
    Try
    conn.Open()
    da = New MySqlDataAdapter(stm, conn)
    da.Fill(ds, "tbl_pcountheader")
    DataGridView1.DataSource = ds.Tables("tbl_pcountheader")
    Dim headers = (From header As DataGridViewColumn In DataGridView1.Columns.Cast(Of DataGridViewColumn)() _
    Select header.HeaderText).ToArray
    Dim rows = From row As DataGridViewRow In DataGridView1.Rows.Cast(Of DataGridViewRow)() _
    Where Not row.IsNewRow _
    Select Array.ConvertAll(row.Cells.Cast(Of DataGridViewCell).ToArray, Function(c) If(c.Value IsNot Nothing, c.Value.ToString, ""))
    Using sw As New IO.StreamWriter("c:\report.txt", append:=True)
    sw.WriteLine(String.Join(",", headers))
    For Each r In rows
    sw.WriteLine(String.Join(",", r))
    Next
    End Using
    ds.WriteXmlSchema("Sample.xml")
    Dim cr As New CrystalReport1()
    cr.SetDataSource(ds)
    CrystalReportviewer1.ReportSource = cr
    CrystalReportviewer1.Refresh()
    Catch ex As MySqlException
    MsgBox("Error: " & ex.ToString())
    Finally
    conn.Close()
    End Try
    ' Show the file information.
    Dim PrintPrompt As String
    PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
    If PrintPrompt = vbYes Then
    'fileInfoText.print()
    If saveCheckBox.Checked = True Then
    ' Place the log file in the same folder as the examined file.
    Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
    Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
    Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
    ' Append text to the log file.
    'System.IO.File.AppendAllText(bakFilePath, bakText)
    My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
    'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
    'My.Computer.FileSystem.DeleteFile(bakFilePath)
    'Form2.Show()
    End If
    'Note: This message box shows that you've uploaded a file and back up it.
    MessageBox.Show("Already backed-up to ")
    Else
    'Me.Close()
    'Application.Exit()
    'End
    End If
    'Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    'Form2.Close()
    'Me.Close()
    End Sub
    here's my final code that solves my problem.
    i just make the environment of vb into mysql console
    so that i can call all the database that i wanted.

    Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
    If saveCheckBox.Checked = False Then
    MsgBox("Please click the box to continue.")
    Return
    End If
    If lb_file.SelectedItem Is Nothing Then
    MessageBox.Show("Please select a file.")
    Exit Sub
    End If
    ' Obtain the file path from the list box selection.
    Dim filePath = lb_file.SelectedItem.ToString
    ' Verify that the file was not removed since the Browse button was clicked.
    If System.IO.File.Exists(filePath) = False Then
    MessageBox.Show("File Not Found: " & filePath)
    Exit Sub
    End If
    ' Obtain file information in a string.
    Dim fileInfoText As String = GetTextForOutput(filePath)
    'LookUP comparison db_details to db_products
    'Dim connString As String = "Database=db_products;Data Source=localhost;" & "User Id=root;Password=1234"
    'Dim conn As New MySqlConnection(connString)
    'Dim cmd As New MySqlCommand()
    'Try
    ' conn.Open()
    ' cmd.Connection = conn
    ' cmd.CommandText = "SELECT Database1.dbo.TableName.ColumnName, Database2TableName.Name, 'The reason why Database 2 isnt defined is the fact that it has been defined in the connection" _
    ' FROM Database2TableName INNER JOIN _
    ' Database2TableName2 INNER JOIN _
    ' WHERE (Database1.dbo.TableName.ColumnName = '')"
    ' cmd.Prepare()
    ' cmd.ExecuteNonQuery()
    ' conn.Close()
    'Catch ex As Exception
    'End Try
    ' Show the file information.
    Dim PrintPrompt As String
    PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
    If PrintPrompt = vbYes Then
    'fileInfoText.print()
    If saveCheckBox.Checked = True Then
    ' Place the log file in the same folder as the examined file.
    Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
    Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
    Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
    ' Append text to the log file.
    'System.IO.File.AppendAllText(bakFilePath, bakText)
    My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
    'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
    'My.Computer.FileSystem.DeleteFile(bakFilePath)
    Form2.Show()
    End If
    'Note: This message box shows that you've uploaded a file and back up it.
    MessageBox.Show("Already backed-up to ")
    Else
    Me.Close()
    Application.Exit()
    End
    End If
    Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    Form2.Close()
    Me.Close()
    End Sub
    here's my code wherein i have to compare the two database and save it into .txt file
    i just have to get this items
    Rack No:
    Date:
    Counter No:
    Barcode:
    Item Code:
    Item Description:
    Quantity:
    as a prooflist to be print out.

  • How can I compare two collections at the same time? (View two grid views)

    I have two collections containing some of the same images. (My Nikon D70 did not put an end-of-file on some images. I recovered them into a different collection.) Now I want to display both collections side-by-side in grid view. I will select those images in the "recovered" collection that correspond to the bad images in the "main" collection, add the ratings etc, and move just these to another collection.
    It is extremely frustrating to have to bounce back and forth between collections, remembering each image one by one and selecting it in the "recovered" collection. (The image names are not preserved in the "recovered" collection -- I have to go by what the image looks like.)
    LightRoom allows me to compare photos in the compare view. I want to compare collections in two grid views.

    CaptureTheLight,
    you have ran into a situation when you have to compare two sets of images and now you're wondering how come Lightroom doesn't have such "obviously necessary" functionality? But you have to admit it, this is not such a common situation in a photographer's workflow recovers broken files and tries to compare them against themselves. I think it's a pretty specific feature you need. Still, Lightroom has enough powerful tools for editing and sorting images.
    For example...
    You could just put them all - "main" and "recovered" - into a single collection or into the Quick Collection. Label the entire "recovered" collection with, say, red and sort by capture time. Now you'll have everything side by side, ordered chronologically. The "recovered" images will stay next to the "main" images since their capture time will be the same, and they will also stand out since they have the red label.
    Make the thumbnails bigger and set up the grid view so it tints the thumbnail cell are tinted with the label color. Now, you can go quickly through them visually checking labeled vs unlabeled.

  • How do I compare two csv files and not disable the user if the username is found in the 2nd file using powershell?

    Hi Guys
    I have two csv files with the following headers and I need to import both files into the script to check whether the StaffCode is present in the Creation/Renewal of Contract csv in a DisableAccount Script so I can stop any action to disable the account as
    the staff has renewed the contract with the company so the account should not be disabled.
    However my accounts are still being disabled. I am not sure now to construct the query so that it detects that the account is to be left alone if the staffcode is present in both files
    I does recognize that the $staffcodeN in the renewal file matches the $staffcode in the termination file
    but still proceeds to disable or set an expiry date to the account anyway based on the termination file. 
    How do I stop it from doing that?
    1)In the Creation/Renewal of contract file the following headers are present
         -  TranCode,StaffCode,LastName,FirstName,SocialSecurityNo,DateJoin,Grade,Dept,LastUpdateDate,EffectiveDate
    2)In the Disable of contract file the following headers are present
        - TranCode,StaffCode,LastName,FirstName,SocialSecurityno,LastDateWorked,Grade,Dept,LastUpdateDate,
    My data is not very clean , I have a-lot of special characters such as = , ' ,/ and \ characters to remove first before i can compare the data
    Thanks for the help in advance.
    Yours Sincrely
    Vicki
    The following is a short snippet of the code 
    $opencsv = import-csv "D:\scripts\Termination.csv"
    $opencsv2 = import-csv "D:\scripts\RenewContractandNewStaff.csv"
    foreach ($usertoaction in $opencsv) 
    $Trancode = $usertoactionTranCode
    $StaffCode = $usertoaction.StaffCode.replace("=","").replace('"','')
    $LastName = [string]$usertoaction.LastName.Replace("/","\/").Replace(",","\,")
    $FirstName = [string]$usertoaction.FirstName.Replace("/","\/").Replace(",","\,")
    $socialsecurityno = $usertoaction.SocialSecurityNo.replace("=","").replace('"','')
    $DateJoin = $usertoaction.DateJoin.replace("=","").replace('"','')
    $LastDateWorked = $usertoaction.LastDateWorked.replace("=","").replace('"','')
    $Grade = [string]$usertoaction.Grade
    $Dept = [string]$usertoaction.Dept
    $LastUpdateDate = $usertoaction.LastUpdateDate.replace("=","").replace('"','')
    $AccountExpiry = [datetime]::Now.ToString($LastDateWorked)
    foreach ($usertoaction2 in $opencsv2) 
    $TrancodeN = $usertoaction2.TranCode
    $StaffCodeN = $usertoaction2.StaffCode.replace("=","").replace('"','')
    $socialsecurityNoN= $usertoaction2.SocialSecurityNo.replace("=","").replace('"','')
    $DateJoinN = $usertoaction2.DateJoin.replace("=","").replace('"','')
    $GradeN = [string]$usertoaction2.Grade
    $DeptN = $usertoaction2.Dept
    $LastUpdateDate = $usertoaction.LastUpdateDate.replace("=","").replace('"','')
    $EffectiveDate = $usertoaction.EffectiveDate.replace("=","").replace('"','')
    $LastName2 = [string]$usertoaction2.LastName.Replace(",", "").Replace("/","").trim()
    $FirstName2 = [string]$usertoaction2.FirstName.Replace("/","").trim()
    # Use DirectorySearcher to find the DN of the user from the sAMAccountName.
    $Domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
    $Root = $Domain.GetDirectoryEntry()
    $Searcher = [System.DirectoryServices.DirectorySearcher]$Root
    $Searcher.Filter = "(sAMAccountName=$samaccountname)"
    $doesuserexist1 = $Searcher.Findall()
    if ($doesuserexist1 -eq $Null)
    {Write-Host $samaccountname "account does not exist"}
    elseif ($StaffCodeN -match $staffcode)
    write-host "user has renewed the contract, no action taken"
    else
    if(($lastupdatedate -ne $null)-or($LastDateWorked -ne $null))
                        write-host "Setting Account Expiry to"$accountexpirydate
    #$ChangeUser.AccountExpires = $accountexpirydate
               #$Changeuser.setinfo()
    if ($UserMailforwarding -ne $null)
    #Set Account expiry date to Last Date Worked
    # $ChangeUser.AccountExpires = $accountexpirydate
    # $Changeuser.setinfo()
     write-host "staff" $displayname "with staff employee no" $samaccountname "has                          
    mailforwarding" 
    Write-host "Please disable the account manually via Active Directory Users & Computers and 
    Elseif ($accountexpirydate -lt $todaysdate)
    #disable the account

    Hi Vicki,
    This Forum has an insert-codeblock function. Using it will make your script far more readable
    Your script is missing some parts, it is impossible to follow the problem.
    You are performing the same string cleaning action on $opencsv2 for each element in $opencsv, when doing it once should suffice. Why not start it all by cleaning the values and storing the cleaned values in new arrays?
    The Compare-Object function is great, why not take it out for a stroll on these lists, it might just safe you lots of unnecessarily complicated code ...
    You are creating a new $Domain, $Root and $Searcher object each iteration, when doing it once should suffice. Probably not much of a time-saver, but every little thing contributes.
    Try pinpointing the problem by doing extensive logging, not only by writing which action was taken, but writing the inidividual information (variables, mostly) before evaluation occurs. Your if/elseif/else looks sound, so if it's still not doing what you
    want, the ingoing data must be different from what you think should be there.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Comparing two xml files in pl/sql

    What is the best way to compare two 'complex' xml structures and return the difference using a plsql procedure/function. Example:
    FUNCTION f_equals(XMLTYPE actualxml, XMLTYPE expectedxml) RETURN VARCHAR2
    this should return 'EQUAL' if they are equal and the actual node with value if different..
    Can somebody throw some ideas please?

    The solution would depend on what you are trying to achieve, is it node to node comparison? overall file comparison? If there is any difference in either of the aforementioned approach, do what with the result?

Maybe you are looking for

  • Appraisal Document : POWL Setting

    Hi Expert, We have used POWL to Display Appraisal Document for Employee /Manager.But Employee/Manager go in repective tab all the columns are visible which are not relevant to EMP/Manager Like Plan Version,Appraisal Doc Id,offline Status. I just want

  • Chart type in WAD?

    Hi, I am working on charts of cone type in WAD(7.0).But I am not finding the cone shape charts.Can any one help me out. Thanks in Advance. Ravi

  • Dreamweaver CS3 "embedded" Flash in my index...

    ...and now the page won't validate. A little background, I was using the "Insert Image Viewer" on my site's index page because I needed a simple rolling montage of informational pictures that was (fairly) easily update-able. Photoshop is my strong su

  • Configure ports

    Please could I get help in some configurations. Remote debugging requires that the debugger be allowed to receive information from network. Remote debugging also requires DCOM (TCP port 135) and ISPEC (UDP 4500 / UDP 500) be unblocked. where do I do

  • Cannot integrate SASL/GSSAPI with SunOne 5.2

    Hi Sir I am using following configuration 1. iPlanet directory server 5.2 2. Solaris 9.0 3. KDC available with solaris 4. I am not using any SSL certificates Goal: To be able to authenticate a ldap user thru kerberos I have been successfully able to