none
list DB Providers RRS feed

  • Question

  • is there a way to list OLE/ODBC DB providers?
     
    for OLE I found this
     
    [data.oledb.oledbenumerator]::GetEnumerator()
     
    but this requires a type, the example on MSDN provides this
     
     
    GetEnumerator(Type.GetTypeFromProgID("MSDAENUM"))
     
    which is suppose to be MS Data Access Root Enum stub, but, im not getting
    anything returned.
     
    Also I wasn’t able to find anything to query for ODBC drivers.
     
    I saw a reference to HKCR and the OLD DB Provider key, but I wasn’t able to
    find that key, im guessing its for older editions of windows?
     
    im testing on my win7 box but I'll need it to work on 2k3
     
    thanks
     
     

    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, October 25, 2011 7:26 PM

Answers

  • (New-Object system.data.oledb.oledbenumerator).GetElements()
    
    

    No need for VS.
    [string](0..9|%{[char][int](32+("39826578840055658268").substring(($_*2),2))})-replace "\s{1}\b"
    • Proposed as answer by Bigteddy Tuesday, October 25, 2011 9:32 PM
    • Marked as answer by jrich Tuesday, October 25, 2011 9:54 PM
    Tuesday, October 25, 2011 8:14 PM

All replies

  • Hi Justin, I tried the C# example, and I get this result:


    [string](0..9|%{[char][int](32+("39826578840055658268").substring(($_*2),2))})-replace "\s{1}\b"
    Tuesday, October 25, 2011 7:43 PM
  • guess I should install VS and give that a try...
     

    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, October 25, 2011 7:56 PM
  • (New-Object system.data.oledb.oledbenumerator).GetElements()
    
    

    No need for VS.
    [string](0..9|%{[char][int](32+("39826578840055658268").substring(($_*2),2))})-replace "\s{1}\b"
    • Proposed as answer by Bigteddy Tuesday, October 25, 2011 9:32 PM
    • Marked as answer by jrich Tuesday, October 25, 2011 9:54 PM
    Tuesday, October 25, 2011 8:14 PM
  • there is a need for VS, just not here :)

    works great, thanks!


    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Tuesday, October 25, 2011 9:55 PM
  • Sorry, Justin, I wasn't being arrogant by proposing my thing as the answer.  I was just trying to get your attention, to save you downloading VS!

    You keep us on our toes.


    [string](0..9|%{[char][int](32+("39826578840055658268").substring(($_*2),2))})-replace "\s{1}\b"
    Tuesday, October 25, 2011 10:00 PM
  • I just saw the get enum and went with it, should have kept looking...
     
    as far as VS we have it here and the CD was already in the drive... just
    needed to install... new pc and hadnt gotten to it yet :)
     
    im probably going to make a small blog post on this since a google search
    for listing OLE providers didn’t return anything useful, I'll be sure to
    give you credit :)
     
     

    Justin Rich
    http://jrich523.wordpress.com
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Wednesday, October 26, 2011 11:57 AM