Using ADO, Call a Stored Procedure with Variables
- From: eric.vogelpohl@xxxxxxxxxxxx
- Date: 4 Dec 2006 10:22:41 -0800
I wrote a WMI script to populate some server info into a DB. Our DBA
wrote the SP.
So now i want to run the exact same SP update from within my WMI script
- this is failing - what am i doing wrong?
I know i'm connecting to Oracle just fine - i can run a adodb.recordset
and parse thru entries - no prob.
i get an error from the Ora provider telling me that "non-numeric value
where numeric was expected..."
This SP provides not returned data - it just takes inputs.
_________________
strConnection = "Provider=OraOLEDB.Oracle;Data Source=CSDD;User
Id=myuserid;Password=mypassword"
Set conn = CreateObject("ADODB.Connection")
conn.Open strConnection
Set Comm = CreateObject("ADODB.Command")
Comm.ActiveConnection = conn
Comm.CommandText = "BEGIN CSD.UPDATE_WINDOWS_SERVER('EMTTULDMZWEB01',
254, 3, 'PowerEdge 2450', 200, 1024, 2, 993, '6/1/2001', 'DMZ',
54508896256, 5858009088);END;"
Comm.Execute
conn.Close
Set conn = Nothing
Set Comm = Nothing
_____________________________
This command below runs perfectly well from the SQLPlus > prompt - so i
think the stored proc is working on the Oracle side:
____________
SQL Plus userid/password@DB
EXEC CSD.UPDATE_WINDOWS_SERVER('EMTTULDMZWEB01', 254, 3, 'PowerEdge 2450', 200, 1024, 2, 993, '6/1/2001', 'DMZ', 54508896256, 5858009088)
____________
.
- Follow-Ups:
- Re: Using ADO, Call a Stored Procedure with Variables
- From: pace.uk@xxxxxxxxxxxxxx
- Re: Using ADO, Call a Stored Procedure with Variables
- Prev by Date: Re: ADO.NET versus T-SQL
- Next by Date: Re: Using ADO, Call a Stored Procedure with Variables
- Previous by thread: Re: ADO.NET versus T-SQL
- Next by thread: Re: Using ADO, Call a Stored Procedure with Variables
- Index(es):
Relevant Pages
|
|