Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP2Excel problem
Message
De
04/03/2009 02:49:34
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01385377
Message ID:
01385396
Vues:
113
>Hi everybody,
>
>I'm trying to use Cetin's VFP2Excel program to create Excel file with notes (memo) field.
>
>I combined my DBF2Excel program with VFP2Excel and I tested it with the local database, the file comes up very nicely formatted.
>
>Here is the beginning of my
>
>DBFToExcelWithMemo procedure
>
>lcTestDB = ADDBS(SYS(2023)) + 'Temp.dbf'
>	COPY TO (lcTestDB) && cursor opened at that point
>	
>	tcXLSFileName = FORCEEXT(tcXLSFileName, 'XLS')
>
>*-- Create Ole Automation with Excel
>	loExcel = CREATEOBJECT("Excel.Application")
>*-- Open XLS File
>	WITH loExcel
>		.ScreenUpdating = .F.
>		.DisplayAlerts = .F.
>		.WorkBooks.ADD()
>		
>		lnCounter = 0		
>
>	   VFP2Excel(lcTestDB,;
>			'select * from Temp',;
>			.ActiveWorkBook.ActiveSheet.Range('A1'))
>
>As I said, if at the time I run the process, I have local database opened, everything is OK.
>
>However, when I have my production database opened (open database myProductionDatabase) before running the above code it produces this error
>
>03/03/2009 09:13:42 PM Error while creating Excel file Error: 1426
>LineNo: 346
>Message: OLE error code 0x80004005: Unspecified error.
>Procedure: vfp2excel
>Details: 80004005: Unspecified error
>StackLevel: 5
>LineContents: toRange.Offset(1,0).CopyFromRecordSet( loRS )
>
>I don't see the connection between the code above and the fact which database is opened at the moment.
>
>Could you please help me to figure this out?
>
>Thanks in advance.
lcTestdb = SYS(2023)
	COPY TO (addbs(m.lcTestDB)+'temp') && cursor opened at that point
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform