Link to home
Start Free TrialLog in
Avatar of JustinW
JustinWFlag for United States of America

asked on

Batch File to Remove ODBC Connection

I've figured out how to create an ODBC connection through a batch file that
runs like this:

ODBCConf ConfigSysDSN "MySQL ODBC 5.1 Driver" "DSN=test;SERVER=cpucnd1277xr9.mycompany.com;UID=%USERNAME%;PWD=today123;DATABASE=arms;PORT=3306"

Open in new window


I'm trying to figure out how to delete this connection through the same process.
Thanks,
-JW
Avatar of coolfiger
coolfiger
Flag of Trinidad and Tobago image

i believe u jsut need to use the instodbc utility and write the necessary code in a batch file
Avatar of JustinW

ASKER

The delete portion of the batch file is going to be run by a lot of different computers.
Is instodbc a native windows utility?
ASKER CERTIFIED SOLUTION
Avatar of johnb6767
johnb6767
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Reason I suggested that, was is that its just a simpler method, instead of the above.....
Avatar of JustinW

ASKER

@john,

How to remove from //ODBC Data Sources?

When I go to odbc source admin, it still lists 'TEST' as an active ODBC
Should be gone after a reboot.....