Dbf To MySql 'New' Table

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Dbf To MySql 'New' Table

Post by sudip » Sat Apr 25, 2009 3:44 pm

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 2791 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 376 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
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5077
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 89 times
Been thanked: 103 times
Contact:

Post by Rathinagiri » Sat Apr 25, 2009 5:05 pm

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?!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Sun Apr 26, 2009 2:20 am

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
With best regards,
Sudip

User avatar
luisvasquezcl
Posts: 988
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Has thanked: 3 times
Been thanked: 9 times
Contact:

Post by luisvasquezcl » Sun Apr 26, 2009 2:49 am

is a great utility.
thanks Sudip.
Regards,
Luis Vasquez.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Sun Apr 26, 2009 8:58 am

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 273 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
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5077
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 89 times
Been thanked: 103 times
Contact:

Post by Rathinagiri » Mon Apr 27, 2009 2:16 pm

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. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Mon Apr 27, 2009 5:45 pm

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
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5077
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 89 times
Been thanked: 103 times
Contact:

Post by Rathinagiri » Fri May 01, 2009 2:13 am

Hi,

Can you send me a sample dbf file?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
sudip
Posts: 1443
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Post by sudip » Fri May 01, 2009 4:50 am

Yes, of course my friend :)
Regards.
Sudip
With best regards,
Sudip

User avatar
Rathinagiri
Posts: 5077
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 89 times
Been thanked: 103 times
Contact:

Post by Rathinagiri » Fri May 01, 2009 4:12 pm

For me, it works fine. I don't know why.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest