Adobe Dreamweaver Forums



Last 10 THreads :         Dragging components (Last Post : hsfrey - Replies : 4 - Views : 5 )           »          Charts: Gap between Vertical Axis and the chart area (Last Post : flexisawesome - Replies : 0 - Views : 1 )           »          Pop up window using AS3 (Last Post : retsnomrev - Replies : 3 - Views : 4 )           »          can a combobox contain two different list seperated byvdivider ? (Last Post : v-Jay - Replies : 2 - Views : 6 )           »          Refreshing xml data in flex (Last Post : PiyushGiri01 - Replies : 2 - Views : 19 )           »          Integrating Captivate with ASP - SQL? (Last Post : bikturisint - Replies : 19 - Views : 131 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »          Re: IPhone (Last Post : MiLSaN99 - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Cold Fusion > Getting Started
 
Tags:



Reply
  #1 (permalink)  
Old 11-20-2008, 04:44 PM
alecken
 
Posts: n/a
Diggs:
Default Store Procedure Help!

I did stor proc before and they're working just fine but this time for some
reason I did not get any error and did not get any result as well. When I
tested the query in analyzer I got records.
I'm using CF8 and Sybase

I tested it with a simple select and still not working:

CREATE PROCEDURE sp_GetRpt
@code1 varchar (10),
@code2 varchar (10)

AS
BEGIN

SELECT *
FROM a_table
WHERE code IN ('@code1', '@code2')

END

I'm calling it from my cf application:

<cfstoredproc procedure="sp_GetRpt" datasource="xxxx">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" value="ADA">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" value="TADA">

OR I also tried it with dbvarname, I still got no records but no error:

<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="code1"
value="ADA">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="code2"
value="TADA">

<cfprocresult name="q_Rpt">
</cfstoredproc>

<cfdump var="#q_Rpt#">

Is there something wrong with my codes?




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-20-2008, 04:54 PM
-==cfSearching==-
 
Posts: n/a
Diggs:
Default Re: Store Procedure Help!

> code IN ('@code1', '@code2')

First remove the single quotes from the variables. Otherwise the select will search for the literal string "@code1"...


Reply With Quote
  #3 (permalink)  
Old 11-20-2008, 05:04 PM
alecken
 
Posts: n/a
Diggs:
Default Re: Store Procedure Help!

Oh Gosh!!! thank you!!
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 07:30 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk