PC Review


Reply
Thread Tools Rate Thread

Call Stored Procedure ORACLE from Access ADODB

 
 
Marc Rondeau
Guest
Posts: n/a
 
      16th Mar 2006
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;



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to call Oracle Stored Procedure from MS ACCESS 2007 VB csidb Microsoft Access VBA Modules 5 11th Oct 2008 12:44 AM
Call Oracle Stored Procedure from Access Jeremy Ellison Microsoft Access 1 22nd Mar 2008 09:05 PM
call a STORED PROCEDURE (oracle) from C# RicercatoreSbadato Microsoft C# .NET 3 19th Jun 2006 08:43 AM
Using MS Access to call an Oracle Stored Procedure and capture DBMS_OUTPUT Adonus Microsoft Access Macros 1 14th Dec 2005 11:55 PM
Call Oracle Stored Procedure Frank Microsoft Access VBA Modules 1 25th Sep 2004 10:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:09 PM.