Skip to Content.
Sympa Menu

baslinux - Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] dbf to sql convertor, was Re: Spanish dollybase,
  • Date: Fri, 11 Jul 2008 09:08:12 GMT

> After trying twice to compile linux dbf database manager, I compiled a
> convertor from dbf to sql instead so I could use sqlite on my database.
>
> > sqlite filename.sql (the file generated by 'dbf' converting it from dbf
> > to sql) tells me:
> >
> > Unable to open database "filename.sql": file is encrypted or is not a
> > database.
>


You want to type

sqlite newdatabase.db

This creates a new database called newdatabase.db, assuming it doesn't already
exist.

Then at the sqlite> prompt, you type

.read filename.sql

Note this is .read not just read. The leading dot tells sqlite it's a
command for sqlite not just sql.

This will probably give you an error along the lines of

SQL error near line 9: no such table: postamt

This is because your script drops the table before recreating it, and the
table won't exist in your blank database.

Then if you type

select * from postamt;

You will see your data.


Hope that helps.

Cheers

Ian




Archive powered by MHonArc 2.6.24.

Top of Page