Hello, Eve,

I would think the first error leads to the solution: to me it looks like there
is no sql text at all. Try un-commenting the "echo $sqlStmt;" at the beginning
and look at the html-source generated; maybe it helps to use something like
        echo ".$sqlStmt.";
instead to clearly see if it's empty.

hth


Arnold Schommer

Raven Eve wrote:
> 
> create table Shop(
> ordId NUMBER(7) NOT NULL PRIMARY KEY);
> 
> create table Customer(
> ordId NUMBER(7) NOT NULL,
> FOREIGN KEY (ordId) REFERENCES Shop(ordId) on delete cascade);
> 
> so, when i delete a row in shop, the corresponding row in customer will be
> deleted.
> 
> so, i have created a function in php to execute the query
> whereby $sqlStmt = "Delete from Shop where ordId = $ordId";
> 
> function executeSql($sqlStmt) //line 524
>  {
> 
>   //echo $sqlStmt;
> 
>    $this->stmt = OCIParse($this->conn, $sqlStmt)or die
> ("Sorry, cannot parse the sql statement. Please inform the webmistress of
> the error messages");
> 
>    // verify that SQL is valid
>    $this->checkErrors();
> 
>   OCIExecute($this->stmt, OCI_DEFAULT) or die //line 534
> ("Sorry, cannot execute the sql statement. Please inform the webmistress of
> the error messages");
> 
>   $this->checkErrors();
> 
>   //commit to database
>   $this->commit();
> 
>  }
> 
> however, when i tried to execute the sql stmt, an error stmt will occur :
> Warning: Missing argument 1 for executesql() in
> c:\apache\htdocs\project\ProcessSql.php on line 524
> 
> Warning: OCIStmtExecute: ORA-24337: statement handle not prepared in
> c:\apache\htdocs\project\ProcessSql.php on line 534
> Sorry, cannot execute the sql statement. Please inform the webmistress of
> the error messages
> 
> This function works for tables that do not have cascading deletes.
> How do i get round this problem? thanx :P
> --
> 
> --

-- 
Arnold Schommer

FS EDV Service & Beratung GmbH

An der Pönt 48
40885 Ratingen

fon: +49 2102 186 400
fax: +49 2102 186 499

mailto:[EMAIL PROTECTED]
http://www.fs-edv.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to