Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2002
    Posts
    3

    Angry Unanswered: Wherefore art the Enumeration integer values

    All,

    I have searched the web high and low to find out where the mappings exist between the DSO enumeration ErrorCodes and their integer values. I am programming in vbscript and cannot use the enumeration object. Does anyone out there have any idea where I can find this information. I do have Visual Studio 6.0 so if the answer is locked away in a C++ header file just let me know which one.

    Thanks in advance,
    Ken Jones

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    I might have a better answer tonight but I am out of pocket at the moment. Initially, I can only see you doing this manually - going through each error code and storing the value returned. Why do you want the number ? You can reference the errorcodes through dso.errorcodes._____.

  3. #3
    Join Date
    Dec 2002
    Posts
    3
    Thanks for your post. My fundamental issue is that in vbscript I don't have access to the enumerations available in VB and other languages. All of the examples I have seen of DSO programming in vbscript show explict definition of a constant for such enumerated values as those in ErrorCodes. Would you mind elaborating on your last comment. Is it possible to gain access to the enumeration values through the DSO object model in vbscript?

    Thanks again,
    Ken Jones

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    Yes, if you are using vbscript then you have to create an include file with all the constants that you need - just like the adovbs.inc. Ironically, it looks like dso is one of the few components of sql server that does not have a header file - however, you can check yourself under the C:\Program Files\Microsoft SQL Server\80\Tools\
    Devtools\Include directory and verify for yourself (I checked and saw nothing valid for dso). If I find anything more, I will let you know.

  5. #5
    Join Date
    Nov 2002
    Posts
    7

    Lightbulb DSO Enumeration search

    I don't deal with DSO at all, but a quick search turned up this link.
    HTH.


    http://msdn.microsoft.com/library/en...asp?frame=true

  6. #6
    Join Date
    Dec 2002
    Posts
    3
    For anyone who comes upon this thread, here is the outcome.

    I eventually called Microsoft and confirmed that there is a hole in the documentation for those of us who program in vbscript/jscript. The long integer values associated with the enumerations are not documented anywhere as such. My resolution was to open up the object browser in VB and browse the DSO library. The enumerations can be browsed and the long integer values are displayed. This can be done for any enumeration in DSO, not only the ErrorCodes enumerations which was the one I was interested in. If you don't have VB (or I suspect C++) you might be fresh out of luck.

  7. #7
    Join Date
    Feb 2002
    Posts
    2,232
    Just to reiterate - Vegemite wants the integer values associated with the names - not the names.

  8. #8
    Join Date
    Nov 2002
    Posts
    7

    Cool Updated DSO Error Enum for anyone who wants it

    Originally posted by rnealejr
    Just to reiterate - Vegemite wants the integer values associated with the names - not the names.

    Understood rnealejr . My only goal with the first list was to provide the basis with which a solution can be developed....
    My first list was better than manually hitting the Object Browser.

    Below is a complete (see note) list of enumeration constants that can be used in an Include file for VBScript, etc

    Note: there were about 3 Enum constants that did not appear to be in my version of DSO.
    This enumeration is ONLY for the Error Collection inside the DSO Object

    I can create comprehensive enumerations for the DSO Object quickly, if there is a demand for it....

    HTH

    Const mderrAcceptError = -2147221373
    Const mderrAcquireCreditsError = -2147221367
    Const mderrAggregationUsageNotCustom = -2147221458
    Const mderrBadParameterForServiceState = -2147221481
    Const mderrBadRequest = -2147221377
    Const mderrBindError = -2147221376
    Const mderrCalculateError = -2147221382
    Const mderrCanceled = -2147221416
    Const mderrCannotAddVirtualDimension = -2147221493
    Const mderrCannotChangeRemoteServer = -2147221417
    Const mderrCannotCloneObjectIntoItself = -2147221450
    Const mderrCannotCommitDatabase = -2147221490
    Const mderrCannotCreatePartition = -2147221442
    Const mderrCannotCreateVirtualDimensionFromAnother = -2147221429
    Const mderrCannotDeleteDataSource = -2147221348
    Const mderrCannotDeleteDimension = -2147221496
    Const mderrCannotDeleteLastPartition = -2147221499
    Const mderrCannotDeleteLevel = -2147221495
    Const mderrCannotDeleteMemberProperty = -2147221494
    Const mderrCannotEnableRealTimeUpdatesWithoutIndexedView s = -2147221339
    Const mderrCannotExecFuncError = -2147221368
    Const mderrCannotModifySharedObject = -2147221477
    Const mderrCannotRemoveMeasureFromDefaultAggregation = -2147221485
    Const mderrCannotRenameObject = -2147221498
    Const mderrCannotSaveInsideTransaction = -2147221491
    Const mderrCellCalculationsNotAvailable = -2147221337
    Const mderrChildProcessFailed = -2147221411
    Const mderrClassError = -2147221391
    Const mderrCollectionItemNotFound = -2147221502
    Const mderrCollectionReadOnly = -2147221503
    Const mderrCOMError = -2147221385
    Const mderrCompatibilityError = -2147221378
    Const mderrConnectError = -2147221372
    Const mderrCorruptedProperty = -2147221459
    Const mderrCorruptedRegistrySettings = -2147221489
    Const mderrCouldInitiateCubeUpdate = -2147221363
    Const mderrCouldInitiateDimensionUpdate = -2147221408
    Const mderrCouldNotLockObject = -2147221399
    Const mderrCouldNotLogMissingMemberKeyErrors = -2147221355
    Const mderrCouldNotOpenService = -2147221483
    Const mderrCouldNotOpenServiceControlManager = -2147221484
    Const mderrCouldNotQueryTheService = -2147221482
    Const mderrCouldNotUnLockObject = -2147221393
    Const mderrCubeDimHasNoDatabaseDim = -2147221433
    Const mderrCubeNotProcessed = -2147221420
    Const mderrCustomRollupsNotAvailable = -2147221343
    Const mderrDataError = -2147221381
    Const mderrDefinitionCannotBeEmpty = -2147221461
    Const mderrDefinitionDoesNotContainNameAndValue = -2147221460
    Const mderrDeletingTablesOutsideOfTransaction = -2147221396
    Const mderrDifferentAggregationDatasources = -2147221443
    Const mderrDifferentAggregationNumber = -2147221446
    Const mderrDifferentAggregationOLAPMode = -2147221444
    Const mderrDifferentAggregationStructure = -2147221445
    Const mderrDifferentRemoteServers = -2147221427
    Const mderrDimensionChangingCannotAddLevel = -2147221361
    Const mderrDimensionLockedByCube = -2147221501
    Const mderrDimensionMemberNotFound = -2147221406
    Const mderrDimensionNotInUnderlyingCubes = -2147221488
    Const mderrDimensionWritebackNotAvailable = -2147221344
    Const mderrDuplicateKeyInCollection = -2147221479
    Const mderrExecuteSQL = -2147221409
    Const mderrFileError = -2147221389
    Const mderrFormulaError = -2147221383
    Const mderrFuncNotSupportedError = -2147221366
    Const mderrIllegalMeasureType = -2147221404
    Const mderrIllegalObjectName = -2147221500
    Const mderrImpersonateError = -2147221365
    Const mderrInconsistentAggregations = -2147221397
    Const mderrInitializationFailed = -2147221414
    Const mderrInternal = -2147221421
    Const mderrInternetError = -2147221356
    Const mderrinvalidAggregateFunction = -2147221418
    Const mderrInvalidAggregationLevel = -2147221426
    Const mderrInvalidAggUsage = -2147221438
    Const mderrInvalidCubeBadFactTableAlias = 82
    Const mderrInvalidCubeDrillThroughNotProperlyDefined = 69
    Const mderrInvalidCubeInconsistentAggregations = 70
    Const mderrInvalidCubeMultipleDistinctCountMeasures = 68
    Const mderrInvalidCubeNoVisibleDimensions = 51
    Const mderrInvalidCubeNoVisibleMeasures = 52
    Const mderrInvalidDataType = -2147221352
    Const mderrInvalidDimensionBadAreMemberKeysUnique = 53
    Const mderrInvalidDimensionBadAreMemberNamesUnique = 75
    Const mderrInvalidDimensionBadDependsOnDimension = 54
    Const mderrInvalidDimensionLevelsAfterHiddenMustBeUnique = 91
    Const mderrInvalidDimensionNoVisibleLevels = 49
    Const mderrInvalidDimensionParentChildInvalidLevel = 58
    Const mderrInvalidLevelBadCustomRollupColumn = 72
    Const mderrInvalidLevelBadOrderingMemberProperty = 50
    Const mderrInvalidLevelBadParentKey = 48
    Const mderrInvalidLevelBadSkippedLevelsColumn = 74
    Const mderrInvalidLevelConflictingMemberProperties = 76
    Const mderrInvalidLevelGrouping = 73
    Const mderrInvalidLevelNamingTemplate = 81
    Const mderrInvalidLockType = -2147221451
    Const mderrInvalidMeasure = -2147221359
    Const mderrInvalidParent = -2147221478
    Const mderrInvalidPartBadFactTableAlias = 83
    Const mderrInvalidPermission = -2147221436
    Const mderrInvalidProcessType = -2147221400
    Const mderrInvalidPropertySetting = -2147221497
    Const mderrInvalidRelatedColumn = -2147221353
    Const mderrInvalidRemoteServerName = 67
    Const mderrInvalidSourceOlapObject = -2147221350
    Const mderrInvalidStructure = -2147221425
    Const mderrInvalidTransactionOperation = -2147221336
    Const mderrInvalidVirtualDimensionMustHaveAllLevel = 93
    Const mderrLastLevelMustBeUnique = -2147221440
    Const mderrLinkedCubeCannotChangeProperty = -2147221358
    Const mderrLinkedCubeInvalidConnectionString = -2147221432
    Const mderrLinkedCubeInvalidServer = -2147221362
    Const mderrLinkedCubeInvalidSourceCube = -2147221431
    Const mderrLinkedCubeNoAggregationsAllowed = -2147221419
    Const mderrLinkedCubeNotEnoughDimensions = -2147221430
    Const mderrLinkedCubesNotAvailable = -2147221345
    Const mderrLinkedCubeSynchronizationFailed = -2147221341
    Const mderrListenError = -2147221375
    Const mderrLoadDLLError = -2147221370
    Const mderrLockAccessError = -2147221466
    Const mderrLockCannotBeObtained = -2147221468
    Const mderrLockDescriptionTooLong = -2147221476
    Const mderrLockFileCorrupted = -2147221472
    Const mderrLockFileMissing = -2147221471
    Const mderrLockNetworkDown = -2147221475
    Const mderrLockNetworkNameNotFound = -2147221473
    Const mderrLockNetworkPathNotFound = -2147221474
    Const mderrLockNotEnoughMemory = -2147221470
    Const mderrLockObjectNotLocked = -2147221467
    Const mderrLockSystemError = -2147221469
    Const mderrMeasureDoesNotHaveValidSourceColumn = -2147221487
    Const mderrMemberPropertyNotFound = -2147221435
    Const mderrMemoryError = -2147221388
    Const mderrMergedPartitionsMustBothUseIndexedViewsOrTabl es = -2147221340
    Const mderrMiningModelNotProcessed = -2147221349
    Const mderrNameCannotBeChanged = -2147221464
    Const mderrNameCannotBeEmpty = -2147221465
    Const mderrNetworkError = -2147221387
    Const mderrNoConnectionToServer = -2147221424
    Const mderrNoEntryPointError = -2147221369
    Const mderrObjectCantBeProcessedWithItsDimensions = -2147221395
    Const mderrObjectChangedByAnotherApp = -2147221492
    Const mderrObsoleteError = -2147221379
    Const mderrODBC = -2147221403
    Const mderrODBCError = -2147221386
    Const mderrOSError = -2147221390
    Const mderrPartitionMustBeProcessed = -2147221398
    Const mderrProcessError = -2147221384
    Const mderrPropertyCannotBeChanged = -2147221463
    Const mderrPropertyCollectionCannotBeChanged = -2147221462
    Const mderrRealTimeUpdatesNotAvailable = -2147221338
    Const mderrRegistryConnectFailed = -2147221457
    Const mderrRegistryOpenKeyFailed = -2147221456
    Const mderrRegistryQueryValueFailed = -2147221455
    Const mderrRemotePartitionCannotHaveWriteableDimension = -2147221357
    Const mderrRepositoryConnectionFailed = -2147221453
    Const mderrRepositoryConnectionStringChanged = -2147221342
    Const mderrRepositoryIncompatible = -2147221452
    Const mderrRepositoryUpgradeFailed = -2147221454
    Const mderrRevertError = -2147221364
    Const mderrROLAPDimensionsNotAvailable = -2147221347
    Const mderrROLAPDimensionsRequireROLAPPartition = 78
    Const mderrSecurityError = -2147221380
    Const mderrSelectError = -2147221374
    Const mderrServerInternal = -2147221422
    Const mderrServerObjectNotFound = -2147221413
    Const mderrServerObjectNotOpened = -2147221423
    Const mderrSkippedLevelsNotAvailable = -2147221434
    Const mderrSourceDoesNotExist = -2147221448
    Const mderrStructureHasChanged = -2147221401
    Const mderrTargetDoesNotExist = -2147221447
    Const mderrTimeOut = -2147221392
    Const mderrTimeoutError = -2147221371
    Const mderrTooManyDimensionMembers = -2147221405
    Const mderrTooManyLevelsInDimension = -2147221486
    Const mderrTooManyMissingMemberKeys = -2147221354
    Const mderrUnexpectedError = -2147221449
    Const mderrUnsuccesfullServiceOperation = -2147221480
    Const mderrUserDefinedPartitionsNotAvailable = -2147221346
    Const mderrValidateLastLevelMustBeUnique = 77
    Last edited by rbrooks; 12-17-02 at 17:42.

  9. #9
    Join Date
    Feb 2002
    Posts
    2,232
    Nice job. I mentioned the need for numbers because your post was the 2nd referring to the same material. Ironically, what you posted was something I had mentioned before but lacked the wisdom to execute/post. Did you loop through the dso.errorcodes collection or some other technique ?

  10. #10
    Join Date
    Nov 2002
    Posts
    7

    Technique

    Thanks,
    Here are the steps that I took:

    1. Copy Paste HTML Into Helios Textpad (I use that app because it has Macro capabilities)
    2. Run a Macro that strips off the descriptions (Everything after the space character)
    3. Run a 2nd Macro to build a Concatenation routine (a strong suit of Helios Textpad). I will be honest it took me 4 attempts to perfect this.
    4. Execute it on the ENTIRE file (once again kudos for Textpad)
    5. What I end up with is something like this:

    strText = strText & "Const mderrAcceptError = " & mderrAcceptError & vbcrlf
    strText = strText & "Const mderrAcquireCreditsError = " & mderrAcquireCreditsError & vbcrlf
    strText = strText & "Const mderrAggregationUsageNotCustom = " & mderrAggregationUsageNotCustom & vbcrlf
    strText = strText & "Const mderrBadParameterForServiceState = " & mderrBadParameterForServiceState & vbcrlf

    6. Take the Textpad text copy and paste it into VB
    7. Dump the strText variable to a Multiline Textbox
    8. Get three errors
    9. Copy and paste text to this AWESOME forum.

    Attached is the textpad macro that took me 4 tries to get right.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •