• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

ExecuteSQL -- Funtion Marked as restricted????

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
khare
Asked:
khare
1 Solution
 
twardCommented:
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
 
khareAuthor Commented:
Edited text of question
0

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now