Importing DAT file to mySQL

Hi folks.

I have a windows program that works with SQL Server database as I read. It has DAT files, BLB files, and IDX files.

I understand the following:
BLB Files are Binary Large Objects that amounts large data
DAT files stores data tables

But reading more articles and based of the kind of data may be is a DBISAM database.

I trying to import DAT files to mySQL, doing this: mysql -u root -p < /Users/GerardoGarcia/Desktop/MG7-Db/CFWEmp/Pox.dat

and Brings me that error: ERROR: ASCII ‘\0’ appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII ‘\0’ is expected. Query: ‘o?’.

I know that maybe I’m doing a silliness, Only I’m trying to import that data of these database to mySQL in order to use in in Xojo.

Regards

Yes, Confirmed its a DBISAm database, Only I need to investigate hoe to import these database to mysql. If someone knows anything that helps me. I’ll be happy to know that.

Thanks

I’d try talking that DBISAM database into creating a proper SQL dump which you can read into your MySQL DB. You should also be able to connect to it with Xojo using ODBC, which would allow you to read and transfer the data to your MySQL instance.

Thats a bit like trying to listen to a .JPG by changing the file extension to .mp3 :slight_smile:

As Max says, probably the best way to do this is to establish two database connections:
One that connects to the original data as exposed through SQL Server, in a form that you can perform SQL queries on it.
The other to your SQLLIite database.
Then in the SQLLite , create tables one at a time, as Select * from each table in the SQL database in turn.

That said, Paul Lefebvre used to have a conversion utility (SQLLite Migrator)

And on windows: Convert SQL Server DB to SQLite DB - CodeProject

Bigger list:
https://www.sqlite.org/cvstrac/wiki?p=ConverterTools

You first would have to find what kind of dat/idx ISAM is used. I worked with a few (25 years ago), and the different ISAM files are not compatible. Almost all companies back then had their own (MS-DOS) programs to rebuild (index) en to extract data. I spend al lot of time converting files…

I need to Investigate what Kind of iSAM is used. I tried a trial program called ABC Amber DBISAM Converter, and it extract only 10 registers.

Its a good idea to convert the database. But preferably I need to find a way to read this DBISAM database with xojo.
Cuz, the database is updating everyday. And the idea is at the end of the day read the Database and import it to my mySQL database

Sounds good, I need to try this. The idea of reading directly the DBISAM with xojo through OBDC likes me a lot.

to be sincere I never worked with ODBC databases with xojo. Only mySQL and SQLite.
I wonder if This kind of database will work on Cross-Platform with xojo.

Thanks

Again I opened with an Utility called “Direct DBISAM table reading” and shows me the property of this “DAT” file.

Version Number: 4.00
Locale ID: ANSI Standard
Protection: OFF
User Version: 1.0

I’m Watching a Paul Le’Febre’s Webinar that talks about ODBC on youtube.
It explains how to set up the DataSource in Windows, but How can I set it up on Mac or Linux?
Or is it exclusive to Windows?

[quote=243524:@Gerardo García]I’m Watching a Paul Le’Febre’s Webinar that talks about ODBC on youtube.
It explains how to set up the DataSource in Windows, but How can I set it up on Mac or Linux?
Or is it exclusive to Windows?[/quote]
http://www.odbcmanager.net/about.php
I found a ODBC Manager for Mac OS X, I hope will work

The maintainers of ODBC Manager, Actual Technologies (http://www.actualtech.com), have some great products that I’ve used with great success in the past, definitely give there stuff a spin.