Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Vilhelm-Ion Praisach
  Where is Vilhelm-Ion Praisach?
 Resita
 Romania
 Vilhelm-Ion Praisach
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: COPY TO [file] nullifies field value
Thread ID: 395961 Message ID: 396073 # Views: 38 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Wednesday, January 22, 2014 5:36:06 PM         
   


> Colleagues,
>
> I've never seen such behavior: some fields are nullified upon a cursor's being saved into a DBF file on disk!
> Here's what's going on:
> I have a cursor, populated in the code (with INSERT INTO C_CURSOR FROM MEMVAR) in a cycle;
> I set a STEP ON after the end of that cycle to check the contents of one particular field;
> Checking this field (numeric) after cycle's completed - the value is correct (non-zero);
> Some additions to this cursor (client's store's attributes) in the code, check this field again - the value is still correct (non-zero);
> I COPY TO (SomePath\C_COPY.DBF), checking this field again (right after that command) - bloody hell, it's Zero! :-@
> As well as couple other fields that weren't zero in the cursor before copying it into a DBF! :-@:-@
>
> Here's the actual code:
>
>
***** Debug *****
> IF _VFP.StartMode==0
>    SET STEP ON
> ENDIF
> *****************
> SELECT CO_STATE && Just in case
> ** Preserve the resulting cursor
> COPY TO (m.gcCompanyPath + [CO_STATE.DBF]) ALL

> Whatever I tried - the result was the same: this particular field turns to zero at the moment it's been copied into a DBF file on disk.
>
> Any idea why this might be happening, and how I can fix it?
>
> AHWBGA!
>
> Regards,
>
> Ilya

Probably not the same thing, but sometimes, after an update, I must perform an Go Recno(), or Go Top/Bottom.

My respects

ENTIRE THREAD

COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/21/2014 10:01:40 PM
RE: COPY TO [file] nullifies field value Posted by Ali Koumaiha @ 1/21/2014 10:29:37 PM
RE: COPY TO [file] nullifies field value Posted by Ali Koumaiha @ 1/21/2014 10:30:22 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/21/2014 10:47:41 PM
RE: COPY TO [file] nullifies field value Posted by Pete Sass @ 1/22/2014 1:11:30 AM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 4:51:28 PM
RE: COPY TO [file] nullifies field value Posted by Pete Sass @ 1/22/2014 6:56:30 PM
RE: COPY TO [file] nullifies field value Posted by Tore Bleken @ 1/22/2014 11:35:59 AM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 4:46:38 PM
RE: COPY TO [file] nullifies field value Posted by Rick C. Hodgin @ 1/22/2014 5:32:21 PM
RE: COPY TO [file] nullifies field value Posted by Pete Sass @ 1/22/2014 6:53:42 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 7:38:46 PM
RE: COPY TO [file] nullifies field value Posted by Gene Wirchenko @ 1/22/2014 8:02:19 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 8:13:59 PM
RE: COPY TO [file] nullifies field value Posted by Gene Wirchenko @ 1/23/2014 7:27:13 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/23/2014 10:42:08 PM
RE: COPY TO [file] nullifies field value Posted by Gene Wirchenko @ 1/24/2014 8:07:43 PM
RE: COPY TO [file] nullifies field value Posted by Tore Bleken @ 1/24/2014 8:43:37 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/24/2014 8:54:55 PM
RE: COPY TO [file] nullifies field value Posted by Tore Bleken @ 1/24/2014 11:24:07 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/24/2014 8:44:14 PM
RE: COPY TO [file] nullifies field value Posted by Pete Sass @ 1/22/2014 9:08:35 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 11:47:25 PM
RE: COPY TO [file] nullifies field value Posted by Rick C. Hodgin @ 1/22/2014 9:46:21 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 11:53:11 PM
RE: COPY TO [file] nullifies field value Posted by Vilhelm-Ion Praisach @ 1/22/2014 5:36:06 PM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/22/2014 7:31:26 PM
RE: COPY TO [file] nullifies field value Posted by Vilhelm-Ion Praisach @ 1/22/2014 8:02:21 PM
RE: COPY TO [file] nullifies field value Posted by Jun Tangunan @ 1/23/2014 4:33:59 AM
RE: COPY TO [file] nullifies field value Posted by Ilya Rabyy @ 1/23/2014 7:22:11 PM