SAPBobsCOM Recordset cannot execute Stored Procedure
I have a query stored in a SQL 2005 Stored Procedure, and when want to retrieve my procedure with the Recordset.doQuery() command, this error message appears :
System.Runtime.InteropServices.COMException (0xFFFFF930) at SAPbobsCOM.IRecordset.DoQuery(String QueryStr) at [ blah2..... (it refers to my code line) ]
My code is :
Dim oRec As SAPbobsCOM.Recordset
oRec = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
oRec.DoQuery("EXEC PO_LIst2")
Catch ex As Exception
MsgBox(ex.GetBaseException.ToString)
End Try
And when I change my code to be like this :
Dim oRec As SAPbobsCOM.Recordset
oRec = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
Try
oRec.DoQuery("Select * From OPOR")
Catch ex As Exception
MsgBox(ex.GetBaseException.ToString)
End Try
I don't get any error....
For all of the code I use SQL Server 2005, Visual Studio 2008, and SAPBobsCOM version 8.8.
Have anyone experience this?? Why the recordset can't execute my stored procedure??
Edited by: Rinaldi Sugiono on Jun 18, 2010 1:44 PM
I would search the forums for SAPBobsCOM to find a more appropriate forum, since the BusinessOne components are outside of scope for this forum.
Sincerely,
Ted Ueda
Similar Messages
-
Updateable recordset from a stored procedure
I would like to retrieve an updateable recordset from a stored procedure using the oracle 9.2.0.2.0
oledb provider
I am using the sample code/tables provided from Oracle.
Does anyone have an example or has actually created an updatedable recordset from a stored procedure ?Assuming your stored procedure is returning a REF CURSOR, it cannot be done. Oracle's REF CURSORS are read only constructs.
Justin -
How to get an updatable ADODB Recordset from a Stored Procedure?
In VB6 I have this code to get a disconnected ADODB Recordset from a Oracle 9i database (the Oracle Client is 10g):
Dim conSQL As ADODB.Connection
Dim comSQL As ADODB.Command
Dim recSQL As ADODB.Recordset
Set conSQL = New ADODB.Connection
With conSQL
.ConnectionString = "Provider=OraOLEDB.Oracle;Password=<pwd>;Persist Security Info=True;User ID=<uid>;Data Source=<dsn>"
.CursorLocation = adUseClientBatch
.Open
End With
Set comSQL = New ADODB.Command
With comSQL
.ActiveConnection = conSQL
.CommandType = adCmdStoredProc
.CommandText = "P_PARAM.GETALLPARAM"
.Properties("PLSQLRSet").Value = True
End With
Set recSQL = New ADODB.Recordset
With recSQL
Set .Source = comSQL
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.Open
.ActiveConnection = Nothing
End With
The PL/SQL Procedure is returning a REF CURSOR like this:
PROCEDURE GetAllParam(op_PARAMRecCur IN OUT P_PARAM.PARAMRecCur)
IS
BEGIN
OPEN op_PARAMRecCur FOR
SELECT *
FROM PARAM
ORDER BY ANNPARAM DESC;
END GetAllParam;
When I try to update some values in the ADODB Recordset (still disconnected), I get the following error:
Err.Description: Multiple-step operation generated errors. Check each status value.
Err.Number: -2147217887 (80040E21)
Err.Source: Microsoft Cursor Engine
The following properties on the Command object doesn't change anything:
.Properties("IRowsetChange") = True
.Properties("Updatability") = 7
How can I get an updatable ADODB Recordset from a Stored Procedure?4 years later...
I was having then same problem.
Finally, I've found how to "touch" the requierd bits.
Obviously, it's hardcore, but since some stupid at microsoft cannot understand the use of a disconnected recordset in the real world, there is no other choice.
Reference: http://download.microsoft.com/downlo...MS-ADTG%5D.pdf
http://msdn.microsoft.com/en-us/library/cc221950.aspx
http://www.xtremevbtalk.com/showthread.php?t=165799
Solution (VB6):
<pre>
Dim Rst As Recordset
Rst.Open "select 1 as C1, '5CHARS' as C5, sysdate as C6, NVL(null,15) as C7, null as C8 from DUAL", yourconnection, adOpenKeyset, adLockBatchOptimistic
Set Rst.ActiveConnection = Nothing
Dim S As New ADODB.Stream
Rst.Save S, adPersistADTG
Rst.Close
Set Rst = Nothing
With S
'Debug.Print .Size
Dim Bytes() As Byte
Dim WordVal As Integer
Dim LongVal As Long
Bytes = .Read(2)
If Bytes(0) <> 1 Then Err.Raise 5, , "ADTG byte 0, se esperaba: 1 (header)"
.Position = 2 + Bytes(1)
Bytes = .Read(3)
If Bytes(0) <> 2 Then Err.Raise 5, , "ADTG byte 9, se esperaba: 2 (handler)"
LongVal = Bytes(1) + Bytes(2) * 256 ' handler size
.Position = .Position + LongVal
Bytes = .Read(3)
If Bytes(0) <> 3 Then Err.Raise 5, , "ADTG, se esperaba: 3 (result descriptor)"
LongVal = Bytes(1) + Bytes(2) * 256 ' result descriptor size
.Position = .Position + LongVal
Bytes = .Read(3)
If Bytes(0) <> 16 Then Err.Raise 5, , "ADTG, se esperaba: 16 (adtgRecordSetContext)"
LongVal = Bytes(1) + Bytes(2) * 256 ' token size
.Position = .Position + LongVal
Bytes = .Read(3)
If Bytes(0) <> 5 Then Err.Raise 5, , "ADTG, se esperaba: 5 (adtgTableDescriptor)"
LongVal = Bytes(1) + Bytes(2) * 256 ' token size
.Position = .Position + LongVal
Bytes = .Read(1)
If Bytes(0) <> 6 Then Err.Raise 5, , "ADTG, se esperaba: 6 (adtgTokenColumnDescriptor)"
Do ' For each Field
Bytes = .Read(2)
LongVal = Bytes(0) + Bytes(1) * 256 ' token size
Dim NextTokenPos As Long
NextTokenPos = .Position + LongVal
Dim PresenceMap As Long
Bytes = .Read(3)
PresenceMap = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(2)), 2))
Bytes = .Read(2) 'ColumnOrdinal
'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
'Aca pueden venir: friendly_columnname, basetable_ordinal,basetab_column_ordinal,basetab_colname
If PresenceMap And &H800000 Then 'friendly_columnname
Bytes = .Read(2) 'Size
LongVal = Bytes(0) + Bytes(1) * 256 ' Size
.Position = .Position + LongVal * 2 '*2 debido a UNICODE
End If
If PresenceMap And &H400000 Then 'basetable_ordinal
.Position = .Position + 2 ' 2 bytes
End If
If PresenceMap And &H200000 Then 'basetab_column_ordinal
.Position = .Position + 2 ' 2 bytes
End If
If PresenceMap And &H100000 Then 'basetab_colname
Bytes = .Read(2) 'Size
LongVal = Bytes(0) + Bytes(1) * 256 ' Size
.Position = .Position + LongVal * 2 '*2 debido a UNICODE
End If
Bytes = .Read(2) 'adtgColumnDBType
'WordVal = Val("&H" & Right$("0" & Hex$(Bytes(0)), 2) & Right$("0" & Hex$(bytes(1)), 2))
Bytes = .Read(4) 'adtgColumnMaxLength
'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
Bytes = .Read(4) 'Precision
'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
Bytes = .Read(4) 'Scale
'LongVal = Val("&H" & Right$("0" & Hex$(Bytes(3)), 2) & Right$("0" & Hex$(Bytes(2)), 2) & Right$("0" & Hex$(Bytes(1)), 2) & Right$("0" & Hex$(Bytes(0)), 2))
Dim ColumnFlags() As Byte, NewFlag0 As Byte
ColumnFlags = .Read(1) 'DBCOLUMNFLAGS, First Byte only (DBCOLUMNFLAGS=4 bytes total)
NewFlag0 = ColumnFlags(0)
If (NewFlag0 And &H4) = 0 Then 'DBCOLUMNFLAGS_WRITE (bit 2) esta OFF
'Lo pongo en ON, ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
NewFlag0 = (NewFlag0 Or &H4)
End If
If (NewFlag0 And &H8) <> 0 Then 'DBCOLUMNFLAGS_WRITEUNKNOWN (bit 3) esta ON
'Lo pongo en OFF, ya que no me importa si NO sabes si se puede updatear no, yo lo se, no te preocupes
'ya que quiero escribir esta columna LOCALMENTE en el rst DESCONECTADO
NewFlag0 = (NewFlag0 And Not &H8)
End If
If (NewFlag0 And &H20) <> 0 Then 'DBCOLUMNFLAGS_ISNULLABLE (bit 5) esta OFF
'Lo pongo en ON, ya que siendo un RST DESCONECTADO, si le quiero poner NULL, le pongo y listo
NewFlag0 = (NewFlag0 Or &H20)
End If
If NewFlag0 <> ColumnFlags(0) Then
ColumnFlags(0) = NewFlag0
.Position = .Position - 1
.Write ColumnFlags
End If
.Position = NextTokenPos
Bytes = .Read(1)
Loop While Bytes(0) = 6
'Reconstruyo el Rst desde el stream
S.Position = 0
Set Rst = New Recordset
Rst.Open S
End With
'TEST IT
On Error Resume Next
Rst!C1 = 15
Rst!C5 = "MUCHOS CHARS"
Rst!C7 = 23423
If Err.Number = 0 Then
MsgBox "OK"
Else
MsgBox Err.Description
End If
</pre> -
Howto:pass an ado.recordset to a stored procedure
Hi,
I need to pass an adodb.recordset to a stored procedure in Oracle 8.0.5.
I am programming with visualbasic 6, an exe application.
I don4t know how to setting the parameter for the adodb.command which execute the procedure.
Any idea??
Thanks,
Cesar,Hi,
You can't do this using an OLEDB provider. There is no such a provider with this feature.
Yuancai (Charlie) Ye
See 30 real well-tested advanced OLEDB samples
Use of free SocketPro for creating super client and server application with numerous samples
www.udaparts.com -
Problem in executing Stored Procedure from Trigger
Hi,
Case1.
I am executing a stored procedure form a trigger. The stored procedure is not executing fully.
Case 2.
But when when I execute Stored Procedure alone it is executing.
CREATE OR REPLACE TRIGGER mhubadmin.call_proc_ratesheet_new
after INSERT OR delete ON mhubadmin.pvt_br_ratesheet
FOR EACH ROW
declare
var_orgid number;
begin
if inserting then
select org_child_id into var_orgid from business_relationship where br_id=:new.br_id;
mhubadmin.proc_ratesheet_new(var_orgid);
else
select org_child_id into var_orgid from business_relationship where br_id=:old.br_id;
mhubadmin.proc_ratesheet_new(var_orgid);
end if;
end;
CREATE OR REPLACE PROCEDURE proc_ratesheet_new(var_orgid in number)
IS
cursor c3 is select distinct(purs.user_id) from hubuser hu
inner join PVT_USER_RATESHEET purs on hu.USER_ID=purs.USER_ID
where hu.ORG_ID=var_orgid;
cursor c1(varUser_id number) is select purs.user_id,purs.ratesheet_id from hubuser hu
inner join PVT_USER_RATESHEET purs on hu.USER_ID=purs.USER_ID
where hu.ORG_ID=var_orgid and purs.USER_ID=varUser_id;
cursor c2(varUser_id number) is select hu.user_id,pbr.ratesheet_id from HUBUSER hu
inner join BUSINESS_RELATIONSHIP br on hu.ORG_ID=br.ORG_CHILD_ID
inner join PVT_BR_RATESHEET pbr on br.BR_ID=pbr.BR_ID
where hu.user_id in(select distinct(purs.USER_ID) from hubuser hu
inner join PVT_USER_RATESHEET purs
on hu.USER_ID=purs.USER_ID
where hu.ORG_ID=var_orgid) and hu.user_id=varUser_id;
foundFlag boolean;
incrFound integer;
insertFound integer;
deleteFound integer;
str varchar2(4000);
BEGIN
incrFound:=0;
insertFound:=0;
for c3var in c3 loop
for c2var in c2(c3var.user_id) loop
insert into test values ('Step3:'||c2var.user_id);
foundFlag:=false;
for c1var in c1(c3var.user_id) loop
if c2var.ratesheet_id=c1var.ratesheet_id then
foundFlag:=true;
incrFound:=incrFound+1;
exit;
end if;
end loop;
if foundFlag=False then
--insert into pvt_user_ratesheet (username_ratesheet_id,user_id,ratesheet_id) values (SEQ_USER_RATESHEET.nextval,c3var.user_id,c2var.ratesheet_id);
dbms_output.put_line('Inserted for user :'||c3var.user_id||' is - ratesheet :'||c2var.ratesheet_id);
insertFound:=insertFound+1;
end if;
end loop;
end loop;
commit;
incrFound:=0;
deleteFound:=0;
for c3var in c3 loop
for c1var in c1(c3var.user_id) loop
foundFlag:=false;
for c2var in c2(c3var.user_id) loop
if c1var.ratesheet_id=c2var.ratesheet_id then
foundFlag:=true;
incrFound:=incrFound+1;
exit;
end if;
end loop;
if foundFlag=False then
--delete from pvt_user_ratesheet where user_id=c3var.user_id and ratesheet_id=c1var.ratesheet_id;
--dbms_output.put_line('Deleted for userid:'||c3var.user_id||' for ratesheet :'||c1var.ratesheet_id);
deleteFound:=deleteFound+1;
end if;
end loop;
end loop;
commit;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line (SQLCODE||' '|| SQLERRM);
END;
Regards,
MathewIn general, I would suggest that you only catch errors that you can handle reasonably. If you know that a SELECT INTO might return 0 rows for example, handle the NO_DATA_FOUND exception. Having a WHEN OTHERS, particularly without re-raising the exception, only serves to hide the source of the problem. I would much rather that my code fail quickly and explicitly than hope that I see an error message in the output and that other code doesn't start failing because the system wasn't left in an appropriate state.
As Mark suggests, you may choose to implement a comprehensive logging framework using autonomous transactions, in which case a WHEN OTHERS would be reasonable, but you would still want to propagate exceptions you cannot handle.
If you see a WHEN OTHERS clause and there is no RAISE, you probably have an error waiting to happen.
Justin -
How can I execute Stored Procedures in PARALLEL and DYNAMICALLY ?
Hi
I have a stored procedure. It can be executed like this
exec test @p = 1;
exec test @p = 2
exec test @p = n;
n can be hundred.
I want the sp being executed in parallel, not sequence. It means the 3 examples above can be run at the same time.
If I know the number in advance, say 3, I can create 3 different Execution SQL Tasks. They can be run in parallel.
However, the n is not static. It is coming from a table.
How can I execute Stored Procedures in PARALLEL and DYNAMICALLY ?
I think about using script task. In the script, I get the value of n, and the list of p, from the table, then running a loop with. In the loop, I create a threat and in the threat, I execute the sp like : exec test @p = p. So the exec test may
be run parallel. But I am not sure if it works.
Any idea is really appreciated.Hi nam_man,
According to your description, you want to call stored procedures in parallel, right?
In SSIS, we can create separate jobs with different stored procedures, then set the same schedule to kick the jobs off at the same time. In this way, we should be careful to monitor blocking and deadlocking depending on what the jobs are doing.
We can also put all stored procedures in SSIS Sequence container, then they will be run in parallel.
For more information about SSIS job and Sequence container, please refer to the following documents:
http://www.mssqltips.com/sqlservertutorial/220/scheduling-ssis-packages-with-sql-server-agent/
https://msdn.microsoft.com/en-us/library/ms139855(v=sql.110).aspx
If you have any more questions, please feel free to ask.
Thanks,
Wendy Fu
Wendy Fu
TechNet Community Support -
In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .
Hi Srinath,
The below blog might be useful
http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
regards,
Harish -
Found a bug in "Execute Stored Procedure..." command
Hi...I've found one interesting "feature": if I do click "Execute Stored Procedure"on SP, which contains an XML parameter (doesn't matter if it's input or output), Management Studio generates script without declaring datatype of that
parameter. But if I click "Generate Script" everything works fine. This situation can be observed in SQL Server 2005-2012.Hello,
Please submit a product feedback on Microsoft Connect:
https://connect.microsoft.com/sqlServer/
Thank you for sharing what you have discovered.
Regards,
Alberto Morillo
SQLCoffee.com -
Execute stored procedure as sysadmin
Hi,
I am running powershell script to execute stored procedure on SQL server. Powershell script is run with low privilege user account on SQL server, but SP is restoring databases and requires sysadmin permissions. How can I execute SP with sysadmin permissions?
Could this be done proxy account? without additional users creation. Any links? ThanksYou can create the sp using a sysadmin account (or in dbo schema) and use EXECUTE AS OWNER inside it
Then give the powershell account execute access to the procedure and it will run under context of dbo user (or owner account) which will have necessary permission to do the data base restore etc
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Could not execute stored procedure in oracle
hello experts,
Problem: I can not execute stored procedures stored in Oracle data base. Error Message: Portal request failed. Could not execute stored procedure.
My steps:
i connected my locally installed Oracle data base to the VC. I mapped the data base user to my VC user. I tested connection and it is fine. Further I see the db alias in Visual Composer and i can drop stored procedures to my story board. I can define parameters, but when I am executing procedures I get the error message.
Further I installed MS SQL Server lokally and connected to the VC and it is working fine. I can do everything.
Why it is not working for Oracle DB?
DriverName: com.sap.portals.jdbc.oracle.OracleDriver
Connect-URL: jdbc:sap:oracle://ip:port;sid=XE
Any comment is highly appreciated.
anton.Hi,
Also you can follow this link which explains you the procedure to configure BI JDBC system for visual composer.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424
Regards
Inder
Do reward points if helpful. -
Entity Framework - Execute Stored Procedures
I want to execute stored procedure using entity framework.
I am using entity framework 6.
The stored procedure has SELECT and RETURN statement.
How can I read the output from SELECT and RETURN statements using
dbContext.Database.ExecuteSqlCommand or dbContext.Database.SqlQuery statement ?Hello Sumit Kadam,
>> The stored procedure has SELECT and RETURN statement.
For the select statement, Entity Framework would support natively:
http://www.entityframeworktutorial.net/stored-procedure-in-entity-framework.aspx
For the return statement, we could use the dbContext.Database.SqlQuery statement as below to fetch the value:
var returnCode = new SqlParameter();
returnCode.ParameterName = "@ReturnCode";
returnCode.SqlDbType = SqlDbType.Int;
returnCode.Direction = ParameterDirection.Output;
// assign the return code to the new output parameter and pass it to the sp
var data = db.Database.SqlQuery<Order>("exec @ReturnCode = ProGetOrder", returnCode);
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to customize events, execute stored procedures using JSF and ADF BC
As a java beginner, I started with developing simple web application using JSF and ADF business component through visual and declarative approach. I need to know how to customize events, execute stored procedures, invoke functions on triggering events associated with rich controls. for eg. how to write customized functions on button click or checkbox click events to achieve business requirement and can be modified whenever required.
Edited by: 792068 on Aug 31, 2010 9:40 PMWhich business layer is prefered to create interactive data model: 1. ADF business components or 2. Enterprise JavaBeans using Java persistance API (JPA) or 3. Toplink 4. Portlets
which minimizes writing low level codes and how much OOPS knowledge is required for creating above business layer binding data to viewcontroller layer? -
Execute Stored Procedures from Stellent
Can we execute stored procedures from stellent 7.5.2 ?
By using java, I dont find any method to execute stored procedure from WorkSpace interface.
Please guide me to solve this..
Appreciate your help and efforts.May not be exactly what you're looking for, but I hope this helps:
http://www.corecontentonly.com/Blog/Calling-A-Stored-Procedure-From-Oracle-Fusion-ECM-Stellent
For java based execution basically:
1. Create your stored proc in the db
2. Create a component
3. Create a query resource
4. In your java code use the createResultSet method of the Workspace object and pass in the name of your query resource and then the current databinder object -
Execute stored procedure from Unix shell script
My current method of executing stored procedures (wpl_1 and wpl_2) from a unix shell script is as follows:
<<wpl.sh>>
sqlplus user/password @/home/oracle/scripts/wpl.sql
<<wpl.sql>>
set serveroutput on size 1000000
set timing on
execute wpl_1('0000010676','~')
execute wpl_2('0000010676','~')
execute wpl_1('0000010236','FIX')
execute wpl_2('0000010236','FIX')
exit
Question: Is it possible to combine the two scripts (unix and oracle) together?A little rusty on this, but this may work:
My current method of executing stored procedures
(wpl_1 and wpl_2) from a unix shell script is as
follows:
<<wpl.sh>>sqlplus user/password @/home/oracle/scripts/wpl.sql << EOF
set serveroutput on size 1000000
set timing on
execute wpl_1('0000010676','~')
execute wpl_2('0000010676','~')
execute wpl_1('0000010236','FIX')
execute wpl_2('0000010236','FIX')
exit
EOF
>
Question: Is it possible to combine the two scripts
(unix and oracle) together? -
Error executing Stored Procedure that returns a recordset in Visual Basic 6
Hello, i tried to use the example in the link posted as a response to my question in a previous thread, and in Visual Basic 6, when i execute the Stored procedure it gives me the following error:
This is the package created as indicated in the example FAQ you posted.
package types
as
type cursorType is ref cursor;
end;
This is the procedure created as indicated in the example FAQ you posted.
PROCEDURE SP_TITUVALO(T_BR IN VARCHAR2,
P_Cursor OUT TYPES.cursorType )
AS
BEGIN
OPEN P_Cursor FOR
SELECT * FROM TASAS WHERE BR=T_BR AND TASA > 0;
END;
This is the code used to execute the Stored Procedure in VB6:
Dim objConn As New ADODB.Connection
Dim connString
Dim cmdStoredProc As New ADODB.Command
Dim param1 As New ADODB.Parameter
Dim RS As ADODB.Recordset
Set param1 = cmdStoredProc.CreateParameter("T_BR", adVarChar, adParamInput, 255, "97")
cmdStoredProc.Parameters.Append param1
objConn.Open strconex
Set cmdStoredProc.ActiveConnection = objConn
cmdStoredProc.CommandText = "SP_TITUVALO"
cmdStoredProc.CommandType = adCmdStoredProc
Set RS = cmdStoredProc.Execute
This is the error returned:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SP_TITUVALO'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
****************************************************************Juan,
Not sure about FAQ you are referring to, but it seems that you need to set PLSQLRSet property of ADODB.Command to TRUE. Because if you fail to do so - errors with refcursors are likely to happen.
Consider:
Set objConn = CreateObject("ADODB.Connection")
objConn.ConnectionString = "Provider=OraOLEDB.Oracle;Persist Security Info=False;Data Source=test9ora;User ID=max;Password=blabla"
objConn.Open
'Dim cmdStoredProc
Set cmdStoredProc = CreateObject("ADODB.Command")
Dim param1
Set param1 = cmdStoredProc.CreateParameter("T_BR", adVarChar, adParamInput, 255, "97")
param1.Value = "X"
cmdStoredProc.Parameters.Append param1
'Dim RS
Set cmdStoredProc.ActiveConnection = objConn
'The following line was missed out
cmdStoredProc.Properties("PLSQLRSet") = True
cmdStoredProc.CommandText = "SP_TITUVALO"
cmdStoredProc.CommandType = adCmdStoredProc
Set RS = cmdStoredProc.ExecuteThis works fine, at least for me.
Cheers.
Maybe you are looking for
-
How we know whether a production order is open or clos
Hi, Anybody can tell me how we can know that whether a production order is open or close? Thanks, Aparna
-
Help on an Efficient Way for Implementing Production Tables Modifications?
Hey Y'all SQL Gurus, We have two tables (I would call Tab1 and Tab2 here). Tab1 contains social security number(SS#) and Emp_ID information while Tab2 has only SS#. Tab2 is a large table containing about 600k rows, and there is no primary key. Table1
-
Need to send the text file using webservice
Hi, I want to send the text file with contains data through oracle pl/sql using webservice. How can i handle this program? Kindly share with your details. Thanks in advance, Maran
-
Scenerio mapping For a CAN Industry
HI The scenerio is the raw material is fed in at inlet to a automatic machine.It undergoes 4 operations Folding , Checking(quality),Printing ,labeling the output is the CAN.At the output the cans are packed in to a pallet which has 50 cans for a pall
-
Hi, We have an application which writes to Oracle BLOBs. This is part of a stored procedure call from our application. However, when trying to write the following exception is thrown: java.lang.ClassCastException: class oracle.sql.BLOB:library:[email