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

Threaded View

  1. #1
    Join Date
    Apr 2012
    Posts
    6

    HELP! Connect to database & export text file content to microsoft access database

    Hi all,

    I need some help:
    1. How to connect to ms access?
    2. How to export the content of text file to ms access database?

    Now I already manage to read text file, just left other 2 steps. Anybody please help (provide me some example of codes if possible) because I really don't know how to do these.




    package textfiles;
    import java.io.IOException;

    public class Dictionary {
    public static void main(String[ ] args) throws IOException{

    String file_name = "C:/Users/King/Desktop/Table A.txt";

    try{
    ReadFile file = new ReadFile( file_name );
    String[ ] aryLines = file.OpenFile( );

    int i;
    for ( i=0; i < aryLines.length; i++ ) {
    System.out.println( aryLines[ i ] ) ;
    }
    }

    catch ( IOException e ) {
    System.out.println( e.getMessage() );
    }
    }
    }




    Here I attached my Table A text file & screen shot of my database table. Thanks!
    Attached Images Attached Images
    Attached Files Attached Files

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