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

 Problem with CCDLookUp

Print topic Send  topic

Author Message
GabrielAkoh

Posts: 9
Posted: 08/26/2008, 8:00 PM

Hi,

Am really new and would want training on web application, but for now, I need a quick help.

I placed the following on Before Insert without result:

1. myform.Username.Value = CCDLookUp("emp_login","employees","emp_id=" & DBConnection.ToSQL(CCGetUserID(),ccsInteger), DBConnection)

2. myform.TransID.Value = CCDLookUp("last(TransID)","Master","UserDept= " & myform.UserDept.Value, DBConnection)+1

Really, I want the current username and to increment transid for current userdept. For the transid, if I specify explicitly the value of userdept (that is say "101" in place of myform.UserDept.value), it works. However, I want the specified userdept on the page.

Thank you.
View profile  Send private message
Oper


Posts: 1195
Posted: 08/27/2008, 3:30 PM

UserDept is on your from?

Are you aware that will only work in Insert (not on update) right?

also is prefer to use before Build Update Instead and

try Myform.Datasource.UserDept.value


use:
Response.write "["& myform.userdept.value & "]"

before sentence to see what data is coming. or datasource what ever you choose to test
_________________
____________________________
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
GabrielAkoh

Posts: 9
Posted: 08/28/2008, 8:25 AM

Thank you.

The userid was null because the page was not restricted therefore did not log in. As soon as I log in, the username update was solved.

I tried before build insert and others to no avail. So I placed my codes inside the insert_button function and got around it.

Now I have a similar but different case:

I have an editable grid with some hidden fields to be updated as changes are submitted. For instance LastUpdateDate = Now() if any change is made. I tried all available events without success. They do not respond even to response.write. I tried to achieve the update using the same step as earlier but did not succeed.

Is it not possible to update a field on an update of another? For instance,

myform.dept_description.value = CCDLookUp("description","Department","Dept_Code= " & myform.UserDept.Value, DBConnection)

whenever UserDept is entered.
(where dept_description is not a database field)


Please assist!
View profile  Send private message

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.

Web Database

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.