|
Answer» Hi, I want to create an ODBC data source in DOS using a BATCH FILE. The target computer has Windows XP and the datasource is in MS Access.
Please Help Me
Best Regards... I do not recommend it, but you could use the reg utility in a batch file to update the registry directly.
A better solution would be to use the Administrative Tools found in the Windows Control Panel. SELECT Data Sources (ODBC).
Thanks It works using a reg file like this way:
Windows XP/Windows 2000
REG Import file.reg
Reg is a DOS command that could manipulate the Windows' Registry.
To create the reg file: 1. Open Administratives Tools in the control panel. 2. Open the Data Source (ODBC) icon. 3. Create the datasource using User DSN or System DSN, or your preference setting. 4. Check that it works correctly. 5. Then, execute Regedit (Run==>regedit==>Enter) 6. Go to [HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI] and EXPORT this forlder (File==>Export). 7. You Could edit the EXPORTED file, including only the source that will be used.
I hope it be useful...
Best Regards
|