The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> ColdFusion Development
|
stored procedure access
Discuss stored procedure access in the ColdFusion Development forum on Dev Shed. stored procedure access ColdFusion Development forum discussing CFML coding practices, tips on CFML, and other CFML related topics. Find out why ColdFusion is the tool of choice for many e-commerce developers.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

July 8th, 2004, 12:38 PM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
stored procedure access
i'm trying to call a stored procedure and i get the following error:
[Macromedia][SQLServer JDBC Driver][SQLServer]Could not find stored procedure 'uspGetChargeBackData'.
I know the stored procedure exists, i watched a guy run it on the database. i can call some other stored procedures just fine. here is my code to call it:
<cfstoredproc
procedure="uspGetChargeBackData"
dataSource = "#dsn#"
username = "#dbid#"
password = "#dbpw#">
<cfprocresult name="ChargeBackData">
</cfstoredproc>
<cfoutput>
#ChargeBackData#
</cfoutput>
any ideas about this?
|

July 8th, 2004, 01:02 PM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
Are you sure that the account you're using for the user name and password has rights to execute the procedure? Also, can you run it from the SQL query analyzer when logged in as that user?
|

July 8th, 2004, 01:22 PM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
we created another stored procedure with the same name except Test on the end and made the user name i am using to connect to the db as the owner and it still can't find it.
we logged in my username and password and executed the procedure.

|

July 8th, 2004, 02:20 PM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
You're using the exact same user name and password in the <cfstoredproc> tag? Can you run any other stored procs from CF? Does the DSN have user name and password info that is overriding the values you're entering as attributes to the <cfstoredproc> tag? Have you enabled execution of stored procedures for this DSN in the CF administrator?
|

July 8th, 2004, 02:59 PM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
i have run other stored procs with the same username and password settings. i just hard coded them in and got the same "Could not find stored procedure 'uspGetChargeBackData'. " error.
this username has access to all the tables in the db too.
|

July 8th, 2004, 03:23 PM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
|
It still sounds like a permissions issue to me, especially if the same user name and password can run other stored procs on the server. Will it run if you use <cfquery> instead, and use the "exec" command to execute the procedure?
If that doesn't work I'm out of ideas unfortunately. Clearly something is not set correctly somewhere, but I've gone through all the places I can think of to check.
|

July 12th, 2004, 07:30 AM
|
|
Contributing User
|
|
Join Date: Sep 2003
Location: Boston, MA
Posts: 47
Time spent in forums: 3 h 34 sec
Reputation Power: 10
|
|
|
One thing I might mention is to double check your DSN and ensure it's pointing to the appropriate server and db.
We've had problems (too frequently, I might add) with DSNs between our local vs. development vs. production environments. One problem is having a local DSN pointing to a local DB, instead of pointing to the production DB for example.
Whenever I have problems that just don't seem to make any sense, 9 times out of 10 it's something really, really simple that I'm overlooking.
Just thought I'd toss that out there.
|

July 13th, 2004, 09:28 AM
|
|
Registered User
|
|
Join Date: Jul 2004
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
you guys were right, it was simple. the stored procedure i was calling was on a different database (i had no idea). just had to add a new datasource and it's fine now. thanks for all the suggestions. i have found this to be the best cold fusion message board on the internet. thanks to all who make it that!
|

August 5th, 2011, 06:57 PM
|
|
Registered User
|
|
Join Date: Aug 2011
Posts: 1
Time spent in forums: 8 m 47 sec
Reputation Power: 0
|
|
|
Fully specify your procedure
I had the same error...
The solution I needed was fully specifying the stored proc name
like this;
cfstoredproc procedure="[USER.PROCNAME]" datasource= etc
For the longest time I didn't have the [ ] and tried a variety of variations that all gave the same error, with exception/debug details being no help.
Posted to help anyone else who is having the same problem.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|