Sur62
Posts: 22
|
| Posted: 02/25/2008, 5:23 AM |
|
I have created a login form with username and password. Now i need to bring the username in the field automatically in other forms so that the users input can be trapped.
In access it could be easily done.But am struck with CCS code.
Can anyone help on this please.Thanks
|
 |
 |
wkempees
|
| Posted: 02/25/2008, 2:32 PM |
|
In the Help and Doc files:
CCGetUserID()
CCGetUserLogin()
Hope this helps
Walter
"Sur62" <Sur62@forum.codecharge> schreef in bericht
news:647c2c16ee1331@news.codecharge.com...
>I have created a login form with username and password. Now i need to bring
>the
> username in the field automatically in other forms so that the users input
> can
> be trapped.
>
> In access it could be easily done.But am struck with CCS code.
>
> Can anyone help on this please.Thanks
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
Sur62
Posts: 22
|
| Posted: 02/25/2008, 9:26 PM |
|
Thanks for your reply. Sorry for bothering you since am new can you tell me what is help and Doc Files?Can you explain it in detail please.
|
 |
 |
wkempees
|
| Posted: 02/26/2008, 4:53 AM |
|
Help: Press F1 in CCS.
Doc Files are the online version of the Help files, more recent. http://docs.codecharge.com/studio3/html/ for CCS3x http://docs.codecharge.com/studio40/html/ for CCS4
All reachable from the opening page of CCS
"Sur62" <Sur62@forum.codecharge> schreef in bericht
news:647c3a2f038c1f@news.codecharge.com...
> Thanks for your reply. Sorry for bothering you since am new can you tell
> me what
> is help and Doc Files?Can you explain it in detail please.
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Sur62
Posts: 22
|
| Posted: 02/26/2008, 11:26 PM |
|
I tried using CCGETLOGIN() in DEFAULT field in the textbox in one of the FORM. But its not displaying the username and giving error. I have a text field in database for displaying the username.Should we give the datasource name or not ?
The login page the text filed is Login and in the form i call it as User.So is it correct to write CCGETLOGIN() ?
Since am new i couldnot follow the reply posted in the Forum before. Can somebody help on this please.Thanks
|
 |
 |
Oper
Posts: 1195
|
| Posted: 02/27/2008, 6:51 AM |
|
no datasource needit
ex:
on beforshow label/text event
Sender.value=ccGetUserLogin()
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
Sur62
Posts: 22
|
| Posted: 02/27/2008, 9:14 AM |
|
Thanks for your reply. I added the code given by you in textbox called User. But am getting error.
Error Type:
Microsoft VBScript runtime (0x800A01F4)
Variable is undefined: 'ccgetlogin'
Am i making any mistake or need to add any code? Can you help on this please.
|
 |
 |
Sur62
Posts: 22
|
| Posted: 02/27/2008, 9:17 AM |
|
Forgot to mention this. I donot want the machine login to be displayed. I have a seperate login form for the application, that user id must be displayed the textbox.
|
 |
 |
Oper
Posts: 1195
|
| Posted: 02/28/2008, 6:30 PM |
|
'ccgetlogin' <--- wrong
Sender.value=ccGetUserLogin() <----- OK

first do this then we coudl complicated the display with thename or whatver you want.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
Sur62
Posts: 22
|
| Posted: 02/28/2008, 9:25 PM |
|
I think there is some mistake, iam getting the same error even if i add
Sender.value = ccGetUserLogin() in Before Show event.
What is UserLogin? Because i dont have any field in that name.
Is the login referring to system login or the user login of the application? I created the login screen by adding from the project which the CCS has given. The datasource i linked with my Access Table and the login screen is working.The textbox field is named as Login but my access table is User. Now in the following Forms i have the User field where i want the username to appear automatically like it does in Access.
Can you give now give me the detail steps as to how to go about, please.
|
 |
 |
wkempees
Posts: 1679
|
| Posted: 02/29/2008, 1:50 AM |
|
No Mistake, I made a Mistake.
Apparently CCGetUserLogin() is not a function available in ASP.
Open the Help File Search for CCGetUserID ASP version.
It has an example of how to retreive th username for the login user.
HelpFile->Component Reference->Programming Reference->ASP->Functions->CCGetUserID
Take example 1, and alter it to fit your needs.
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)
if you liked this info PAYPAL me: http://donate.consultair.eu
|
 |
 |
Oper
Posts: 1195
|
| Posted: 02/29/2008, 10:23 AM |
|
CCgetUserLogin() work perfect
sure63, Just try this:
Sender.value=CCgetUserLogin()
Common.asp
'CCGetUserLogin @0-F260DBE5
Function CCGetUserLogin()
CCGetUserLogin = Session("CustomSessionString")
End Function
'End CCGetUserLogin
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
wkempees
|
| Posted: 02/29/2008, 11:21 AM |
|
Oper, thanks, I read the Helpfile for ASP and function not in there, thought
I was wrong.
(Not an ASP'er)
"Oper" <Oper@forum.codecharge> schreef in bericht
news:647c84daeac680@news.codecharge.com...
> CCgetUserLogin() work perfect
>
> Just use
> Sender.value=CCgetUserLogin()
>
>
> Common.asp
>
> 'CCGetUserLogin @0-08A6CA09
> Function CCGetUserLogin()
> CCGetUserLogin = Session("CBUserLogin" & Session("altcia") )
> End Function
> 'End CCGetUserLogin
>
> _________________
> GLOBAL DEVELOP
> http://www.GlobalDevelop.com (small Comunity)
> Flash + CCS - Scripts and Samples
> (SWISHMAX + CODECHARGE STUDIO)
>
> http://www.PremiumWebTemplate.com
> Affiliation Web Site Templates & Free Stuff
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
|
|
|
 |
Sur62
Posts: 22
|
| Posted: 02/29/2008, 9:02 PM |
|
Thanks Oper , for your reply. Since Iam new to ASP i donot know where to add this code. Is this code to be added Before Show event in the User field of the FORM or to the Login field in the Login FORM?
Sender.value=CCgetUserLogin()
'CCGetUserLogin @0-F260DBE5
Function CCGetUserLogin()
CCGetUserLogin = Session("CustomSessionString")
End Function
'End CCGetUserLogin
Sorry for bothering you too much.
I also have another problem. I created the Login screen from the project but when i run i gives me error saying:
Error:Login/Button_DoLogin Event: OnClick Action: "Login":Unable to add Login Action.Please configure Security Settings.
Would really need your help on this both, please.
|
 |
 |
csierra
Posts: 123
|
| Posted: 03/02/2008, 12:29 AM |
|
HI,
You have to configure security first, so begin with your db, create a table e.g. tbUsers, then you add some fields like name, phone, etc and a uname field (for username) and another pword (for password), after you have done that, you go to Project->Settings, click on Security and choose your recently created table, define then wich field is intented for password (pword) what for username (uname) and then, you can get user login thru CCGetUserLogin()
Review also CCGetUserId() and CCGetGroupId() functions; use the CCS4 chm file for that.
Hope that helps
_________________
Yes! I Can!!! |
 |
 |
Oper
Posts: 1195
|
| Posted: 03/02/2008, 2:51 PM |
|
point at sierra -->
Did you setup the security?
also dont worry to ask. people with reply whne they got time.
CCS Forum Members will reply a lot when thing are asked by the rigth way.
_________________
____________________________
http://www.7bz.com (Free CMS,CRM Developed in CCS)
http://www.PremiumWebTemplate.com
Affiliation Web Site Templates
Please do backup first |
 |
 |
Sur62
Posts: 22
|
| Posted: 03/02/2008, 11:22 PM |
|
Thanks for your reply. Since i already mentioned iam new to Asp and CCS i couldnot follow the coding like other programmers. So is it possible to explain me in detail steps or give me a sample exe for me gothrough it and create it.
I created a login table in Access but when i created in CCS it doesnot show me the button ok or login, it gives me option only to add and search the table.So i created using Authentication Builder and connect to database for checking username and password that works fine.But i also have Rights field which allows user to give rights according to it , which couldnot be done by this builder option.
Please help on this.
|
 |
 |