Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build structure as xml
Message
From
28/07/2004 04:01:24
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Build structure as xml
Miscellaneous
Thread ID:
00928616
Message ID:
00928616
Views:
54
hi all,

i'll try to create table with fields as xml fields,

when i change xml to xls i get 17 field ,15 as general,2 fields discripe as
(general format cells have no spcific number format),inside the 2 fields i see date +time,i creat mytable as general fields,when i run mycode at myform
i get error message at index on char9 tag char9 ,
and it take more than 5 minits to convert,and i get nothing at mytable.
any idea.
activate screen
SET TALK OFF
SET ECHO off
GETDIR()

thisform.text1.Value=GETFILE()
SET DEFAULT TO e:\samerqda
LOCAL lcTableName
lcTableName = thisform.text2.value  
CREATE TABLE &lcTableName (char1 General(10), char2 General(70),char3 General(10), char4 General(10),charg5 General(10), char6 General(40),char7 General(10), char8 General(10),char9 c(10), char10 General(40),char11 General(10), char12 General(60),char13 General(50), char14 General(40),char15 General(10), char16 General(10),char17 General(10))

XMLTOCURSOR(ALLTRIM(thisform.Text1.Value),"VFPCursorName",512)
   APPEND FROM (DBF("VFPCursorName"))

m.t=(thisform.text2.value)
CLOSE all

USE (m.t) exclusive ALIAS SomeAlias
index on char9 tag char9  && i get error message
select sys(2015) as SortOrder,* from SomeAlias ;
 into cursor crsTemp nofilter

select SomeAlias && now it should work
zap
select crsTemp
MY_CHAR7="POTHWAY"
scan
 if !seek(char9 ,'SomeAlias','char9')

scatter memvar memo


 insert into (thisform.text2.value) from memvar
 endif
endscan

CREATE TABLE newamar66 (char1 General(10), char2 General(70),char3 General(10), char4 General(10),charg5 General(10), char6 General(40),char7 General(10), char8 General(10),char9 c(10), char10 General(40),char11 General(10), char12 General(60),char13 General(50), char14 General(40),char15 General(10), char16 General(10),char17 General(10))


CLOSE all
select sys(2015) as SortOrder,* from (ThisForm.Text2.Value) ;


INDEX ON RAND() TAG idx_rand
SET ORDER TO idx_rand
LOCATE
COPY TO newamar66 NEXT 450 FIELDS char1,char2  && etc.áÇÎÐ ÍÞæá ãÚíäÉ ÝÞØ


m.a=thisform.text2.Value
CLOSE all
USE (m.a)
gcDelimName = ALIAS( ) + '.xls'
gcDelimFile = PUTFILE('excel_file:', gcDelimName, 'xls')
IF EMPTY(gcDelimFile)  && Esc pressed
   CANCEL
ENDIF
COPY TO (gcDelimFile) xls for recno()>2 && or 1
MODIFY FILE (gcDelimFile) NOEDIT
***********************************tttttt
Next
Reply
Map
View

Click here to load this message in the networking platform