Here's what I have in spy.log Since testText is a text type, SQL server does not allow the use of DISTINCT. Any idea?
1129863764009|10|3|statement||SELECT DISTINCT A0.ConsulateId,A0.CountryCode,A0.AddressRoom,A0.AddressFloor,A0.AddressBuild ing,A0.addressStreetNumber,A0.addressStreet,A0.addressCity,A0.addressDistric t,A0.addressState,A0.addressArea,A0.addressCountry,A0.addressZip,A0.telephon e,A0.facsimilie,A0.telex,A0.website,A0.remarks,A0.officeHoursMonFri,A0.offic eHoursSat,A0.contactId,A0.requirementId,A0.testText FROM Consulates A0 -----Original Message----- From: Armin Waibel [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 19, 2005 2:17 AM To: OJB Users List Subject: Re: How to map ntext of SQL Server 2000? Hi, could you post more detailed info, like the generated sql-string (e.g. using p6spy), the used query for "Consultate" (or is the query internal generated by OJB) and the used OJB version? regards, Armin Christopher Cheng wrote: > Hi all, > > > > I have a problem to map "ntext column type" in SQL Server 2000 in OJB > > > > <field-descriptor > > name="remarks" > > column="remarks" > > jdbc-type="CLOB" > > /> > > > > I tried CLOB, BLOB and VARBINARY already and I have the following error: > > > > Caused by: org.apache.ojb.broker.PersistenceBrokerSQLException: SQLException > during the execution of the query (for > com.mycompany.model.reference.Consulate): The text, ntext, or image data > type cannot be selected as DISTINCT. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
