473,405 Members | 2,261 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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.Connection
Dim cmdOracle As New ADODB.Command

'Je crée la connexion
With connOracle
.Provider = "ORAOLEDB.Oracle"
.Properties("Data Source") = "ORACLESVR"
.Properties("User Id") = "Admin"
.Properties("Password") = "Admin1234"
.Properties("Persist Security Info") = False 'Permet de ne pas
afficher le password dans l'objet connOracle
.CursorLocation = adUseServer
.Open
End With

With cmdOracle
.ActiveConnection = connOracle
.CommandType = adCmdStoredProc
.CommandTimeout = 30

.Properties("PLSQLRSet") = False 'Item(80)
.CommandText = "begin IGOR_CREATE_USER; 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_USER:

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 2234
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
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: ...
6
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...
13
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...
11
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
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...
1
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...
2
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...
1
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.