Professional Web Applications Themes

Problem in Stored procedure - Coldfusion Database Access

Hi, i'm using stored procedures in MySQL 5.0.18 and ColdFusion MX 6. when i execute the cfm file it returns this error.... The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code. Null Pointers are another name for undefined values. My code is: <cfstoredproc procedure="sp_testing3" datasource="#application.rsdsn#" returncode="yes" debug="yes"> <cfprocparam type="out" cfsqltype="cf_sql_integer" variable="test"> <cfprocresult name="rs1"> </cfstoredproc> And my stored proc's code is: DELIMITER $$ DROP PROCEDURE IF EXISTS `sp_testing3` $$ CREATE PROCEDURE `sp_testing3`(out rec_count int) BEGIN select count(*) into rec_count from tbl_customer_master; select * from tbl_customer_master; END $$ ...

Sponsored Links
  1. #1

    Default Problem in Stored procedure

    Hi,

    i'm using stored procedures in MySQL 5.0.18 and ColdFusion MX 6.

    when i execute the cfm file it returns this error....

    The system has attempted to use an undefined value, which usually indicates a
    programming error, either in your code or some system code.
    Null Pointers are another name for undefined values.

    My code is:

    <cfstoredproc procedure="sp_testing3" datasource="#application.rsdsn#"
    returncode="yes" debug="yes">
    <cfprocparam type="out" cfsqltype="cf_sql_integer" variable="test">
    <cfprocresult name="rs1">
    </cfstoredproc>

    And my stored proc's code is:

    DELIMITER $$

    DROP PROCEDURE IF EXISTS `sp_testing3` $$
    CREATE PROCEDURE `sp_testing3`(out rec_count int)
    BEGIN
    select count(*) into rec_count from tbl_customer_master;
    select * from tbl_customer_master;
    END $$

    DELIMITER ;

    Thanks to all......

    Sponsored Links
    Rajan_cfm Guest

  2. #2

    Default Re: Problem in Stored procedure

    Rajan_cfm wrote:
     

    don't you mean select count(*) AS rec_count .... ?


    --

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Azadi Guest

  3. #3

    Default Re: Problem in Stored procedure

    sorry, my bad... stored procedures.. definitely select INTO...

    apologies...

    --

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com
    Azadi Guest

  4. #4

    Default Re: Problem in Stored procedure

    cfprocparam value= ?
    Kabuto2 Guest

  5. #5

    Default Re: Problem in Stored procedure

    SELECT count(*)... can never be NULL If nothing is matches your WHEE clause then SELECT count(*) would be zero, NOT null.

    Phil
    paross1 Guest

Similar Threads

  1. stored procedure problem
    By Leon Shaw in forum Dreamweaver AppDev
    Replies: 42
    Last Post: November 7th, 05:13 PM
  2. MSSQL Stored Procedure Problem
    By Sequenzia in forum Coldfusion Database Access
    Replies: 2
    Last Post: October 10th, 07:56 PM
  3. ADO/Stored Procedure Problem
    By James Arnall in forum ASP Database
    Replies: 9
    Last Post: August 13th, 08:37 PM
  4. Stored Procedure/Parameter problem
    By ElmoWatson in forum ASP.NET General
    Replies: 1
    Last Post: August 6th, 01:19 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139