• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: VARCHAR > 3000 characters with JTurbo and SQL Server 7 (WO 5.2)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VARCHAR > 3000 characters with JTurbo and SQL Server 7 (WO 5.2)


  • Subject: Re: VARCHAR > 3000 characters with JTurbo and SQL Server 7 (WO 5.2)
  • From: Jonathan Rochkind <email@hidden>
  • Date: Thu, 06 Mar 2003 10:27:07 -0600

I use MS SQL Server and JTurbo, but I haven't run into that problem, and don't really understand it or have ideas for fixing it.

But one thing to be aware of: the "value type" column in EOModeler. Setting this column properly can often take care of such problems. Apple keeps changing where (or if!) they document the possible values for the 'value type' column. I can't seem to find it at the moment, but it's still in the Google cache at this (sorry, horribly long) URL:
http://216.239.51.100/search?sourceid=navclient&q=cache:http://developer.apple.com/techpubs/webobjects/UsingEOModeler/4WorkingWithAttributes/Value_Type.html.


But it looks like it would be worth trying both 'S' and 'C' for the value type of that attribute, with both a varchar and a text, and see if any of those combinations work.

Also, be aware that if you are using MS SQL Server 2000, there is a free Microsoft provided JDBC Driver, which is officially supported by Apple for use with WO/EOF as of WO 5.1. Since I use MS SQL Server 7, that's not an option for me. But if you use MS SQL Server 2000, it might work better (since it's officially supported by Apple) than JTurbo.

At 02:54 PM 3/6/2003 +0100, Sibastien Rottiers wrote:
Hi list,

If I try to modify a record which contains a column defined in VARCHAR of more than 3000 characters I obtain this exception:

com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.JDBCExpression: "UPDATE dbo.THEMES_ODJ SET commentaire = ? WHERE (id_themes_odj = ? AND id_odj_cr = ? AND theme = ? AND commentaire is NULL AND id_personne = ? AND duree = ? AND ligne = ?)" withBindings: 1:"12345678901234567890...12345678901234567890"(commentaire), 2:12(idThemesOdj), 3:14(idOdjCr), 4:"Point 2"(theme), 5:3337(idPersonne), 6:15(duree), 7:2(ligne)>:
Next exception:SQL State:42000 -- error code: 260 -- msg: Disallowed implicit conversion from data type ntext to data type varchar, table 'SNIP_SP_DEMO.dbo.THEMES_ODJ', column 'commentaire'. Use the CONVERT function to run this query.



and if i define this column in text in SQL Server and NSData in EOModeler i obtain this exception :


com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: <com.webobjects.jdbcadaptor.JDBCExpression: "SELECT t0.commentaire FROM dbo.THEMES_CR t0 WHERE (t0.id_themes_cr = ? AND t0.id_odj_cr = ? AND t0.theme = ? AND t0.id_action = ? AND t0.id_personne = ? AND t0.isFinished is NULL AND t0.ligne = ?) FOR UPDATE" withBindings: 1:10(idThemesCr), 2:14(idOdjCr), 3:"Point1"(theme), 4:74(idAction), 5:2431(idPersonne), 6:1(ligne)>:
Next exception:SQL State:01000 -- error code: 1003 -- msg: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.


Is there a solution to this problem ?

thanks

Sibastien
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >VARCHAR > 3000 characters with JTurbo and SQL Server 7 (WO 5.2) (From: Sébastien Rottiers <email@hidden>)

  • Prev by Date: Re: WOFileUpload ANOTHER bug
  • Next by Date: Re: WOFileUpload ANOTHER bug
  • Previous by thread: VARCHAR > 3000 characters with JTurbo and SQL Server 7 (WO 5.2)
  • Next by thread: Formatting table resultset
  • Index(es):
    • Date
    • Thread