mySQL Stored Prcocedures won't work

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default mySQL Stored Prcocedures won't work

    I've been spending the better part of the morning pulling my hair out trying to
    get CF to use stored procedures from MySQL. Here is what I am running:

    MySQL version 5.0.18
    CFMX7 version 7,0,1,116466
    mysql-connector-java-3.1.12-bin.jar

    I have two stored procedures for testing purposes, one requiring two
    parameters, one with no parameters. Both work from the mysql command line.

    When I attempt to execute the stored procedure requiring parameters, here is
    what I get:

    Error Executing Database Query.
    Parameter index out of range (3 > number of parameters, which is 2).
    The debug information is "{ (param 1) = call spTest2( (param 2) , (param 3) )}"


    When I attempt to execute the stored procedure without any parameters, here is
    what I get:

    Error Executing Database Query.
    Unknown column 'spTest' in 'field list'
    The debug information is "{ (param 1) = call spTest}"

    The first thing I noticed was that the stored procedure without any parameters
    should say spTest(), but does not. Is this a problem with the JDBC connector?

    Thanks,

    Alex

    Geektime Guest

  2. Similar Questions and Discussions

    1. Flash swf Ads stored in Mysql database
      Hi Everyone, I am using Dreamweavers' Development toolkit and can upload images such as JPG and GIF files to my server and add their file name to...
    2. converting a MySQL 4.1 subquery to something that'll work with MySQL 4.0
      Say I have the following SQL query: UPDATE phpbb_users SET user_nthpost = ( SELECT post_time FROM phpbb_posts WHERE phpbb_users.user_id =...
    3. MySQL 5 + MX7 stored proc problem
      I had the usual issues with driver incompatibility: "null null" error and then, after installing connector/j 3.0.17 I got "Callable statments not...
    4. Calling stored procedure from MysQL 5.0
      I am trying to call stored procedures using <cfquery> in Coldfusion MX 7.0, but I am getting this error: Error Executing Database Query. General...
    5. Does MySQL have a Stored Procedure equivalent?
      I've only used ASP and MS SQL Server before but I want to learn PHP and MySQL. Does MySQL have an equivalent of Microsoft's Stored Procedures (i.e....
  3. #2

    Default Re: mySQL Stored Prcocedures won't work

    Forgot to include the CF Code:

    <cfstoredproc procedure="spTest2" datasource="xxxxx" returncode="Yes">
    <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="testval1"
    value="#FORM.testval1#">
    <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="testval2"
    value="#FORM.testval2#">
    <cfprocresult name="Test" resultset="1">
    </cfstoredproc>


    <cfstoredproc procedure="spTest" datasource="xxxxx" returncode="Yes">
    <cfprocresult name="Test" resultset="1">
    </cfstoredproc>

    Geektime Guest

Posting Permissions

  • You may not post new threads
  • You may 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