• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

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

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
willwatters
Asked:
willwatters
  • 4
  • 4
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
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
 
willwattersAuthor Commented:
Im trying to do automatic testing to see if these values exist.  How will I do this please?
0
 
Éric MoreauSenior .Net ConsultantCommented:
0
Technology Partners: 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!

 
willwattersAuthor Commented:
Sorry, but I don't understand why I have to re-create the DSN?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Because it takes shorter then starting to validate it the DSN is existing and if it is still valid.
0
 
willwattersAuthor Commented:
How many points do you want to code this please?
0
 
Éric MoreauSenior .Net ConsultantCommented:
why? You have all you required here? What is missing?
0
 
willwattersAuthor Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now