navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

How to Show AccountExpires

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> How to Show AccountExpires
Page: [1]
 
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
How to Show AccountExpires - 5/4/2008 18:52:14   
Hi – using FP2003 + the Dev Version of the Spooky Login System, I am trying to set up a page where users can view their other account records associated with the login system. The page is password protected. I have been able to show the session variable for x_FirstName, X_Lastname etc. but the one that just won’t work is a session variable that would show when the account is expired. I am using this bit of code: <%=Session("AccountExpires")%>

In the admin panel for the login, each member record expirary date is set manually. It’s not linked to a pay pal feature.

I tried using the DRW with the login db, and the Spooky Diet, adding:
fp_sQry="SELECT * FROM Users WHERE (UserID='"&Session("UserID")&"')"
,,, and selecting “accountexpires” for a result, but only get a DRW error.

Am I missing something or is it more complicated than this?

Help would be very appreciated!
:)

_____________________________

" All that matters is what we do for each other" Lewis Carroll
Spooky

 

Posts: 26560
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: How to Show AccountExpires - 5/4/2008 18:57:53   
What is the DRW error you get? It is a date field, so you would have to use date delimiters - either ' or #

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to winter)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/4/2008 23:26:14   
Hi Spooky - thanks so much for helping!

Here is the DRW code - which i am not sure where the delimiters go.

<!--#include file="../_fpclass/fpdblib.inc"-->
<%
fp_sQry="SELECT * FROM Users WHERE (UserID='"&Session("UserID")&"')"
fp_sDefault=""
fp_sNoRecords="<tr><td colspan=2 align=""LEFT"" width=""100%"">No records returned.</td></tr>"
fp_sDataConn="HRALogin"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&UserID=3&x_Firstname=202...the usual thing in here
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<tr>
<td>
<%=FP_FieldVal(fp_rs,"ActiveAccount")%></td>
<td>
<%=FP_FieldVal(fp_rs,"AccountExpires")%></td>
</tr>
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
</tbody>
</table>
<p> </p>
<p> </div>


This is the error message That I get:

ActiveAccount AccountExpires
Database Results Wizard Error
The operation failed. If this continues, please contact your server administrator.

Do you mean to put the ' or # somewhere in this part of the code?...
<%=FP_FieldVal(fp_rs,"AccountExpires")%>

I will play with this.

Thanks so much!

Carolyn

< Message edited by winter -- 5/4/2008 23:44:15 >


_____________________________

" All that matters is what we do for each other" Lewis Carroll

(in reply to Spooky)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/4/2008 23:43:05   
quote:

<%=FP_FieldVal(fp_rs,"ActiveAccount")%>



For the DRW code in the last post I tried amending the "Account Active" part this way...

<%=FP_FieldVal(fp_rs,'"AccountExpires"')%>
<%=FP_FieldVal(fp_rs,#"AccountExpires"#)%> .. and I also tried putting the delimiters outside the brackets but i still get the error message.

hmmm... will sleep on this. Other ideas very welcomed!

Thanks again.

Carolyn

_____________________________

" All that matters is what we do for each other" Lewis Carroll

(in reply to winter)
Spooky

 

Posts: 26560
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: How to Show AccountExpires - 5/5/2008 2:37:45   
<%=FP_FieldVal(fp_rs,'"AccountExpires"')%> should be sufficient - really need to see the error thats created.
To see that, turn debugging off as in this post :

http://www.frontpagewebmaster.com/m-175524/tm.htm

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to winter)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 9:52:27   
quote:

<%=FP_FieldVal(fp_rs,'"AccountExpires"')%>


HI Spooky, - I did as you suggested and turned debugging to True. And copied and pasted the code exactly as you have it. The error message now reads...

---------------------------------^


Microsoft VBScript compilation error '800a03ea'

Syntax error

/membership/myaccount2.asp, line 281

Response.Write(FP_FieldVal(fp_rs,'"AccountExpires"'))
---------------------------------^

it must be a space or something?

Thanks so much! :)

_____________________________

" All that matters is what we do for each other" Lewis Carroll

(in reply to Spooky)
BeTheBall

 

Posts: 6271
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 10:23:35   
The single quotes shouldn't be there.

Response.Write(FP_FieldVal(fp_rs,"AccountExpires"))

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to winter)
Spooky

 

Posts: 26560
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: How to Show AccountExpires - 5/5/2008 15:22:15   
Ooops, I copied your code :) As Duane says, no quotes.
However you were having a DRW error before that, does it reappear without the quotes?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to BeTheBall)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 19:42:48   
Thanks Duane and Spooky,

I originally started out with just double quotes, then added single, now removed the single quotes.

I tried it out again on a fresh page with just this DRW and the code you have suggested which actually does get generated by the wizard.


Here is the sample page I am using with the newest error message:
http://www.hramembers.org/test55.asp

And where this code appears in the DRW:
<%=FP_FieldVal(fp_rs,"AccountExpires")%>

U/p: test/test

Do I need to switch something on for this variable in the system settings somewhere?

Ideas very appreciated!

Thanks

Carolyn



(in reply to Spooky)
BeTheBall

 

Posts: 6271
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 19:54:14   
Lose the single quotes in your SQL. I assume UserID is numeric. If so, this:

SELECT * FROM Users WHERE (UserID='"&Session("UserID")&"')

should be:

SELECT * FROM Users WHERE (UserID="&Session("UserID")&")

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to winter)
Spooky

 

Posts: 26560
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: How to Show AccountExpires - 5/5/2008 20:22:07   
fp_sQry="SELECT * FROM Users WHERE UserID="&Session("UserID")

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to BeTheBall)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 20:37:00   
Hi Duane, - I tried the code you suggested:

quote:

SELECT * FROM Users WHERE (UserID="&Session("UserID")&")


... and still doesn't work as seen on the page http://www.hramembers.org/test55.asp

However, if I leave the sql statement alone, and use the DRW for the AccountExpires piece as on this page: http://www.hramembers.org/membership/myaccount2.asp ... you are able to access the page and all the other session variables show up, but the DRW for "AccountExpires" does not work. Scroll way down to the very bottom of the page where i was trying to test it. the slq statement is with the double and single quotes.

In the system settings, Access level values are recorded the same as the name of the level i.e. Certifed has a stored value of Certified. I may have done this when My knowledge of the Spooky Login system was at a grade 6 level as opposed to perhaps grade 9 or so now! Could this be the problem?


Thanks so much - I really appreciate your help!

(in reply to BeTheBall)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 20:54:05   
quote:

fp_sQry="SELECT * FROM Users WHERE UserID="&Session("UserID")


I can't stop smiling! It works!!!!! Not only that... for a few seconds I was wondering ...well... why does it work?

Spooky from your earlier suggestion, I am concluding the a single quote + double quote in the sql statment, means that it is putting a separator in between 2 or more things? IF that is the answer, - I think I really get it.

My thanks to both of you! This is wonderful! It works!

With appreciation

Carolyn

(in reply to Spooky)
Spooky

 

Posts: 26560
Joined: 11/11/1998
From: Middle Earth
Status: online

 
RE: How to Show AccountExpires - 5/5/2008 20:55:08   
You may be working on it now? the top link seems to work?

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to winter)
winter

 

Posts: 168
Joined: 3/12/2002
From: Toronto ON Canada
Status: offline

 
RE: How to Show AccountExpires - 5/5/2008 20:58:54   
Yes! - BOth links now work! I guess the problem all along was the sql statment. I need to do more reading somewhere to get a better grip on this. I make my way around by just guessing! Copying and pasting and the Sesame Street process called "which of these things are not like the other"

http://www.hramembers.org/membership/myaccount2.asp?

http://www.hramembers.org/test55.asp

:):):)

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> How to Show AccountExpires
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts