Skip to Content.
Sympa Menu

freetds - RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Helio Cavichiolo Jr <hcav AT terra.com.br>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP
  • Date: Sun, 13 Oct 2002 18:55:16 -0200


I'm still waiting that a God's soon can help me on this.
I've identified the problem, but don't know how to correct it.
I have PHP compiled as cgi and as Apache module. Both with same compiling
options (except for cgi option).
Using PHP as CGI I can run a script that connects to a SQLServer via unixODBC
+ freetds without problems, but when I try it with PHP as Apache module, it
crashes because during a select preparation, PHP calls a freetds function
called SQLSetStmtAttr with SQL_CURSOR_TYPE option, still not implemented.
It looks that just returning the supported one to PHP would be enough, but I
don't know how to do this.
I tried just placing this inside the case:

SQL_CURSOR_TYPE:
break;

But then, nothing is returned.

The freetds SQLSetStmtAttr is:

SQLRETURN SQL_API SQLSetStmtOption(
SQLHSTMT hstmt,
SQLUSMALLINT fOption,
SQLUINTEGER vParam)
{
CHECK_HSTMT;
switch (fOption)
{
case SQL_ROWSET_SIZE:
/* Always 1 */
break;
default:
tdsdump_log(TDS_DBG_INFO1, "odbc:SQLSetStmtOption: Statement option %d
not implemented\n", fOption);
odbc_LogError ("Statement option not implemented");
return SQL_ERROR;
}
return SQL_SUCCESS;
}





Archive powered by MHonArc 2.6.24.

Top of Page