#24125 [Fbk->Opn]: Unable to add records when opened with odbc_pconnect
ID: 24125 Updated by: [EMAIL PROTECTED] Reported By: michael at redboxcode dot com -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Win NT PHP Version: 4.3.2 New Comment: Private Mail received from user: can you post this reply, or tell me how to retrieve my password? - php db-9d ENTER SQLAllocEnv HENV * 005B3A90 php db-9d EXIT SQLAllocEnv with return code 0 (SQL_SUCCESS) HENV * 0x005B3A90 ( 0x00a61430) php db-9d ENTER SQLAllocConnect HENV00A61430 HDBC * 005B3A94 php db-9d EXIT SQLAllocConnect with return code 0 (SQL_SUCCESS) HENV00A61430 HDBC * 0x005B3A94 ( 0x00a614d8) php db-9d ENTER SQLConnectW HDBC00A614D8 WCHAR * 0x00A615E0 [ -3] "mydata\ 0" SWORD -3 WCHAR * 0x1F7D8B70 [ -3] "**\ 0" SWORD -3 WCHAR * 0x1F7D8B70 [ -3] "**\ 0" SWORD -3 php db-9d EXIT SQLConnectW with return code 0 (SQL_SUCCESS) HDBC00A614D8 WCHAR * 0x00A615E0 [ -3] "mydata\ 0" SWORD -3 WCHAR * 0x1F7D8B70 [ -3] "**\ 0" SWORD -3 WCHAR * 0x1F7D8B70 [ -3] "**\ 0" SWORD -3 php db-9d ENTER SQLAllocStmt HDBC00A614D8 HSTMT * 00B68088 php db-9d EXIT SQLAllocStmt with return code 0 (SQL_SUCCESS) HDBC00A614D8 HSTMT * 0x00B68088 ( 0x00a61a28) php db-9d ENTER SQLGetInfoW HDBC00A614D8 UWORD8 PTR 0012F758 SWORD4 SWORD * 0x0012F73C php db-9d EXIT SQLGetInfoW with return code 0 (SQL_SUCCESS) HDBC00A614D8 UWORD8 PTR 0012F758 SWORD4 SWORD * 0x0012F73C (4) php db-9d ENTER SQLSetStmtOption HSTMT 00A61A28 UWORD6 SQLLEN 2 php db-9d EXIT SQLSetStmtOption with return code 1 (SQL_SUCCESS_WITH_INFO) HSTMT 00A61A28 UWORD6 SQLLEN 2 DIAG [01S02] [Microsoft][ODBC Microsoft Access Driver]Option value changed (10) php db-9d ENTER SQLExecDirect HSTMT 00A61A28 UCHAR * 0x00B68040 [ -3] "select * from mytable order by time_stamp;\ 0" SDWORD-3 php db-9d EXIT SQLExecDirect with return code 0 (SQL_SUCCESS) HSTMT 00A61A28 UCHAR * 0x00B68040 [ -3] "select * from mytable order by time_stamp;\ 0" SDWORD-3 php db-9d ENTER SQLNumResultCols HSTMT 00A61A28 SWORD * 0x00B68094 php db-9d EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS) HSTMT 00A61A28 SWORD * 0x00B68094 (3) php db-9d ENTER SQLColAttributes HSTMT 00A61A28 UWORD1 UWORD1 PTR0x00B680C8 SWORD 32 SWORD * 0x0012F738 SQLLEN *0x php db-9d EXIT SQLColAttributes with return code 0 (SQL_SUCCESS) HSTMT 00A61A28 UWORD1 UWORD1 PTR0x00B680C8 SWORD 32 SWORD * 0x0012F738 (2) SQLLEN *0x php db-9d ENTER SQLColAttributes HSTMT 00A61A28 UWORD1 UWORD2 PTR0x SWORD0 SWORD * 0x SQLLEN *0x00B680F0 php db-9d EXIT SQLColAttributes with return code 0 (SQL_SUCCESS) HSTMT 00A61A28 UWORD1 UWORD2 PTR0x SWORD0 SWORD * 0x SQLLEN *0x00B680F0 (4) php db-9d ENTER SQLColAttributes HSTMT 00A61A28 UWORD1 UWORD6 PTR0x SWORD0 SWORD * 0x SQLLEN *0x0012F730 php db-9d EXIT SQLColAttributes with return code 0 (SQL_SUCCESS) HSTMT 00A61A28 UWORD1 UWORD6 PTR0
#24125 [Fbk->Opn]: Unable to add records when opened with odbc_pconnect
ID: 24125 User updated by: michael at redboxcode dot com Reported By: michael at redboxcode dot com -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Win NT -PHP Version: 4.3.1 +PHP Version: 4.3.2 New Comment: I've upgraded my development machine to 4.3.2 and the behavior still exist. Previous Comments: [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 reading the database and THEN inserting the records does NOT work in this code. [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 *** \n"; echo "\n"; echo "Insert record then read table\n"; echo "\n"; echo "\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 "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Next try to read table then insert a record"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page2.php *** \n"; echo "\n"; echo "Read table then insert a record\n"; echo "\n"; echo "\n"; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\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 "".$result." = ".$sql_command.""; echo "Back to insert a record then display table"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page3.php *** \n"; echo "\n"; echo "Clear the table and start over\n"; echo "\n"; echo "\n"; // Clear mytable database $sql_command = "delete * from mytable;"; $result = odbc_exec( $connect_id, $sql_command ); echo "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Insert a record then display the table"; echo "Display the table then insert a record"; echo "\n"; echo "\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" ??) 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
#24125 [Fbk->Opn]: Unable to add records when opened with odbc_pconnect
ID: 24125 User updated by: michael at redboxcode dot com Reported By: michael at redboxcode dot com -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Win NT -PHP Version: 4.3.2 +PHP Version: 4.3.1 New Comment: 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 reading the database and THEN inserting the records does NOT work in this code. Previous Comments: [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 *** \n"; echo "\n"; echo "Insert record then read table\n"; echo "\n"; echo "\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 "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Next try to read table then insert a record"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page2.php *** \n"; echo "\n"; echo "Read table then insert a record\n"; echo "\n"; echo "\n"; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\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 "".$result." = ".$sql_command.""; echo "Back to insert a record then display table"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page3.php *** \n"; echo "\n"; echo "Clear the table and start over\n"; echo "\n"; echo "\n"; // Clear mytable database $sql_command = "delete * from mytable;"; $result = odbc_exec( $connect_id, $sql_command ); echo "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Insert a record then display the table"; echo "Display the table then insert a record"; echo "\n"; echo "\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=24125&edit=1
#24125 [Fbk->Opn]: Unable to add records when opened with odbc_pconnect
ID: 24125 User updated by: michael at redboxcode dot com Reported By: michael at redboxcode dot com -Status: Feedback +Status: Open Bug Type: ODBC related Operating System: Win NT PHP Version: 4.3.2 New Comment: note: these files, the access database and phpinfo() are zipped at www.redboxcode.com/Michael.zip * page1.php *** \n"; echo "\n"; echo "Insert record then read table\n"; echo "\n"; echo "\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 "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Next try to read table then insert a record"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page2.php *** \n"; echo "\n"; echo "Read table then insert a record\n"; echo "\n"; echo "\n"; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\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 "".$result." = ".$sql_command.""; echo "Back to insert a record then display table"; echo "Clear the table"; echo "\n"; echo "\n"; ?> * page3.php *** \n"; echo "\n"; echo "Clear the table and start over\n"; echo "\n"; echo "\n"; // Clear mytable database $sql_command = "delete * from mytable;"; $result = odbc_exec( $connect_id, $sql_command ); echo "".$result." = ".$sql_command.""; // Display the table $sql_command = "select * from mytable order by time_stamp;"; $rsDetail = odbc_exec($connect_id, $sql_command); echo "".$rsDetail." = ".$sql_command.""; $more_records = odbc_fetch_row($rsDetail); echo "idnametime stamp\n"; while ($more_records) { echo "".odbc_result($rsDetail,'id').""; echo "".odbc_result($rsDetail,'name').""; echo "".odbc_result($rsDetail,'time_stamp')."\n"; $more_records = odbc_fetch_row($rsDetail); } echo "\n"; echo "Insert a record then display the table"; echo "Display the table then insert a record"; echo "\n"; echo "\n"; ?> Previous Comments: [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=24125&edit=1