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!

Copy to statement in Vdb 5.6

Status
Not open for further replies.

Steelcsb

Programmer
Jun 20, 2003
5
0
0
ES
Hi,

We are converting our dbase IV application to Visual Dbase 5.6. In one of the procedures of the application we have a copy to statement which copies the records from a table to a file (type SDF). If we run it once, it works perfect, but if we try to run it again, without closing and restarting the application, we get a message an internal error has occured........

Does anyone know how to get around the problem of the internal error, or does anyone have an easy alternative for the COPY TO statement?

Thnx in advance,
SteelCSB
 
1. It is a free upgrade to 5.7

2. It sounds like either the file/table, or the variable associated to it, wasn't released. Do you have a snippet of the code?

Christopher F. Neumann
[dBASE Charter Member]
Blue Star Visual dBASE graduate
ICCP TCP/IP Network Analyst
Data Communications Engineer
 
My mistake, we are using visual dbase 5.7

The code looks like this:

SET DIRECTORY TO &bstnd
USE btboek

boeka = root + "\data\temp\btboek_a"
COPY TO &boeka TYPE sdf FOR STATUS < 1

CLOSE ALL
QUIT
 
This is the part that is confusing, you said &quot;If we run it once, it works perfect, but if we try to run it again, without closing and restarting the application, we get a message an internal error has occured........&quot; but your code says:

CLOSE ALL
QUIT


Anyway, what happens if you add:

use
release boeka
quit


instead of:

CLOSE ALL
QUIT

Christopher F. Neumann
[dBASE Charter Member]
Blue Star Visual dBASE graduate
ICCP TCP/IP Network Analyst
Data Communications Engineer
 
First few times it worked perfectly, but now it still becomes unstable
 
Are you overwriting this file every time?

Christopher F. Neumann
[dBASE Charter Member]
Blue Star Visual dBASE graduate
ICCP TCP/IP Network Analyst
Data Communications Engineer
 
It certainly wouldn't hurt. But it sounds like if it runs 5 times, that isn't the cause of your problems.

You might checck your memory resources prior to running it and then again afterwards. It sounds like something is not releasing after you exit the program.

Christopher F. Neumann
[dBASE Charter Member]
Blue Star Visual dBASE graduate
ICCP TCP/IP Network Analyst
Data Communications Engineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top