|
| |
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
DRW confusion - 3/23/2003 14:34:13
I' m having a DRW problem with what should be simple SQL syntax in FP2000 and Spooky' s Login to display a loged-in user' s records. Is it right that the user is identified by this... " <%=Session(" Username" )%>" ..in a form and Spooky' s post for the DRW is... ' " &Session(" Username" )&" ' ... which I have copied to the SQL statment but it doesn' t pick up the User, although it does verify ok. I am using this on a new page. Should I be including any files at the top of the page? If I look at this statement in html view it reads fp_sQry=" SELECT * FROM Results WHERE Username=' " " &Session(" " Username" " )&" " ' " which seems odd. It' s added in extra " The page loads ok This is the DR as displayed at the moment, what is the correct SQL statement WITHIN THE DRW <% fp_sQry=" SELECT * FROM Results WHERE Username=' " " &Session(" " Username" " )&" " ' " fp_sDefault=" " fp_sNoRecords=" <tr><td colspan=28 align=left width=" " 100%" " >No records returned.</td></tr>" fp_sDataConn=" input" fp_iMaxRecords=256 fp_iCommandType=1 fp_iPageSize=0 fp_fTableFormat=True fp_fMenuFormat=False fp_sMenuChoice=" ID" fp_sMenuValue=" ID" fp_iDisplayCols=28 fp_fCustomQuery=True BOTID=0 fp_iRegion=BOTID %> Please help. I must be missing something very simple here.
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/23/2003 15:32:03
No. Im trying to use the edit function within the DRW (step 2) I have tried this and editing within html view but so far nothing works. " Where to now?"
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/24/2003 14:07:49
Okay, worth a try the grey bit is now s-sql=" SELECT * FROM Results WHERE Username=' &Session(Username)&' " which means that the red bit is now fp_sQry=" SELECT * FROM Results WHERE Username=' &Session(Username)&' " and still doesn' t work. Any clues?
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/24/2003 14:53:40
Thanks for the attention to detail, but I think you must have missed the bit above regarding the extra quotes that unwantedly appear. Spooky suggested editing the grey code but it doesnt produce the red code that we seek. Here is the grey bit. Please let me know what I should amend. s-sql=" SELECT * FROM Results WHERE Username=' " & Session(" Username" ) & " ' " this produces this fp_sQry=" SELECT * FROM Results WHERE Username=' " " & Session(" " Username" " ) & " " ' " from a DRW statement of this SELECT * FROM Results WHERE Username=' " & Session(" Username" ) & " ' This verifies ok. Please help.
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/24/2003 16:59:49
Okay guys, I' ve worked out why I dont understand your posts. What do you mean by " do the diet" I just noticed your link and I' m sorry I missed it earlier. I' ll read the stuff and come back to you.
< Message edited by walrus -- 3/24/2003 5:15 PM >
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/25/2003 14:52:34
Okay, thanks for the advice. Ive done the diet (manually, couldn' t get the macro to work!) This is what I have left. It looks good, but doesn' t pick up the username. Any ideas? <title>New Page 1</title>
<meta name=" Microsoft Theme" content=" construc 111, default" >
</head>
<body>
<table>
<tbody>
<!--#include file=" _fpclass/fpdblib.inc" -->
<%
fp_sQry=" SELECT * FROM Results WHERE Username=' " &Session(" Username" )&" ' "
fp_sDefault=" "
fp_sNoRecords=" <tr><td colspan=28 align=left width=" " 100%" " >No records returned.</td></tr>"
fp_sDataConn=" input"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=" "
fp_sMenuValue=" "
fp_iDisplayCols=28
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file=" _fpclass/fpdbrgn1.inc" -->
<tr>
<td><%=FP_FieldVal(fp_rs," ID" )%>
</td>
<td><%=FP_FieldVal(fp_rs," T1" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Building" )%>
<td><%=FP_FieldVal(fp_rs," Street" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Town" )%>
</td>
<td><%=FP_FieldVal(fp_rs," City" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Postcode" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Rent" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Term" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Type" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Students" )%>
</td>
<td><%=FP_FieldVal(fp_rs," DSS" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Contact" )%>
</td>
<td><%=FP_FieldVal(fp_rs," C1" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Phone" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Mobile" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Email" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Day" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Month" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Year" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Remote_computer_name" )%>
</td>
<td><%=FP_FieldVal(fp_rs," User_name" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Browser_type" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Timestamp" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Username" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Agent" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Desciption" )%>
</td>
<td><%=FP_FieldVal(fp_rs," Period" )%>
</td>
</tr>
<!--#include file=" _fpclass/fpdbrgn2.inc" -->
</tbody>
</table>
</body>
</html>
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW confusion - 3/25/2003 15:42:32
Do you get errors now? Can you Response.write the session?: .... <body> <%=Session(" UserName" )%> <table> .... That should write the session to the page. Also, double check the session variable. I' m not positive, but it may be case sensitive. My version of Spooky Login uses ' UserName' (notice the capital ' N' )....
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/25/2003 15:58:14
I take your point about the case sensitivity. Good advice anyway! I have amended as follows, I hope I understood your post </head>
<body><%=Session(" UserName" )%><table>
<tbody>
<!--#include file=" _fpclass/fpdblib.inc" -->
<%
fp_sQry=" SELECT * FROM Results WHERE Username=' " &Session(" UserName" )&" ' "
fp_sDefault=" "
fp_sNoRecords=" <tr><td colspan=28 align=left width=" " 100%" " >No records returned.</td></tr>"
fp_sDataConn=" input"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=" "
fp_sMenuValue=" "
fp_iDisplayCols=28
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file=" _fpclass/fpdbrgn1.inc" --> Still no joy. Please bear with me..
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DRW confusion - 3/25/2003 16:01:14
Does the session write to the page???
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
walrus
Posts: 554 Joined: 3/13/2003 From: London Status: offline
|
RE: DRW confusion - 3/25/2003 17:08:09
Works. Thanks guys. Im beginning to properly understand this login process and diet stuff. It' s neat. I appreciate your patience with beginners (like me). We all start somewhere.
_____________________________
I hope The Boss isn't reading this, ...she thinks I program everything!
|
|
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
|
|
|