Click to See Complete Forum and Search --> : Visual J++, dbf, SQLServer 7, ADO


bkkenkre
March 30th, 2000, 03:02 AM
Hi,

I have an appication which downloads certain .dbf files from the net onto my harddrive. Each .dbf file is a dbase IV table. The next step is to migrate the data from each of the dbase file to a MS SQLServer 7 table.

So I want to read each dbf file row by row using ADO Connection in my Visual J++ application and transfer them to the SQLServer table.
I have succeeded in connecting to SQLServer 7.0.

But i don't know how to connect and read data from the dbase files using ADO in Visual J++. Can anyone help me out on this. More specifically i need the Connection string that i should use with my Connection object.

I have found out how this can be done using C++ and DAO.
(I have not tried it out)
CDaoDatabase * pdb = new CDaodatabase;
pdb->Open("d:\\source\\db". //path only
TRUE, // exclusive
TRUE // read only
"dBASE IV;"); //connect String
CDaoRecordSet rs(pDB);
rs.Open(dbOpenDynaset,"select CUST from [customer.dbf]");

But i want the above using Visual J++ and ADO.
If not then how can i convert the same code as above to J++.
What packages i should use. Will it still be com.ms.wfc.data ?

At present i am doing the migration outside my application using DTS provided by MS SQLServer 7.0

Any help or advice will be greatly appreciated.
Thanks in advance.