From: tarbin jiang Date: February 3 2009 3:49am Subject: RE: what's the reason for problem "Tuple did not exist"? List-Archive: http://lists.mysql.com/ndb-connectors/665 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="_4f65bf04-5685-4c01-83b9-67244c5b9d20_" --_4f65bf04-5685-4c01-83b9-67244c5b9d20_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Frazer=2C thanks for your response. I did use BLOB type to handle TEXT type column. pop error code: String columnName =3D "column2"=3B//column2 type is "TEXT" String paraValue =3D ""=3B String tableName =3D "MyTable"=3B NdbTransaction trans =3D ndb.startTransaction()=3B NdbOperation op =3D trans.getInsertOperation(tableName)=3B ...... //get content from a xml file and set to paraValue ....... NdbBlob text=3B text =3D op.getBlobHandle(columnName)=3B = text.setValue(paraValue.getBytes())=3B .... =20 //set other column values ..... ret =3D trans.execute(ExecType.Commit=2C AbortOption.AbortOnError= =2Ctrue)=3B trans.close()=3B =20 no error code: String columnName =3D "column2"=3B//column2 type is "TEXT" String paraValue =3D ""=3B String tableName =3D "MyTable"=3B NdbTransaction trans =3D ndb.startTransaction()=3B NdbOperation op =3D trans.getInsertOperation(tableName)=3B ...... //set a normal string such as "abcdefg" to paraValue ....... NdbBlob text=3B text =3D op.getBlobHandle(columnName)=3B = text.setValue(paraValue.getBytes())=3B .... =20 //set other column values ..... ret =3D trans.execute(ExecType.Commit=2C AbortOption.AbortOnError= =2Ctrue)=3B trans.close()=3B =20 Thanks. tarbin > Date: Mon=2C 2 Feb 2009 11:18:24 +0000> From: Frazer.Clement@stripped> Sub= ject: Re: what's the reason for problem "Tuple did not exist"?> To: tarbin@= live.com> CC: ndb-connectors@stripped> > Hi Tarbin=2C> Can you expla= in a bit further what you are doing?> FYI : TEXT *is* a BLOB with a charact= er set. So you must use the BLOB > API to read/write TEXT columns. You *mus= t not* use the normal > setValue/getValue API for TEXT columns.> Perhaps yo= u could describe what does and does not work in terms of > schemas=2C your = code and the content and length of the data you are using.> Frazer> > tarbi= n jiang wrote:> > all=2C> > when I insert a record which including a TEXT t= ype column=2C it returns error: > > com.mysql.cluster.ndbj.NdbApiPermanentE= xception: Tuple did not exist.> > I found that if I set the TEXT type colum= n as a formal string=2C it works without error.> > but if I set the Text ty= pe column as a xml file=2C the error pops.> > The procedure of reading xml = file is no problem. And I used NDBBlob type to handle text type.> > > > ins= ertOperation.setValue(xmlFile.bytes())> > > > can anybody help me?> > thank= s from tarbin> > > > ______________________________________________________= ___________> > News=2C entertainment and everything you care about at Live.= com. Get it now!> > http://www.live.com/getstarted.aspx> >> > > > -- > Fraz= er Clement=2C Software Engineer=2C MySQL Cluster > Sun Microsystems - www.m= ysql.com> Office: Reading=2C UK> > Are you MySQL certified? www.mysql.com/c= ertification> > > -- > MySQL NDB Connectors Mailing List> For list archives= : http://lists.mysql.com/ndb-connectors> To unsubscribe: http://lists.mysql= .com/ndb-connectors?unsub=3Dtarbin@stripped>=20 _________________________________________________________________ Drag n=92 drop=97Get easy photo sharing with Windows Live=99 Photos. http://www.microsoft.com/windows/windowslive/photos.aspx= --_4f65bf04-5685-4c01-83b9-67244c5b9d20_--