How to import dbf into SQL Server CE

G

Gregor Z

Hi

Is there any easy way to import dbf (dbase ?) files into SQL Server CE.

I'm working in Visual Studio .NET 2003.

I tried some workarounds with exporting dbf to a csv file and then importing
it through inset queries but I must be missing something. There just has to
be an easier way.

Any hint would be welcome.

Is it just me or the documentation for Microsoft products is just the worst
crap in the world? Finding some useful information in it takes me hours.
I've been used to linux documentation which is precise, short and easy to
get through compared to MSDN for example.

I'm considering joining an Anonymous .NEToholics group because I already
need some treatment.

Gregor
 
G

Ginny Caughey [MVP]

Gregor,

Going from dbf to CSV to SqlCe is probably as good an approach as any in the
current version of SqlCe, and it will be faster than some other approaches
such as XML.
 
C

Corrado Labinaz

Is there any easy way to import dbf (dbase ?) files into SQL Server CE.


"Easy" I belive not.

You can import dbf into a (real) SQL Server with DTS, and then replicate
with SQL Server CE.
Setting up SQL Server <-> SQL Server CE replication is not a 5 minutes task,
but it works.

If it's a one time only copy you could try to:
1. import data in SQL Server with DTS
2. generate DDL (CREATE TABLE) and DML (INSERT) scripts from the imported
data. Notice SQL Server have not native functionalty to generate DML
scripts, but you can find free stuff on the Internet (look for a
GenerateInsert stored procedure).
3. copy the scripts on PocketPC and run them with PocketPC Query Analyzer.

I've heard next SQL Server version (Yukon, actually in beta) will introduce
SQL Server CE connection in DTS.
This way you should be able to create a dbf -> SQL Server CE datapump.

Regards,
Corrado
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top