Get OLEDB Providers: revised

Started by stanl, September 24, 2020, 03:26:38 AM

Previous topic - Next topic

stanl

Code (WINBATCH) Select


;Winbatch 2020a - OLEDB Providers
ObjectClrOption('useany', 'System.Data')
oProv =  ObjectClrNew('System.Data.OleDb.OleDbEnumerator')
dtable = oProv.GetElements()
providers=""
ForEach r in dtable.Rows 
   ForEach  c in dtable.Columns 
      providers := c.ColumnName:" ":r.Item(c):@LF
   Next
   providers := @LF
Next
oProv=0
Message("OLEDB Providers",providers)
Exit

kdmoyers

Yikes! I get 17 providers! I had no idea.
-K
The mind is everything; What you think, you become.

stanl

Quote from: kdmoyers on September 24, 2020, 11:54:11 AM
Yikes! I get 17 providers! I had no idea.
-K


I assume at least one of those was ACE Provider.  I show both ACE 12 and ACE 16 - I don't have Office 64 bit installed but any WB script that works with 12 will work with 16 but takes 2-3 times longer to run.