Is there a way to convert a 4D database to a free SGBD like MySQL ? If no, is there a way to export tables from a 4D database to a csv file ?
Export data from 4D database / convert 4D-database to free SGBD
287 Views Asked by bndgte At
3
There are 3 best solutions below
0
On
if you are using a +v15 version you could export every table to json using something like this:
$jsontext:=JSON Stringify(ds.YourTable.all())
C_TIME(vhDoc)
vhDoc:=Create document("";"json") // Create new document called Note
If (OK=1)
SEND PACKET(vhDoc;$jsontext) // Write one word in the document
CLOSE DOCUMENT(vhDoc) // Close the document
SHOW ON DISK(Document)
End if
0
On
The answer for the first question: how to export all data from a 4D database to MySQL (or similar SQL DBMS)
SQL EXPORT DATABASE("";0) // the second parameter = 0 to let export ALL tables
This create a structure of folders with names as table names and containing a file named "SQLExport.sql" with SQL dumps. SQL EXPORT DATABASE command page in 4d doc
Convert, no. You can export data using either the export or quick report editor.