title: SQLGetInfo - How to use this function
body: <p>I have developed a c# application which connects to many types of database servers like Sql,Oracle,Mysql etc..Connection was established using <strong>ODBC</strong>.</p>
  
  <p>I need to find the server type (DBMS type) for which the connection was established, as the user only enters the <strong>DSN</strong> name.</p>
  
  <p>After several hours of surfing, I found that my requirement is possible only through this function <a href="https://msdn.microsoft.com/en-us/library/ms711681%28v=vs.85%29.aspx" rel="noreferrer">SQLGetInfo</a>.But I don't know how to deal with this in C#.</p>
  
  <p>even have checked this <a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/4579ccbc-4977-493e-a863-94ecdfe181b4/odbcconnectiongetschema-vs-sqlgetinfo?forum=netfxbcl#9d74fc73-7be9-482b-b6db-1b4c256cb355" rel="noreferrer">Link1</a>.</p>
  
  <p>from the above link, I found that ODBC API only gives <a href="https://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.database.aspx" rel="noreferrer">DataBase name</a> and <a href="https://msdn.microsoft.com/en-us/library/system.data.odbc.odbcconnection.datasource.aspx" rel="noreferrer">DataSource Name</a>.But I need to find the Datatbase type like whether it's a SQL connection or Oracle connection or mySqlConnection.</p>
  
  <p>Is it possible to get the DBMS type from DSN name..?</p>
  
  <p>Note: I don't want to read it from a registry setting.I tried this and it works, but I'm having permission issues..!</p>