Calling Oracle SQL Stored Procedures from VB 
Author Message
 Calling Oracle SQL Stored Procedures from VB


Quote:
>Hello There,
>I've got what should be a fairly simply question. I'm trying to run a stored
>procedure in Oracle from VB using the following from the MS VB KnowledgeBase:

>How to Pass Parameters to a Stored Procedure
>--------------------------------------------

<stuff deleted>
Here's a follow up, it turns out that VB 3.0 does not have support for all
of Oracle 7 features. So far, it looks like Oracle 7's stored procedures
gives VB 3.0 conniptions. We can run other SQL commands, but not stored
procedures. Oh well, it looks like it's off to calling VC++ DLLs or using
SQLRpcInit, Param, and Send. I'm assuming those will work.

Rory

BTW, I can't seem to find any documentation on SQLRpcInit, SQLRpcParam, and
SQLRpcSend so if anybody has usage strings on them they can send me,
that would be great.
--
Rory M. dela Paz                     | "In the time of chimpanzees

(617) 374-8521                       |   - Beck
----------------------------------------------------------------------------



Fri, 31 Jul 1998 03:00:00 GMT  
 Calling Oracle SQL Stored Procedures from VB
Hello There,
I've got what should be a fairly simply question. I'm trying to run a stored
procedure in Oracle from VB using the following from the MS VB KnowledgeBase:

How to Pass Parameters to a Stored Procedure
--------------------------------------------

To pass parameters, include them after the name of the stored procedure in
a string, for example:

   SQLx = "My_StorProc parm1, parm2, parm3"  ' String specifying SQL
                                             ' command.
   ...
   i = MyDB.ExecuteSQL(SQLx)  ' For stored procedure that

                              ' doesn't return records.
   ...
   set Ds = MyDB.CreateDynaset(SQLx,64) ' For stored procedure that
                                        ' returns records.

The object variable (Ds) will contain the first set of results from the
stored procedure (My_StorProc).

-------------------------------------------

My code does something similar to the above where SQLx is the following
string:
? [ODBC.BAS:iPutMsg] strExec: "msg_put 144, 'premis', 'pc', 100, 'this is a
test'"
It looks like I'm doing everything correctly, but instead, I get an
ODBC-call failed error. I've gone through all combinations, I think, of
passing the parameters to the stored procedure (e.g. enclosing the digits in
single quotes, enclosing the whole parameter list in parens, etc.) Am I
missing something from the KnowledgeBase? I'm following the KnowledgeBase to
the T and cannot quite understand what's going on.

What I'm going to do now is to just try and see whether I can execute a
parameter-less stored procedure and see whether that will work. BTW, I made
sure that under the userid/password combination I'm using, that I can run
the stored procedure directly from SQL*Plus and from Microsoft Query -
that's working. Anyway, thanks in advance for any help.

Rory
--
Rory M. dela Paz                     | "In the time of chimpanzees

(617) 374-8521                       |   - Beck
----------------------------------------------------------------------------



Fri, 31 Jul 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. RDO 2.0 and calling Oracle PL/SQL Stored Procedures

2. Calling an Oracle Stored Procedure via SQL Passthrough in Access 97

3. Call Stored Procedure using PL/SQL,VB4 and ORACLE 7.3

4. Calling Oracle Stored Procedure from VB

5. How to call an Oracle stored procedure from VB

6. Calling an Oracle Stored Procedure from Vb using Q+E

7. Calling Oracle Stored Procedure in VB

8. Calling Oracle Stored Procedure from VB

9. Calling Oracle Stored Procedure in VB ?

10. VB/Access to call Stored Procedures in Oracle

11. Calling Oracle Store Procedure from VB.

12. Calling Oracle Stored Procedures from VB

 

 
Powered by phpBB® Forum Software