- 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 &quot;Paul Swingewood&quot;, 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 -<

Reply via email to