How to move bulk data 
Author Message
 How to move bulk data

Hi ALL,
        I have a situation where in I want to move "n" number of records
in to a table (Access), from a text file. This is what I'm doing
currently.

Step 1. m_pDB->m_pWorkspace->BeginTrans();

Step 2. m_pRecordset->AddNew();
            m_pRecordset->SetFieldValue(m_arrayFieldName[0],X);
            m_pRecordset->SetFieldValue(m_arrayFieldName[1],Y);
            m_pRecordset->Update();

Step 3. m_pDB->m_pWorkspace->CommitTrans();

Step 2 is called in a FOR loop before which step 1 is executed. Step 3
is executed after the completion of the for loop.

However, I'm not sure whether this will store all the records into the
database in one shot. If it does then please let me know where are the
records stored before it is stored into the database. Also, please let
me know if there are any other methods to do the same using DAO. The
text file which I'm processing is typically around 10 MB - 50 MB in
size.

TIA
Anand



Fri, 15 Sep 2000 03:00:00 GMT  
 How to move bulk data

Shalom,

U have 2 choices.
1. If u just need that data to be there, and dont need it indexed, or dont
need the ability to go through it with all the DAO commands, u can pour it
all into a BLOB (Binary Long Object) field (There are places where it is
refered to as OLE type)....
2. If not... The only quickest way I can think of is to do what u want is
a. Create a stored procedure which does it on the server.
b. transfer the Text file to the server
c. Execute the Stored procedure...

--
Shahar Prish
Balisoft Technologies : http://www.balisoft.com

Quote:

>Hi ALL,
>        I have a situation where in I want to move "n" number of records
>in to a table (Access), from a text file. This is what I'm doing
>currently.

>Step 1. m_pDB->m_pWorkspace->BeginTrans();

>Step 2. m_pRecordset->AddNew();
>            m_pRecordset->SetFieldValue(m_arrayFieldName[0],X);
>            m_pRecordset->SetFieldValue(m_arrayFieldName[1],Y);
>            m_pRecordset->Update();

>Step 3. m_pDB->m_pWorkspace->CommitTrans();

>Step 2 is called in a FOR loop before which step 1 is executed. Step 3
>is executed after the completion of the for loop.

>However, I'm not sure whether this will store all the records into the
>database in one shot. If it does then please let me know where are the
>records stored before it is stored into the database. Also, please let
>me know if there are any other methods to do the same using DAO. The
>text file which I'm processing is typically around 10 MB - 50 MB in
>size.

>TIA
>Anand



Sat, 23 Sep 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Bulk loading data using DAO/JET

2. Bulk loading SQL data

3. URGENT : Return bulk data from Stored Procedure to C++

4. Updating bulk rows of data

5. Data retrival problem during Bulk Fetch

6. CryptoAPI: Public-key encryption of bulk data

7. struct to move data between app layers?

8. Moving data from DataRow to a table

9. Move data from byte[] to short[]

10. how do you move data in a linked list

11. how to move data from CApp Object to CMainframe Object

12. moving data of derived classes

 

 
Powered by phpBB® Forum Software