locked
Determine a provider from a connection string RRS feed

  • Question

  • Hello,

    I have a connection string and I want to extract its provider, but it doesn't necessarily have the provider field, so what can I do?

    Thanks.

     

    Wednesday, September 29, 2010 7:53 AM

Answers

  • If you are using OledbConnection class, then you can check Provider property of it to get name of the provider. Does it work for you? What exactly are you trying to achieve?
    Val Mazur (MVP) http://www.xporttools.net
    • Marked as answer by Alex Liang Friday, October 8, 2010 8:57 AM
    Wednesday, September 29, 2010 10:18 AM
  • Depends upon the connection string. It would help if you could identify what type of connection string you are working with.

    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Alex Liang Friday, October 8, 2010 8:57 AM
    Thursday, September 30, 2010 5:35 PM

All replies

  • If you are using OledbConnection class, then you can check Provider property of it to get name of the provider. Does it work for you? What exactly are you trying to achieve?
    Val Mazur (MVP) http://www.xporttools.net
    • Marked as answer by Alex Liang Friday, October 8, 2010 8:57 AM
    Wednesday, September 29, 2010 10:18 AM
  • Depends upon the connection string. It would help if you could identify what type of connection string you are working with.

    Paul ~~~~ Microsoft MVP (Visual Basic)
    • Marked as answer by Alex Liang Friday, October 8, 2010 8:57 AM
    Thursday, September 30, 2010 5:35 PM