You are here: Re: [PHP] PROGRESS SQL_CUR_USE_ODBC « PHP « IT news, forums, messages
Re: [PHP] PROGRESS SQL_CUR_USE_ODBC

Posted by "Richard Lynch" on 10/08/05 00:38

On Tue, October 4, 2005 11:47 am, cybermalandro cybermalandro wrote:
> I am connecting to a PROGRESS DB through the MERANT ODBC driver, When
> I have
> the 4th parameter SQL_CUR_USE_ODBC as shown, my queries return nothing
> but
> if I have the 4th parameter as lower case it returns my query results
> but
> with a PHP error complainning
> *Notice*: Use of undefined constant sql_cur_use_odbc - assumed
> 'sql_cur_use_odbc'
>
> Wtf? I don't get it, most of the documentation from people connecting
> to
> PROGRESS do have the 4th parameter uppercase can someone help me out ?

Well, you could put apostrophes or quotes around it and get rid of the
PHP Notice, and that would be syntactically correct for PHP.

What it would mean to MERANT ODBC, though, I dunno...

Though what you currently have, with lower-case, will be THE SAME to
MERANT ODBC as adding the quotes, because that's what PHP is doing for
you, and that's what the Notice is all about.

Translation:
PHP: You were supposed to put quotes on that sql_cur_use_odbc thing,
but you didn't, so I did it for you.


But this is probably NOT going to make things actually work as you
expect.

What happens next is that PHP has to convert your string
"sql_cur_use_odbc" into a number. And that number will be 0.

So then MERANT ODBC gets the integer 0 as that 4th argument.

Which is probably NOT the number you want to send it to actually turn
on this SQL CUR USE ODBC thingie, whatever that is.

SQL_CUR_USE_ODBC is almost for sure an integer.

You could see what it is by doing:

echo "SQL_CUR_USE_ODBC has the value: ", SQL_CUR_USE_ODBC, "<hr />\n";

in your code.

If it's not 0, then adding quotes to suppress the PHP Notice is only
masking a symptom, not fixing the real problem.

I guess we'd need to know what your queries are, and if I had some
clue what SQL_CUR_USE_ODBC was supposed to be doing, it would help...
Hopefully somebody else can chime in on this part.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация