TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-01-2008, 09:09 PM   #1 (permalink)
The Contributor
 
aristoworks's Avatar
 
Join Date: Nov 2007
Location: Nashville
Posts: 44
Thanks: 7
aristoworks is on a distinguished road
Default Porting Windows APP To Web App - Database Question

Well - i'm not really porting but I'm making a copy of a windows-only app in an online form (LAMP) and the client has been using this app for about 15 years (since DOC).

All of their data is stored in a file with a .D01 extension. When I open the file I see their data mixed with tons of formatting etc.

My question is - does anyone have good ideas about getting this data out of this obscure format and into something that I can import into mysql? XLS, CSV, SQL - anything??

I would very much appreciate anyones insight.
Send a message via AIM to aristoworks
aristoworks is offline  
Reply With Quote
Old 08-01-2008, 09:30 PM   #2 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

Instead of having to do 2 things at once (making a script that parses the file and another one that saves the data into another format for importing it into the database), I'd go for trying to parse the .D01 file and inserting its contents directly into the database. How you do that, it's your job. Nobody knows what format it's in. At least I don't.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
xenon is offline  
Reply With Quote
Old 08-02-2008, 01:31 AM   #3 (permalink)
The Contributor
 
aristoworks's Avatar
 
Join Date: Nov 2007
Location: Nashville
Posts: 44
Thanks: 7
aristoworks is on a distinguished road
Default

Thanks for responding xenon but your post isn't very helpful. What I asked is what in the hell is a .D01 file and how do you get data out of it? It can't be parsed as easily as a csv, xml, tab or anything else I've ever encountered because it is some crazy format with millions of "data" characters.
Send a message via AIM to aristoworks
aristoworks is offline  
Reply With Quote
Old 08-02-2008, 04:38 AM   #4 (permalink)
The Addict
 
Enfernikus's Avatar
 
Join Date: Jun 2008
Posts: 335
Thanks: 2
Enfernikus is on a distinguished road
Default

I believe the issue he was trying to get across is what it is and how it's going to be parsed is entirely your problem, if the issue wasn't as proprietary I'm sure he would've lent a helping hand. Not offense intended but why did you accept the job if you didn't know how to handle the file format in the first place?
Enfernikus is offline  
Reply With Quote
Old 08-02-2008, 05:12 PM   #5 (permalink)
The Contributor
 
Ross's Avatar
 
Join Date: Jan 2008
Location: England, UK
Posts: 83
Thanks: 3
Ross is on a distinguished road
Default

A little research brought me this: File Extension .D01 Details. I assume the .D01 you're dealing with is a Tonline DB file (from above) That's what it is.

I suggets posting an example of this file. I think you've said it's a plain text file - as there is no in-built PHP parser you have to make your own, as you would with any other file format.

This would include a file_get_contents, then looping through each line to parse it into something you can manipulate easily, for example insert it into the database.

I had a brief look for parsing details but couldn't find much.
Ross is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:10 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design