//删除注册的ODBC
procedure OBDCDelete(ODBCName:string);
var registerTemp:TRegistry;
begin
registerTemp := TRegistry.Create;
with registerTemp do
begin
try
RootKey:=HKEY_LOCAL_MACHINE;
if OpenKey(‘SoftwareODBCODBC.INIODBC Data Sources‘,True) then
begin //注册一个DSN名称
DeleteValue(ODBCName);
end ;
closeKey;
registerTemp.DeleteKey(‘SoftwareODBCODBC.INI‘ odbcname);
except
end;
end;
registerTemp.Free;
end;