Checking txt,accdb files rec cnt

How to check the rec count of a file like .txt and .accdb, before loading the data I want to capture the rec count for these file, so that later can I compare it with the rec loaded in the sql table, to perform validation
Thanks
Neil

you can use rowcount transformation for that.
In SSIS data flow task where you use any of the above source, use rowcount task to capture count values to variable created in SSIS before you dump it to destination.
Then after data flow you can do check against variable using Execute sql task by passing the variable as a parameter.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Checking .txt file with valid XML tags

    hey guys,
    I've a .txt file which conatins info with XML tags. I've to check whether the file contains valid tags or not!
    a tag should start with "<" and end with ">", there shouldn't be space between characters after "<" e.g.
    a tag should be like "<name>" or "</name>" not "< name>" or  "< /name>" nor "<name" or "</name"nor "name>" or  "/name>"Here is an example of a well formed XML document:
    <root>
    Some text <nextTag> more text  <secondTag> stuff </secondTag> </nextTag> more text again
    </root>Here is an example of XML .txt file:
    <students >
         <student>
              <name> John </name>
              <name> Doe </name>
              <address> 98 Pine St.</address>
         </stdnt>
    </students>I also have to make sure that no text appears before and after the root tag! Please help me, i'm trying to figure out but my alogrithm just doesn't work! Thanks in advance!!!

    What's the purpose of those requirements? If you
    wanted to check whether the file was well-formed XML
    then you would just need to run it through an XML
    parser. But some of the things you plan to reject are
    actually well-formed XML. I don't see the point of
    that.basically, it's my assignment. In the assignment our task is to check the .txt files to make sure that all XML tags are valid. The problems i mentioned in my first post, i've figured those out, eventually. There're few other things which i've to also make sure for example no text appearing before and after the root tag
    Can someone please tell me how i can check following cases:
    text<root> or </root> text  (both are invalid XML files)

  • Error in checking a primary file

    Hi ,
    I am trying to use the CHECKIN_UNIVERSAL idcservice froma standalone java class. I have appeneded the following xml string in my request and trying to use a primary file from my local m/c.
    <code>
    requestString = "<?xml version='1.0' ?><SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"><SOAP-ENV:Body><idc:service xmlns:idc=\"http://www.stellent.com/IdcService/\" IdcService=\"CHECKIN_UNIVERSAL\"><idc:document dDocName="+param1+" dDocAuthor=\"sysadmin\" dDocTitle="+param2+" dDocType="+param3+" dSecurityGroup="+param4+" dDocAccount=''>
    <idc:file name=\"primaryFile\" href =`D:/soapfile.txt`></idc:file></idc:document></idc:service></SOAP-ENV:Body></SOAP-ENV:Envelope>";
    </code>
    But when I am trying to invoke the service from a jsp, I am getting the follwoing error in the response:
    <idc:field name="StatusMessage">Content item &#39;test&#39; was not successfully checked in. The content item must have a primary file.</idc:field>
    I need to fix this urgently. Please help!!.

    I've tried to not use CHECKIN_UNIVERSAL. I've written java class (extends ServiceHandler) that changes some binder parameters.
    Written Service on top of this:
    <tr>
         <td>TEST_CHECKIN_BYNAME</td>
         <td>DocService
              34
              null
              null
              null<br>
              null</td>
         <td>3:determineID::2:null
    3:doSubService:TEST_CHECKIN_SUB:0:null</td>
    </tr>
    <tr>
         <td>TEST_CHECKIN_SUB</td>
         <td>DocService
              34
              null
              SubService
              null<br>
              null</td>
         <td>3:TEST_prepareMetaData::0:null
    3:prepareCheckinSecurity::0:null
              3:checkSecurity::0:null
              3:doSubService:CHECKIN_NEW_SUB:0:null</td>
    </tr>
    So:
    1. If I put
    m_binder.addTempFile(tmpFileName);
    in my method TEST_prepareMetaData Checkin succeeds.
    2. If I do not put m_binder.addTempFile(tmpFileName); //tmpFileName is the link to file being uploaded
    The same error is thrown: "The content item must have a primary file"
    First question: Why?
    1. If I put
    m_binder.addTempFile(tmpFileName);
    in method TEST_prepareMetaData Checkin succeeds - status message "<idc:field name="StatusMessage">Successfully checked in content item 'TTT_0000001'.</idc:field>";
    BUT there is no content item in the ContentServer!!
    Seqond question: Why?

  • Unable to open connection to MS Access 2013 .accdb file Under WCF Web Service Project Using Windows 8.1 64bit

    I am encountering the following error when trying to connect to an Access 2013 database:
    The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.
    I have Visual Studio 2013 SP3 running on Windows 8.1 64bit OS which also has Office 2013 installed (which includes MS Access 2013).  My project is a WCF web service using .NET Framework 4.5.1 using any cpu as target.  I have tried reluctantly
    to install the older drivers as described by in the below article:
    https://social.msdn.microsoft.com/Forums/en-US/1d5c04c7-157f-4955-a14b-41d912d50a64/how-to-fix-error-the-microsoftaceoledb120-provider-is-not-registered-on-the-local-machine?forum=vstsdb
     and also went through the "Add Data Source" wizard in the Project menu to have the connect string automatically built.  Even with the automatically built connect string I can not connect to the .accdb file from within my WCF web service.
    What's odd is if I use the Database Explorer in Visual Studio it has no problem connecting the my Access file.  I inspected the connect string and tried to use it as well but still get the same error. Even stranger is that I have no problem connecting
    to the Access DB in an ASP.NET project on the same PC. I am also able to connect to the Access file using a simple Windows Forms application.  So I'm wondering if it has something to do with trying to connect to the Access file from a WCF web service
    project.
    What I'd like to know is if anyone has been able to get this to work in an environment as I described above as a 64bit WCF web service project?  I tried to switch my project to 32bit but when I do I get a different error which reads:
    System.BadImageFormatException: Could not load file or assembly 'file:
    Almost to the point of trying to get this web service project done with SQL Express but would like to know if it can be done with MS Access 2013.  Any information anyone can provide to help me get past this issue is greatly appreciated. Thanks.

    Have you installed the 64-bit Access driver on your machine? See
    Data Source Names and 64-Bit Operating Systems for the differences in odbcad32. Call %SystemRoot%\system32\odbcad32.exe to check the drivers.
    How do you host your service? Stand-alone or IIS or embedded to another application? Keep in mind that IIS7 runs it in its application pool which is defaullt 64bit. Thus the bad image exception, when compiling your service as 32bit.
    When you need the Access database for your service to store informtation, then I would switch to SQL Server (Express) or XML files depending on your actual needs.
    Also check whether your account under which your service is run has the necessary NTFS file permissions on the access file and the folder. This is getting even more complex when it's a remote folder.

  • Dynamic file name in case of .txt output files

    Hi all,
    I have a query related to dynamic file name scenario.
    In case of IDOC-XI-FILE sceanrio,
    <b>Is it possible to generate .txt file name based on Plant number like</b>
    <b>%<Plantname>%_%<BusinessDay>_filename.txt</b>
    <b>Note:I have implemneted this for .xml output files but I am not able to implement it for .txt output files .</b>
    PLEASE HELP ME .
    Regards
    Prabhat

    Hi Prabhat,
    I think, the normal Dynamic File Name generation should work fine in your case also. Even if you perform Content Conversion, you can use Variable Name Substiution to create your Destination file name as, the name of the file is determined first and only then is the content converison perfromed.
    for info on content conversion, I would suggest that you go through this thread and check my reply,
    Re: Dynamic  File Name for Receiver File Adapter
    Regards,
    Bhavesh

  • Loading accdb file using for each loop in to single target table

    I have 3 accdb file as below in single folder, in control flow I have created a for each loop to loop through all the below file.  In dataflow task I have created oledb source using connection manager to point to first file a1.accdb. I am trying
    to load all the file into single below mentioned target table, here It is only loading first file it is not looping through other two file.
    This I have tried to load .txt files and csv files it is working perfectly but similarly when I try to load access db file table it is not working, can any one of you help me?
    1. a1.accdb contains only one table  a1tab ( col1 col2 col3 )  
    2. a2.accdb  contains only one table  a2tab  ( col1 col2 col3 )
    3. a3.accdb  contains only one table  a3tab   ( col1 col2 col3 )
    I have a target table with similar structure as source
    Target table <TargetTable> Col1 Col2 Col3
    aak

    Thanks Arthur, please find below response
    How do you handle the different table names?  Cant we handle it in a similar manner, how we handle the .csv/.txt files with different name and similar structure for sources(multiple files) and target (single table)
    Is it good to drop the idea of for each loop and create a separate task for each accdb file? to be loaded to same target table( performance wise etc.. any justification would be helpful)
    You must handle the connection string dynamically?
    Can you help me with the logic for handling connection string dynamically
    aak

  • Create .txt empty file After Message Processing Command Line Linux command

    Hi All,
    An empty .txt file has to be created in FTP location(FTP loc c:\xyz\Customer20082910.txt) only after the .dat file has been created(FTP loc c:\xyz\Customer20082910.dat)
    Note:.dat has the actual data and .txt is an empty file and is created only after .dat is created
    I know that .txt empty file can be created using the After Message Processing Command Line...
    But confused which command to be given such that it will be created in the FTP location(c:\xyz\Customer20082910.txt)
    Can any one please give the Linux command for it...
    Regards,
    Sridhar

    Hi Aamir,
    Thanks for the suggestion, I will ask my client to create a shell script at FTP server...
    And one more question,
    This is reverse side , now the .dat file is to be picked only if .txt exists at the FTP server (scenario File > XI>SAP) (earlier was SAP>XI>File)..
    So please can you suggest for this also...
    How can i check for the .txt and pick corresponding .dat file...
    i had posted question long back
    Need to pick .TXT file only if .CTL file is available
    Regards,
    Sridhar

  • How to check if the file already exists in the application server directory

    Hi all. I'm on devsuite 10g.
    I transfer file from local machine to application server using webutil function webutil_file_transfer.client_to_as and I want to check if the file I'm transfering already exists on the server directory.
    How can I make this?
    Thanks all,
    Fabrizio

    use the text_io package and open the file in read-mode.
    like this
    declare
    xFileType text_io.file_type;
    begin
    xFileType := text_io.fopen('c:\temp\test.txt','R'); --file on the middle tier
    -- file exists;
    text_io.fclose(xFileType);
    exception
    when others then
    --file doesn't exist
    end;
    regards
    Christian

  • Bash scripting, check filetype with file command

    Hi community,
    I've got as homework to write a script which uses the command file to check if a file is really a text file, and if yes echo its name.
    I wrote the following
    #!/bin/bash
    for filetype in *
    do
    a= file $filetype | cut -f2 -d' '
    b="ASCII"
    if [ "$a"="$b" ]
    then
    echo "$filetype"
    fi
    done
    however, this does not work.
    It just echoes the filetype and all the filenames.
    directory
    Desktop
    Bourne-Again
    existe
    gzip
    kernel26-one-2.6.27-3-i686.pkg.tar.gz
    Bourne-Again
    list
    Bourne-Again
    pidof
    empty
    ps
    Bourne-Again
    realjpg
    Bourne-Again
    taille
    ASCII
    temp.txt
    directory
    themes
    Any ideas?
    Why is the filetype echoed, when I declare it as a variable?
    Why does the condition thing not work?
    Basically, what am I missing?

    thanks for the ressource.
    here's the link
    http://tldp.org/LDP/abs/html/
    Thanks also for the answers, they were really helpful.
    ok, I wanted to post another problem I had but while I was pasting my code in here I realised my mistake.

  • Utl_file.open_file question to check if a file exists and is not empty

    Hello,
    I am trying to write a code where in 3 seperate files are created based on some parameter condition for the extract call.
    Say the parameters are NULL, 'A' and 'B'.
    When Null condition is passed to the extract call then it should create file A and B if records are found. If not it should create empty files.
    It is possible that the parameter to the extract is just 'A' then it would create A with say non zero file and B with zero file.
    Now when the extract is called with 'B' parameter and if the file A already exists and is not empty then I should not touch/overwrite it with empty records.
    Is there any simple way that I can do this to check if a file exists and is non empty?
    I am using
    open_file
    ( gv_utl_file_path
    ,lv_file_name
    ,lv_file_handle
    Please help.
    Thanks

    @OP : No Need to open
    SQL> declare
      2   lb_file_exist boolean;
      3   ln_size number;
      4   ln_block_size number;
      5  begin
      6   sys.utl_file.fgetattr('TEST_DIR','a.txt',lb_file_exist,ln_size,ln_block_size);
      7   if lb_file_exist then
      8    dbms_output.put_line('a Exists');
      9    dbms_output.put_line(to_char(ln_size));
    10   else
    11    dbms_output.put_line('a Not Exists');
    12   end if;
    13   sys.utl_file.fgetattr('TEST_DIR','b.txt',lb_file_exist,ln_size,ln_block_size);
    14   if lb_file_exist then
    15    dbms_output.put_line('b Exists');
    16    dbms_output.put_line(to_char(ln_size));
    17   else
    18    dbms_output.put_line('b Not Exists');
    19   end if;
    20   sys.utl_file.fgetattr('TEST_DIR','c.txt',lb_file_exist,ln_size,ln_block_size);
    21   if lb_file_exist then
    22    dbms_output.put_line('c Exists');
    23    dbms_output.put_line(to_char(ln_size));
    24   else
    25    dbms_output.put_line('c Not Exists');
    26   end if;
    27  end;
    28  /
    a Exists
    0
    b Exists
    3
    c Not Exists
    PL/SQL procedure successfully completed.Edited by: jeneesh on Mar 30, 2012 1:21 AM

  • Try to check whether a file already exists on disk by using fileExists

    Hy all,
    i try to check whether a file already exists on disk in my
    Action scirpt.
    I found this link about fileExists:
    link
    So i tried somethink like this in my code, but without
    success...
    if(fl.fileExists("file:///C|/toto.txt"))
    {gotoAndPlay(2);}
    else
    {gotoAndPlay(3);}
    Is it not the right syntax?
    Thank you for your help.

    Did you build and application from the swf with mProjector?
    The only
    way this and other mProjector functions will get called is to
    post
    process your swf into and application (exe / app) using
    mProjector.
    you can get a free trial here
    http://www.screentime.com/software/mprojector/demo.html
    On 2007-01-08 16:02:42 -0500, "Alexis Schneider"
    <[email protected]> said:
    John Pattenden
    Screentime Media - Flash Tools since 1997
    http://www.screentime.com

  • Check if pic-file loaded?

    Hi NG,
    i dont get it. I load in my project via random all the time a new pic. THis makes me problemes, because if the pic is not loaded, it shows to the time its loaded the old. Looks ugly!!!
    Is there not any way to proof if the file is loaded?
    Like i start on timeline 1 with loading and when timeline 100 is coming i proof if the pic-file is complete loadet = play, if not play(1) // means go back to 1 .....like such a preloader in flash AS.?
    But how can i proof if pic is loaded?
    sym.$("pivcture_xyz").error(function(){
    or something with
    sym.$("pivcture_xyz").load(function(){
    Thanks for ideas
    TELLO

    What if you copy it and then try to delete the original file?
    Message was edited by:
    ajaimesIn that case, the file will be deleted. Then, when you save the opened file, it will save as a new file. Then, how would you know if the file is being accessed or not?
    However, this could be the possible reason.....
    I'd bet the .txt file isn't "open" either. By "open"
    do you mean you have Notepad running with the
    contents of that file displayed in its window? That
    doesn't mean the file is "open" at all. That would
    just mean Notepad HAD opened it, read the contents
    into memory, and likely closed it. Then it
    showed the memory contents in a window.
    By: warnerjaYes. That is probably right. Now, I have some improvement in understanding what is happening. This does not happen with the other types of files like Word Documents, etc. Why? Dont they do the same thing? And Then, in the case of .txt files, how can we know if the file is open or not.
    I will reframe the title a little bit here: How can we check if a file is being accessed by other program or not?
    Any more comments or ideas.
    Thanks.

  • How to check-in multiple files with same name having different revision num

    Hi
    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Regards
    Raj
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • History report error: | An Exceptional Error occurred. Application exiting. Check the log file for error 5022

    Hi all
    I've got a error msg when try to generate a report using Cisco history report tool:
    Error | An Exceptional Error occurred. Application exiting.  Check the log file for error 5022
    It only happens when choose report template: ICD_Contact_Service_Queue_Activity_by_CSQ_en_us.
    User tried samething on other PC, it working fine.
    only on user' own PC and only choose this report, error appears.
    user runing windows 7 and do not have crystal report installed
    tried reinstalled the software, doesn't work.
    also tried this: (https://cisco-support.hosted.jivesoftware.com/thread/2041254) - doesn't work
    then tried https://supportforums.cisco.com/docs/DOC-6209  - doesn't work
    attached the log file.
    thanks.

    wenqianyu wrote:From the log file:Looks like you get a Login Window.Error message showed up after username/password be enteredThere is an error in the log: Error happened in comparing UCCX version and HRC versionYou may need to do a clean uninstall, download the Historical report from the server, and install it again on the PC.Does this only happen to one PC or to every PC with this application?Wenqian 
    I have completely uninstalled the HRC, and download from server install again -- still doesn't work with exactly same error.
    this matter only happens on this PC, when user try same thing on other PC, it works.
    so i think it not relate to server or account.

Maybe you are looking for

  • XML Page Generator

    http://jhilwig.com/xml_page/ Source Flash files to take standard XML and parse to mobile pages suitable for Symbian and Windows Mobile devices. There is some device resolution independence built in, but this could be improved upon. Any feedback appre

  • External Speakers = Only one works

    Hello there I'm having an issue with my speakers - I have some Altec Lansing speakers connected to my Dell Latitude E6400, and if I want to play audio, then there's only the right speaker working. 1. They run both if used with - for example - an MP3

  • Critical update won't load for office 2011 released 2.10.15

    A critical update appears  for Office 2011   released 2.10.2015   14.4.8  113.6 MB This update fixes critical issues. As soon as it goes through all the install process, it says it was successful, Then it immediatlely shows up as a critical update ne

  • Load balancing error 88: Cannot connect to message server (rc=9)

    Hi, We are facing a problem in the system object. initially we created a system object with loadbalancing template ,and everything worked fine, but after couple of months we found a error "Load balancing error 88: Cannot connect to message server (rc

  • Will there be a Lumia 900 trade-in program?

    Just curious to know if there will be some sort of trade in program for those of us that bought a Lumia 900?  I wouldn't expect it because it probably doesn't make a lot of fiscal sense but you guys would gain a TON of love if you made it happen.  Do