Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error while creating ADO recordset with VFPOLEDB
Message
From
05/06/2009 06:08:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01403799
Message ID:
01403883
Views:
46
>>>>Hi,
>>>>
>>>>I have a procedure that uses some code from Cetin to fill Excel workbook from VFP cursors.
>>>>
>>>>The code creates an ADO recordset from the VFP cursor, saves the recordset to an intermediate rst file, and later opens the rst file from excel.
>>>>
>>>>This code works well in one procedure but not another. In both cases the code is called twice to fill two Excel sheets. In the routine that fails it does during the second call when the recordset is being saved to the rst file. The error is: OLE IDispatch exception code 0 from Microsoft OLEDB persistence Provider: Multiple-step operation generated errors. Check each status value...
>>>>
>>>>In each case the code checks to make sure the rst file has been erased before attempting the save.
>>>>
>>>>Any suggestions?
>>>>
>>>>TIA,
>>>>
>>>>Alex
>>>
>>>Did you try to close Excel and re-open? We were having similar errors, BTW, when I was trying to run it with the debugger open.
>>
>>The code that works calls a subroutine three times. The subroutine creates a private datasession, and in it similar cursors but with different GROUP BY and then exports that cursor to a different sheets in the same excel workbook.
>>
>>The routine that fails creates two very different cursors and each time calls the Cetin inspired routine. I've tried to duplicate the environment of the successful routine in the failing routine, even creating two separate datasessions, one for each cursor and closing Excel in between.
>>
>>Were you able to solve the problem?
>>
>>Thanks for your help.
>>
>>Alex
>
>No, I left that company. Last time I asked my manager about the routine he told me it was not reliable. I haven't talked with him for a long time.

Your manager never sounded to me as a wise man.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform