Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ExecuteSQL -- Funtion Marked as restricted????

Posted on 1997-06-01
2
Medium Priority
?
205 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
[X]
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
2 Comments
 
LVL 7

Accepted Solution

by:
tward earned 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

636 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