php-windows Digest 22 Jul 2002 08:01:32 -0000 Issue 1251

Topics (messages 14864 through 14866):

Re: Oracle or OCI8
        14864 by: Lung
        14865 by: Thies C. Arntzen

mssql functions not working properly
        14866 by: David Elliott

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

  I have already used Stored Procedure. When I use ORA_*, it just needs 1
sec. But it takes 10 sec. for OCI_*. Any suggestions?
  Thanks!

Lung

"Philippe Saladin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >   I have tried both, it seems Oracle (i.e Ora_?) is much faster but OCI8
> is
> > more powerful. So, how can I tune OCI8 in order to have faster response.
>
> ora_* functions are for Oracle 7 only.
> oci_$ functions are for Oracle 7, Oracle 8 (and I suppose for Oracle 9).
> So, for future compatibility, oci_* are IMHO the best choice.
> What kind of faster response do you expect ? from a select, an update ?
have
> you tried stocked procedures ?
> Regards,
> Philippe
>
>


--- End Message ---
--- Begin Message ---
On Sun, Jul 21, 2002 at 11:04:03PM +0800, Lung wrote:
> Hi,
> 
>   I have already used Stored Procedure. When I use ORA_*, it just needs 1
> sec. But it takes 10 sec. for OCI_*. Any suggestions?
>   Thanks!

    can you send me the shortest possible php-code (ora_ and oci_
    calls) that shoes this?

    re,
    tc
> 
--- End Message ---
--- Begin Message ---
Greetings All,

I posted this on Friday but now I have cut it down to make it readable and
stand alone

W2K server
MS SQL 2000
PHP 4.2.1 (in CGI mode)

I have a valid bit of SQL, but PHP does not correctly run it

below is bit of code

==========8<=============================================================
<?
  define("Server","xxxxxxxxx");
  define("User","xxxxxx");
  define("PWord","xxxxxx");

mssql_connect(Server,User,PWord);

    $ExcQry = "
begin transaction
set nocount on
declare
  @PerID int

insert into
Item (ItemTypeid,Name,LastUpdated,LegacyId)
Values(42,'CCompanyName',Current_timestamp,'".date ("mdGis")."')

set @PerId = @@identity

insert into
person
(ItemId,CompanyName,FirstName,LastName)
Values
(@PerId,'PCompanyName','PFirstName','PLastName')

set nocount off

commit

select @PerId itemid

";
    $Result = mssql_query($ExcQry);

    list($ItemId)=mssql_fetch_row($Result);

echo $ItenId;

==========8<=============================================================

The code does get passes and run as there are results in the database, but I
get no result set back. I have also run it in the query analyser, it runs. I
have also watched it in the profiler and seen it work.

-- 
 BBFN,                     _______________________________________________
  David                   |    David  Elliott    |   Software Engineer    |
 _________________________|  [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
| Don't be a baby. I know what I'm doing. --Wednesday.                    |

--- End Message ---

Reply via email to