Issue 111504 - [From Symphony]The number of error that throwed by COM API is not consistent with Excel
Summary: [From Symphony]The number of error that throwed by COM API is not consistent ...
Status: CONFIRMED
Alias: None
Product: App Dev
Classification: Unclassified
Component: vba (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 06:02 UTC by lihuiibm
Modified: 2017-05-20 11:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Test sample file for this issue (56.00 KB, text/plain)
2010-05-10 06:03 UTC, lihuiibm
no flags Details
Patch for this issue (3.14 KB, patch)
2010-05-10 06:03 UTC, lihuiibm
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description lihuiibm 2010-05-10 06:02:47 UTC
Call COM API in OOo, if the COM API throw the error, the error number is not
consistent with the number in Excel. Such as:
    Dim dbEng As Object
    Dim wks As Object
    Dim sDB As Object
    Dim rs_Options As Object
    
On Error GoTo Handler
    Set dbEng = CreateObject("DAO.DBEngine.36")
    Set wks = dbEng.Workspaces.Item(0)
    
    Set sDB = wks.OpenDatabase("d:\\Data.mdb", False, False, "")
    Set rs_Options = sDB.OpenRecordset("Select * from Options")
Handler:
    MsgBox Err.Number
Comment 1 lihuiibm 2010-05-10 06:03:26 UTC
Created attachment 69387 [details]
Test sample file for this issue
Comment 2 lihuiibm 2010-05-10 06:03:46 UTC
Created attachment 69388 [details]
Patch for this issue
Comment 3 noel.power 2010-05-11 09:39:25 UTC
In general this patch seems very good ( and I like it ) my only concern about
this patch is the fact that we use a BasicErrorException to transfer the error
code to basic, the problem is the automation bridge is not exclusively used by
basic ( it is a standalone service ) so... this might cause some unexpected
result for some client of the bridge somewhere :-/ Otoh, I don't see what else
to do without adding some more complexity and I would say it is very very
unlikely someone (client) would unwrap the exception carried by the
InvocationtargetException. 
So... I would say lets go with this fix ( and see what upstream say about it ) 
Comment 4 Marcus 2017-05-20 11:29:17 UTC
Reset assigne to the default "issues@openoffice.apache.org".