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: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Dbf To MySql 'New' Table

Post 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 12861 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 865 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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Dbf To MySql 'New' Table

Post 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?!
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Dbf To MySql 'New' Table

Post 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
With best regards,
Sudip
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: Dbf To MySql 'New' Table

Post by luisvasquezcl »

is a great utility.
thanks Sudip.
Regards,
Luis Vasquez.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Dbf To MySql 'New' Table

Post 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 713 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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Dbf To MySql 'New' Table

Post 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. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
sudip
Posts: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Dbf To MySql 'New' Table

Post 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
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Dbf To MySql 'New' Table

Post by Rathinagiri »

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: 1454
Joined: Sat Mar 07, 2009 11:52 am
Location: Kolkata, WB, India

Re: Dbf To MySql 'New' Table

Post by sudip »

Yes, of course my friend :)
Regards.
Sudip
With best regards,
Sudip
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Dbf To MySql 'New' Table

Post by Rathinagiri »

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