![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | problem with running script remotely - ODBC connection - ORACLE DB Hi, I wrote script which connect to oracle 10. It works locally, but when I try to run this remotely I get error that connection can't be done. I try to use driver for Oraclecilen I have client at different machine. When I try to add driver paramter in ODBC connection I receieve error: Provider for ODBC Drivers: [Microsoft][ODBC Driver Manager] Data source name no t found and no default driver specified the erros is in this line: connection.Open connectionString I tried everything to run this by SCOM. The script is below: ' Parameters that should be passed to this script ' 1 st - User name for database ' 2 nd - Password ' 3 rd - FileFlag ' 4 th - sth ' 5 th - sth Set collArg = WScript.Arguments If collArg.Count < 5 Then 'brak argumentow Set WshShell = WScript.CreateObject("WScript.Shell") strCommand = "eventcreate /T Informtion /SO XXXX /ID 123 /L Application /D " & _ Chr(34) & "Script '" & Wscript.ScriptName & "' has wrong number of parameters."& Chr(34) WshShell.Run strCommand Else ' ok Dim User, Password, BackupFlag, a, b User = collArg(0) Password = collArg(1) BackupFlag = collArg(2) a= CInt(collArg(3)) b= CInt(collArg(4)) Set fs = CreateObject("Scripting.FileSystemObject") If fs.FileExists(file) Then else 'Dim connectionString: connectionString = "dsn=ORACLE;uid=XXXX;pwd=XXXX" Dim connectionString: connectionString = "server=FQDN;dsn=ORACLE;uid=XXX;pwd=XXXX" Dim connection: Set connection = CreateObject("ADODB.Connection") Dim rows: Set rows = CreateObject("ADODB.Recordset") connection.Open connectionString Set connectionString = Nothing Set connection = Nothing End If End If any idea? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: problem with running script remotely - ODBC connection - ORACLEDB the error is: The connection cannot be used to perform this operation. It is either closed or invalid in this context. ADODB.Recordset any idea? |
My System Specs![]() |
| | #3 (permalink) |
| | Re: problem with running script remotely - ODBC connection - ORACLEDB You need to register your Oracle database with ODBC and test it there to see if it connects. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How to login any Windows Machine remotely using script | VB Script | |||
| Script to install application remotely on a windows machine | VB Script | |||
| odbc connection | Microsoft Office | |||
| Oracle ODBC driver and Vista | Vista General | |||
| I have a problem creating a ODBC connection to a Foxpro Database!! | Vista file management | |||