Link to home
Start Free TrialLog in
Avatar of stephenz43
stephenz43

asked on

dbf file to dataset

hello folks

Ive been screwing around with this problem all day and need some help. I have a freestanding dbf file ( dbase iv) that i want to insert into a sql server table. currently Im opening the dbf file using oledb and preforming a read to the file. After each record, i then perform a insert the sqltable. It works but is extremly slow and killing the system resources. so.....

Is there a way to open the dbf file with a adapter to create a dataset and insert into the sqltable from the dataset?

Steve
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Why dont you import from Enterprise Manager directly ?
Avatar of stephenz43
stephenz43

ASKER

Wish i could, but the requirement is have a vb.net app that will preform this function

Ohh ok, if its required then there should be solution to your problem. ehem!

Question:
1. How many or maximum records do you wish to retrieve from dbf?
2. Are you planning to execute a code where it will retrieve and post it directly to sql?
3. If your using OLEDB do you create your own DSN? that will manage and execute your connection and queries.


If your planning to impress your boss, you need to learn Enterprise Manager DTS. In this case you could incorporate it to your solution as an object that able to import and export data from your SQL DB, but its a long learning curve ahead. More power........................
Since you are using OleDB provider, have you tried to load all data first in Datatable, and then save it to SQL. Basically, not one by one, but get all data at once? Maybe it will speed up execution, altough as far as I know, working with both OleDb and ODBC to connect to dBase is slow.

Goran
priest04 logically is completely correct. Retrieve all the data, bind it in a datatable and import it to SQL DB.
ASKER CERTIFIED SOLUTION
Avatar of Sancler
Sancler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial