473,804 Members | 3,708 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Called Stored proc Oracle from Access ADODB

Hi every expert. I very need Help!

I don't know what is wrong in my code. When i try to execute this code on my
access , it give me give this weard error

The stored proc have no parameters, i only need to call it. Thats it

error -2147467259 Error not specified

What is wrong!!?????

I very need help!!!

Thanck!

Public Sub CallStoredProc( )
On Error GoTo ERRORHANDLER

Dim connOracle As New ADODB.Connectio n
Dim cmdOracle As New ADODB.Command

'Je crée la connexion
With connOracle
.Provider = "ORAOLEDB.Oracl e"
.Properties("Da ta Source") = "ORACLESVR"
.Properties("Us er Id") = "Admin"
.Properties("Pa ssword") = "Admin1234"
.Properties("Pe rsist Security Info") = False 'Permet de ne pas
afficher le password dans l'objet connOracle
.CursorLocation = adUseServer
.Open
End With

With cmdOracle
.ActiveConnecti on = connOracle
.CommandType = adCmdStoredProc
.CommandTimeout = 30

.Properties("PL SQLRSet") = False 'Item(80)
.CommandText = "begin IGOR_CREATE_USE R; end;"

.Execute

End With

GoTo OVERERROR

ERRORHANDLER:

MsgBox err.Number & ":" & err.Description

OVERERROR:

Set connOracle = Nothing
Set cmdOracle = Nothing
'Set rsOracle = Nothing

End Sub
¨
ON ORACLE SERVER

IGOR_CREATE_USE R:

AS
i_NomUsager VARCHAR2(30) :='Test123';
i_PassWord VARCHAR2(30) := '1234';

BEGIN
EXECUTE IMMEDIATE 'CREATE USER "' || i_NomUsager || '" PROFILE "DEFAULT" '
||
'IDENTIFIED BY ' || i_PassWord || ' DEFAULT TABLESPACE "CISQ_DAT"' ||
'TEMPORARY TABLESPACE "TEMP2" ' || 'ACCOUNT UNLOCK';
EXECUTE IMMEDIATE 'GRANT "CONNECT" TO ' || i_NomUsager;
END;

Mar 17 '06 #1
1 2262
Salut de terre-neuve, Marc,

Marc Rondeau wrote:
Hi every expert. I very need Help!

I don't know what is wrong in my code. When i try to execute this code on my
access , it give me give this weard error

The stored proc have no parameters, i only need to call it. Thats it

error -2147467259 Error not specified


I don't have an answer for you, though I've been watching to see if
anyone might have. I use Oracle as a BE to Access but I've stuck with
DAO methods and have only rarely called a pl/sql procedure from Access.

I guess the two things to check are:

1) Despite the error, is the stored procedure performing as expected?

2) If no to 1, have you tried executing the stored procedure from SQL
Plus (or Toad or whatever)? I use pass through queries and avoid linked
Access tables so whenever I'm having trouble with a PTQ, I copy my sql
from the Access SQL window to SQL Plus and run it then. SQL Plus is
wonderful for telling where the error lies.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Mar 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
4980
by: Michel R. | last post by:
Hello, I'm trying to call an Oracle stored procedure from a VBA module in ADO through an ODBC connection. My procedure just inserts a record based on the 2 parameters. Here's the code: Private Sub InsertNew() Dim objDB As ADODB.Connection Dim objcmd As ADODB.Command Dim RS As ADODB.Recordset
6
1882
by: ndn_24_7 | last post by:
Hello all, I have a stored procedure that prompts the user for beginning date and ending date to run a monthly report. The prompt says Enter_Beginning_Date and Enter_Ending_Date. I want the prompt to say Enter Beginning Date (Example:1-1-2003) or something like that. Is there a way to do this? CREATE PROCEDURE dbo.MonthlyReport(@Enter_Beginning_Date datetime, @Enter_Ending_Date datetime) AS SELECT incident, @Enter_Beginning_Date AS...
13
4284
by: EmbersFire | last post by:
I'm using a stored proceedure which should update a number of rows in a table depending on a key value supplied (in this case 'JobID'). But what's happening is when I call the proc from within the program, only one row gets updated. So When I call the proc from Query Analyser, all rows get updated. When I call the proc from within the program, only one row gets updated
11
3498
by: ColdCanuck | last post by:
Greetings! I am VERY new to DB2 but not Orable, Sybase and SQL Server. I am trying to call a stored procedure via VB 6 and ADO/OLEDB. But when I try to execute
1
9204
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this will work for 9i and even 10g ) No one had what I needed, so I wrote it myself. I Rule. This code isn't going for efficiency, and isn't trying to be dynamic. It doesn't create the table structure in Oracle, that's up to you. (I
1
3458
by: burtonl | last post by:
I'm using the ADODB abstraction layer and trying to figure out how to call an Oracle stored procedure. It has the following types defined: CREATE OR REPLACE TYPE varchar2_3200_array IS TABLE OF VARCHAR2(3200); / CREATE OR REPLACE TYPE number_array IS TABLE OF NUMBER; /
2
5711
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I can successfully insert and update the oracle database by calling a oracles stored proc from my .net code. This oracle stored proc is returning some value. I cannot see that value in my .net code Below is my .net code OracleParameter mbrid = new OracleParameter("RET_MBRID", OracleType.Number); mbrid.Direction = ParameterDirection.Output;
1
1840
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I can successfully insert and update the oracle database by calling a oracles stored proc from my .net code. This oracle stored proc is returning some value. I cannot see that value in my .net code Below is my .net code OracleParameter mbrid = new OracleParameter("RET_MBRID", OracleType.Number); mbrid.Direction = ParameterDirection.Output;
0
1990
by: mirandacascade | last post by:
Questions toward the bottom of the post. Situation is this: 1) Access 97 2) SQL Server 2000 3) The Access app: a) sets up pass-thru query b) .SQL property of querydef is a string, the contents of which comprise the call to a stored proc
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9582
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.