CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 lookup based on session variable user_id

Print topic Send  topic

Author Message
Dreamcatchers


Posts: 120
Posted: 11/09/2007, 2:12 PM

I have a page that should display specific information from the user record when the page is opened.

I need to lookup the user when the page opens based on the user_id sessions variable set from their login.

I am stumped on how to do this. Any suggestions?
_________________
Training and LMS Developer
View profile  Send private message
Oper


Posts: 1195
Posted: 11/09/2007, 2:18 PM

ccgetuserid()

what are you displaying grid? form? or just a label?
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)

http://www.PremiumWebTemplate.com
Affiliation Web Site Templates

Please do backup first
View profile  Send private message
ReneS

Posts: 225
Posted: 11/10/2007, 2:59 AM

Hi,

Once a user logs in, a session is started (CCS does that for you). In your security settings of the project, you can "connect" your user table to "UserID" from the session that CCS starts. After this, you can use the UserID as any other parameter you normally use. Set it in the grid etc. as "where" parameter > YourUserID=UserID > set type to session.

Hope I explained it well enough. (I'm not the real expert)

Good luck,

Rene
View profile  Send private message
Dreamcatchers


Posts: 120
Posted: 11/10/2007, 5:28 AM

I am displaying a form with two labels ( an image url and a memo field). I placed the session variable ccgetuserid() in the where clause on the record and it is not causing a lookup. I beleive it may be syntax.

On the visual query builder I define the where clause as :

field user_id
condition equals(=)
parameter ccgetuserid()

Am I setting this in the wrong place or is it a syntax issue?

_________________
Training and LMS Developer
View profile  Send private message
Dreamcatchers


Posts: 120
Posted: 11/10/2007, 6:43 AM

I have it figured out thanks to an online tutorial posted by Global Develop

http://www.serversa.com/swftut/ccgetuserid.html

My error was in not changing the type field from URL to expression.

making the sql query an expression and using the ccgetuserid session variable works great.

Thanks!
_________________
Training and LMS Developer
View profile  Send private message
wkempees
Posted: 11/10/2007, 10:15 AM

OR
field user_id
condition equals(=)
parameter UserID
type session


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.