Marcin Szkudlarek | 13 Jun 2005 09:09
Picon

oracle blob problem

Hi!

I've following problem with ADODB: when uploding blob to a view my php 
script hangs. When I use table instead of view it's ok. I'm using this 
code:

   if (!$db->Execute('INSERT INTO BLOB_TEST (BLOBID, BLOBDATA) VALUES 
('.$id.', EMPTY_BLOB())'))
     error('Insert failed', $db->ErrorMsg());

   if (!$db->UpdateBlobFile('BLOB_TEST', 'BLOBDATA', $path,'BLOBID='.$id, 
'BLOB'))
     error('UpdateBlobFile failed', $db->ErrorMsg());

Any suggestions appreciated but please don't suggest me to stop using 
view because I have to.

M.S.

-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
Chris Wiegand | 15 Jun 2005 02:15

Possible bug in FetchField for MSSQL driver?

I think I've found a bug related to function _adodb_getupdatesql, file
adodb-lib.inc.php, version 465, around line 492. I've added some echo
statements to the code below to help me figure this out:

    echo print_r($rs,true);
                // Loop through all of the fields in the recordset
                for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
                        // Get the field from the recordset
                        $field = $rs->FetchField($i);

                        // If the recordset field is one
                        // of the fields passed in then process.
                        $upperfname = strtoupper($field->name);
                        echo "<BR>upperfname = $upperfname";
                        if (adodb_key_exists($upperfname,$arrFields,$force))
{

 
I consistently am getting false/blank for $upperfname, and it's therefore the
function's not working. But a print_r($rs) gives plenty of fields, as shown
below. Actually, I'm starting to think the error is in the FetchField()
function for mssql, since it's what appears to be returning false/blank, but
I can't seem to find mssql_fetch_field in any of the files.

adorecordset_mssql Object ( [dataProvider] => native [fields] => Array (
[Payer] => 116 [PayerType] => 1 [RequiresValidReferral] => 1 [PayerAccountID]
=> 1161 [InitReferralsAutoApproved] => 1 [NOCReferralsAutoApproved] => 1
[Switch2AFSMonth] => 4 [Switch2PayerAccountID] => 0
[RequireReportsBeforeServices] => 1 [ReferralsEnabled] => 1
[CWRequireTrailsCaseID] => 0 [PayerAccountName] => Denver County
(Continue reading)

Chris Wiegand | 15 Jun 2005 19:14

RE: Possible bug in FetchField for MSSQL driver?

Never mind. I was calling in my part of the code an auditlog function (which
used a new connection), however, apparently the mssql driver doesn't use
NConnect (according to the documentation), so it was trying to re-use the
connection (which worked weirdly enough) but which also made the
$rs->_queryID useless. So cancel this report.

Chris Wiegand
Network Administrator / Programmer
Signal Behavioral Health Network
Ph: 303.639.9320 x1016 

-----Original Message-----
From: Chris Wiegand 
Sent: Tuesday, 14 June, 2005 6:15 PM
To: 'adodb-general <at> lists.sourceforge.net'
Subject: Possible bug in FetchField for MSSQL driver?

I think I've found a bug related to function _adodb_getupdatesql, file
adodb-lib.inc.php, version 465, around line 492. I've added some echo
statements to the code below to help me figure this out:

    echo print_r($rs,true);
                // Loop through all of the fields in the recordset
                for ($i=0, $max=$rs->FieldCount(); $i < $max; $i++) {
                        // Get the field from the recordset
                        $field = $rs->FetchField($i);

                        // If the recordset field is one
                        // of the fields passed in then process.
                        $upperfname = strtoupper($field->name);
(Continue reading)

operationsengineer1 | 17 Jun 2005 19:46
Picon
Favicon

ADOdb Connection Function

hi all,

i am trying to call a function for my db connection.

i have the following code.
-----

//variables defined up here ($db not defined up
//here)...

function adodb_conn() {
 $db = &ADONewConnection('postgres');
 $db->connect($db_string,$db_owner,$db_pw,$db_name);
}
					adodb_conn($db_string,$db_owner,$db_pw,$db_name);

-----

i think this doesn't work b/c i'm using adodb's
abstraction layer class and i think i have a variable
scope issue.

can anyone please guide me how to correctly send all
the information to the function to get this to work?

i would much prefer to call a function for my db
connection script rather than write the code over and
over.

tia...
(Continue reading)

OKAN ARI | 22 Jun 2005 13:05

execution time

I want to see the each queries execution time. I enabled the $db->debug=true option but it only shows the queries. Is it possible to show these each queries' execution time?
 
Thank you
 
Eric Brunson | 22 Jun 2005 16:18
Favicon

Re: execution time


Your question displays a lack of understanding of how queries, cursors
and fetches work.  Use the time functions of your programming language
to see the execution times, because there are more than a single time to
consider.

OKAN ARI wrote:

> I want to see the each queries execution time. I enabled the
> $db->debug=true option but it only shows the queries. Is it possible
> to show these each queries' execution time?
>  
> Thank you
>  

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Eric Brunson | 22 Jun 2005 19:49
Favicon

Re: execution time

OKAN ARI wrote:

>Sorry but I am using the microtime function to calculate the creation of the
>page time. So isn't it possible to calculate the execution time of each
>query?
>
>  
>
I would note the timestamp before and after I executed the query.

>On the other hand is it possible to monitor the performans. Because I have a
>site that has 3 to 7secs execution time. This is very very slow! How can I
>learn the guilty of thes condition?
>  
>
This is the art of optimizing queries, and the tools to examine the 
execution plan for a query vary by database vendor, so it's extremely 
dependent on your backend database.  This topic would be best suited for 
a forum on your specific database engine.

>Thank you
>
>----- Original Message ----- 
>From: "Eric Brunson" <brunson <at> brunson.com>
>To: "OKAN ARI" <okanari <at> aribem.com>
>Cc: <adodb-general <at> lists.sourceforge.net>
>Sent: Wednesday, June 22, 2005 5:18 PM
>Subject: Re: [ADodb-general] execution time
>
>
>  
>
>>Your question displays a lack of understanding of how queries, cursors
>>and fetches work.  Use the time functions of your programming language
>>to see the execution times, because there are more than a single time to
>>consider.
>>
>>OKAN ARI wrote:
>>
>>    
>>
>>>I want to see the each queries execution time. I enabled the
>>>$db->debug=true option but it only shows the queries. Is it possible
>>>to show these each queries' execution time?
>>>
>>>Thank you
>>>
>>>      
>>>
>>    
>>
>
>  
>

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Marcin Szkudlarek | 24 Jun 2005 11:48
Picon

ado execute method

Hi!

I'm using ado 4.62 with oracle 8.17. My question:
is there a way to execute select query without getting all the results?
I have a table with about 50k records and calling only the execute method 
takes about 1,8s. What I want to achieve is fetching the rows without 
having to get all the data at once.

Thanks.

Marcin Szkudlarek

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Marcin Szkudlarek | 24 Jun 2005 11:49
Picon

adodb execute method

Hi!

I'm using ado 4.62 with oracle 8.17. My question:
is there a way to execute select query without getting all the results?
I have a table with about 50k records and calling only the execute method
takes about 1,8s. What I want to achieve is fetching the rows without
having to get all the data at once.

Thanks.

Marcin Szkudlarek

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Emil Zegers | 24 Jun 2005 12:00
Picon

RE: adodb execute method

What do you exactly mean by 'fetching the rows'?

If you want to do a row count then your query could be something like
'SELECT COUNT(*) FROM TABLENAME'

If you want to get only a certain amount of rows you can do something
like 'SELECT TOP 100 * FROM TABLENAME'.

Also take a look at paging options.

If you do want to get the data in a recordset for manipulation you
really have to fetch it.

You can limit the data (and thus the query time) by selecting only the
columns needed.

Regards,

Emil

-----Original Message-----
From: adodb-general-admin <at> lists.sourceforge.net
[mailto:adodb-general-admin <at> lists.sourceforge.net] On Behalf Of Marcin
Szkudlarek
Sent: vrijdag 24 juni 2005 11:49
To: adodb-general <at> lists.sourceforge.net
Subject: [ADodb-general] adodb execute method

Hi!

I'm using ado 4.62 with oracle 8.17. My question:
is there a way to execute select query without getting all the results?
I have a table with about 50k records and calling only the execute
method takes about 1,8s. What I want to achieve is fetching the rows
without having to get all the data at once.

Thanks.

Marcin Szkudlarek

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
ADodb-general mailing list
ADodb-general <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/adodb-general

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click

Gmane