+ Reply to Thread
Results 1 to 12 of 12

Applicatin is closing automatically without throwing any exception.

  1. #1
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Question Applicatin is closing automatically without throwing any exception.

    Hi all,

    I have devloped an application in VBA (Excel 2003) which imports lot of data (around 2,00,000 to 5,00,000 rows) from .csv files (as raw files) to .xls files.
    These .xls file will be created month wise (date is avalilable in csv files). Tool also creates one log file in which tool writes the number of rows updated from each file with file name and also logs errors if any occured. At a time tool can import 32 files. Most of the raw files are more than 15 MB. Tool takes around 1/2 an hour to import each file. I am using error handeler in each and every function and subroutines, but some times tool gets close without throwing any exception.
    The problem I am facing is some times tool suddenly gets closed while running which throwing any exception. From log file we can see that while importing which file tool got closed. And when we try to import the same file second time it gets imported without any error or without closing the tool.
    One of our user using this tool in Excel 2010 and he is facing the issue "Automation error: The object invoked has disconnected from its clients". This error is repeating for him in every 2 to 3 days . Problem is also same here when he import the same file second time, tool imports it without any error. I am not able to understand problem and not even able to duplicate the error. Please suggest me something to resolve this issue.

    Thanks in advance....
    Last edited by Gaurav Singh; 03-07-2014 at 03:30 AM.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Applicatin is closing automatically without throwing any exception.

    how are you doing the logging and what are you logging


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Thumbs up Re: Applicatin is closing automatically without throwing any exception.

    For logging information I am using .txt file.
    I am looging the .csv file name(raw file), how many rows has been imported in .xls files and some more addition information which is available in .csv file.

    For example:
    This is thing which tool is logging for each .csv file

    Importing DTC Report: CSV FILE NAME
    Number of Zero occurrence count - 0 12:25:26 AM (Additional information which is available in raw files)
    Number of duplicate codes - 17 12:25:27 AM (Additional information which is available in raw files)
    Number of codes are not imported due to unavailability of MID: 2751 (Additional information which is available in raw files)
    Importing DTC report completed 12:29:48 AM
    Total codes imported - 243480 12:29:48 AM (Number of rows imported)
    *Codes = Rows

    I am waiting for your reply

  4. #4
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Thumbs down Re: Applicatin is closing automatically without throwing any exception.

    Is there anyone who can suggest me something regading this issue on excelforum....?????
    I am getting this issue frequently...

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Applicatin is closing automatically without throwing any exception.

    Some of my questions/suggestions:-

    Before importing the data check the number of rows of import data and the available rows of the appending file.

    What is your actual file version?

    Can you please share the main code which you use for looping through the folder for files and import the data?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Applicatin is closing automatically without throwing any exception.

    Code is too much, it will not fit here.
    What I can tell you is:
    - If the problem is with range then tool must have thrown exception as I am using error handlers in all functions and sub.
    - Also tool is segregating each file's data in many level (Emission level wise -> Month wise -> MID wise in each file)
    - So we have 6 Emission level folder and data from 2009 to till date which is divided month wise and then MID wise.
    - We are using .xls file to save the data.
    Please find the attachment of sanpshots to undestand data segregation from each csv files.Images.zip

  7. #7
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Applicatin is closing automatically without throwing any exception.

    Code is too much, it will not fit here.
    What I can tell you is:
    - If the problem is with range then tool must have thrown exception as I am using error handlers in all functions and sub.
    - Also tool is segregating each file's data in many level (Emission level wise -> Month wise -> MID wise in each file)
    - So we have 6 Emission level folder and data from 2009 to till date which is divided month wise and then MID wise.
    - We are using .xls file to save the data.
    Please find the attachment of sanpshots to undestand data segregation from each csv files
    Images.zip

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Applicatin is closing automatically without throwing any exception.

    Screenshots just giving an overview about the files and folders, but it will not help in fixing the exact issue

    Just do right click on the modules and click Export and attached the exported files.

  9. #9
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Thumbs up Re: Applicatin is closing automatically without throwing any exception.

    Ok I am attaching .bas file
    In which main function is "Import_pldm_codes_report_Main"
    Please find the attachment.
    If required i will send the other modules also.
    Module2.zip

  10. #10
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Applicatin is closing automatically without throwing any exception.

    You state that "also logs errors if any occurred" but you don't.

    If you wrote all that code you must be reasonably competent so I won't embarrass you with detail.

    Check your handling of the error object after an error. And log all errors.

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    03-01-2014
    Location
    Hyderabad
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Applicatin is closing automatically without throwing any exception.

    Hi tony,

    thanx for your suggestion.
    Could you please explain me the exact mistake which I am doing and what should I do to make it work?
    Tool is logging errors that "Process Terminated, Unknown error has been detected." but its not logging the error details.
    And every time when any error occurs I am calling this ErrorHendler function.
    But when application closes suddendly this function(ErrorHandler) is not geting executed.
    Tool jst logs half information like:
    Start Time: 1:01:06 PM
    Date: 3/10/2014
    DTC Database Admin Tool Ver 0.607

    Importing Diagnostic Reports 1:01:07 PM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_07.csv
    Number of Zero Occurrence Count - 0 1:01:18 PM
    Number of Duplicate Rows - 227 1:01:20 PM
    Number of codes are not imported due to unavailability of MID: 3147
    Number of codes are not imported due to unavailability of CID and EID: 2469
    Importing DTC report completed 1:23:01 PM
    Total Codes Imported - 8192 1:23:01 PM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_07_2013_Q2.csv
    Number of Zero Occurrence Count - 0 2:33:53 PM
    Number of Duplicate Rows - 1 2:33:56 PM

    But if tool completes it process then it will log like:
    Start Time: 8:19:21 AM
    Date: 3/12/2014
    DTC Database Admin Tool Ver 0.608

    Importing Diagnostic Reports 8:19:23 AM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_01.csv
    Number of Zero Occurrence Count - 0 8:19:32 AM
    Number of Duplicate Rows - 17 8:19:33 AM
    Number of codes are not imported due to unavailability of MID: 2976
    Importing DTC report completed 8:26:53 AM
    Total Codes Imported - 3121 8:26:53 AM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_02.csv
    Number of Zero Occurrence Count - 0 8:26:59 AM
    Number of Duplicate Rows - 69 8:27:00 AM
    Number of codes are not imported due to unavailability of CID and EID: 121
    Importing DTC report completed 8:36:35 AM
    Total Codes Imported - 2594 8:36:35 AM

    End Time 8:39:17 AM
    Date : 3/12/2014

    And if any error occured tool will log like:
    Start Time: 8:19:21 AM
    Date: 3/12/2014
    DTC Database Admin Tool Ver 0.608

    Importing Diagnostic Reports 8:19:23 AM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_01.csv
    Number of Zero Occurrence Count - 0 8:19:32 AM
    Number of Duplicate Rows - 17 8:19:33 AM
    Number of codes are not imported due to unavailability of MID: 2976
    Importing DTC report completed 8:26:53 AM
    Total Codes Imported - 3121 8:26:53 AM

    Importing DTC Report: CEDE_DTC_Report_SN_prefix_list_02.csv
    Number of Zero Occurrence Count - 0 8:26:59 AM
    Number of Duplicate Rows - 69 8:27:00 AM
    Number of codes are not imported due to unavailability of CID and EID: 121

    Importig of codes has been stopped
    Process Terminated, Unknown error has been detected

    End Time 8:39:17 AM
    Date : 3/12/2014

  12. #12
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Applicatin is closing automatically without throwing any exception.

    Guarav,

    I contribute to this forum for a bit of light relief and getting to the bottom of your problem will take some work. Unfortunately for you I neither believe your statement that you wrote this nor do I think you have taken my advice to look at "use of the error object". If you had put in some effort and demonstrated that I might be inclined to help. The exhortation by you to "please explain me the exact mistake which I am doing and what should I do to make it work?" I just find irritating. I am unlikely to look at this thread again.

    Good luck.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003
    By namijami in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-27-2009, 08:05 AM
  2. Interop.Excel.dll 11.0 throwing exception on Machine having only Excl 2003
    By namijami in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2009, 09:26 AM
  3. Win32 exception while closing from VBA
    By rtandon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2008, 08:05 AM
  4. Automatically closing workbook
    By zapszipszops in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2006, 11:50 AM
  5. closing userform automatically
    By Jim Brass in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-05-2005, 11:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1