Oriole,
First of all you don't need the CFOUTPUT's around your cfset and your
cfcookie.
Secondly, your error is coming from that fact that your Database requires
you to login to it and your not supplying a User ID and Password in your
CFQUERY, at least that's the way the error reads.
Thirdly you might want to look at the IsDefined after the query, because
that's the next error your going to get. The proper syntax is
IsDefined("scope.variablename").
Go from there and post again if you still need more help.
Bill
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 27, 2000 3:27 PM
> To: [EMAIL PROTECTED]
> Subject: Another newbie w/a database query questiomn
>
>
> Hi all,
>
> I am one of those newbies who was hired to support the Webmaster,
> until she
> moved on and now I'm designing databases & building user front
> ends with no
> experience whatsoever. So I need some serious help!!
>
> My system cuts two cookies. One called "canplay" to say that a
> person can
> play without registering. And one called "canwin" to say they can win
> because they've registered. Once the cookies expire, they need to either
> reregister or choose not to register & get new "canplay/canwin"
> cookies. I
> want to have them enter their email addresses and test the
> database to see if
> a matching email has been entered. But I can't figure out how to
> do this.
> Here is the code I've written so far. Please don't laugh at how basic it
> is... This is an action page. They've come from a form page where they
> entered their email address.
>
> For those who have already registered, I need to carry the email
> forward so
> that they get to a pre-populated form page. That's why I'm
> setting a cookie
> here (expires at end of session). My next challenge will be to
> figure out
> how to read that cookie & run a query to populate the form page with
> previously entered information, but one problems at a time...
>
> <!-- checks to see if user has already registered or not -->
> <CFOUTPUT>
> <CFSET user="#form.email#">
> <CFCOOKIE NAME="email" VALUE="variable.user">
> </CFOUTPUT>
>
> <CFQUERY NAME="testregistered" DATASOURCE="marksport">
> SELECT user_info_basic.uid,
> user_info_basic.email
> FROM user_info_basic
> WHERE user_info_basic.email EQ variables.email
> </CFQUERY>
>
> <CFIF IsDefinied (testregistered.email)>
> <CFLOCATION URL="/testsandbox/updateform.cfm">
> <CFELSE>
> <CFLOCATION URL="/testsandbox/shortform.cfm">
> </CFIF>
>
> Here's the error I'm getting:
> Error Occurred While Processing Request
>
> Error Diagnostic Information
>
> ODBC Error Code = 37000 (Syntax error or access violation)
>
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
> '(null)'. Reason: Not associated with a trusted
> SQL Server connection.
>
> The error occurred while processing an element with a general
> identifier of
> (CFQUERY), occupying document position
> (14:1) to (14:54).
>
> Date/Time: 07/27/00 11:59:53
> Browser: Mozilla/4.7 [en] (Win98; I)
> Remote Address: 209.190.195.200
> HTTP Referer: http://www.marksport.com/testsandbox/registerform.cfm
>
> ANY ideas would be greatly appreciate. I am soooooo confused!
>
> :-)
> Oriole
> ------------------------------------------------------------------
> ------------
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.