For Programmers: Free Programming Magazines  


Home > Archive > Clipper > June 2004 > losing data when changing field type









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author losing data when changing field type
hpy_awad@yahoo.com

2004-06-18, 8:55 pm

I a changed type of field from character to numeric I lose all the
data in dbf . Is there a way to avoid that loss when I change the
firld type?
Ross McKenzie

2004-06-19, 3:55 am

On 18 Jun 2004 15:05:56 -0700, ehab_aziz2001@yahoo.com
(hpy_awad@yahoo.com) wrote:

>I a changed type of field from character to numeric I lose all the
>data in dbf . Is there a way to avoid that loss when I change the
>firld type?


Hi,

You did not say how you changed the field, via utility like dbu or bro
or in your code, or if it was via another dbf file.

One easy to understand way is to add a new field to the dbf and then
...

do while !eof()

replace newfiledname with val( oldfieldname )

dbskip()
enddo

You could then remove the old field and then with a second step rename
the newfield to be the same as the oldfieldname.

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia

valusoft AT optushome DOT com DOT au
hpy_awad@yahoo.com

2004-06-19, 3:55 pm

I lost via DBU
Ross McKenzie

2004-06-20, 3:55 am

On 19 Jun 2004 07:17:40 -0700, ehab_aziz2001@yahoo.com
(hpy_awad@yahoo.com) wrote:

>I lost via DBU


Well then, just use your backup copy (you did make a backup first?),
add a new field of type numeric and write a small utility to do as
described in my earlier posting.

Regards,

Ross McKenzie
ValuSoft
Melbourne Australia

valusoft AT optushome DOT com DOT au
dragan

2004-06-20, 3:55 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-21, 3:55 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-22, 3:55 am

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-22, 2:38 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-22, 2:39 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-22, 2:39 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-24, 6:57 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-24, 6:57 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


dragan

2004-06-24, 6:59 pm

This is dangerous operation (for data of course). In this case first
step is BACKUP (personal expirience), and use better data managaer for
DBF like dBASE III+ or FoxPlus. It's very old aplication and work
correctly.


"hpy_awad@yahoo.com" wrote:

> I a changed type of field from character to numeric I lose all the
> data in dbf . Is there a way to avoid that loss when I change the
> firld type?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com