Solved

ExecuteSQL -- Funtion Marked as restricted????

Posted on 1997-06-01
2
182 Views
Last Modified: 2008-03-04
I am trying to run a stored proc on Oracle using VB4.

I can connect to the database using
set db = opendatabase ("", false, false, connnect$)

But when I try:
PROC_NAME AS STRING, NAME AS STRING, CATID AS INTEGER
PROC_NAME = "BEGIN ADDCUSTOMERINFO ('" & NAME & "'," & CATID & "); END;"

Noofrows = db.ExecuteSQL (PROC_NAME)
I get an error saying "Function marked as restricted or ..uses OLE type not supported by VB"

The oracle stored procedure does nothing apart from inserting a record in a table.  it works properly from SQL Plus.  Also it DID WORK with VB4 and then all of a sudden it started giving this error.

I can't even execute an action query using db.Execute ..the error is "Invalid Action"!!!!

The tables, database belong to me and I have all rights and priviledges.  I have checked the syntax of my code umpteen times (its correct!!).

0
Comment
Question by:khare
2 Comments
 
LVL 7

Accepted Solution

by:
tward earned 200 total points
ID: 1426683
You might want to provide some more code, like what PROC_NAME is set to...  I use Oracles Objects for OLE and do the following to open the database:

Public OraSession As Object
Public oraDatabase As Object

Set OraSession = CreateObject("oracleinprocserver.xorasession")

Set oraDatabase = OraSession.dbopendatabase(DatabaseName, CONNECTS$, 0&)

Then I can execute an SQL statement as follows:

oraDatabase.ExecuteSQL (ValidSQLStatement)

Let me know if this helps or you need more info..
0
 

Author Comment

by:khare
ID: 1426684
Edited text of question
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now