a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

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

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

 

DRW confusion

 
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 >> DRW confusion
Page: [1]
 
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!
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW confusion - 3/23/2003 14:51:27   
It does appear to have additional quotes which should not be there

fp_sQry=" SELECT * FROM Results WHERE Username=' " &Session(" Username" " )&" ' "  


You are adding this code in HTML view and not via the custom SQL wizard?

_____________________________

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

§þ:)


(in reply to walrus)
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!

(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW confusion - 3/23/2003 15:46:51   
Ok, what you may want to do, is first look at doing the Spooky diet - this will allow you to easily customise the code (from HTML view)

You could first try removing the duplicate quotes from the GRAY CODE in html view.

_____________________________

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

§þ:)


(in reply to walrus)
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!

(in reply to Spooky)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: DRW confusion - 3/24/2003 14:26:04   
fp_sQry=" SELECT * FROM Results WHERE Username=' " & Session(" Username" ) & " ' "

Pay careful attention to the type and number of quotemarks:

Username=(single)(double) & Session(" Username" ) & (double)(single)(double)

Hope it helps...:)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to walrus)
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!

(in reply to rdouglass)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: DRW confusion - 3/24/2003 15:46:31   
quote:

Ok, what you may want to do, is first look at doing the Spooky diet


I second Spooky' s suggestion. You' ll probably need to put this on a Spooky Diet...

As a general ' rule of thumb' , once I' ve setup the basic DRW, I then put iton a diet. That' s the only way I' ve been even ' marginally' sucessful at manipulationg the DRW.

You CAN do what you want to do so hang in there....:)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to walrus)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW confusion - 3/24/2003 15:48:13   
Sorry, I think youll definitely need to do the diet for that function.
The web bot is changing it to a string.
Youll find the diet quite easy to do :)

_____________________________

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

§þ:)


(in reply to walrus)
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!

(in reply to Spooky)
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!

(in reply to Spooky)
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.

(in reply to walrus)
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!

(in reply to rdouglass)
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.

(in reply to walrus)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW confusion - 3/25/2003 16:01:55   
So, the code :

<%=Session(" UserName" )%> does not write a value?
The user is logged in to this page?

If its blank, it tends to suggest they havent logged in or a different session name exits

_____________________________

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

§þ:)


(in reply to walrus)
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!

(in reply to Spooky)
Spooky

 

Posts: 26617
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: DRW confusion - 3/25/2003 19:07:03   
Dang - Roger beat me by a second :-)
Good to hear it works!

_____________________________

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

§þ:)


(in reply to walrus)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> DRW confusion
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