ExecuteSQL -- Funtion Marked as restricted????

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

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!!).

Question by:khare
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

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..

Author Comment

ID: 1426684
Edited text of question

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

738 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