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

  • SEARCH
  • Home
  • 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 8593535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:00:52+00:00 2026-06-12T00:00:52+00:00

Its been an hour I m having trouble executing oracle stored procedures in Codeigniter

  • 0

Its been an hour I m having trouble executing oracle stored procedures in Codeigniter 2. I m not being able to find proper documentation for CI+Stored procedures.

My Stored Procedure :

CREATE OR REPLACE 
PROCEDURE SP_DISTRICT_INSERT(P_DST_NAME VARCHAR2, FLAG VARCHAR2 Default '0',P_USER_ID Number) AS

PKEY NUMBER:=0;

         BEGIN

             SELECT MAX(NVL(DST_ID,0))+1 INTO PKEY FROM DISTRICT ;

      INSERT INTO DISTRICT(DST_ID, DST_NAME, USER_ID, ENTERED_DATE, FLAG) VALUES(PKEY,P_DST_NAME,P_USER_ID,SYSDATE ,FLAG);

     COMMIT ;



EXCEPTION

        WHEN OTHERS THEN

 RAISE_APPLICATION_ERROR (-20001,PKEY|| 'INVALID_NO'|| P_DST_NAME|| 'DATAMISMATCH'|| SQLERRM, TRUE) ;

END SP_DISTRICT_INSERT ;

AND I executed stored procedure in my model like this

$ins=$this->db->query("call SP_DISTRICT_INSERT('abcdxyz',1,1)");

The page showing error

Error Number:

call SP_DISTRICT_INSERT('abcdxyz',1,1)

Filename: D:\xampp\htdocs\..\database\DB_driver.php

Line Number: 330

However,

If i call procedure directly from Navicat, it works

Any help will be appreciated.

P.S. I m using Codeigniter 2 and Oracle 11g

Thanks

  • 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-06-12T00:00:53+00:00Added an answer on June 12, 2026 at 12:00 am

    Well the problem was database field length. The scenario is that after form submission, the input string is converted into unicode format like . So if database field length is 10 and i input string with 4 characters, the procedure returned error because 4 characters when converted into unicode format becomes around 24 characters which is bigger than the allowed length in database field.

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

Sidebar

Related Questions

I've been using uploadify for about an hour now and think its great but
When I restart my app after its been killed (after an hour or so
I've been searching an googleing over one hour now and I'm not really sure
Its been a while since I had to do some Java/JSP... I have a
Its been a while since i have coded c++ and i have forgot an
Its been a long day and this is probably extemely simple but how do
This is a weird question but its been driving me bonkers for the last
I have been playing around with using graphs to analyze big data. Its been
I call a service which returns GMT dates. Its been working fine since November,
Does anyone know of a way to do this? Im sure its been 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.