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!

VDB Problem 2

Status
Not open for further replies.

moggy44

Technical User
Nov 13, 2002
77
0
0
GB
Hi dbmark,
There seems a bug in your revision and I can't find where it is it seems to go to the last name with the correct 4 characters.

There is one other problem I have to get round which I think when I can find the problem with the your code I will be able to do a similar procedure, the problem is there are a number of streets with the same name but different areas so I will have to enter the following into the database. i.e

Bolton Road Horwich
Bolton Road Farnworth
Bolton Road Kearsley
Bolton Road Edgworth
Bolton Road Westhoughton
etc etc etc

Then what I need to do is go from the right and get rid of Area then look right again for the next space and then identify the left most character, as you have done in your listing.

My next headache which I don't think there is a way round, I have about 5600 streets to put into the database, I thought about scanning and then OCR to database but I don't think that will work so I to OCR to spreadsheet and then copy and paste is my only option, this works,but tedious, any thoughts

Regards John
 
Mark's already working with you on the first part of your problem, so I'll let him follow up on that.

The part about cutting and pasting from a spreadsheet - you can save from the spreadsheet using File/Save As into a text or delimited file and then use APPEND FROM in dBase to read that text file into the .DBF.

USE MyTable
APPEND FROM MyFile SDF && if fixed record length text file

Or

USE MyTable
APPEND FROM MyFile DELIMITED && or DELIMITED WITH somecharacter, check out the help function
&& for APPEND FROM

hth
Dennis
 
Hi 1oldfoxman,

Thanks for help with pasting from spreadsheet can you give me a bit more help with how I do the operation using VD 5.5.
Tried using Find Records Icon but got unallowable errors.
The records are from Bolton Street Index.
I have reduced the spreadsheet to a single column and have edited street name to get rid of , and ........
i.e "Abbot Street, Hor.........9-G4"
to "Abbot Street Hor"
etc etc
Brain power going due to old age lol.

Regards John
 
Assuming :

- saved text file (from spreadsheet Save As)is MyFile.txt
- database file you wish to populate is MyTable.dbf, having a single column wide enough to hold your streetname records.

Open the text file in any editor (I'd use MODI COMM MyFile.txt from the dBase command line). Delete any column header lines that the spreadsheet probably saved in the .txt file. I suspect that is where the invalid data is coming from. Save the revised .txt file.

From the dBase command line:

USE MyTable
ZAP && If you need to make sure it is empty
APPEND FROM MyFile.txt SDF

This should do it.

I don't use Visual dBase, but all the other posts I've seen here lead me to believe it has the same syntax and command window as dBase itself. Hope I'm not misleading you with that assumption.

hth
Dennis [glasses]
 
As I have used Excel to save scanned data the format would be Excel, so would I have to save as plain text (MS-Dos)

Tried to save and open but didn't have enough time to follow the opening sequence.

There is a command window in VDb 5.5 and I think i can see what you mean know.

Regards John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top