Daniel,

I did reproduce your problem, first with both the OpenLink driver and the
SQLServer native driver, and then both with and without PHP (e.g. directly
against SQLServer, making the API calls directly)  This problem exists in
the absense of PHP or OpenLink, therefore it's intrinsic to the SQLServer
layer.

If you are interested, here is the evidence of the native driver failing
(looks the same as via ODBC).

SQLColAttributes:
                                In:                             hstmt = 0x008218D8, 
icol = 1, fDescType = SQL_COLUMN_TYPE=2,
rgbDesc = 0x00154528, cbDescMax = 600, pcbDesc = 0x001552F0,
                                                                                pfDesc 
= 0x00155E30, Description Type = SQL_C_SLONG=-16
                                Return: SQL_SUCCESS=0
                                Out:                    *rgbDesc = <unmodified>, 
*pcbDesc = 4, *pfDesc = 4
                                TST1001: Buffer rgbDesc was not updated.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Data Integration Technology Providers


> -----Original Message-----
> From: Daniel H. Ardison [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 07, 2001 9:55 AM
> To: Bug Database
> Subject: [PHP-DEV] Re: Bug #10369 Updated: Openlink4/ODBC
> odbc_field_type returns nothing
>
>
> Firstly, I already compiled with odbc support, as I said it in my mail, I
> can retrieve the data but I can't retrieve column SQL Data Type, I have a
> case opened with openlink and the last thing they said was:
>
> >Daniel,
> >
> >I tested this using the SQL Server native driver, and the results are the
> same as with ours: >the SQLColAttributes() ODBC call returns a
> <unmodified>
> value for >SQL_COLUMN_TYPE.  I do not know why this is the case; it would
> need to be investigated >with Microsoft.  The SQLDescribeCol() API call is
> much more robust, and will return the >information you require.
> However, I
> don't know if the PHP development community is >willing to invest in this
> change.
>
> >Best regards,
> >Stephen - Online Support Team
>
> I'm curious, why you decided to close the case without testing?, or if you
> tested the script I sent why you don't mentioned, I don't follow your QA.
>
> Thanks anyway
> Daniel H. Ardison
> Systems Development Manager
> Ardison Software & Consulting
>
> ----- Original Message -----
> From: "Bug Database" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Viernes 4 de Mayo de 2001 4:15 PM
> Subject: Bug #10369 Updated: Openlink4/ODBC odbc_field_type
> returns nothing
>
>
> > ID: 10369
> > Updated by: ahill
> > Reported By: [EMAIL PROTECTED]
> > Old-Status: Open
> > Status: Closed
> > Bug Type: ODBC related
> > PHP Version: 4.0.4pl1
> > Assigned To:
> > Comments:
> >
> > Firstly, please use --with-iodbc instead of --with-iodbc.
> > Also, this is most likely not a PHP issue but a database specific issue,
> and will only occur in cases where the corresponding database CLI call
> doesn't work natively.
> >
> > Please test this with the latest OpenLink drivers and open a
> support case
> at http://www.openlinksw.com/support/suppindx.htm if the problem persists.
> >
> >
> >
> > Previous Comments:
> >
> --------------------------------------------------------------------------
> -
> >
> > [2001-04-17 20:12:15] [EMAIL PROTECTED]
> > This script reproduces the problem:
> >
> > <HTML>
> > <HEAD>
> > <TITLE>Test odbc_field_type</TITLE>
> > </HEAD>
> > <BODY bgcolor="#000000" text="#CCCCCC" link="#33CCFF" vlink="#996699"
> alink="#FF
> > FFFF" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
> > <?php
> >
> >
> > putenv("LD_LIBRARY_PATH=/usr/local/openlink/odbcsdk/lib");
> > putenv("LIBPATH=/usr/local/openlink/odbcsdk/lib:$LIBPATH");
> > putenv("SHLIB_PATH=/usr/local/openlink/odbcsdk/lib:$SHLIB_PATH");
> > putenv("UDBCINI=/usr/local/openlink/bin/odbc.ini");
> > putenv("ODBCINSTINI=/usr/local/openlink/bin/odbcinst.ini");
> > putenv("ODBCINI=/usr/local/openlink/bin/odbc.ini");
> > $dsn="DSN=Arbant";
> > $user="dba";
> > $password="sql";
> > $sql='Select cod_emp, cod_amb, den from loguec';
> > if(($conn_id=odbc_connect("$dsn","",""))){
> >   if(($result=odbc_prepare($conn_id,$sql))){
> >     @odbc_execute($result);
> >     if(!empty($result)){
> >        $cols_count=odbc_num_fields($result);
> >        $ind=1;
> >        while($ind<=$cols_count){
> >          $cols_name[$ind]=odbc_field_name($result,$ind);
> >          $cols_types[$ind]=odbc_field_type($result,$ind);
> >          $ind++;
> >        }
> >        echo "<H1>Results</H1>";
> >        echo "<B>The Query is: $sql<B>n";
> >        echo '<TABLE  align="center" border="1" bordercolor="green"
> cellpadding="
> > 2" cellspacing="0">';
> >        $ind=1;
> >        echo "<tr><td><b>Names</b></td><td><b>Types</b></td></tr>";
> >        while($ind<=$cols_count){
> >          echo "<tr>";
> >          echo "<td>" . $cols_name[$ind] . "</td>n";
> >          echo "<td>" . $cols_types[$ind] . "</td>n";
> >          echo "</tr>";
> >          $ind++;
> >        }
> >        odbc_free_result($result);
> >     }else{
> >        echo "Cannot execute query";
> >     }
> >   }else{
> >     echo "Cannot prepare query";
> >   }
> > }
> > ?>
> > </BODY></HTML>
> >
> > I compiled PHP standard, I simply run ./configure with openlink option ,
> run make and make install.
> > I can retrieve column name information and also data but I
> can't retrieve
> the column SQL Type. I asked Openlink and they said that is a PHP issue.
> >
> > I'm using Openlink Multi-tier Driver for accessing a MS SQL Server 7
> Database on a Windows NT box from PHP scripts running on the Apache Web
> Server on a Linux Box
> > OpenLink Version 4
> > PHP Version 4.0.4pl1
> > Linix SuSE 6.1 Kernel Version 2.2.7
> > Apache Version 1.3
> > PHP is running as a Loadable Apache Module
> >
> >
> >
> --------------------------------------------------------------------------
> -
> >
> >
> >
> > ATTENTION! Do NOT reply to this email!
> > To reply, use the web interface found at
> http://bugs.php.net/?id=10369&edit=2
> >
>
>
> --
> PHP Development 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 Development 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]

Reply via email to