Re: AW: [PHP-DB] "delete" working erratically on ODBC

2001-01-12 Thread fabrizio . ermini

On 12 Jan 2001, at 16:43, Michael Rudel wrote:

> try to COMMIT after your first DELETE and then start the Second one and so
> on.
> 
> Hope 'tll work.
> 
Hi Mike...

Yes, I've tried, same result. If I put the two delete in two different 
transaction block the second delete is still ignored. If I put a 
commit in the middle without opening a transaction block it 
complains an error, and I think this is correct behaviour.

Thanks, Lebe wohl!


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Fabrizio Ermini   Alternate E-mail:
C.so Umberto, 7   [EMAIL PROTECTED]
loc. Meleto Valdarno  Mail on GSM: (keep it short!)
52020 Cavriglia (AR)  [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




AW: [PHP-DB] "delete" working erratically on ODBC

2001-01-12 Thread Michael Rudel

Ciao Fabrizio,

try to COMMIT after your first DELETE and then start the Second one and so
on.

Hope 'tll work.

Greetinx,
  Mike
(Germany)

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 12. Januar 2001 16:39
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] "delete" working erratically on ODBC


Hi All!
I've a encountered a baffling problem in one project of mine. 

It's a data entry application build to work as a "stand-alone" app - 
it's all on a PC, built on Win98, PWS, PHP 4.0.3, and access 
2000 as DB, accessed (pun not intended!) thru ODBC.

I wished to delete all rows from a couple of tables, to start filling 
them anew. So I issued the following commands:

[...]
if (!isset($conn))
{ 
$statusOpen=DB_Open(&$conn,$dbName);
}
if(!$statusOpen) die ("error in DB ".$dbName);

$ji=odbc_exec($conn,"DELETE FROM table1");

echo "->$ji<-";
$ji=odbc_exec($conn,"DELETE FROM table2");
echo "->$ji<-";

[...]

The two "echo"s are for debug purposes, obviously.
Actually, no error condition is returned. On screen I see that both 
echo print a valid result ID. But the second DELETE is NOT 
executed! 
All rows all still there, after the execution. 

If I change the order of the query, i.e. 

[...]

$ji=odbc_exec($conn,"DELETE FROM table2");

echo "->$ji<-";
$ji=odbc_exec($conn,"DELETE FROM table1");
echo "->$ji<-";

[...]   

Data in table2 are deleted, and data in table1 are still there!

Even If I put some other query in the middle, it appears that only 
the first "DELETE" is really executed, while the other is silently 
ignored. 

Somebody has a clue on what's happening???

TIA, bye!


/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Fabrizio Ermini   Alternate E-mail:
C.so Umberto, 7   [EMAIL PROTECTED]
loc. Meleto Valdarno  Mail on GSM: (keep it short!)
52020 Cavriglia (AR)  [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]