Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fields
Message
De
14/12/2006 01:30:25
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Fields
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01177490
Message ID:
01177490
Vues:
50
hi all,
is there away to convert any fields at my table have characters type,

without determine the fields that need to convert as.
PUBLIC newname

close database
USE CNV_WORD IN A ORDER 2

USE code99 IN C

SELECT C
NEW_WORK = SPACE(1)
IND_1 = 1
DO WHILE .NOT. EOF()

	OLD_NAME = cname
	do cnv_work
*	REPLACE cname WITH NEWNAME&&works
	replace (any fields is characters type) WITH NEWNAME&&&
	IF .NOT. EOF()
		SKIP
	ENDIF	
ENDDO
brow

procedure cnv_work
	SELECT A
	wrk_leng = len(alltrim(old_name))+1
	DO WHILE IND_1 < wrk_leng
		WRK_CHRS = SUBSTR(OLD_NAME,IND_1,1)
		SEEK WRK_CHRS
		IF FOUND()
			NEW_WORK = NEW_WORK + WND_CHRS
		ELSE
			NEW_WORK = NEW_WORK + WRK_CHRS
		ENDIF
		IND_1 = IND_1 + 1
	ENDDO
	NEWNAME = NEW_WORK
	NEW_WORK = SPACE(1)
	IND_1 = 1
	select c
return
thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform