Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Feb 2001
    Posts
    369
    Thanks
    2
    Thanked 1 Time in 1 Post

    converting intrinsic constants (2000 SR1a)

    This is similar to a recent thread, and I fear the answer may be the same, but I'm feeling worn out and lazy so I thought it might be worth a try.

    Is there any easy way to look up the name of an intrinsic constant? For instance, I want to loop through all the possible values of the querytype parameter in the OpenSchema method of an ado connection (passing the querytype value as a number - the counter), then save the resulting file with filename databasenamequerytypeparametervalue, where the parameter value appears as the name of the intrinsic constant, not its numeric value (I really don't want to have to remember that 23 is the value of adSchemaViews, for instance).

    Sure I can look them all up, make a table etc, but given the fact that I'm saving the file in the first place rather than going to the effort of writing the code to make a table from the recordset, that doesn't fit with my current indolent state.

    Yeah, yeah, lazy folk work the hardest, I know. But please, if you have any suggestions, indulge me.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: converting intrinsic constants (2000 SR1a)

    I don't think so. Remember, intrinsic constants when used in your VBA code are converted at compile time to their numeric equivalent. This is why, for example, you can use an intrinsic constant in your code, but not in a saved query.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

Posting Permissions

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