whois12000a
MIS
Hi need some help.
I am trying to insert some data into a oracle DB using sqlplus:
' Option Explicit
set WshShell = CreateObject("WScript.Shell")
set oEnv=WshShell.Environment("Process")
Dim WshShell, cmdString, oExec, input
cmdString = "D:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe "user name"/"password"@DBName Insert into schema.tablename(SERVER_NAME, SERVER_IP, ENVIRONMENT, LAST_REBOOT, DATE_PULLED) Values ('testserver','0.0.0.0', 'Name', TO_DATE('04/05/2016 15:31:39', 'MM/DD/YYYY HH24:MI:SS'),sysdate); COMMIT;"
)
Set oExec = WshShell.Exec(cmdString)
there is no error displayed but when I check the db no data is written from this script. Not sure where to go from here.
any ideals?
I am trying to insert some data into a oracle DB using sqlplus:
' Option Explicit
set WshShell = CreateObject("WScript.Shell")
set oEnv=WshShell.Environment("Process")
Dim WshShell, cmdString, oExec, input
cmdString = "D:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe "user name"/"password"@DBName Insert into schema.tablename(SERVER_NAME, SERVER_IP, ENVIRONMENT, LAST_REBOOT, DATE_PULLED) Values ('testserver','0.0.0.0', 'Name', TO_DATE('04/05/2016 15:31:39', 'MM/DD/YYYY HH24:MI:SS'),sysdate); COMMIT;"
)
Set oExec = WshShell.Exec(cmdString)
there is no error displayed but when I check the db no data is written from this script. Not sure where to go from here.
any ideals?