Subject Re: SQLite to DbF
From Ken Mayer <dbase@nospam.goldenstag.net>
Date Thu, 16 Feb 2023 05:11:40 -0800
Newsgroups dbase.getting-started

On 2/16/2023 4:25 AM, Ralf Krieg wrote:
> Hallo zusammen,
>
> ich habe ein Problem mit der Verarbeitung von Tabellen aus SQLite Datenbanken.
>
> Meine Umgebung:
>   dBASE Plus 8 build 2345
>   BDE 5.202
>   ODBC Treiber - SQLite3 ODBC Driver 0.9998.00.00 von Christian Werner Software
>
> Die Aufgabe:
> Es ist eine beliebige Anzahl Tabellen, bestehend aus max. 585 Tabellen aus der SQLite DB nach Dbf4 zu kopieren und auch umgekehrt von Dbf4 nach SQLite. Für die Tabellenstrukturen gibt es vorhandene Ordner mit leeren Tabellen jeweils als DbF und auch als SQLite.
>
> Das Problem:
> Die SQLite DB kennt für Textfelder nur den Datentyp "Text" und da kann alles mögliche drin stehen von 1 Zeichen bis 32 Kbyte. Praktisch gibt es aber nur Inhalte bis 254 Zeichen.
> Die BDE erkennt diese Textfelder über den ODBC Treiber immer als Felder vom Typ "Memo". Ich habe verschiedene Methoden ausprobiert diese Tabellen von SQLite nach dbF zu kopieren. Über die alte dBASE DML per "append from", aber auch per ODML über ein "updateSet".
> Tabellen bis ca. 300.000 Datensätze lassen sich so kopieren, bei größeren Tabellen gibt es Fehlermeldungen der BDE bezüglich der Ressourcen.
> Die BDE hatte ich schon auf Maximalwerte konfiguriert - ohne Erfolg.
> Als nächstes hatte ich versucht über ADO (gleiche ODBC Quelle) die Daten zu kopieren. Ohne Erfolg.
>
> Inzwischen verarbeite ich Sätze mit kleinen Tabellen mit meiner dBASE Anwendung, fange die Fehler ab und protokolliere Diese. Die Tabellen, die sich so nicht zu verarbeiten lassen, lade ich manuell über die gleiche ODBC DSN in MS Access, ändere dort die Struktur (z.B. longvarchar, nach varchar) und exportiere diese dann nach dbf4.
>
> Da dieser Workaround nervig ist, stelle ich meine Frage an alle. Gibt es einen anderen Weg SQLite nach dbf zu konvertieren?
> Funktioniert der Zugriff über ADO bei neueren dBASE Versionen vielleicht besser?
>
> Viele Grüße
> Ralf Krieg

I ran this through Google Translate (but I have no answer):

Hello everyone,

I have a problem with processing tables from SQLite databases.

My environment:
  dBASE Plus 8 build 2345
  BDE 5.202
  ODBC driver - SQLite3 ODBC Driver 0.9998.00.00 from Christian Werner
Software

The task:
Any number of tables, consisting of a maximum of 585 tables, can be
copied from the SQLite DB to Dbf4 and vice versa from Dbf4 to SQLite.
For the table structures, there are existing folders with empty tables,
each as DbF and also as SQLite.

The problem:
The SQLite DB only recognizes the "Text" data type for text fields and
can contain anything from 1 character to 32 Kbytes. In practice,
however, there is only content up to 254 characters.
The BDE always recognizes these text fields via the ODBC driver as
fields of the "Memo" type. I tried different methods to copy these
tables from SQLite to dbF. Via the old dBASE DML via "append from", but
also via ODML via an "updateSet".
Tables with up to approx. 300,000 data records can be copied in this
way, with larger tables there are error messages from the BDE regarding
the resources.
I had already configured the BDE to maximum values ​​- without success.
Next I tried to copy the data via ADO (same ODBC source). Without success.

I now process sets of small tables with my dBASE application, catching
the errors and logging them. I load the tables that cannot be processed
in this way manually via the same ODBC DSN in MS Access, change the
structure there (e.g. longvarchar, to varchar) and then export them to dbf4.

Since this workaround is annoying, I'll ask my question to everyone. Is
there another way to convert sqlite to dbf?
Does access via ADO work better with newer dBASE versions?

Best regards
Ralph Krieg
--
*Ken Mayer*
Ken's dBASE Page: http://www.goldenstag.net/dbase
The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm
dBASE DOS to Windows Tutorial:
http://www.goldenstag.net/dbase/DtoWTutorial/00_Menu.htm