This is an old pieces of code I wrote in the past, it create an Oracle DSN called "Dorisdq" if it doesn't exist.
I used it under NT/98, tested 5 minute ago (just before post it) under 2000, seems works.
Use it as jump start
#DEFINE HKEY_CLASSES_ROOT -2147483648 && BITSET(0,31)
#DEFINE HKEY_CURRENT_USER -2147483647 && BITSET(0,31)+1
#DEFINE HKEY_LOCAL_MACHINE -2147483646 && BITSET(0,31)+2
#DEFINE HKEY_USERS -2147483645 && BITSET(0,31)+3
csys="System"
windir=GETENV("windir")
sistemaop=GETENV("OS")
systemroot=GETENV("systemroot")
if upper(sistemaop)="WINDOWS_NT"
csys=csys+"32"
endif
drvodbc=windir+"\"+csys+"\MSORCL10.DLL"
SET CLASSLIB TO registry.vcx additive
oReg = CreateObject("registry")
if !oreg.iskey("SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.openkey("SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE,.t.)
oreg.SetRegKey("BufferSize","40000","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("ConnectString","worm","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("Description","Doris","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("Driver",drvodbc,"SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("DSN","Doris","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("PWD",chr(0),"SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("Remarks","0","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("RowLimit","400","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("SynonymColumns","1","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("SystemTable","0","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("UID","arcisadm","SOFTWARE\ODBC\odbc.ini\dorisdq",HKEY_LOCAL_MACHINE)
oreg.SetRegKey("Dorisdq","Microsoft ODBC for Oracle","SOFTWARE\ODBC\odbc.ini\ODBC Data Sources",HKEY_LOCAL_MACHINE)
Endif
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only