Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FlexFile

Status
Not open for further replies.

awhitney77

Programmer
Oct 1, 2001
5
0
0
US
I have a legacy dbase file that needs to be migrated to a SQL Server table. This file uses Flexfile (.dbv instead of .dbt) memo files. I've tried importing (or linking) it into MS Access but to no avail. I would like to use VB instead of Clipper to migrate the data.

Does anyone know of a 3rd party tool that can possibly translate this legacy data into something meaningful (other can dbu? Any/All suggestions are welcomed.

Thanks in advance.
Annette
 
You might have to write program itself in Clipper first. Do this.

Create a flat file specially for MEMO text using your .DBF file which also has .DBV file. Use the primary key from .DBF (e.g. Invoice#,,etc.). Go record by record using DO WHILE !EOF()..ENDDO. You should create the flat file this way.

File: CMNT.TXT
Inv_____InvHdrMemoComment
99999999999999XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
98452122000001this is first line of comment inv# 122
98452122000002this is second line of comment inv# 122_002
98452123000001this is first line of comment inv# 123

Make sure that if you have any CHR(13) character in your memo text then put some escape sequence in comment line and use the same escape sequence in your VB program to update SQL Server table's memo field with CHR(13). For example if you find CHR(13) character in your memo text, convert it into \\LF. While fetching this row from VB if you see \\LF then convert that into CHR(13)+CHR(10) again to store into SQL Server. Your line should look like this

98452122000001this is first line\\LFthis is second line

so when you convert, it should look like:
Invoice# 98452122
Invoice Header# 000001
Comment: this is first line
this is second line

I hope you got the idea.

Nikhil Shah
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top