Create an ODBC Entry for Oracle DB
Hi everyone, I'm newest using the Nsis, and I have a trouble when I try to compile my Nsis source. I'm using the publicated script that could Create an ODBC Entry using Oracle Database.
This is the Script:
Function CreateOracleODBCEntry
Exch $R2 ; Server Name
Exch
Exch $R3 ; Name of the ODBC Entry
; Save Registers R0,R1
Push $R0
Push $R1
Push $R4
; Try to find an Oracle home directory
Call OracleDefaultHome
Pop $R0
StrCmp $R0 "" FindAnyValidOracleHome CheckForODBCDriverExistence
; Find any valid home, if there is no valid default home
FindAnyValidOracleHome:
Call ValidOracleHome
Pop $R0
StrCmp $R0 "" NoOracleHomeFound CheckForODBCDriverExistence
; Check whether the ODBC entry already exists
CheckForODBCDriverExistence:
Push $R3
Call ODBCEntryExists
Pop $R1
StrCmp $R1 "TRUE" YaExiste
Goto Continuar
YaExiste:
MessageBox MB_YESNO "El origen de datos $R3 ya existe ¿Desea sobrescribir la configuración?" IDNO NoSobrescribe
DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3"
Goto Continuar
Continuar:
; Get the path of the Oracle home
Push $R0
Call OracleHomePath
Pop $R4
; Create the registry keys
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Driver" "$R4\bin\sqora32.dll"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Translation DLL" ""
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Translation Option" "0"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Attributes" "W"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "FetchBufferSize" "64000"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "NumericSetting" "NLS"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "ForceWCHAR" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "FailoverDelay" "10"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "FailoverRetryCount" "10"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "MetadataIdDefault" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Longs" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "CloseCursor" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "EXECSchemaOpt" ""
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "EXECSyntax" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Application Attributes" "T"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "SQLGetData extensions" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "ResultSets" "T"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "QueryTimeout" "T"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Failover" "T"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Lobs" "T"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "DisableMTS" "F"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "BatchAutocommitMode" "IfAllSuccessful"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Description" "$R7"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "ServerName" "$R2"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "Password" ""
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "UserID" "$R6"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "DSN" "$R3"
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources" "$R3" "$R5 $R0"
StrCpy $R2 "TRUE"
Goto Done
ODBCEntryAlreadyExists:
StrCpy $R2 "FALSE"
Goto Done
NoOracleHomeFound:
StrCpy $R2 "FALSE"
Done:
; Restore R0-R4
Pop $R4
Pop $R1
Pop $R0
Pop $R3
Exch $R2
FunctionEnd
The point is when I try to compile this source the system shows me the next error:
!include: error in script Line 301
the line 301 contains:
WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\ODBC\ODBC.INI\$R3" "FailoverDelay" "10"
Please Help me I don't know how to solve it
Regards