Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set defa to
Message
From
21/11/2004 05:54:18
 
 
To
21/11/2004 05:31:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00963220
Message ID:
00963298
Views:
9
Hi Mohammed,

Is aar BOTH the name of the directory and the excel-file? If not, what is the name of the excel-file, including path?
As mentioned before, use semikolon (;) to break up your long lines, long lines are practically impossible to read and debug.
And don't use the &, use paranthesis as I showed you! The & will work, but is slow and not the preferred way.
set defa to e:\bills1\bills1\aar\
thisform.text1.Value='aar'
LOCAL lcTableName
lcTableName = thisform.text2.value
CREATE TABLE (lcTableName) (a C(50), b C(70),c C(50), d C(50),e C(70), f C(70),s C(70), l C(70),char9 c(70), char10 c(40),;
char11 C(10), char12 C(60),char13 C(50), char14 C(40),char15 C(10), char16 C(10),char17 C(10), char18 C(70),char19 C(10),;
char20 C(10),char21 C(10), char22 C(40),char23 C(10), char24 C(10),char25 C(10), char26 C(70),char27 C(10), char28 C(10); NOCPTRANS)
lcTableName = thisform.text1.value
APPEND FROM (lcTableName) TYPE XLS
*** USE (thisform.text2.value) exclusive ALIAS SomeAlias && Not necessary, this table is already selected
GO TOP
DELETE NEXT 6
>hi,
>
>thank you,
>
>i try as under, but i get error message Invalid path or file name .
>
>&&AAR the excel sheet name
>
>set defa to e:\bills1\bills1\aar\
>thisform.text1.Value='aar'
>LOCAL lcTableName
>lcTableName = thisform.text2.value
>CREATE TABLE &lcTableName (a C(50), b C(70),c C(50), d C(50),e C(70), f C(70),s C(70), l C(70),char9 c(70), char10 c(40),char11 C(10), char12 C(60),char13 C(50), char14 C(40),char15 C(10), char16 C(10),char17 C(10), char18 C(70),char19 C(10), char20 C(10),char21 C(10), char22 C(40),char23 C(10), char24 C(10),char25 C(10), char26 C(70),char27 C(10), char28 C(10) NOCPTRANS)
>
>lcTableName = thisform.text1.value
>APPEND FROM (lcTableName) TYPE XLS
>*** USE (thisform.text2.value) exclusive ALIAS SomeAlias && Not necessary, this table is already selected
>GO TOP
>DELETE NEXT 6
>
>
>thanks.
>m.qasem
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform