Skip to Content.
Sympa Menu

freetds - RE: FreeTDS / PHP 3.0.16 Fails on Large Insert

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Franck Martin <Franck AT sopac.org>
  • To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
  • Subject: RE: FreeTDS / PHP 3.0.16 Fails on Large Insert
  • Date: Thu, 3 Aug 2000 15:56:59 +1200


I think that strings in PHP are limited to 256 characters. So beware...

Cheers.

Franck Martin
Database Development Officer
SOPAC South Pacific Applied Geoscience Commission
Fiji
E-mail: franck AT sopac.org <mailto:franck AT sopac.org>
Web site: http://www.sopac.org/ <http://www.sopac.org/>



-----Original Message-----
From: Jon McDonald [mailto:jonm AT entrigue.net]
Sent: Thursday, August 03, 2000 1:41 AM
To: TDS Development Group
Subject: [freetds] FreeTDS / PHP 3.0.16 Fails on Large Insert


On MSSQL 7.0 we have a nvarchar field set to 2048 bytes. The following PHP
code fails:

<?
//$query = "INSERT INTO bi..test (test)
VALUES('11111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111')";
$id = mssql_connect("sqlbox", "username", "password");
$result = mssql_query($query, $id);
mssql_close($id);
?>

The 1's are repeated 1024 times.

Any suggestions would be appreciated. Network sniffs show the data being
sent to the SQL Server from the PHP box. However, the data is never
inserted into SQL and no error message is returned...


Thanks in Advance!

---
You are currently subscribed to freetds as: franck AT sopac.org.fj
To unsubscribe, forward this message to
$subst('Email.Unsub')




Archive powered by MHonArc 2.6.24.

Top of Page