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 17:57:44 -0300


This is what I was trying to do: say 'no' to PHP when it calls SQLSetStmtAttr
with option SQL_CURSOR_TYPE (6). That is the function I listed bellow, but
now, what to put in 'return' to represents 'no' to PHP? I don't think it's
the word 'no'.

Em Qui 10 Out 2002 17:08, you wrote:
> Here are the values you seem to be looking for. But I bet PHP is trying
> to find out if cursors are supported - find that call and tell PHP 'no'.
> You may avoid further calls re. cursor. Pretty much anything having to
> do with a cursor is not supported by tds driver (last I checked).
>
> #define SQL_QUERY_TIMEOUT 0
> #define SQL_MAX_ROWS 1
> #define SQL_NOSCAN 2
> #define SQL_MAX_LENGTH 3
> #define SQL_ASYNC_ENABLE 4
> #define SQL_BIND_TYPE 5
> #define SQL_CURSOR_TYPE 6
> #define SQL_CONCURRENCY 7
> #define SQL_KEYSET_SIZE 8
> #define SQL_ROWSET_SIZE 9
> #define SQL_SIMULATE_CURSOR 10
> #define SQL_RETRIEVE_DATA 11
> #define SQL_USE_BOOKMARKS 12
> #define SQL_GET_BOOKMARK 13
> #define SQL_ROW_NUMBER 14
>
> Peter
>
> Helio Cavichiolo Jr wrote:
> >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')
> >
> >---
> >You are currently subscribed to freetds as: [pharvey AT codebydesign.com]
> >To unsubscribe, forward this message to
> > $subst('Email.Unsub')
>
> ---
> 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