WO 4, NT 4, SP 4

Hi,

I have a problem when I update some info on a MSSQL database. Some columns
are in "text" type, so when I try to update, I have a message telling me
that I cannot use text or image datatypes in a where clause. This is because
EOF uses a where clause on the whole row, rather than only on the primary
key.

I digged into the documentation to find where I could change that behavior,
and found the documentation about the locking mechanism, but I am unsure
wether this will work with MSSQL, and solve my problem. And it doesn't
answer my problem, which is:
how do I update rows using the primary key to select them?

I also found the programming topic "Updating with the Adaptor Level" on
Apple website, but the example is in ObjectiveC and I was unable to find the
corresponding method in Java. And it looks like I loose all the advantages
of the EOEditingContext, and have to manage a lot of things myself (which I
don't want to do).

I have enclosed the error message (some is in French sorry).

==================================
Cyril Godefroy
Lab Production - CD and web development
105 rue La Fayette - 75010 Paris
Tel     (33) 1 55 07 28 28
Fax    (33) 1 55 07 80 92
===================================

EOGeneralAdaptorException: Exception occured while evaluating 'submit', on
target:<change_surname 0xaa1c00>:
SQLExecDirect in -[ODBCChannel evaluateExpression:(<ODBCSQLExpression:
"UPDATE  "PERSONNE"   SET  surname= ?  WHERE  (PERS_ID = ? AND Nom = ? AND
Prenom = ? AND Telephone = ? AND mail = ? AND poste = ? AND surname= ? AND
userLevel = ?)" withBindings:(1:bonhomme(surname), 2:26(PERS_ID),
3:Godefroy(nom), 4:Cyril(prenom), 5:01 42 29 51 34(telephone),
6:[EMAIL PROTECTED](mail), 7:301(poste), 8:maxou(surname),
9:5(userLevel))>)]
37000-306: [Microsoft][ODBC SQL Server Driver][SQL Server]Il n'est pas
permis d'utiliser les types de donn\U00e9e TEXT et IMAGE dans une clause
WHERE, sauf avec l'expression LIKE

Reply via email to