Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6962959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:43:38+00:00 2026-05-27T15:43:38+00:00

Trying to make a django test application which will use stored oracle’s procedures to

  • 0

Trying to make a django test application which will use stored oracle’s procedures to insert/get data.

Using jython with zxJDBC but same error applies with python and cx_oracle too.

here is some code snipets:

models.py

from django.db import models
from django.db import connection

class ALEX_TEST_PKG():
    def get_data(self, inparam1):
        cursor = connection.cursor()
        ret = cursor.callproc("ALEX_TEST_PKG.test0", inparam1)
        cursor.close
        return ret

views.py

class TestForm(forms.Form):
    inparam1 = forms.CharField(max_length=500)


def message(request):
    if request.method == 'POST':
        form = TestForm(request.POST)
    else:
        form = TestForm()
    if form.is_valid():
        my_util = ALEX_TEST_PKG()
        ret = my_util.get_data(request.POST['inparam1'])
        return HttpResponse(ret)
    return render_to_response('form.html', {'form':form}, context_instance=RequestContext(request))

oracle’s procedures:

CREATE OR REPLACE PACKAGE BODY ALEX.alex_test_pkg
IS
   PROCEDURE test0 (inparam1 IN integer)
   IS
   BEGIN
      insert into alex_debug(col1) values(inparam1); 
   END test0;
END alex_test_pkg;
/

Django error log:

Environment:


Request Method: POST
Request URL: http://localhost:8000/form/

Django Version: 1.3.1
Python Version: 2.7.0
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'dbtest']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "C:\Python27\lib\site-packages\django-1.3.1-py2.7.egg\django\core\handlers\base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "E:\WatchTower\workspace3\erwtwe\erwtwe\dbtest\views.py" in message
  19.         ret = my_util.get_data(request.POST['inparam1'])
File "E:\WatchTower\workspace3\erwtwe\erwtwe\dbtest\models.py" in get_data
  7.         ret = cursor.callproc("ALEX_TEST_PKG.test0", inparam1)

Exception Type: DatabaseError at /form/
Exception Value: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TEST0'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

Any help is appriciated. breaking my head with this for 3 days already.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:43:39+00:00Added an answer on May 27, 2026 at 3:43 pm

    You’re passing the value from request.POST, where it’s always a string, but your stored procedure is expecting an integer.

    Use form.cleaned_data['inparam1'] instead – the form will have converted it to the proper type, ie an integer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

'm trying to make a small modification to django lfs project, that will allow
I am trying to make an chat application using python and django. I almost
I am working on an application in Python/Django. I am trying to make a
I am trying to make Django view that will give JSON responce with earliest
How can I use django.auth.views.login? I am trying to make a user login but
I am trying to make one query, to get some statistic data from database.
I am trying to use Django's generic views to make a user registration page.
I'm trying to make some types in Django that map to standard Django types.
I am trying to make a search view in Django. It is a search
I am trying to make a livesearch with Django and jQuery. What I've done

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.