PDA

View Full Version : mysql stored procedure does not show up


vampiro
04-19-2007, 07:09 PM
In dreamweaver when i select stored procedure, the one i created does not show up in the list. I am using mysql database and using it to develop coldfusion application. my mysql database has 1 stored procedure that was created using navicat GUI.

why is it not showing up in the drop down menu?

davidj
04-19-2007, 07:33 PM
try to hand code it into your SQL call to see if it works

if it does then great and dont ever rely on drop downs again...


vampiro... your a mystery to me

using advanced db techniques like stored procedure's and yet still relying on wizards and dropdowns. You should be hand coding the lot at your level

vampiro
04-19-2007, 09:42 PM
Actually I am not very familiar with stored procedures. I only require it to navigate through indivudual recordsets on the detail page of a master-detail setup. The detail page will display the each record in detail from the database.

I was going through a certain article regarding this and it uses stored procedures.

However i did manage to hand code it within coldfusion but it still shows error.
Below is the code in detail1.cfm

<CFSTOREDPROC procedure="nextandprevious" datasource="976evil_db">
<CFPROCPARAM type="IN" dbvarname="@id" value="#url.recordID#" cfsqltype="CF_SQL_INTEGER">
<CFPROCPARAM type="OUT" dbvarname="@prev" variable="out_prev" cfsqltype="CF_SQL_INTEGER">
<CFPROCPARAM type="OUT" dbvarname="@next" variable="out_next" cfsqltype="CF_SQL_INTEGER">
</CFSTOREDPROC>

On running the page, when i click any record on master page, I get the following error.
Error Executing Database Query.
Result consisted of more than one row

Exceptions

21:19:04.004 - Database Exception - in C:\CFusionMX\wwwroot\Previous_and_Next_Links_for_D etails_Page_Stored_Procedure\detail1.cfm : line 4

Error Executing Database Query.

Code for the previous link on page is shown below.
<a href="detail1.cfm?<cfoutput>#Recordset1.blog_item_id#</cfoutput>=<cfoutput>#out_prev#</cfoutput>">PREVIOUS </a>

Where am i going wrong?

davidj
04-20-2007, 07:11 AM
im sorry but i am not really a coldfusion person

i dont think we have a CF guru

alamask
04-23-2007, 06:04 PM
i have the same problem. i did mine in ASP though, i have stored procedures wrote in mysql but when i import in dreamweaver, even tho it sees the SP but just can't use it, cant retrieve params.
So, i just hand coded everything in ASP. which is rather messy though, it would be much nicer when u just passed the params to SP and let it do the job. Let me know if u found out wat is the problem