So my problem is:

$r=odbc_exec($x,"select 'a' as a_leter from some_table");

generate FATAL: emalloc(): Unable to allocate 2147483599 bytes
'a' - is string leteral some_table is any table in my access db.
I use MS win2000 sp1,MS SQL Server2000, php 4.0.1-php4.0.4
(the problem is not depend on PHP version, in my old php3 it's the same)
before installation SQL Server2000 every thing. I can't find any
service packs for MS SQL Server 2000.
In over programs using ODBC this select works fine

Best Regards Denis Eltsov


<[EMAIL PROTECTED]> wrote in message
H0000073000559d1.0985280230.askr.easysoft.com@MHS">news:H0000073000559d1.0985280230.askr.easysoft.com@MHS...
Nope, your syntax is wrong!

"foo" is used to indicate a case-sensitive schema object name (user,
table, field) etc:

e.g.

SELECT "MyTable"."MyField"
FROM "MyTable"

"MyTable" and "mytable" are treated as two separate entities.


'foo' is used to represent a string literal:

SELECT "MyTable"."MyField"
FROM "MyTable"
WHERE "MyTable"."MyField" LIKE 'bar%'

Anyway, back to your original problem.

Have you installed/re-installed the latest NT service pack after you
installed SQL Server
and installed the latest SQL Server 2000 service pack?

Bet ya didn't ;-)

  _____

~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
http://www.easysoft.com <http://www.easysoft.com>  -
http://www.cinema.com <http://www.cinema.com>
"A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila."

  _____





-----Original Message-----
From: eltsov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 4:32 PM
To: php-db
Cc: eltsov
Subject: FW: Re: [PHP-DB] FATAL: emalloc(): Unable to allocate
2147483599 bytes


No this not solves the problem

Unfortunatly it's not the sintax problem.
because Everything was fine until I setup
SQL Server 2000

Best Regards Denis Eltsov

""Michael Rudel"" <[EMAIL PROTECTED]> wrote in message
000301c0b2b0$08ae9020$[EMAIL PROTECTED]">news:000301c0b2b0$08ae9020$[EMAIL PROTECTED]...
> Hi Denis,
>
> try this one:
>
> $r=odbc_exec($x,"select 'a' as a_leter from some_table");
>
> or
>
> $r=odbc_exec($x,"select \"a\" as a_leter from some_table");
>
> which you prefer, but you have to escape the "" within a ""-String !!
>
> Hope this solves your problem.
>
> Greetinx,
>   Mike
>
> Michael Rudel
> - Web-Development, Systemadministration -
> _______________________________________________________________
>
> Suchtreffer AG
> Bleicherstraße 20
> D-78467 Konstanz
> Germany
> fon: +49-(0)7531-89207-17
> fax: +49-(0)7531-89207-13
> e-mail: mailto:[EMAIL PROTECTED]
> internet: http://www.suchtreffer.de
> _______________________________________________________________
>
>
>
> > -----Original Message-----
> > From: Denis Eltsov [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 22, 2001 8:00 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-DB] FATAL: emalloc(): Unable to allocate
> > 2147483599 bytes
> >
> >
> > I use IIS5 - php4 (as CGI) - odbc connection to Access 2000
> >
> > Everything was fine until I install MS SQL 2000 to the same machine.
> >
> > After this I receive such a message
> >
> >
> >
> > FATAL:  emalloc():  Unable to allocate 2147483599 bytes
> >
> >
> >
> > every time I try to execute such a program
> >
> > <?
> >
> > $x=odbc_connect("oh","","");
> >
> > $r=odbc_exec($x,"select "a" as a_leter from some_table");
> >
> > ?>
> >
> > or
> >
> > <?
> >
> > $x=odbc_connect("oh","","");
> >
> > $r=odbc_exec($x,"select format("dd.mm.yyyy",date_field) from
> > some_table");
> >
> > ?>
> >
> >
> >
> > Best regards Denis Eltsov
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





----------------------------------------------------------------------------
----


> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to