Oracle's SP OUT param

31 views
Skip to first unread message

Akira Kir

unread,
Jan 4, 2012, 11:58:04 AM1/4/12
to django...@googlegroups.com
Hello.
Im trying to get Oracle SPs working in django.

Procedure recives in_param and out_param

in get_data function i do

[code]
def get_data(self, in_param):
    cursor = connection.cursor()
    #out_param =
    ret=cursor.callproc("TEST_PKG", (in_param,out_param))
    cursor.close()
[/code]

the question is - how do i register out_param?
If i try to make
[code]
out_param = models.CharField(max_length=20)
[/code]
im gettig wrong type error from database.

Tim Sawyer

unread,
Jan 5, 2012, 5:37:02 AM1/5/12
to django...@googlegroups.com
This might help:

http://drumcoder.co.uk/blog/2010/apr/23/output-parameters-cx_oracle-and-plsql/

Tim.

> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/vWTLGHMMkYUJ.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


Akira Kir

unread,
Jan 5, 2012, 8:48:32 AM1/5/12
to django...@googlegroups.com
That worked, tho i was already making all based on cx_oracle. Thanks ;:)
Reply all
Reply to author
Forward
0 new messages