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
HENV 00A61430
HDBC * 005B3A94
php db-9d EXIT SQLAllocConnect with return code 0
(SQL_SUCCESS)
HENV 00A61430
HDBC * 0x005B3A94 ( 0x00a614d8)
php db-9d ENTER SQLConnectW
HDBC 00A614D8
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)
HDBC 00A614D8
WCHAR * 0x00A615E0 [ -3] "mydata\ 0"
SWORD -3
WCHAR * 0x1F7D8B70 [ -3] "******\ 0"
SWORD -3
WCHAR * 0x1F7D8B70 [ -3] "******\ 0"
SWORD -3
php db-9d ENTER SQLAllocStmt
HDBC 00A614D8
HSTMT * 00B68088
php db-9d EXIT SQLAllocStmt with return code 0
(SQL_SUCCESS)
HDBC 00A614D8
HSTMT * 0x00B68088 ( 0x00a61a28)
php db-9d ENTER SQLGetInfoW
HDBC 00A614D8
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0012F758
SWORD 4
SWORD * 0x0012F73C
php db-9d EXIT SQLGetInfoW with return code 0
(SQL_SUCCESS)
HDBC 00A614D8
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0012F758
SWORD 4
SWORD * 0x0012F73C (4)
php db-9d ENTER SQLSetStmtOption
HSTMT 00A61A28
UWORD 6 <SQL_CURSOR_TYPE>
SQLLEN 2
php db-9d EXIT SQLSetStmtOption with return code 1
(SQL_SUCCESS_WITH_INFO)
HSTMT 00A61A28
UWORD 6 <SQL_CURSOR_TYPE>
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
UWORD 1
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B680C8
SWORD 32
SWORD * 0x0012F738
SQLLEN * 0x00000000
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 1
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B680C8
SWORD 32
SWORD * 0x0012F738 (2)
SQLLEN * 0x00000000
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 1
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B680F0
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 1
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B680F0 (4)
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 1
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 1
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730 (11)
php db-9d ENTER SQLBindCol
HSTMT 00A61A28
UWORD 1
SWORD 1 <SQL_C_CHAR>
PTR 0x00B68A70
SQLLEN 12
SQLLEN * 0x00B680EC
php db-9d EXIT SQLBindCol with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 1
SWORD 1 <SQL_C_CHAR>
PTR 0x00B68A70
SQLLEN 12
SQLLEN * 0x00B680EC (0)
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 2
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B680F4
SWORD 32
SWORD * 0x0012F738
SQLLEN * 0x00000000
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 2
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B680F4
SWORD 32
SWORD * 0x0012F738 (4)
SQLLEN * 0x00000000
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 2
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B6811C
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 2
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B6811C (12)
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 2
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 2
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730 (50)
php db-9d ENTER SQLBindCol
HSTMT 00A61A28
UWORD 2
SWORD 1 <SQL_C_CHAR>
PTR 0x00B68168
SQLLEN 51
SQLLEN * 0x00B68118
php db-9d EXIT SQLBindCol with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 2
SWORD 1 <SQL_C_CHAR>
PTR 0x00B68168
SQLLEN 51
SQLLEN * 0x00B68118 (0)
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 3
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B68120
SWORD 32
SWORD * 0x0012F738
SQLLEN * 0x00000000
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 3
UWORD 1 <SQL_COLUMN_NAME>
PTR 0x00B68120
SWORD 32
SWORD * 0x0012F738 (10)
SQLLEN * 0x00000000
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 3
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B68148
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 3
UWORD 2 <SQL_COLUMN_TYPE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x00B68148 (12)
php db-9d ENTER SQLColAttributes
HSTMT 00A61A28
UWORD 3
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730
php db-9d EXIT SQLColAttributes with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 3
UWORD 6 <SQL_COLUMN_DISPLAY_SIZE>
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F730 (50)
php db-9d ENTER SQLBindCol
HSTMT 00A61A28
UWORD 3
SWORD 1 <SQL_C_CHAR>
PTR 0x00B681B8
SQLLEN 51
SQLLEN * 0x00B68144
php db-9d EXIT SQLBindCol with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 3
SWORD 1 <SQL_C_CHAR>
PTR 0x00B681B8
SQLLEN 51
SQLLEN * 0x00B68144 (0)
php db-9d ENTER SQLAllocStmt
HDBC 00A614D8
HSTMT * 00B68448
php db-9d EXIT SQLAllocStmt with return code 0
(SQL_SUCCESS)
HDBC 00A614D8
HSTMT * 0x00B68448 ( 0x00a61f20)
php db-9d ENTER SQLGetInfoW
HDBC 00A614D8
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0012F758
SWORD 4
SWORD * 0x0012F73C
php db-9d EXIT SQLGetInfoW with return code 0
(SQL_SUCCESS)
HDBC 00A614D8
UWORD 8 <SQL_FETCH_DIRECTION>
PTR 0012F758
SWORD 4
SWORD * 0x0012F73C (4)
php db-9d ENTER SQLSetStmtOption
HSTMT 00A61F20
UWORD 6 <SQL_CURSOR_TYPE>
SQLLEN 2
php db-9d EXIT SQLSetStmtOption with return code 1
(SQL_SUCCESS_WITH_INFO)
HSTMT 00A61F20
UWORD 6 <SQL_CURSOR_TYPE>
SQLLEN 2
DIAG [01S02] [Microsoft][ODBC Microsoft Access Driver]Option value
changed (10)
php db-9d ENTER SQLExecDirect
HSTMT 00A61F20
UCHAR * 0x00B683E0 [ -3] "insert into mytable
(name,time_stamp) values ('Michael','June 30 9:04:05');\ 0"
SDWORD -3
php db-9d EXIT SQLExecDirect with return code 0
(SQL_SUCCESS)
HSTMT 00A61F20
UCHAR * 0x00B683E0 [ -3] "insert into mytable
(name,time_stamp) values ('Michael','June 30 9:04:05');\ 0"
SDWORD -3
php db-9d ENTER SQLNumResultCols
HSTMT 00A61F20
SWORD * 0x00B68454
php db-9d EXIT SQLNumResultCols with return code 0
(SQL_SUCCESS)
HSTMT 00A61F20
SWORD * 0x00B68454 (0)
php db-9d ENTER SQLFreeStmt
HSTMT 00A61A28
UWORD 1 <SQL_DROP>
php db-9d EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 00A61A28
UWORD 1 <SQL_DROP>
php db-9d ENTER SQLFreeStmt
HSTMT 00A61F20
UWORD 1 <SQL_DROP>
php db-9d EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 00A61F20
UWORD 1 <SQL_DROP>
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=24125&edit=1