×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

How to dump the contents of a .dat file to a delimited text file

How to dump the contents of a .dat file to a delimited text file

How to dump the contents of a .dat file to a delimited text file

(OP)
I've run out of options on what to do next..

Objective:
I need to dump the contents of a .dat file to a delimited text file, using Visual Basic 6.

Problems:
*I seem to be unable to edit the file, field and index.ddf files as I keep getting errors 46 and 94 (Permission ?) although they have no attributes.

*I wrote some VB code, and when I run it, I get "Table not found" and when I remove the .Dat part of the connection, I get an "unspecified error". I'm also using Microsoft Activex Data Objects 2.5 library.

Private Sub Form_Load()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
rs.CursorLocation = adUseServer
rs.Open "CashAcct.dat", "Provider=PervasiveOLEDB;Data Source=c:\forex", adOpenDynamic, adLockReadOnly, adCmdTableDirect
End Sub

* I tried using BtSearch32 to edit the file.ddf and although the files that I want to use appear in the description, no fields are enabled for me to select for export, except file, field and index.

* I went to SWSoft's website for Colibri's ODBC and they have removed it for download purposes.

Can anyone offer some sort of help ?

Thanx !!




RE: How to dump the contents of a .dat file to a delimited text file

I cannot tell you how to do it from VB but there is a real handy btreive file utility called btviewer that can do it for you.  Search for it on the web.  It is shareware.

Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office

RE: How to dump the contents of a .dat file to a delimited text file

FILE.DDF and FIELD.DDF are system files and are not updateable using the Btrieve API without the owner name, which is not given out.  You should not need to modify them any way.  THey are used for interfaces like the ActiveX controls or ODBC.  THey are not needed for the Btrieve API.  
Using ADO, you cannot open just the file. You would either need to specify the ODBC DSN, or the OLEDB provider.  You didn't mention what version of Btrieve (Pervasive.SQL) you're using so it's hard to give specific suggestions.  
You should get the DDFs from the vendor of the application. It'll have the proper defintions and you'll be able to use ODBC or OLEDB or ActiveX controls.  If you know the structure of the files, you can use the Btrieve API as well.  

Mirtheil
mirtheil@mirtheil.com
Custom VB and Btrieve development.

RE: How to dump the contents of a .dat file to a delimited text file

If you need to export your data to ascii or dbase format you can take a look at BtSearch at www.nssdd.com. ; You can also perform automated exports using BtSearch with a task scheduler.

Gil

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close