Results 1 to 2 of 2

Thread: DBProviderFactories.GetFactory

  1. #1

    Thread Starter
    Addicted Member Smartacus's Avatar
    Join Date
    Oct 2009
    Deep South, USA


    Hi All,

    I am looking for a way to put into a dgv the getfactory data rows after running DBProviderFactories.GetFactory(system.data.odbc) or oledb or sql etc.

    What I am expecting it to return is the installed drivers for type specified for example:

    Microsoft Access Driver (*.mdb), version, file
    Microsoft dBase Driver (*.dbf), " , "

    or Oledb

    Microsoft FoxPro VFP Oledb, version, vfpoledb.dll

    My plan is to offer a simple import setup program that once the setup is done with connection type, dbname, file name, or view name then I will store the connection string in the applications default data base.

    I already have a combo box filled with DbProviderFactories.GetFactoryClasses(). Now I want to filter the driver types by the getfactory invariant.
    Smartacus comes packaged "As Is With No Warranty"

    ************* Useful Links ******************
    FAQs: Index / Database Development / .NET CodeBank /
    Before Posting Here...MSDN

    MZTools (I love this tool when using VB6 - Free) /

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Sydney, Australia

    Re: DBProviderFactories.GetFactory

    That would be nice if that's what that method did, but it's not so you are out of luck. The GetFactory method can take one of two parameters: a String containing the name of a factory or a DataRow, returned by GetFactories, containing the name of a factory. It will then return the appropriate DbProviderFactory, i.e. a System.Data.Odbc.OdbcFactory object. It has nothing whatsoever to do with ODBC drivers.

Posting Permissions

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


Click Here to Expand Forum to Full Width