Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you delete ODBC database name?

Status
Not open for further replies.

sacsadmin

IS-IT--Management
Oct 16, 2002
39
0
0
US
When creating a new ODBC Engine DSN, I get the error:

"The database name must be unique. The specified name already exists. Please specify another database name."

The drop down list is getting rather long and I would like to recycle some of the names.

Does this make sense?
 
Using the ODBC Administrator, you can delete DSNs.
Launch the ODBC Administartor, highlight the desired DSN, and click the [Remove] button.

On Win9x: Control Panel -> ODBC Data Sources
On WinNT: Control Panel -> Data Sources (ODBC)
On W2K/XP: Control Panel -> Administrative Tools -> Data Sources (ODBC)

User DSNs are specific to a given user and are stored in the HKEY_CURRENT_USER\Software\ODBC\ODBC.INI registry key.
System DSNs are common to all users and stored in the HKEY_LOCAL_MACHINE\Software\ODBC\ODBC.INI registry key.


 
RHill7,

Thanks for the reply. However, I think my question has been mis-understood. I know that you can delete DSN records as stated in youre reply, but...

When creating a new DSN Engine Setup from the ODBC administrator, In the ODBC Engine DSN Setup screen there is a section called Database. In this section is a drop down list for the database name.

In my drop down list there are names of past databases for DSN's that have been deleted. This is why I get the error from my original post.

I can't figure out how to delete the names from the drop down list.

Hope this makes sense.
 
Sorry, I thought that was too easy!

I'm not sure where you are seeing this drop down list. Can you give me click by click instructions on finding it?

Also, what version of Windows and ODBC (ADO) are you running?
 
NOS: MS Windows NT 4.0 Service Pack 6.0

Steps:

Control Panel > ODBC Data Source Administrator
ODBC DSA > System DSN Tab > Add
Create New Data Source > Select Pervasive ODBC Engine
Data Source = Demo1
Description = Demo1

Database Name = ( ) This is where the list is showing all the past names and active names. There is also a create button here as well.

Any idea?

 
Sounds like some list that the Pervasive ODBC driver setup is hanging on to. I was initially confused since I typically only have been dealing with the setups for MS-Access and SQL Server, neither of which maintain a drop down list.

I would guess that the Pervasive ODBC setup is storing this list of 'recent' databases in either the registry or in an INI file. I would first search the registry for one of the database names, and if that fails, search the HDD for a file that contains the DB name. Another thing to try would be to use RegMon and FileMon ( when launching the Pervasive ODBC driver to see where the list is being read from. Once you find the list, then it is just a matter of determining how to delete items from it.
 
I got the same problem

edit C:\Windows\ODBC.ini


cheers

 
Sorry, wrong file....

i meant c:\windows\dbnames.cfg
 
To delete Pervasive Database Names, you can go into the Pervasive Control Center, expand the computer name node and right click on "Configuration". Select "Maintain Named Databases" and you'll be able to create, edit and delete Pervasive Named Databases. If you've still got the ODBC DSN pointing to that Database Name, you can right click on the database in the PCC and select "Delete" as well.
If you want to remove the database names programmatically, you can use DTI or DTO.
Hope this helps.

info@mirtheil.com
Custom VB and Btrieve development.
Certified Pervasive Developer
Certified Pervasive Technician
 
I have a question relating to issue to some extent. I have an access database application that connects to SQL Server 7.0. I created a file DSN that is stored locally on my hard drive. The users connect to the database on the network through a shortcut. If the actual DSN files is located on my hard drive, how come users are able to connect to the application on the shared network??
When I tried to create the DSN on the Shared netword drive, every time a user opens the application, he or she gets the login SQL dialog window. THey have to check the trusted connection option to get into the application. Very wierd indeed. Can anyone out there help understand this please?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top