OS : Windows7 DB : Oracle 11 Enterprise Release 11.2.0.4.0 DSN: DSN created in ODBC in SYSWOW64
I have a vbs file that connect to Oracle DB and execute a query and return the result based on which I do some action.
Call db_connect(curSession, "DSN=INTDB;UID=RAKHSH;PWD=fdfg4qprd;")
strQuery="select count(*) from atmn.vc_run;"
call db_execute_query(curSession, strQuery)
intCount = db_get_rows_count_SQL(curSession, strQuery)
Public Function db_connect( byRef curSession ,DSN)
Set curSession = createobject("ADODB.Connection")
curSession.connectionstring = DSN
curSession.open
if Err.Number = 0 then
db_connect=1
else
db_connect=0
end If
End Function
I'm facing 2 problems:
When I double click this vbs file, it shows an error of architecture mismatch. I found the below thread and when I open the CMD from syswow64 and execute the script it works fine but when I double click it shows error How do I run a VBScript in 32-bit mode on a 64-bit machine?
I also need to run this from jenkin job using CSCRIPT, it shows the same message in jenkin console
I have been googling various solutions since last 2 days but unable to find any.