Solved

How to open Data Sources(ODBC) & check value in the System DSN

Posted on 2004-09-10
8
172 Views
Last Modified: 2010-05-02
How do  you open ODBC Data Source Administrator (control pannel>Administrative Tools>Data Sources (ODBC)) and check if the value ORA_W2K exists in the System DSN tab and its TNS Service Name (configuration details) has the value - CLT2.  This is for windows 2000  
0
Comment
Question by:willwatters
  • 4
  • 4
8 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
it is easier and quicker to simply recreate the DSN without checking its existence or current value:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;171146&FR=1
http://support.microsoft.com/default.aspx?scid=kb;en-us;184608&Product=vb6&FR=1
0
 

Author Comment

by:willwatters
Comment Utility
Im trying to do automatic testing to see if these values exist.  How will I do this please?
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
0
 

Author Comment

by:willwatters
Comment Utility
Sorry, but I don't understand why I have to re-create the DSN?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
Because it takes shorter then starting to validate it the DSN is existing and if it is still valid.
0
 

Author Comment

by:willwatters
Comment Utility
How many points do you want to code this please?
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 50 total points
Comment Utility
why? You have all you required here? What is missing?
0
 

Author Comment

by:willwatters
Comment Utility
Thanks for your help, but this is not what I was looking for.  The resoultion is below:

'Navigate to ORA_W2K server name & store this location as a variable
Const ODBC_VAL = "HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ORA_W2K\servername"

Dim strODBCVal As String
'Find the value of the server name
strODBCVal = RegRead(ODBC_VAL)

'If ORA_W2K or CLT2 does not exist then record bug (test failed)
If strODBCVal <> "CLT2" Then
    oErrLog.LogError Err.Number, Err.Description, Err.Source, "ODBC Settings Test 14 - Incorrect ODBC Settings "
    Err.Clear
End If
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now