Re: cfstored procedure problem

2000-12-06 Thread sebastian palmigiani

on 12/5/00 3:46 PM, S R at [EMAIL PROTECTED] wrote:

 Hi everyone,
 
 I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5
 
 This is my stored procedure in SQL:
 
 @SAMAccountName varchar
 
 AS
 
 SELECT UserID FROM PasUsers
 WHERE SAMAccountName = '@SAMAccountName'

I don't know if you purposefully left it out but you need to have:

CREATE PROCEDURE myProceduresName (@SAMAccountName varchar (field lenght) )


For example:

CREATE PROCEDURE SelectUserID ( @SAMAccountName varchar (15) )

AS

etc.

Sebastian


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfstored procedure problem

2000-12-06 Thread Andres

I've found that you also need to specify the size of your data type.
Something like this...

@SAMAccountName varchar(50)

hope this helps!



-Original Message-
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 05, 2000 11:29 PM
To: CF-Talk
Subject: Re: cfstored procedure problem


on 12/5/00 3:46 PM, S R at [EMAIL PROTECTED] wrote:

 Hi everyone,
 
 I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5
 
 This is my stored procedure in SQL:
 
 @SAMAccountName varchar
 
 AS
 
 SELECT UserID FROM PasUsers
 WHERE SAMAccountName = '@SAMAccountName'

I don't know if you purposefully left it out but you need to have:

CREATE PROCEDURE myProceduresName (@SAMAccountName varchar (field lenght) )


For example:

CREATE PROCEDURE SelectUserID ( @SAMAccountName varchar (15) )

AS

etc.

Sebastian
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfstored procedure problem

2000-12-06 Thread Chris Terrebonne

Kill the single quotes.  No need to put them around an SQL var.

Chris
--
Original Message
From: "sebastian palmigiani"[EMAIL PROTECTED]
Subject: Re: cfstored procedure problem
Date: Tue, 05 Dec 2000 22:29:16 -0600

on 12/5/00 3:46 PM, S R at [EMAIL PROTECTED] wrote:

 Hi everyone,
 
 I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5
 
 This is my stored procedure in SQL:
 
 @SAMAccountName varchar
 
 AS
 
 SELECT UserID FROM PasUsers
 WHERE SAMAccountName = '@SAMAccountName'

I don't know if you purposefully left it out but you need to have:

CREATE PROCEDURE myProceduresName (@SAMAccountName varchar (field lenght) )


For example:

CREATE PROCEDURE SelectUserID ( @SAMAccountName varchar (15) )

AS

etc.

Sebastian



~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfstored procedure problem

2000-12-05 Thread Darryl Lyons

I'm pretty sure you don't need the quotes in your SQL statement

-Original Message-
From: S R [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 06, 2000 7:46 AM
To: CF-Talk
Subject: cfstored procedure problem


Hi everyone,

I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5

This is my stored procedure in SQL:

@SAMAccountName varchar

AS

SELECT UserID FROM PasUsers
WHERE SAMAccountName = '@SAMAccountName'

Here is my CF Code:

CFLDAP NAME="GetUser" SERVER="LDAPSERVER.COM" ACTION="QUERY" 
ATTRIBUTES="SAMAccountName" SCOPE="subtree" 
FILTER="SAMAccountName=#cgi.auth_user#" START="" 
USERNAME="mydomain\sal.rosales" PASSWORD="password" PORT="" 
TIMEOUT="30"

CFSTOREDPROC DATASOURCE="#application.datasource#" DBNAME="userpreferences"

PROCEDURE="GetUserID"
CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="@SAMAccountName" 
VALUE="#GetUser.SAMAccountName#" TYPE="In"
CFPROCPARAM TYPE="Out" DBVARNAME="@UserID" VARIABLE="UserID" 
CFSQLTYPE="CF_SQL_INTEGER"
/CFSTOREDPROC

cfoutput#UserID#/cfoutput

I keep getting a 'Data Access Error Unknown data'

Sal
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfstored procedure problem

2000-12-05 Thread Dave Watts

 I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5
 
 This is my stored procedure in SQL:
 
 @SAMAccountName varchar
 
 AS
 
 SELECT UserID FROM PasUsers
 WHERE SAMAccountName = '@SAMAccountName'
 
 Here is my CF Code:
 
 CFLDAP NAME="GetUser" SERVER="LDAPSERVER.COM" ACTION="QUERY" 
 ATTRIBUTES="SAMAccountName" SCOPE="subtree" 
 FILTER="SAMAccountName=#cgi.auth_user#" START="" 
 USERNAME="mydomain\sal.rosales" PASSWORD="password" PORT="" 
 TIMEOUT="30"
 
 CFSTOREDPROC DATASOURCE="#application.datasource#" 
 DBNAME="userpreferences" 
 PROCEDURE="GetUserID"
 CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="@SAMAccountName" 
 VALUE="#GetUser.SAMAccountName#" TYPE="In"
 CFPROCPARAM TYPE="Out" DBVARNAME="@UserID" VARIABLE="UserID" 
 CFSQLTYPE="CF_SQL_INTEGER"
 /CFSTOREDPROC
 
 cfoutput#UserID#/cfoutput

It looks to me like your stored procedure is returning a recordset, not a
parameter, but your CFSTOREDPROC tag is referencing an output parameter
instead of a recordset. Try this:

cfstoredproc ...
cfprocparam cfsqltype="CF_SQL_VARCHAR" dbvarname="@SAMAccountName"
value="#GetUser.SAMAccountName#" type="in"
cfprocresult name="MyUserID"
/cfstoredproc

cfoutput#MyUserID.UserID#/cfoutput

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfstored procedure problem

2000-12-05 Thread Joe Sheble aka Wizaerd

CFSTOREDPROC DATASOURCE="#application.datasource#" DBNAME="userpreferences"
PROCEDURE="GetUserID"
CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="@SAMAccountName"
VALUE="#GetUser.SAMAccountName#" TYPE="In"
!--- CFPROCPARAM TYPE="Out" DBVARNAME="@UserID" VARIABLE="UserID"
CFSQLTYPE="CF_SQL_INTEGER" ---
CFPROCRESULT NAME="UserID
/CFSTOREDPROC

Your second call to CFPROCPARAM is specifying that your procedure accepts
two arguments.  You only have one listed in your example, so I'm assuing
that you were calling the procedure in-correctly.

Joseph E. Sheble
a.k.a. Wizaerd
Wizaerd's Realm
Canvas, 3D, Graphics,
ColdFusion, PHP, and mySQL
http://www.wizaerd.com
=

 -Original Message-
 From: S R [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, December 05, 2000 2:46 PM
 To: CF-Talk
 Subject: cfstored procedure problem


 Hi everyone,

 I can't figure this one out. I'm using SQL Server 7.0 and CF 4.5

 This is my stored procedure in SQL:

 @SAMAccountName varchar

 AS

 SELECT UserID FROM PasUsers
 WHERE SAMAccountName = '@SAMAccountName'

 Here is my CF Code:

 CFLDAP NAME="GetUser" SERVER="LDAPSERVER.COM" ACTION="QUERY"
 ATTRIBUTES="SAMAccountName" SCOPE="subtree"
 FILTER="SAMAccountName=#cgi.auth_user#" START=""
 USERNAME="mydomain\sal.rosales" PASSWORD="password" PORT=""
 TIMEOUT="30"

 CFSTOREDPROC DATASOURCE="#application.datasource#"
 DBNAME="userpreferences"
 PROCEDURE="GetUserID"
 CFPROCPARAM CFSQLTYPE="CF_SQL_VARCHAR" DBVARNAME="@SAMAccountName"
 VALUE="#GetUser.SAMAccountName#" TYPE="In"
 CFPROCPARAM TYPE="Out" DBVARNAME="@UserID" VARIABLE="UserID"
 CFSQLTYPE="CF_SQL_INTEGER"
 /CFSTOREDPROC

 cfoutput#UserID#/cfoutput

 I keep getting a 'Data Access Error Unknown data'

 Sal

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists