How to link c++ code with Ms Access

This is a discussion on How to link c++ code with Ms Access within the C++ Programming forums, part of the General Programming Boards category; dear all, I have done a simple c++ program in witch I compared two same files but one file contains ...

  1. #1
    Registered User
    Join Date
    Nov 2012
    Location
    Wah, Pakistan, Pakistan
    Posts
    2

    Exclamation How to link c++ code with Ms Access

    dear all,
    I have done a simple c++ program in witch I compared two same files but one file contains the text with no error and other file contains spelling error in it. I print their differences in another file.....

    Now i want the same thing in Microsoft access using the following code. I really don;t know how to connect this code with MS access

    Please please please help me step by step to complete this assignment before 18,December 2012.

    Here is code that i am using to check the differences between two files.

    Code:
    //checks the Difference between two files
    #include <iostream.h>
    #include <conio.h>
    #include <string.h>
    #include <fstream.h>
    
    int main()
    {
        char str_1[36];
        char str_2[36];
        char ch_1, ch_2;
        int i=0;
        clrscr();
        ifstream file_1 ,file_2;
        ofstream file_3;
        file_1.open("file_1.txt", ios::in);
        file_2.open("file_2.txt", ios::in);
        file_3.open("file_3.txt", ios::out);
    
        //The difference will be shown in these Parentheses
    
        file_3 << "\t\t\"{}\": Change Text\n";
        file_3<< "\t\t\"[]\": Original Text\n\n";
    
         //go to the end of the file
    
        while(!file_1.eof())
        {
            file_1.getline(str_1,35);
            file_2.getline(str_2, 35);
            ch_1 = str_1[i];
            ch_2 = str_2[i];
            // If the line of file2 ends but the line of file1 is not ended then print the renaming character in file3
            if(file_2.eof() && !file_1.eof())
            {
                while(!file_1.eof())
                {
                    file_3 << str_1<<"\n";
                    file_1.getline(str_1,35);
                }
                cout<<"\n\n\n\n \t\t........Comparison has been completed....... :)\n\n\n\n Open file_3 to check the changes.. THANK YOU  :P";
                getch();
                return 0;
    
            }
            // If both the lines are equal then simply checks their differences
    
            while(ch_1 != '\0')
            {
                if(ch_1 == ch_2)
                          file_3 << ch_1;
                else
                {
                    file_3 << "{" << ch_1 << "}" << "[" << ch_2 << "]" ;
                }
                ch_1 = str_1[++i];
                ch_2 = str_2[i];
            }
    
            file_3 <<"\n \n ";
            i=0;
    
        }
    
        // If the line of file1 ends but the line of file2 is not ended then print the renaming character in file3
    
        while(!file_2.eof())
        {
    
            file_3 << str_2 << "\n";
            file_2.getline(str_2 , 35);
        }
        file_2.close();
        file_1.close();
        file_3.close();
        cout<<"\n\n\n\n \t\t........Comparison has been completed....... :)\n\n\n\n Open file_3 to check the changes.. THANK YOU  :P";
        getch();
        return 0;
    }
    .

    Regards.
    Mustanser Iqbal

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,302
    Maybe you should just export the tables in the MS Access file to say, CSV format, then use your existing program to perform the file differencing.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Nov 2012
    Location
    Wah, Pakistan, Pakistan
    Posts
    2

    Unhappy

    Quote Originally Posted by laserlight View Post
    Maybe you should just export the tables in the MS Access file to say, CSV format, then use your existing program to perform the file differencing.
    Thanks brother for information but the thing is i have no idea how to relate this code with ms access..... can you please help me with few steps?????

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. link list build: memory access denied
    By sed_y in forum C++ Programming
    Replies: 5
    Last Post: 07-25-2011, 08:17 PM
  2. a link list code question..
    By transgalactic2 in forum C Programming
    Replies: 29
    Last Post: 10-27-2008, 04:24 PM
  3. Complie and link C++ code in C
    By Micko in forum C++ Programming
    Replies: 9
    Last Post: 02-27-2008, 07:38 AM
  4. Code to link a buttom to a new page
    By hpteenagewizkid in forum C# Programming
    Replies: 0
    Last Post: 04-25-2007, 01:39 PM
  5. Help me ! Link list code in OOP C++
    By phoenix2007 in forum C++ Programming
    Replies: 14
    Last Post: 01-16-2007, 04:48 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21