Page 1 of 4

Dbf To MySql 'New' Table

Posted: Sat Apr 25, 2009 3:44 pm
by sudip
Hi,

Today I saw some excellent codes by Rathinagiri. It's excellent!!! (may be this is the word I use too much, but it is true)

He created Dbf2MySql to export dbf table to existing MySql table with field selection and mapping facility. And he created in just 3 hours!!! :o

I was planning to do the easier part ;) to export a dbf table to a new mysql table with the same name. If the table doesn't exist, software creates it and if it exists software tries to add data to the existing table (if table structure is same).
NewDbf2MySql.jpg
NewDbf2MySql.jpg (70.45 KiB) Viewed 6264 times
It is not something very great, but it is a challenge to myself that I can do it!!! (Thank you Rathi). :)

Please download it from
NewDbf2MySql.zip
(3.29 KiB) Downloaded 565 times
And then compile and run it.

I created the software after a hectic day... chasing after dead-line... Yes, after a busy day of programming for "others" we can "relax" by programming for "ourselves" :)

Please send your comments. I need it very much. I want to learn both HMG + MySql. :)

(BTW, my proposed Shopping Mall software is under analysis phase!!! Hope to start coding very soon :) )

TIA

With best regards.

Sudip

Re: Dbf To MySql 'New' Table

Posted: Sat Apr 25, 2009 5:05 pm
by Rathinagiri
I am so happy to see your code Sudip. Actually, I had started writing for the new table creation today and got some other work.

Can I add your code to my converter so that it can have both the features?!

Re: Dbf To MySql 'New' Table

Posted: Sun Apr 26, 2009 2:20 am
by sudip
Rathinagiri wrote: Can I add your code to my converter so that it can have both the features?!
Yes!!! It's a honor to me!!! :D

Regards.

Sudip

Re: Dbf To MySql 'New' Table

Posted: Sun Apr 26, 2009 2:49 am
by luisvasquezcl
is a great utility.
thanks Sudip.
Regards,
Luis Vasquez.

Re: Dbf To MySql 'New' Table

Posted: Sun Apr 26, 2009 8:58 am
by sudip
Hello,

I found some problem regarding INSERT date value!!! Especially for blank dates and dd/mm/yyyy format. So, I made some changes in Rathinagiri's C2Sql() function and confirmed from Rathinagiri. :)

Please download and compile.
NewDbf2MySql.zip
(3.09 KiB) Downloaded 427 times
And send your comments.

Rathinagiri is writing a full conversion utility of DBF to MySql. Here he wants to use some of my codes :) Thank you Rathi.

So, this project will be merged with Rathi's utility!!! :D

With best regards.

Sudip

Re: Dbf To MySql 'New' Table

Posted: Mon Apr 27, 2009 2:16 pm
by Rathinagiri
Hi,

I had somewhat given shape to the DBF2MySQL Converter. :)

Here is the file.

Here is the screenshot.

Image

Please give your comments and rectify bugs if any. :)

Re: Dbf To MySql 'New' Table

Posted: Mon Apr 27, 2009 5:45 pm
by sudip
Hello Rathi,

Thank you very much for sharing this utility. :)

But, I found one minor problem. When I tried to export from a dbf table (created with VFP) to a "New" table in MySql, it gives some error.

Then I tried to do the same thing with my old project and it works fine.

I haven't tried with existing table with field selection yet.

I am sure this is a very minor problem. And can be solved very easily :)

Regards.

Sudip

Re: Dbf To MySql 'New' Table

Posted: Fri May 01, 2009 2:13 am
by Rathinagiri
Hi,

Can you send me a sample dbf file?

Re: Dbf To MySql 'New' Table

Posted: Fri May 01, 2009 4:50 am
by sudip
Yes, of course my friend :)
Regards.
Sudip

Re: Dbf To MySql 'New' Table

Posted: Fri May 01, 2009 4:12 pm
by Rathinagiri
For me, it works fine. I don't know why.