#24125 [Fbk->NoF]: Unable to add records when opened with odbc_pconnect
| From: | sniper@php.net | Date: | Tue, 19 Aug 2003 00:44:03 +0000 |
| Subject: | #24125 [Fbk->NoF]: Unable to add records when opened with odbc_pconnect | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-46153@lists.php.net to get a copy of this message | ||
ID: 24125
Updated by: sniper@php.net
Reported By: michael at redboxcode dot com
-Status: Feedback
+Status: No Feedback
Bug Type: ODBC related
Operating System: Win NT
PHP Version: 4.3.2
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2003-08-14 00:38:28] sniper@php.net
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
------------------------------------------------------------------------
[2003-06-25 15:05:15] kalowsky@php.net
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] sniper@php.net
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
?>
------------------------------------------------------------------------
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=24125&edit=1