Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    8

    Unanswered: Calling an oracle stored procedure from access odbc error 3146

    Trying to call an oracle 10i stored procedure from ms access 2003. The error I'm receiving is runtime error 3146 odbc call failed. I am on a standalone machine. The stored procedure runs fine in plsql. The procedure selects certain records from a single table, parses the fields and inserts them into another table.

    Function CallSProc() As Boolean

    Dim db As Database
    Dim LSProc As QueryDef

    'On Error GoTo Err_Execute


    Set db = CurrentDb()

    Set LSProc = db.CreateQueryDef("")

    'Use {Microsoft ODBC for Oracle} ODBC connection
    LSProc.Connect = "ODBC;DSN=xxxx;UID=xxxx;PWD=xxxx;SERVER=xxxx"
    LSProc.SQL = "BEGIN QryPNC; END;"
    LSProc.ReturnsRecords = False
    LSProc.ODBCTimeout = 0

    LSProc.Execute

    Set LSProc = Nothing

    CallSProc = True

    Exit Function

    'Err_Execute:

    'MsgBox "The call to the Oracle stored procedure failed."
    'CallSProc = False

    End Function

  2. #2
    Join Date
    Sep 2004
    Posts
    60

    Question

    Few questions regarding problem:

    Is oracle dB is on same machine?
    If not, do you have oracle installed in your machine.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I can't help the OP, but - Abhishekdixit - what's the difference between

    "is oracle db on same PC" AND "do you have oracle installed on your PC"

    BTW, OP said " I am on a standalone machine".

  4. #4
    Join Date
    Sep 2006
    Posts
    8
    Access and the oracle database are on the same machine.

  5. #5
    Join Date
    Sep 2004
    Posts
    60
    "is oracle db on same PC"
    is database which need to be access is on machine or on other machine/server?

    "do you have oracle installed on your PC"
    If they are different machine, is oracle installed on machine from where procedure is tried to be accessed.
    Even I never saw this problem but want to make sure some basic requirment are getting fullfilled.

    Any correction is welcome if I am giving any misleading information.

  6. #6
    Join Date
    Sep 2006
    Posts
    8
    Everything is on the same machine; the oracle database with the stored procedure I want to call, as well as the microsoft access database with the call to the stored procedure.

  7. #7
    Join Date
    Sep 2004
    Posts
    60
    Hi episudics,

    Searching on error given me below link for similar problem. It may be helpful for you :

    http://www.mcse.ms/archive166-2004-9-1007846.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •