• 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: Problems updating a row
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems updating a row


  • Subject: Re: Problems updating a row
  • From: "Alberto de Arriba" <email@hidden>
  • Date: Tue, 15 Jun 2004 10:56:24 +0200

Thanks for your help, but I eventually found out that the problem was not
because of the data field but because of another text field. The problem
came when handling text with non-ASCII characters. I solved it changing the
value type in EOModeler to 'S' instead of 'C'.



>> From: "Alberto de Arriba" <email@hidden>
>> To: <email@hidden>
>> Subject: Problems updating a row
>> Date: Fri, 11 Jun 2004 15:00:42 +0200
>>
>> Hi all, I've been reading you for some months and this is my first
>> post.
>>
>> I have a problem in a form with a WOFileUpload component. When the
>> form is submitted it throws the following exception:
>>
>> Error:  com.webobjects.eoaccess.EOGeneralAdaptorException:
>> updateValuesInRowDescribedByQualifier --
>> com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
>> database
>> Reason:  updateValuesInRowDescribedByQualifier --
>> com.webobjects.jdbcadaptor.JDBCChannel method failed to update row in
>> database
>>
>>
>> In the action method I have this code:
>>
>> if (uploadedData != null && uploadedData.length()>0)
>>       data.takeStoredValueForKey(uploadedData,"photograph");
>> session().defaultEditingContext().saveChanges();
>
> Hi Alberto, try this it might help (not tested - written in email
> window):
>
> if (uploadedData != null && uploadedData.length()>0) {
>    try {
>             if ((uploadedData.length()==0) &&
>                 (uploadedData.length()>0)){ //do nothing, keep old
>             uploaded data in iVar } else if
> ((uploadedData.length()==0) && (uploadedData.length()==0)){
>                 uploadedData = null;
>             } else {
>                     data.takeValueForKey(uploadedData,"photograph");
>             }
>         }
>         catch (NullPointerException npEx){ /*your message*/; }
>     }
> }
>
> Jonathan :^)
>
>>
>> uploadedData is an instance variable of type NSData used to hold the
>> file contents. If i comment out the first two lines it does perform
>> the saveChanges correctly, so I think it must have something to do
>> with NSData handling.
>>
>> Any suggestion?
>>
>>
>> Thanks in advance.
>> Alberto.
>> _______________________________________________
>> 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.
>>
>
> _________________________________________________________________
> It's fast, it's easy and it's free. Get MSN Messenger today!
> http://www.msn.co.uk/messenger
_______________________________________________
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: 
 >RE: Problems updating a row (From: "Jonathan Fleming" <email@hidden>)

  • Prev by Date: Re: Running Out of Memory
  • Next by Date: com.webobjects liberary
  • Previous by thread: RE: Problems updating a row
  • Next by thread: Binding in WObrowser
  • Index(es):
    • Date
    • Thread