CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Affter update Event to Insert another Table in another server

Print topic Send  topic

Author Message
Khong Biet
Posted: 07/23/2004, 4:33 AM

Plaese help me to fix bug.
I create Editable grid with some row query from Localhost server and set tinh_trang == 1 and submit
When submit I read all data of row have tinh_trang==1 to Insert to server so in Event Affter update look like:

if ($vb_den->tinh_trang->GetValue() == 1)
{
$SQL = "INSERT INTO vb_den ("
. "so_kh, "
. "trich_yeu, "
. "loai_vb, "
. "noi_gui, "
. "ngay_ky, "
. "nguoi_ky, "
. "tinh_trang"
. ") VALUES ("
. $db->ToSQL($vb_den->so_kh->GetDBValue(), $vb_den->so_kh->DataType) .", "
. $db->ToSQL($vb_den->trich_yeu->GetDBValue(), $vb_den->trich_yeu->DataType) .", "
. $db->ToSQL($vb_den->loai_vb->GetDBValue(), $vb_den->loai_vb->DataType) .", "
. $db->ToSQL($vb_den->noi_gui->GetDBValue(), $vb_den->noi_gui->DataType) .", "
. $db->ToSQL($vb_den->ngay_ky->GetDBValue(), $vb_den->ngay_ky->DataType) .", "
. $db->ToSQL($vb_den->nguoi_ky->GetDBValue(), $vb_den->nguoi_ky->DataType) .","
. ")";
$db = new clsDBConnection2();
$db->query($SQL);
$db->close();

}

But it run and give me error : Fatal error: Call to a member function on a non-object in (. $db->ToSQL($vb_den->so_kh->GetDBValue(), $vb_den->so_kh->DataType) .", " ...)

Can you point me in the right direction to fix bug
Best regards
Last Hero
Posted: 07/23/2004, 7:45 AM

Try move "$db = new clsDBConnection2();" before "$SQL = ...."

:)

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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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