Convert DBF to mysql lazarus / 16-Databases ---------------------------------------------------------------------- pjensen · 2007-07-25 06:56 Hi, I am a newbie on lazarus-freepascal. But used TurbPascal years ago. I want to play around with some database-applications. Question: Is it possible on convert all *.dbf files which are contained in one directory automticly to a mysql 5.* database? PS I am looking for a book for lerning freepascal and especially mysql. Any hints? (if possible a book in german language.) Regards, Peter Jensen ---------------------------------------------------------------------- Chris37 · 2007-07-25 10:13 Hello, One methode ! 1) Create your structure on your mysql database (its more) 2) In lazarus, open a query TDBF in reading to dbf files. 3) In lazarus, open a query (TSqlQuery with TMySql50Connection) 4) Parse and assign TDBFFields to TSQLQueryFields and post Exemple: TSqlQuery.Open TDBFQuery.Open TDBFQuery.first while TDBFQuery.eof   TSqlQuery.Edit     TSqlQuery.FieldbyName('YourMySqlName').asstring:=TDbfQuery.FieldbyNa me('Yourdbfname').asstring   ...(Other fields)   TSqlQuery.Post TDBFQuery.next end;  So, its not perfect but this function  if that can help you !! Sorry for my bad english ! Chris ---------------------------------------------------------------------- pjensen · 2007-07-25 18:51 Hi Chris, thanks for reply.  Don't we have a tool for lazy idiots to do this job?  :wink: OK  first i have to lern about mysql in lazarus. Question: do you know where i can  find easy beginners exampales for using mysql 5 with lazarus? Peter ---------------------------------------------------------------------- Chris37 · 2007-07-25 19:53 Look there ! http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtop ic&p=17524 http://lazarus- ccr.sourceforge.net/index.php?wiki=LazarusDatabase#Lazarus_and_MySQL ---------------------------------------------------------------------- pjensen · 2007-07-28 18:53 Jap, thanks that helped :=