Skip to Content
0

SAP B1 SDK: ODBC tracing/logging

Dec 22, 2016 at 12:25 AM

450

avatar image
Former Member

Just wondering if anybody ever tried doing ODBC tracing or any kind of logging? I want to know more about the occasional ODBC errors (eg. -2039, -1029), so I'm wondering if it's possible to dig into it by doing ODBC tracing.

Anyway, I started by going to the server's ODBC Data Source Admin and clicked "Start Tracing Now". But somehow the trace file (SQL.LOG) is never created...

Anybody has any experience or advise about this?

Thanks

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Dec 22, 2016 at 07:23 AM
1

Hi Tjandra,

Those error codes seem more like DI API error codes than anything. There is a list of codes in the SDK Help Center (those are included there).

SAP Business One SDK 9.2

Error Handling

If an error occurs during the execution of a method, the method will throw an exception. You must check for these exceptions separately from the return value.

When a run-time error occurs, the properties of the Err object are filled with information that uniquely identifies the error and information that can be used to handle it. To generate a run-time error in your code, use the Raise method.

The Err object's properties are reset to zero or zero-length strings ("") after an On Error Resume Next statement and after an Exit Sub or Exit Function statement within an error-handling routine. The Clear method can be used to explicitly reset Err.

The following table lists the UI API error codes and their meaning.

Code String -39 End of File -43 File not Found -47 File is Busy -50 File Cannot Open -51 File Corrupted -99 Division by Zero -100 Out of Memory -101 Print Error -103 Print Canceled -104 Money Overflow -111 Invalid Memory Access -199 General Error -213 Bad Directory -214 File Already Exists -216 Invalid File Permission -217 Invalid Path -1001 Data Source - Bad Column Type -1003 Data Source - Alias Not Found -1004 Data Source - Value Not Found -1005 Data Source - Bad Date -1012 Data Source - No Default Column -1013 Data Source - Zero/Blank Value -1015 Data Source - Integer Overflow -1016 Data Source - Bad Value -1022 Data Source - Other File Not Related -1023 Data Source - Other Key Not In Main Key -1025 Data Source - Array Record Not Found -1027 Data Source - Value Must Be Positive -1028 Data Source - Value Must Be Negative -1029 Data Source - Column Cannot be updated -1100 Data Source - Cannot Allocate Environment -1101 Data Source - Bad Connection -1102 Data Source - Connection Not Opened -1103 Data Source - DB Already Exists -1104 Data Source - Cannot Create Database -1200 Data Source - Data Bind General Error -2001 Data Source - Bad Parameters -2003 Data Source - Too Many Tables -2004 Data Source - Table Not Found -2006 Data Source - Bad Table Definition -2007 Data Source - Bad Data Source -2010 Data Source - Bad Data Source Offset -2013 Data Source - No Fields In Table -2014 Data Source - Bad Field Index -2015 Data Source - Bad Index Number -2017 Data Source - Bad Alias -2020 Data Source - Bad Alias -2022 Data Source - Bad Field Level -2024 Data Source - Not Matching Data Source -2025 Data Source - No Keys In Table -2027 Data Source - Partial Data Found -2028 Data Source - No Data Found -2029 Data Source - No Matching Field -2035 Data Source - Duplicate Keys -2038 Data Source - Record Lock -2039 Data Source - Data Was Changed -2045 Data Source - End of Sort -2049 Data Source - Not Opened for Write -2056 Data Source - No Matching With Current Data Source -2062 Data Source - Bad Container Offset -3001 Query - Field Not Found -3003 Query - Bad Data Source -3004 Query - Bad Token -3005 Query - Token After End -3006 Query - Unexpected End -3008 Query - Too Long Query -3009 Query - Extra Right Parenthesis -3010 Query - Missing Right Parenthesis -3012 Query - No Operation Code -3013 Query - No Field In Comparison -3014 Query - Bad Condition -3015 Query - Bad Sort List -3017 Query - No String -3018 Query - Too Many Fields -3019 Query - Too Many Indexes -3020 Query - Too Many Tables -3021 Query - Reference Not Found -3022 Query - Bad Range Set -3023 Query - Bad Parsing -3025 Query - Data Bind is Missing -3026 Query - Bad Input -3027 Query - Progress Aborted -3028 Query - Bad Table Index -3032 Query - General Failure -3033 Query - Empty Record -3036 Query - Bad Parameter -3037 Query - Missing Table in List -3040 Query - Bad Operation -3041 Query - Bad Expression -3042 Query - Name Already Exists -3044 Query - Time Expired 3001 Form - Is Not Initialized 3002 Form - Bad Data Source 3003 Form - Exceeded Data Sources Limit 3006 Form - Invalid Form Item 3007 Form - Exceeded Forms Limit 3009 Form - Too Many Saved Data 3012 Form - Invalid Form 3015 Form - Cannot Get Multi-Line Edit 3016 Form - Bad Item Type 3017 Form - Bad Parameter 3023 Form - No Message Callback 3029 Form - Item Is Not Selectable 3031 Form - Bad Value 3033 Form - Item Not Found 4007 Grid - Invalid 4008 Grid - Bad Size 4009 Grid - No Data 4011 Grid - Invalid Parameters 4013 Grid - Not Super Title 4014 Grid - Super Title 2 Exits 4015 Bad Item Unique ID 4016 Grid - Bad Data 4017 Grid - Column is Already Folded 4018 Grid - Column is Already Expanded 4019 Grid - Line Exists 4020 Grid - Not Enough Data 4022 Grid - Super Title Exists 4027 Grid - Row Is Not Collapsible 8004 Status Bar - No Such Info 8005 Status Bar - Info Occupied 8006 Status Bar - No Message Bar 8007 Status Bar - Progress Stopped 8008 Status Bar - Too Many Progress 5001 Graph - Invalid 5002 Graph - Bad Form Item 5005 Graph - Bad Parameters -7008 Form not found -7000 Invalid Form -7031 Form - Reserved /Illegal form Unique ID -7032 Form - Invalid Mode -7006 The item is not a user defined item and cannot be manipulated in such manner -7005 Invalid table name -7004 XML batch load failed -7003 Menu operation Add failed -7002 Function not supported -7001 Invalid Item -7034 Could not clear item in group -7033 Out of boundaries -7020 This method cannot be invoked by a Cell object -7019 Invalid form unique ID. Should not begin with an F_ prefix -7018 Invalid Field Value -7017 Invalid Field Name -7016 This datasource object is not a user-defined object -7015 Invalid Column -7014 A Column object with the specified unique ID already exists in the system. -7013 The string value entered should be less then 10 characters. -7012 An Item object with the specified unique ID already exists in the system. -7011 The string value entered should be less then 11 characters. -7010 A form with the requested unique ID already exists in the system. -7009 The string value entered should be less the 32 characters. -7040 Cannot Load XML File -7051 Unexpected usage of the specified XML TAG. -7050 This action type is not valid or not implemented yet. -7043 Cannot load the Menu resource from the specified XML file. -7042 Cannot load the Item resource from the specified XML file. -7041 Cannot load the Form resource from the specified XML file. -7071 Failed to create the items group. -7070 UID -7069 Failed to change the form current pane level. -7068 Failed to change the form color. -7067 Failed to change the Form mode. -7066 Failed to fix the form default button. -7065 Failed to change the form Visible state. -7064 Could not change the form title. -7063 The change of form dimensions has failed -7062 Unknown Form attribute -7061 XML batch resource update is not supported yet. -7060 Reached Max Number of user data sources. -7094 Failed to add the items child objects. -7093 Failed to batch add the items -7092 Failed to bind the item to the data source -7091 Wrong Item Attribute -7090 Unknown Field Type -7114 Type of Column is Not Supported. -7113 Failed to add the column child objects. -7112 Failed to add the new columns. -7111 Failed to bind the column to a data source -7110 Invalid column attributes -7133 The specified menu position is not valid -7132 Invalid menu type -7131 Failed to add the menu object -7130 The specified menu already exists. -7030 Invalid Row Number -7029 Operation not supported on system form. -7028 Out of boundary of DB data source offset. -7027 The menu item is not a user defined menu item and cannot be manipulated in such manner. -7026 Menu item was not found -7025 Unknown Form State -7024 Failed setting form bounds -7023 Invalid Target -7022 Could not commit action because the item is currently in focus. -7021 Operation could not be set on extended edit text item. -7200 Your connection string doesn't much UI development work mode. -7201 The specified connection string is not valid. 7202 Connection - Could not find SBO that match the connection string 7203 Connection - License Guard Is Invalid 7300 Progress Bar - resource is occupied and can not be used at this time 7301 Progress Bar - has stopped 7035 Form - Invalid Object 7036 Data Source - Table already exists 7037 Argument is out of Range 7038 Form - Modal form is currently active 7039 Form - Not Auto Managed 7400 Object no longer exists 7401 Add-On does not have registration to call GetReportData including XML with properties. 7402 This method or property is not valid during the event if the BeforeAction flag is true. 7403 Printing in progress; only one report can be printed at a time. 7404 This method or property is not valid during the event if the BeforeAction flag is false. 7405 Failed to get report object 7406 Start page is out of report range 7407 Number of pages is out of report range 7408 This method is not valid when the Xml generation is failed 7409 Failed to get report - Xml file is too big 7500 Invalid Choose From List 7501 This Choose From List is not available for users. 7502 The Choose From List unique ID already exists 7503 ChooseFromList - Invalid object type. 7600 Failed to generate automatic unique ID for form. 7650 Cannot get information for an item when the form is not active 7651 Focus is not set yet for the form 7652 Cannot select an invisible item 7653 An unspecified error occurred. This item cannot be selected 7654 You are not authorized to select this item 7145 Menu - This operation is illegal on root menus. 7700 Invalid value - the value must be integer greater than or equal to 0. 7660 Xml 'Conditions' parsing failed 7098 The string value entered is too long; it should be less than 16K 7099 The string value entered is too long; it should be less than 32K 7750 Data Table - Out of boundaries 7800 The Item has no data bind 7100 Item - can not set value the valon is equals to valOff 7504 ChooseFromList - This form is in invalid for ChooseFromList opertaions 7802 XML Contains not supported Items 7820 Xml - Form Type already exist 7821 Xml - Form type not found 7822 Xml - Event type already exists 7823 Xml - Event type not found 7115 Invalid item type 7116 Data Source - invalid Unique Id 7147 Menu - failed to set menu string 7076 Form - failed to set focus 7751 DataTable - source datatable should be different from target datatable 7752 Data Table - duplicate column Unique ID 7753 Data Table - invalid column index 7754 Data Table - invalid column Unique Id 7755 Data Table - invalid data 7756 Data Table - duplicate Unique Id 7757 Data Table - invalid Unique Id 7758 Data Table - invalid table index 7759 Data Table - invalid variable number 7760 Data Table - invalid row index 7761 Data Table - invalid alias 7762 Data Table - action not allowed when line exists 7763 Data Table - invalid item type. Valid for matrix only 7764 Data Table - not writable - temporary created by Choose From List 7765 Data Table - Table already binded to a Grid 7766 Data Table - Table already binded to an item or matrix column 7767 Data Table - exceeds column data size 7505 The Item must be bound to an AlphaNumric field. 7768 Data Table - invalid value type 7830 Failed to get current period - environment or company is not initialized yet. 7780 Action stopped by add-on 7101 Item - Can't set value on item because the item can't get focus. 7840 Can't click on picker - this picker type is not displayed. 7102 In a system form, use of the prefix "SYS_" for User Data Source name is not allowed.

© Copyright 2015 SAP SE. All rights reserved.

Pedro Magueija

LinkedIn | Twitter | Blog

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi, sorry about the indentation but I've tried everything and it won't look right.

0