Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax error(10)
Message
De
25/04/2007 06:44:27
 
 
À
25/04/2007 05:27:14
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01219663
Message ID:
01219686
Vues:
9
hi,
thank you for reply,
i need to let the user do that if he get the error message,
i useto (Mr.Cetin code ) to open xls.xml....
if error message ...
   declare long ShellExecute in "shell32.dll" ;
	long hwnd, string lpszOp, ;
	string lpszFile, string lpszParams, ;
    string lpszDir, long nShowCmd
ShellExecute(0,'Open',thisform.text9.Value,'','',1)
thanks.
>You might open the sheet through Automation and analyze the column titles. Then do the import. See my introductory article on Excel Automation if you didn't do it before. Universal Thread Magazine, September 2002.
>
>>hi all,
>>
>>i try to convert excel sheet to .dbf, but i get error message (Syntax error )
>>
>>if i have fields name more than 10 character as customer-name...etc,
>>
>>is ther away to display message if this sheet have big name or if fields is more 10 characters as..
>>if syntax erorr(erorr 10)
>>("Pls change sheet name to small name,change fields size to less than or equal 10 characters only") ,
>>endif
>>
>>CLOSE all
>>SET DATE BRITISH
>>SET CENTURY on
>>thisform.text9.Value=GETFILE('xls')
>>IMPORT FROM (thisform.text9.value) TYPE XLS
>>
>>use JUSTSTEM(thisform.text9.value)
>>m.t=JUSTSTEM(thisform.text9.value)
>>USE (m.t)
>>
>>FOR gnCount = 1 TO FCOUNT( )
>>   m.OldName =  FIELD(gnCount)
>>   m.NewName = ALLTRIM(EVALUATE(FIELD(gnCount)))
>>********************************
>>&&if syntax erorr(erorr 10)
>>   &&    messagebox("")
>>    &&exit
>>  &&else
>>**********************
>>ALTER TABLE (m.t) RENAME COLUMN (m.OldName) TO (m.NewName)
>>(m.NewName)
>>NEXT
>>&&endif
>>=MESSAGEBOX("DON")
>>
>>thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform