Solved

ExecuteSQL -- Funtion Marked as restricted????

Posted on 1997-06-01
2
181 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Mysql vs Oracle 10 120
Replace Formatted Numbers with text 9 51
Best way to parse out a json string in VB6? 10 73
Adding to a VBA? 6 48
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

707 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

13 Experts available now in Live!

Get 1:1 Help Now