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: Thu, 10 Oct 2002 15:18:25 -0300


Well, I tried to hack. The problem is with SQLSetStmtOption. No errors shown
but no result list, I got an empty page.

SQLRETURN SQL_API SQLSetStmtOption(
SQLHSTMT hstmt,
SQLUSMALLINT fOption,
SQLUINTEGER vParam)
{
CHECK_HSTMT;

switch (fOption)
{
case SQL_ROWSET_SIZE:
/* Always 1 */
break;
case 6:
/* Hacking error */
break;
default:
tdsdump_log(TDS_DBG_INFO1, "odbc:SQLSetStmtOption: Statement option
%d
n
ot implemented\n", fOption);
odbc_LogError ("Statement option not implemented");
return SQL_ERROR;
}

return SQL_SUCCESS;
}


Em Qui 10 Out 2002 14:37, you wrote:
> Well its seems that no one has the time to correct this for you. I could
> do it in about an hour but I am busy doing other things. You may want to
> try implementing the options yourself or find some one who can. Look at
> the MySQL or PostgreSQL drivers for what to do for these options or hack
> the return so as not to fail.
>
> The function you are looking for is SQLGetInfo().
>
> Peter
>
> Helio Cavichiolo Jr wrote:
> >OK, but why it works perfectly as php-cgi (running from the shell)? This
> > error occurs just running as PHP module (everything was compiled the same
> > way for php as cgi and php as apache module).
> >Is there any trick on running as PHP module?
> >
> >Em Qui 10 Out 2002 10:39, you wrote:
> >>Hi Helio,
> >>
> >>>From: Helio Cavichiolo Jr [mailto:hcav AT ig.com.br]
> >>>Sent: October 10, 2002 7:47 AM
> >>>
> >>>I've turned on freeTDS debugging at got the following errors:
> >>>
> >>>odbc:SQLGetInfo: info option 8 not supported
> >>
> >> odbc.c line 2089. The supported options are:
> >>
> >> SQL_DRIVER_NAME
> >> SQL_DRIVER_ODBC_VER
> >> SQL_ACTIVE_STATEMENTS
> >> SQL_SCROLL_OPTIONS
> >> SQL_SCROLL_CONCURRENCY
> >>
> >>>odbc:SQLSetStmtOption: Statement option 6 not implemented
> >>
> >> odbc.c line 2286. The only option supported is SQL_ROWSET_SIZE.
> >>
> >>I don't have unixodbc installed; you'd need to check their .h file to
> >> find out what options 8 and 6 are.
> >>
> >>If your main objective is to use PHP, it looks to me like you'd be better
> >>off configuring PHP for use with db-lib or ct-lib. But perhaps some of
> >> the ODBC fans will have better (or at least other) advice for you.
> >>
> >>Regards,
>
> ---
> You are currently subscribed to freetds as: [hcav AT ig.com.br]
> To unsubscribe, forward this message to
> $subst('Email.Unsub')





Archive powered by MHonArc 2.6.24.

Top of Page