>- see footer for list info -< You can treat "SP_Results" exactly as you would a regular query (to loop through it, output it, etc)...
-----Original Message----- From: Paul Swingewood [mailto:[EMAIL PROTECTED] Sent: 18 October 2005 11:20 To: [email protected] Subject: RE: FW: [CF-Dev] Stored Procedure beginer >- see footer for list info -< er.. Ok I have set the permissions and all is running ok now. My next question is how to get the "recordcount" I take it you can reference this <cfprocresult name="SP_Results"> Like SP_Results.Recordcount and SP_Results.UsersName etc ... I take it you can no longer use <cfoutput query="abc"> so to loop the query what would you use? Regards - Paul >From: "Snake" <[EMAIL PROTECTED]> >Reply-To: Coldfusion Development <[email protected]> >To: "'Coldfusion Development'" <[email protected]> >Subject: FW: [CF-Dev] Stored Procedure beginer >Date: Tue, 18 Oct 2005 11:07:45 +0100 > > >- see footer for list info -< > > > <cfif isDefined("form.entered_username") AND form.entered_username NEQ >""> > >-- >Russ > >-----Original Message----- >From: Snake [mailto:[EMAIL PROTECTED] >Sent: 18 October 2005 11:05 >To: 'Coldfusion Development' >Subject: RE: [CF-Dev] Stored Procedure beginer > >Because your evaluating the variable. ><cfif isDefined("#form.entered_username#") AND #form.entered_username# NEQ >""> Will result in checked if the value of form.entered_username exists, >which it wont. > >You should use. ><cfif isDefined("form.entered_username") AND #form.entered_username# NEQ >""> > >-- >Russ > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Paul Swingewood >Sent: 18 October 2005 10:58 >To: [email protected] >Subject: Re: [CF-Dev] Stored Procedure beginer > > >- see footer for list info -< >Ok I have the stored procedure on the server and it appears to have worked >ok. > >I now want to call the stored procedure .... > >I have > ><cfset sp = "cfpages_Authenticate"> > ><cfif isDefined("#form.entered_username#") AND #form.entered_username# NEQ >""> > <cfstoredproc procedure="#sp#" >datasource="#Application.BackendDSN#"> > <!--- Apllication ID ---> > <cfprocparam > cfsqltype="cf_sql_varchar" > value="#Application.ID#"> > <!--- LoginName ---> > <cfprocparam > cfsqltype="cf_sql_varchar" > value="#form.entered_username#"> > <!--- Password ---> > <cfprocparam > cfsqltype="cf_sql_varchar" > value="#form.entered_password#"> > <cfprocresult > name="Results"> > </cfstoredproc> > > > <cfdump var="#Results#" label="Results"> > ></cfif> > ><cfabort> > > >When I run this code I get ..... > >Parameter 1 of function IsDefined, which is now "Paul >Swingewood", >must be a syntactically valid variable name. > > >The error occurred in >D:\inetpub\wwwroot\cfpages\calendar\login\login_action2.cfm: line 31 > >29 : <cfset sp = "cfpages_Authenticate"> 30 : >31 : <cfif isDefined("#form.entered_username#") AND #form.entered_username# >NEQ ""> >32 : <cfstoredproc procedure="#sp#" >datasource="#Application.BackendDSN#"> >33 : <!--- Apllication ID ---> > > > > > > >From: "Duncan Cumming" <[EMAIL PROTECTED]> > >Reply-To: Coldfusion Development <[email protected]> > >To: <[email protected]> > >Subject: Re: [CF-Dev] Stored Procedure beginer > >Date: Tue, 18 Oct 2005 10:36:53 +0100 > > > > >- see footer for list info -< > >change > >@arg_application_ID INT(4), > >to > >@arg_application_ID INTEGER, > > > > > >Duncan Cumming > >New Media Developer > >Customer Relations Management / Education > >Fife Council > >700 4105 / 01592 414105 > > > > >>> [EMAIL PROTECTED] 18/10/2005 10:31 >>> > > >- see footer for list info -< > >Having never used stored procedures before I decided its time I learned >how > >to do this ... > > > >So heres the first question ... > > > >I have a this in query analyzer ... > >CREATE PROCEDURE cfpages_Authenticate ( > > @arg_application_ID INT(4), > > @arg_LoginName NVARCHAR(50), > > @arg_Password CHAR(8)) > >AS > > > >SELECT TOP 100 PERCENT tblAuthentication.UsersName, > > tblAuthentication.LoginName, > > tblAuthentication.Password, > > tblusertoapplication.FKApplicationID, > > tblAuthentication.UserIDPK, > > tblAuthentication.EmailAddress > >FROM tblAuthentication > >INNER JOIN tblusertoapplication ON tblAuthentication.UserIDPK = > >tblusertoapplication.FKUserID > >WHERE (tblusertoapplication.FKApplicationID = @arg_application_ID) > > AND (tblAuthentication.LoginName = @arg_LoginName) > > AND (tblAuthentication.Password = @arg_Password) > >ORDER BY tblAuthentication.UsersName > > > > > >Which syntax checks all ok ..... > > > >When I run it I get ... > > > >Server: Msg 2716, Level 16, State 1, Procedure cfpages_Authenticate, Line >0 > >Column or parameter #1: Cannot specify a column width on data type int. > >Parameter '@arg_application_ID' has an invalid data type. > > > >It doesn't like the INT for the Primary Key of ApplicationID > > > >How do I fix this and why is it giving me an error? > > > >Regards - Paul > > > > > >_______________________________________________ > > > >For details on ALL mailing lists and for joining or leaving lists, go to > >http://list.cfdeveloper.co.uk/mailman/listinfo > > > >-- > >CFDeveloper Sponsors:- > > >- Hosting provided by www.cfmxhosting.co.uk -< > > >- Forum provided by www.fusetalk.com -< > > >- DHTML Menus provided by www.APYCOM.com -< > > >- Lists hosted by www.Gradwell.com -< > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > >-< > > > > > >********************************************************************** > >This email and any files transmitted with it are confidential and >intended > >solely for the use of the individual or entity to whom they are addressed > >and should not be disclosed to any other party. > >If you have received this email in error please notify your system >manager > >and the sender of this message. > > > >This email message has been swept for the presence of computer viruses >but > >no guarantee is given that this e-mail message and any attachments are >free > > >from viruses. > > > >Fife Council > >Tel: +44 (0) 1592 414141 > >********************************************************************** > >_______________________________________________ > > > >For details on ALL mailing lists and for joining or leaving lists, go to > >http://list.cfdeveloper.co.uk/mailman/listinfo > > > >-- > >CFDeveloper Sponsors:- > > >- Hosting provided by www.cfmxhosting.co.uk -< > > >- Forum provided by www.fusetalk.com -< > > >- DHTML Menus provided by www.APYCOM.com -< > > >- Lists hosted by www.Gradwell.com -< > > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > >-< > > >_______________________________________________ > >For details on ALL mailing lists and for joining or leaving lists, go to >http://list.cfdeveloper.co.uk/mailman/listinfo > >-- >CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< > > > >_______________________________________________ > >For details on ALL mailing lists and for joining or leaving lists, go to >http://list.cfdeveloper.co.uk/mailman/listinfo > >-- >CFDeveloper Sponsors:- > >- Hosting provided by www.cfmxhosting.co.uk -< > >- Forum provided by www.fusetalk.com -< > >- DHTML Menus provided by www.APYCOM.com -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help >-< _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -< **************************************************************************** Notice: This e-mail and any attachments are confidential and may contain legally privileged information and/or copyright material of Hansen Technologies Limited or third parties. Copying, distributing, disclosing, commercialising or otherwise acting in reliance on this e-mail and any attachments is strictly prohibited unless you are the addressee of this e-mail and have written permission to do so. If you have received this e-mail in error please delete this e-mail (including any copies and attachments) and contact Hansen Technologies Limited by return e-mail or by telephone on + 61 39840 3000. Any views expressed in this e-mail are those of the individual sender and may not necessarily reflect the views of or be a commitment by the organisation, except where the individual sender has the authority and expressly states them to be so. **************************************************************************** _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- Hosting provided by www.cfmxhosting.co.uk -< >- Forum provided by www.fusetalk.com -< >- DHTML Menus provided by www.APYCOM.com -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
