[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


How to use the urbo pascal data file with extension DTA in VB to Add records

Posted on 2006-06-13
Medium Priority
Last Modified: 2008-02-07

I need to use a data file with extension DTA, it looks like it is turbo pascal data file. I am wandering is there any way I could use this data file in VB to add records to this data file which will be use and display data by other famous accounting software SAGE. If anybody could help me in this matter, I will be very greatfull.

Question by:Shahbazomeara
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
LVL 15

Expert Comment

ID: 16892635
If it's a data file, you can of course add stuff to it. Do you have the file name, the size, where it came from , etc. From that someone may be able to take an educated guess as to its contents.

Expert Comment

ID: 16893167
It depends on the application that created the data file. If you have the source code, it should be easy enough to decode the format and recreate it in your program. Some appliactions also come with a specification describing the file format, and it's up to you to write code to handle it.

If you do not have access to source code or file definition, then things can be considerably more difficult, because you have to try and guess (or reverse engineer) the meanoing of the data in the file. Some files are fairly easy to decode as they have obvious field and record delimiters, or en easily decipherable fixed width. You can also run into difficulties where different sections within a file mean different things. For example, you could have a header record which would contain pointers to different segments of the file that contain different types of data, with different record lengths. Text fields are generally easy enough to figure out as you can usually see their contents, but numeric fields can often be stored in binary format, making them difficult to decode. Some applications actually encrypt their data, which can make them almost impossible to reverse engineer.

One approach that can be useful is to use a file compare utility to compare two versions of your file, before and after making a small change in the application.

Generally it's not too hard to write an application to read from another program's file, as you only need to enderstand enough to extract the data you need. However, writing to the file can be a nightmare, as you need to know every detail of how the file works. If you make the slightest mistake, you can render the file unreadable, so make sure you make backups!

Hope this gives you some ideas.
LVL 25

Expert Comment

ID: 16893482
As mentioned, it depends if the file is in a binary format (which would be really difficult without the source code), Or if the file is in a text based format (which should not be so difficult).
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 31

Expert Comment

ID: 16898322
You mention DTA extension... and Sage.  Sage uses DTA files to store Accounts Data.  There are four ways to access this Data within your own apps (1) Use Sage's export facilities: Reports actually, which can be to CSV format.  (2) Use ODBC, if Sage is installed correctly, you will find an ODBC driver listed - if using this you have Read access to everything in Sage - transaction data, customers, suppliers, the works.  You can't write to the data though.  (3) Sign up as a Sage developer and you will be given information on how to "drive" data into Sage - this is only worth it if the version of Sage being used by the target system isn't going to change much, and the budget is there to pay the quarterly Developer fees.  (4) A Hex editor is a useful tool, but I can't say more than that...

Author Comment

ID: 16901157
Thanks for your reply,

I will try to explain you what I need to do.
I have developed a software for Travel Agents which stores and print Invoices. Most of the travel agents who use my software they use Sage Instant Accounting software to manage their accounts, Its mean they will print invoice on my software and manaully enter the invoice information into sage to do posting to all relevant accounts.

That's why to reduce the manual work I am looking at the ways to import invoice information to sage, but the import facility in sage is not for importing invoices.
I can not use ODBC driver because it is read only, 3rd option was to Sage Data Object, To use data object I have to pay £1500 which I don't want to pay.

Can you think of any other way I could perform this action?
If you could help me in this matter, I will be very greatful.

LVL 15

Expert Comment

ID: 16901213
Maybe you can use ODBC to discover the file contents.

Expert Comment

ID: 16903264
You could possibly use screenscraping techniques to mimic the user entering into the Sage forms.

Good luck!

LVL 31

Expert Comment

ID: 16906138
Use the File Import, Audit Trail Transactions facility as outlined in your other question.

The thing to bear in mind is that, if the Customer has moved location, the image of the Invoice shows the address of the Customer as at the time the Invoice was raised.  Apart from that, the Invoicing facility in Sage is not very useful to you - the Invoice is simply an image of the Invoice as printed by Sage (useful for reprinting invoices - presumably your program can reprint invoices).  

Anything that is needed to meet statutory requirements is contained (1) on the Invoice document you produce (2) in the Sage Audit Trail.

Simply putting an Invoice into the Invoice list does not put it in the Audit Trail, which is where you really need it to go.  
LVL 31

Accepted Solution

moorhouselondon earned 750 total points
ID: 16906158
>as outlined in your other question.


Shunting a link across to here so that everyone can see

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question