Solved

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

Posted on 2004-09-10
8
173 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
ID: 12025835
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
ID: 12026364
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
ID: 12026891
0
 

Author Comment

by:willwatters
ID: 12043635
Sorry, but I don't understand why I have to re-create the DSN?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 69

Expert Comment

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

Author Comment

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

Accepted Solution

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

Author Comment

by:willwatters
ID: 12543560
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access 2016 VB code 9 102
Updates not working for MS Windows 7 12 152
Error when passing an argument to a vb6 that contains  '/' 7 31
Excel Automation VBA 19 30
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 need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

911 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

16 Experts available now in Live!

Get 1:1 Help Now