473,545 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP crashed when I try use bind function in PDO on Oracle

Hello,
I have some problem with bind method in PDO on Oracle with clob | long
column type.

I have table named TEST_TABLE where I have two columns: ID (int 10, 0)
and TEXT (varchar 4000 or long or clob).

When I try execute PHP code (based on example in manual):

<?php
$sql = 'SELECT id, text FROM test_table';
try
{
$stmt = $this->m_pdoConnectio n->prepare($sql );
$stmt->execute();

/* Bind by column number */
$stmt->bindColumn(1 , $id);
$stmt->bindColumn(2 , $text);

while ($row = $stmt->fetch(PDO::FET CH_BOUND))
{
$data = $id . "\t" . $text . "\t";
print $data;
}
}
catch (PDOException $e)
{
print $e->getMessage() ;
}
?>

When column TEXT type is varchar(4000) all works ok, but I can write
text only to 4000 chars.

When column type is long I have: "Warning: PDOStatement::f etch()
[function.fetch]: column 1 data was too large for buffer and was
truncated to fit it in ...skrypt.php.. . on line ...xxx...", and text in
$text is cut to 1000 chars, and...

When column type is clob PHP is crashed.

I have PHP 4.1.2 and Oracle 10g.

Please check this if You can.
Thanks

--
Dawid Szalega

Jul 7 '06 #1
3 3436
On 7 Jul 2006 00:48:00 -0700, "DavidPL" <da***********@ gmail.comwrote:
>I have some problem with bind method in PDO on Oracle with clob | long
column type.

I have PHP 4.1.2 and Oracle 10g.
What version of PHP do you really have?

--
Andy Hassall :: an**@andyh.co.u k :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jul 7 '06 #2
I have PHP 4.1.2 and Oracle 10g.
>
What version of PHP do you really have?
Upss... Sorry...
I have PHP 5.1.2 of coruse and Oracle 10.2g

--
Dawid Szalega

Jul 10 '06 #3
On Mon, 10 Jul 2006 00:16:42 -0700, DavidPL wrote:
Upss... Sorry...
I have PHP 5.1.2 of coruse and Oracle 10.2g
5.1.4 fixed many problems with PDO_OCI, but it still doesn't have get
metadata, which means that you cannot describe a cursor. In my opinion
PDO_OCI will be usable with PHP 5.2.x

--
http://www.mgogala.com

Jul 16 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
31355
by: Jack | last post by:
Hi All, What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g. select x from y where z=:parameter Which in asp/jsp would be followed by some statements to bind a value to :parameter I dont like the idea of making the SQL statement on the fly without binding parameters as I dont want a highly polluted SQL cache.
3
6084
by: Ryan | last post by:
Using prepared statements like Oracle does? This way in a high transaction system you do not have to recompile queries every time?
0
1094
by: john m | last post by:
Hello, Has anyone else experienced this? I had a single user Oracle installation on another computer. And i wanted to use a cool dot net example program that allows you to open any crystal report and point it to the database. So i installed dot net on the machine and afterwords oracle will not
0
1246
by: Dextor | last post by:
I was hoping someone else could confirm this to be a bug in the new 1.1 framework when binding to a combo box. Here is the low down: When using the Oracle DataAdapter to return a query and fill a datatable, all the column headers are capitalized when they are returned. If I only capitalize the first letter of the Column Name when binding a...
3
10411
by: RDS | last post by:
Does anyone know how to do the following vb6 code using bind variables for oracle dbs, in .net? dim cmdMyCommand as ADODB.COMMAND Set cmdMyCommand = New ADODB.COMMAND With cmdMyCommand .ActiveConnection = objConn .CommandText = "Select COL1 from TABLENAME Where COL2 = ?" .Parameters.Append .CreateParameter( "", _ adVarChar,...
1
2531
by: femski | last post by:
Folks ! How do you pass an argument to "date" or for that mater any function in JDBC for DB2 ? I am migrating an application from Oracle to DB2 (type IV driver) and I can't seem to be able to call "date" function with an argument. In oracle I could use "insert into mytable (as_of_date) values ( to_date(?, 'YYYY-MM-DD'))") with...
0
1463
by: Shawn Mason | last post by:
We added bind variables to our Oracle calls and once this began getting activity the .net runtime would have an error (as indicated by the event viewer logs). This of course resetst the session and brings all the users back to the login screen. If we remove the bind variables part then the problem goes away. Anyone else have this issue or...
1
1662
by: mtanquary | last post by:
I have a script that runs in my DEV and PROD environment, but for some reason on my TEST server, I am getting the following error: The script's function is to read from an XML file and load the data to an Oracle table. I believe this error is actually caused by the environment, not sure what yet, but I have checked the DBI and DBD version...
2
5268
by: Dave | last post by:
ilee@bigpond.net.au (Ivan) wrote in message news:<90137e1b.0403301523.55aed707@posting.google.com>... Ivan - I little more specific to the java syntax. Right now you are probably using an implementation of the Statement interface...for instance, Connection c = new Connection(.... Statement st = c.createStatement(); ResultSet rs =...
0
7457
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7746
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5962
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5320
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4941
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3443
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1869
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
693
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.