Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Syntax error
Message
From
27/08/2008 05:38:13
 
 
To
27/08/2008 04:21:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01341460
Message ID:
01342121
Views:
18
i try as below, but i think it is wrong way becuse no result
CLOSE all
SET DATE BRITISH
SET CENTURY on
thisform.text11.Value=GETFILE('xls')
IMPORT FROM (thisform.text11.value) TYPE xls

use JUSTSTEM(thisform.text11.value)
tt=JUSTSTEM(thisform.text11.value)

CLOSE all
USE (tt) excl
 Try
*set step on
ALTER TABLE (TT) ADD COLUMN TXPNO C(19) 
ALTER TABLE (TT) ADD COLUMN YEARe C(6) 
ALTER TABLE (TT) ADD COLUMN INFTYPE C(2) 
ALTER TABLE (TT) ADD COLUMN INFDATE C(12) 
ALTER TABLE (TT) ADD COLUMN OFFCODE C(6) 
ALTER TABLE (TT) ADD COLUMN ENTRYID C(15) 
ALTER TABLE (TT) ADD COLUMN ENTDATE C(12) 
ALTER TABLE (TT) ADD COLUMN CONFFLAG C(3) 
ALTER TABLE (TT) ADD COLUMN CONFID C(12) 
ALTER TABLE (TT) ADD COLUMN CONFDATE C(12) 



replace TXPNO WITH THISFORM.TEXT1.Value
replace YEARe WITH THISFORM.TEXT2.Value
replace INFTYPE WITH THISFORM.TEXT3.Value
replace INFDATE WITH THISFORM.TEXT4.Value
replace OFFCODE WITH THISFORM.TEXT5.Value
replace ENTRYID WITH THISFORM.TEXT6.Value
replace ENTDATE WITH THISFORM.TEXT7.Value
replace CONFFLAG WITH THISFORM.TEXT8.Value
replace CONFID WITH THISFORM.TEXT9.Value
replace CONFDATE WITH THISFORM.TEXT10.Value
Catch
   Wait 'Oldname with error is '+m.oldname window
   Wait 'Newname with error is '+m.newname window
Endtry


FOR gnCount = 1 TO FCOUNT( )
   m.OldName =  FIELD(gnCount)
   m.NewName = ALLTRIM(EVALUATE(FIELD(gnCount)))
     *******************************************************
   ALTER TABLE (tt) RENAME COLUMN (m.OldName) TO (m.NewName)
 
NEXT
>I'm pretty sure that your problem is the name of the fields, and not the syntax. Try something like this
>Try
>   Alter table...
>Catch
>   Wait 'Oldname with error is '+m.oldname window
>   Wait 'Newname with error is '+m.newname window
>Endtry
>Then you write down the wrong values, and tell me what they are.
>
>>sorry i don't now what you main, or how i can know(to get) the value for OldName and NewName
>>What is the value of OldName when you get this error?
>>What is the value of NewName when you get this error?
>>
>>>Please answer my two simple questions!
>>>
>>>>if you main when i make replace via textboxes it's characters and numbers ,
>>>>
>>>>if you main excel sheet i have some fields have numbers ,and some fields have characters and ONE field have first record as blabla and next as #
>>>>
>>>>
>>>>
>>>>>What is the value of OldName when you get this error?
>>>>>What is the value of NewName when you get this error?
>>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform