#24125 [Opn-Fbk]: Unable to add records when opened with odbc_pconnect

2003-08-14 Thread sniper
 ID:   24125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at redboxcode dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Win NT
 PHP Version:  4.3.2
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip




Previous Comments:


[2003-06-25 15:05:15] [EMAIL PROTECTED]

Please turn on SQL Logging in your ODBC Administrator and post the
appropriate portions to this bug... aka from the first initial connect
to the last ODBC command for the script.  Please note you MAY need to
delete the unique identifing material in the script (aka a
username/password).  



[2003-06-17 20:46:45] michael at redboxcode dot com

I've upgraded my development machine to 4.3.2 and the behavior still
exist.



[2003-06-16 08:30:06] [EMAIL PROTECTED]

Please update to PHP 4.3.2 first.




[2003-06-16 07:49:42] michael at redboxcode dot com

please note: I noticed that I am actually on version 4.3.1
Windows NT localhost 4.0 build 1381 

inserting a record then reading the database works in this code

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo $result. = .$sql_command.\n;
// this will work correctly
?

reading the database and THEN inserting the records does NOT work in
this code.

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// first read the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
// The command returns a valid results, but the record is NOT in the
database
?



[2003-06-12 05:44:39] [EMAIL PROTECTED]

Maybe I didn't stress enough the word SHORT example script..? :) 

Can you please make this ONE file and max. 15 lines.
No HTML either, please.




The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/24125

-- 
Edit this bug report at http://bugs.php.net/?id=24125edit=1



#24125 [Opn-Fbk]: Unable to add records when opened with odbc_pconnect

2003-06-25 Thread kalowsky
 ID:   24125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at redboxcode dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Win NT
 PHP Version:  4.3.2
 New Comment:

Please turn on SQL Logging in your ODBC Administrator and post the
appropriate portions to this bug... aka from the first initial connect
to the last ODBC command for the script.  Please note you MAY need to
delete the unique identifing material in the script (aka a
username/password).  


Previous Comments:


[2003-06-17 20:46:45] michael at redboxcode dot com

I've upgraded my development machine to 4.3.2 and the behavior still
exist.



[2003-06-16 08:30:06] [EMAIL PROTECTED]

Please update to PHP 4.3.2 first.




[2003-06-16 07:49:42] michael at redboxcode dot com

please note: I noticed that I am actually on version 4.3.1
Windows NT localhost 4.0 build 1381 

inserting a record then reading the database works in this code

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo $result. = .$sql_command.\n;
// this will work correctly
?

reading the database and THEN inserting the records does NOT work in
this code.

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// first read the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
// The command returns a valid results, but the record is NOT in the
database
?



[2003-06-12 05:44:39] [EMAIL PROTECTED]

Maybe I didn't stress enough the word SHORT example script..? :) 

Can you please make this ONE file and max. 15 lines.
No HTML either, please.




[2003-06-11 23:17:35] michael at redboxcode dot com

note: these files, the access database and phpinfo() are zipped at
www.redboxcode.com/Michael.zip

*  page1.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleInsert record then read table/title\n;
echo /head\n;
echo body\n;

// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;
echo bra href='page2.php'Next try to read table then insert a
record/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page2.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleRead table then insert a record/title\n;
echo /head\n;
echo body\n;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;

// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;


echo bra href='page1.php'Back to insert a record then display
table/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page3.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo 

#24125 [Opn-Fbk]: Unable to add records when opened with odbc_pconnect

2003-06-16 Thread sniper
 ID:   24125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at redboxcode dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Win NT
 PHP Version:  4.3.1
 New Comment:

Please update to PHP 4.3.2 first.



Previous Comments:


[2003-06-16 07:49:42] michael at redboxcode dot com

please note: I noticed that I am actually on version 4.3.1
Windows NT localhost 4.0 build 1381 

inserting a record then reading the database works in this code

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo $result. = .$sql_command.\n;
// this will work correctly
?

reading the database and THEN inserting the records does NOT work in
this code.

?PHP
$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);
// first read the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
// The command returns a valid results, but the record is NOT in the
database
?



[2003-06-12 05:44:39] [EMAIL PROTECTED]

Maybe I didn't stress enough the word SHORT example script..? :) 

Can you please make this ONE file and max. 15 lines.
No HTML either, please.




[2003-06-11 23:17:35] michael at redboxcode dot com

note: these files, the access database and phpinfo() are zipped at
www.redboxcode.com/Michael.zip

*  page1.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleInsert record then read table/title\n;
echo /head\n;
echo body\n;

// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;
echo bra href='page2.php'Next try to read table then insert a
record/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page2.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleRead table then insert a record/title\n;
echo /head\n;
echo body\n;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;

// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;


echo bra href='page1.php'Back to insert a record then display
table/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page3.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleClear the table and start over/title\n;
echo /head\n;
echo body\n;

// Clear mytable database
$sql_command = delete * from mytable;;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo 

#24125 [Opn-Fbk]: Unable to add records when opened with odbc_pconnect

2003-06-12 Thread sniper
 ID:   24125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at redboxcode dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Win NT
 PHP Version:  4.3.2
 New Comment:

Maybe I didn't stress enough the word SHORT example script..? :) 

Can you please make this ONE file and max. 15 lines.
No HTML either, please.



Previous Comments:


[2003-06-11 23:17:35] michael at redboxcode dot com

note: these files, the access database and phpinfo() are zipped at
www.redboxcode.com/Michael.zip

*  page1.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleInsert record then read table/title\n;
echo /head\n;
echo body\n;

// First insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;
echo bra href='page2.php'Next try to read table then insert a
record/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page2.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleRead table then insert a record/title\n;
echo /head\n;
echo body\n;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;

// Now insert a record into the database
$sql_command = insert into mytable (name,time_stamp) values
('Michael','.date(F j G:i:s).');;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;


echo bra href='page1.php'Back to insert a record then display
table/abr;
echo bra href='page3.php'Clear the table/abr;
echo /body\n;
echo /html\n;
?

*  page3.php ***
?PHP

$connect_id = odbc_pconnect(mydata,,0) or die (Cannot connect to
database);

echo html\n;
echo head\n;
echo titleClear the table and start over/title\n;
echo /head\n;
echo body\n;

// Clear mytable database
$sql_command = delete * from mytable;;
$result = odbc_exec( $connect_id, $sql_command );
echo br.$result. = .$sql_command.br;

// Display the table
$sql_command = select * from mytable order by time_stamp;;
$rsDetail = odbc_exec($connect_id, $sql_command);
echo br.$rsDetail. = .$sql_command.br;
$more_records = odbc_fetch_row($rsDetail);
echo table border=1trthid/ththname/ththtime
stamp/th/tr\n;
while ($more_records)
{
  echo trtd.odbc_result($rsDetail,'id')./td;
  echo td.odbc_result($rsDetail,'name')./td;
  echo td.odbc_result($rsDetail,'time_stamp')./td/tr\n;
  $more_records = odbc_fetch_row($rsDetail);
}
echo /table\n;
echo bra href='page1.php'Insert a record then display the
table/abr;
echo bra href='page2.php'Display the table then insert a
record/abr;
echo /body\n;
echo /html\n;
?



[2003-06-11 12:13:31] [EMAIL PROTECTED]

You should have added the short sample without us having to ask for
it..(doesn't this read in the help page for how to report ??)




[2003-06-11 09:58:29] michael at redboxcode dot com

This problem went away when I changed odbc_Pconnect to just
odbc_connect

If I read a table then attempt to insert a record to the table the
results are reported successful but the record is NOT added.

If I insert the record then read the table it works correctly.

Changing the pconnect to connect corrected the problem.

If you need additional info, please email. I can strip down the scripts
to create a sample of the problem.




-- 
Edit this bug report at http://bugs.php.net/?id=24125edit=1



#24125 [Opn-Fbk]: Unable to add records when opened with odbc_pconnect

2003-06-11 Thread sniper
 ID:   24125
 Updated by:   [EMAIL PROTECTED]
 Reported By:  michael at redboxcode dot com
-Status:   Open
+Status:   Feedback
 Bug Type: ODBC related
 Operating System: Win NT
 PHP Version:  4.3.2
 New Comment:

You should have added the short sample without us having to ask for
it..(doesn't this read in the help page for how to report ??)



Previous Comments:


[2003-06-11 09:58:29] michael at redboxcode dot com

This problem went away when I changed odbc_Pconnect to just
odbc_connect

If I read a table then attempt to insert a record to the table the
results are reported successful but the record is NOT added.

If I insert the record then read the table it works correctly.

Changing the pconnect to connect corrected the problem.

If you need additional info, please email. I can strip down the scripts
to create a sample of the problem.




-- 
Edit this bug report at http://bugs.php.net/?id=24125edit=1