CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 CCS Editable Grid - Changing fields Before Insert

Print topic Send  topic

Author Message
JFS
Posted: 05/21/2003, 5:31 AM

I have a details grid where all new records need to be tagged with the same ID number to connect them to the master record. I have tried the BeforeBuildInsert event with no success. Below is the test code I am using with just a dummy data to insert. The error I get is that reqid is NULL when the sql insert occurs. Any help greatly appreciated.

global $req_labor;
$req_labor->reqid->SetValue( '1001' );


Using PHP,MYSQL,CCS2
Edd
Posted: 05/21/2003, 9:03 PM

JFS ,
Sorry, I am not a PHP programmer but in ASP you must specify the "datasource"

In ASP it would be req_labor.DataSource.reqid.value = "1001"

Hope that gives you a clue.

Edd
Lee Irving
Posted: 05/22/2003, 4:00 AM

Why not have a hidden field in the row and set its default value to be what you need it to be. this hidden field can then be tied to the correct field in database.

Or you can use the
$req_labor->reqid->SetValue( '1001' );

please note that seems to be setting a text value rather than numerical

$req_labor->reqid->SetValue(1001) would set it to a numeric, if the field is set as a numeric and you try to put a string in it will put in a 0

regards

Lee
JFS
Posted: 05/23/2003, 6:13 AM

Thanks for the help guys, I got it working:

global $req_labor;
global $requests;
$req_labor->ds->reqid->SetValue( $requests->autoid->GetValue() );

The above code pulls the reqid number from the master and sets it for all new records in the details list. I used the BeforeBuildInsert event. Thanks again


   


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.