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 -> PHP

 ::: ds Run-Time Property (PHP)

Print topic Send  topic

Author Message
klwillis


Posts: 428
Posted: 08/08/2004, 4:44 PM

Is there any way to check for errors on the
datasource (ds) object?

ds->next_record() will position to the next record
in a result set, but is there a way to check to see
if an update failed when calling the quest method
on the ds object?

(i.e. $PeopleList->ds->query("update people set ...");

How can you determine (from the ds object above) that
the query failed. :-)

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
View profile  Send private message
Carl Chipman
Posted: 08/10/2004, 8:56 AM

the DB_Mysql class has the following code:

  
    if ($this->Debug)  
      printf("Debug: query = %s<br>\n", $Query_String);  
  
    $this->Query_ID = @mysql_query($Query_String,$this->Link_ID);  
    $this->Row   = 0;  
    $this->Errno = mysql_errno();  
    $this->Error = mysql_error();  
    if (!$this->Query_ID) {  
      $this->halt("Invalid SQL: ".$Query_String);  
    }  
  

so a call to $PeopleList->ds->Error should get the mysql query string.

also, the derived connection object usually has an clsError object named Errors that you can get also... in the help check out the connection object reference
klwillis


Posts: 428
Posted: 12/13/2004, 11:00 AM

It's been awhile since I posted this question.
Thanks for your reply. ;-)

Quote Carl Chipman:
the DB_Mysql class has the following code:

  
    if ($this->Debug)  
      printf("Debug: query = %s<br>\n", $Query_String);  
  
    $this->Query_ID = @mysql_query($Query_String,$this->Link_ID);  
    $this->Row   = 0;  
    $this->Errno = mysql_errno();  
    $this->Error = mysql_error();  
    if (!$this->Query_ID) {  
      $this->halt("Invalid SQL: ".$Query_String);  
    }  
  

so a call to $PeopleList->ds->Error should get the mysql query string.

also, the derived connection object usually has an clsError object named Errors that you can get also... in the help check out the connection object reference

_________________
Kevin Willis, VP/CIO
HealthCare Information Technology Specialist
http://www.nexushealthcare.com
"Fast - Convenient - Quality-Care"

Medical Software Consulting Services
Email : klwillis@nexushealthcare.com
Skype : klwillis2006
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.

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.