From freetds Sun Oct 13 22:22:03 2002 From: Peter Harvey Date: Sun, 13 Oct 2002 22:22:03 +0000 To: freetds Subject: [freetds] RE: freetds-0.60 + unixODBC + sqlserver2000 + PHP X-MARC-Message: https://marc.info/?l=freetds&m=103454774224038 Turn on ODBC trace and send resulting output (from running under PHP as Apache module) to me and I will see what I can do. Peter BTW: It may be that cursor support *must* be implemented for this to work and I am not prepared to do that - at least not right now. Hopefully the solution is much simpler than that. :) Helio Cavichiolo Jr wrote: >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; >} > > >--- >You are currently subscribed to freetds as: [pharvey@codebydesign.com] >To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu > > > > --- You are currently subscribed to freetds as: [freetds@progressive-comp.com] To unsubscribe, forward this message to leave-freetds-113879Q@franklin.oit.unc.edu