Solved

Get the ODBC database type from ADO

Posted on 2001-06-05
5
294 Views
Last Modified: 2012-05-04
Hi
  Could someone advice me how I could find the database
type after I have made a ADO connection to it from a ODBC
data source.

Any help is greatly appreciated.

Thanx
 
Dylan
0
Comment
Question by:dilantha
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:dbirdman
ID: 6158024
I'm not entirely sure what you're after, but see if this helps:

There is a PROVIDER property, that can have the following values, though this is usually set before you connect:
  MSDASQL - for ODBC
  MSIDXS - Index Server
  ADSDSOOBject - Active Directory Services
  Microsoft.Jet.OLEDB.4.0 - MS Jet Databases
  SQLOLEDB - SQL Server
  MSDAORA - Oracle
  MSDataShape - MS Data Shape
  MSDAIPP.DSO.1 - Internet Publishing
  MSDAOSP - OLE DB, simple tablular format
  MSPersist - Persisting rs Objects

Hope this is helpful
0
 
LVL 2

Expert Comment

by:pkohlmil
ID: 6158152
The Provider property is all I can think of also.
If your data environment is called DataEnvironment1 and your connection is called DataConnect then use:
DataEnvironment1.DataConnect.Provider
This will return something close to the list provided by dbirdman. For SQL Server I get SQLOLEDB.1
0
 
LVL 2

Accepted Solution

by:
WalterM earned 100 total points
ID: 6159336
You can inspect the connection object's properties collection to obtain additional information.

Assuming that your connection string is stored in a variable called ConStr, try this:

--- example code ---

Dim Con As ADODB.Connection

Con.Open ConStr  ' Use you own connection string here

With Con.Properties
    Debug.Print "OLE DB Version"; Tab(30); " = "; .Item("OLE DB Version").Value
    Debug.Print "DBMS Name"; Tab(30); " = "; .Item("DBMS Name").Value
    Debug.Print "DBMS Version"; Tab(30); " = "; .Item("DBMS Version").Value
    Debug.Print "Provider Name"; Tab(30); " = "; .Item("Provider Name").Value
    Debug.Print "Provider Friendly Name"; Tab(30); " = "; .Item("Provider Friendly Name").Value
    Debug.Print "Provider Version"; Tab(30); " = "; .Item("Provider Version").Value
End With

--- end example code ---

Hope this helps,

Michel
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6353349
Greetings, dilantha.  You have asked 41 questions within Experts Exchange, but only closed 20 of them.  I will post follow up comments on all your open items to help you navigate to them and complete them.
__________________________________

It's time to clean up this topic area and that means taking care of this question. Your options at this point are:
 
1. Award points to the Expert who provided an answer, or who helped you most. Do this by clicking on the "Accept Comment as Answer" button that lies above and to the right of the appropriate expert's name.
 
2. PAQ the question because the information might be useful to others, but was not useful to you. To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
3.  Ask Community Support to help split points between participating experts.  Just comment here with details.
 
4.  Delete the question because it is of no value to you or to anyone else.  To use this option, you must state why the question is no longer useful to you, and the experts need to let me know if they feel that you're being unfair.
 
If you elect for option 2, 3 or 4, just post comment with details here and I'll take it from there.  We also request that you review any other open questions you might have and update/close them.  Display all your question history from your Member Profile to view details.
 
PLEASE DO NOT AWARD THE POINTS TO ME.
 
____________________________________________
 
 
 
Hi Experts:
 
In the event that the Asker does not respond, I would very much appreciate your opinions as to which Expert ought to receive points (if any) as a result of this question.  Likewise, you can also suggest that I PAQ or delete the question.
 
Experts, please do not add further "answer" information to this question.  I will be back in about one week to finalize this question.
 
Thank you everyone.
 
Moondancer :)
Community Support Moderator @ Experts Exchange
 
P.S.  Engineering has been advised about the error in the comment date/time sort order on some older questions.  REGARDING POINTS and more:  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp  
0
 
LVL 3

Expert Comment

by:modder
ID: 6489720
Hello all,

dilantha is a duplicate account, and it has been closed.

Please advise as to who should get points for this.

modder
Community Support
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question