CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    Feb 2012
    Location
    Prizren
    Posts
    37

    Post How to check lines in a text file with rows in database?

    Hi again. I'm having hard time how to solve this problem. I have a text file with some call records in it. Each call record states a line in that text file. And what I want to do is that parsing to database with a 100% success rate. Due to sometimes the SQL connection might get buggy or stop or w/e so it came to my mind that I should make some function or maybe a stored procedure to check whether the requested/selected or whole lines in that text file have been successfully added or not to the database. Let's assume I have 10 lines in a text file called "log.txt" like:
    call line 1
    call line 2
    call line 3
    call line 4
    call line 5
    call line 6
    call line 7
    call line 8
    call line 9
    call line 10
    And assuming that the SQL connection to the database got stuck somehow(buggy) and it stopped inserting those lines to their respectively columns. Let's say it parsed lines from 1-6 and it stopped there, that's where I need the app to tell me that it stopped and continue inserting immediately where it stopped at to the end from 6-10th line. What am I supposed to do? The smoothest way so that the processor doesn't get overwhelmed (in case there are like hundreds of thousands lines). And should it be written in SQL as a stored procedure or written as a function from VB side.
    Toolkit : Microsoft Visual Studio 2010 Ultimate - VB.Net language & Microsoft SQL Management Studio 2005 - SQL Database.
    Last edited by Venn; March 19th, 2012 at 10:48 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
  •  





Click Here to Expand Forum to Full Width

Featured