Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to Read and Write records of .DBF's into Single Access 2000Table??

PreethamMPreethamM Member Posts: 39
Hello,
I need help from VB professionals..please help me..
Here i will explain about the task..
NOTE : Please use Vb 6.0(ADO's) and Access 2000 only, if you don't have access 2000, then do it with 97 and if any

modifications are there to work with 2000 then u can suggest me..
1)Here all are DBF files only..If you observe the file P2 type and R1 Type
you will find that there are 28 fields in R1 type and 37 fields in P2 type files.. sample data i listed here for file for P2

and R1.
2) There are 2 fields PLATINENR and QWAHL in R1 type which P2 don't have (rest of the fields other then these two are in P2)
3) There are 11 fields HTYP,NTYP,HBAUART,NBAUART,NZAEHLERNR,NQN,QSP1,QSP2,FEHSP1,FEHSP2 and NIMPW in P2 type which R1 don't

have..
3) So now we have to make a table in access 2000 with one table in it which will be having all the fields from both type of

files..means there should be a access database with 39 fields(please check the fields from sample files for confirmance).
4) if you select a folder which has both these kind of files together..it should read all the files one by one and the

records should be written into one single table..
To be more clear, lets say R1 type has only 28 fields of dat but our database table has 39 fields...so when you select a

single file or a folder which has P1 type then the software should be in sich a way the it should search the corresopnding

fields and should write the data in to that field and so on..when it don't have any value for a particular field or fields it

should leave that field empty..i mean when u read and write the data from a R1 file it will write in only 28 fields rst of

the 11 fields are just balnk, the same case with other type also...
5) In simple when you select a file it should write the data into the corresponding fields of the new dtabase table with 39

fields..
6)The most important thing is that lets say today we have wrote 10 files of data into new database, and tomorrow i want to

update the records with new files data...then these new files records should be added into the same existing table...i mean i

should be able to add records of P2 or R1 dbf files at any time to the same data table...
7)I have already created a database with table "wasser" which has 39 fields in which first 28 fields are from R1 Type and

rest are from non common fields from P2 rype..
8) Remember i have dbf files like this in 100's and 1000's.. i should be able to do any no. of files(records) to the same

table at any time...till it reaches 2 GB, access limit lets say..
7)I am sending all field names in a form of list for u r quick reference.
If you have any more questions or doubts please mail me...i will try to explain more...

NOTE : please email me for sample files and more details, if anybody wants to help me..coz here i cna't post the sample data files as ZIP file....looking for somebody...

my email : mailmeback2001@yahoo.com

Thanks in advance
With regards
Preetham
Sign In or Register to comment.